This is my first mod, be gentle.
Under the current setup to get to next/previous image you have to click on the link at the upper right/left corner or wherever your template puts it. I am proposing using an imagemap on the image itself to do the same thing. It allows the user to flip through the pictures faster, because they don't have to move the mouse
Files to modify:
/includes/functions.php/templates/<Your template>/details.html/templates/<Your template>/jpg.htmlLets get started.
Step 1.Backup everything!
Step 2.Open
functions.phpFind
$site_template->register_vars(array(
"media_src" => $media_src,
"media_icon" => $media_icon,
"image_name" => $image_name,
Insert after
"third_width" => $width/3,
"third_height" => $height/3,
"two_thirds_width" => 2*$width/3,
"two_thirds_height" => 2*$height/3,
"category_index_url" => $site_sess->url(ROOT_PATH."categories.php?".URL_CAT_ID."=".$cat_id),
If everything is correct, the code immediately after should look like this
"width_height" => $width_height,
"width" => $width,
"height" => $height,
"iptc_info" => $iptc_info
));
If it isn't, don't worry about it too much, but do let me know what it looks like so that I can change the instructions accordingly.
Step 3.Open
details.html and insert immediately after
{header}
the following snippet:
<!-- Allow navigation by clicking on the image -->
<div><map name="ee_multiarea" id="ee_multiarea">
<area
shape="rect" coords="0,0,{third_width},{height}"
{if prev_image_url}
alt="Previous photo" title="Previous photo"
href="{prev_image_url}"
{endif prev_image_url}
/>
<area
shape="rect" coords="{two_thirds_width},0,{width},{height}"
{if next_image_url}
alt="Next photo" title="Next photo"
href="{next_image_url}" style="cursor: e-resize;"
{endif next_image_url}
/>
<area
shape="rect" coords="{third_width},0,{two_thirds_width},{height}"
{if category_index_url}
alt="Thumbnail page" title="Thumbnail page"
href="{category_index_url}"
{endif category_index_url}
/>
</map></div>
Step Last.Open
jpg.html and change it from
<!-- Template file for JPG Files -->
<img src="{media_src}" border="1" alt="{image_name}"{width_height} ><br />
into this
<!-- Template file for JPG Files -->
<img src="{media_src}" border="1" alt="{image_name}"{width_height} usemap="#ee_multiarea" /><br />
If your file is different, just insert
usemap="#ee_multiarea"
before the closing if the <IMG ... > tag.
This creates an imagemap on the pictures. Clicking on the left third will take you to the previous picture, the middle third takes you to the category page with the thumbs, and the right third takes you to the next picture.
If you are in the mood for experimenting, you can also use {third_height} and {two_thirds_height} to define some really sophisticated maps, but I prefer to keep it simple.