Forums / General Questions / Adding a HotSpot to an Image in PHP?

Adding a HotSpot to an Image in PHP?

Locked

Views: 1,542

Results 1 to 1 of 1
This thread is locked. New replies are disabled.
5 Aug 2009, 10:58 AM
#1
limelites avatar

limelites

Totally Zenned

Join Date:
Jan 2009
Posts:
2,085
Plugin Contributions:
0

Adding a HotSpot to an Image in PHP?

I have the following image on my site as a shopping cart:

if ($_SESSION['cart']->count_contents() == 0) {
    // display empty cart image
    $totalsDisplay = '<a href="' . zen_href_link(FILENAME_SHOPPING_CART) . '"><span class="headerbasketempty">'. zen_image(DIR_WS_TEMPLATE_IMAGES . 'cart_empty2.png', 'Image of Shopping Basket') .'</span></a>';
 } else {
    // make all content a link... Float image to the right and CSS style..

   $totalsDisplay = '<a href="' . zen_href_link(FILENAME_SHOPPING_CART) . '"><span class="headerbasket" style="float:right;">'. zen_image(DIR_WS_TEMPLATE_IMAGES . 'shopping_basket.png', 'Image of Shopping Basket') .'</span>'. $totalDisplay .'</a>';

Is it possible to add a hotspot to a specific area of this image by adapting the code above? The html would be:

<img src="http://www.limelites.co.uk/images/cart_empty2.png" border="0" usemap="#Map" /> <map name="Map" id="Map"><area shape="rect" coords="1,3,172,169" href="http://www.limelites.co.uk/index.php?main_page=shopping_cart" />

Struggling to add the hotspot in PHP... Any help greatly appreciated.