PDA

View Full Version : Applying GeoS' Show Category addon to the ame235-skin


PPersson
12-04-2006, 06:23 PM
Hi,
I'm trying to implement GeoS’ Show Category addon to my photoblog (http://www.seffel.net/par), based on the ame235skin. Could someone please help me rewriting some parts?

I first implemented the code GeoS posted on the forum. The specifik parts that deals with the navigation is:

<div id="image-navigation">
<SC_IMAGE_PREVIOUS_LINK_TXT>
<SC_IMAGE_NEXT_LINK_TXT>
</div>

With this way of navigating through the pictures, everything works fine. But when I try to convert this into my existing code in the template called 235skin I can't get the navigation to work. This is the corresponding code to the part above:

<div id="content">
<div id="image">
<img src="./images/<IMAGE_NAME>" id="imgmaine" width="<IMAGE_WIDTH>" height="<IMAGE_HEIGHT>" />
<div id="menu_browse" style="width: <IMAGE_WIDTH>px; height:<IMAGE_HEIGHT>px;">
<script type="text/javascript">
var existprev = "<IMAGE_PREVIOUS_ID>";
var existnext = "<IMAGE_NEXT_ID>";
if (existprev != "<IMAGE_ID>")
{
document.write('<a href="#" id="menu_browse_prev" onclick="document.location=\'index.php?showimage=< IMAGE_PREVIOUS_ID>\';"></a>');
}
if (existnext != "<IMAGE_ID>")
{
document.write('<a href="#" id="menu_browse_next" onclick="document.location=\'index.php?showimage=<IMAGE_NEXT_ID>\';"></a>');
}
</script>
</div>

NB! The code above isn't the original code in the 235skin. It is modified, by the author himself (that is ame235), to get rid of the useless arrow facing right in the last photo as well as the arrow facing left in your firstly posted photo.

I guess the tricky part is:
onclick="document.location=\'index.php?showimage=<IMAGE_NEXT_ID>

I know I'm supposed to replace this string with the <SC_IMAGE_NEXT_LINK_TXT> tag GeoS introduced but I can't get it to work.

If someone has time, please take a look at the code above.

Thanks for your help!
/Pär

GeoS
12-04-2006, 09:26 PM
For ID of next and prev I suggest to use:
<SC_IMAGE_NEXT_ID>
<SC_IMAGE_PREVIOUS_ID>