• Howdy! Welcome to our community of more than 130.000 members devoted to web hosting. This is a great place to get special offers from web hosts and post your own requests or ads. To start posting sign up here. Cheers! /Peo, FreeWebSpace.net
managed wordpress hosting

Adding prev/next 'arrows' to an excisting script?

MaGiCSuN

New Member
Hi there !

I'm having some issues. I found this great script for a simple image gallery for Joomla, it's VSig. It works like the client wanted.

However, like most clients, they change minds easily. Now he wants next/prev arrows (i'm sure textlinks we'll do fine aswell!) to scroll through the photo's.

Is there any way to insert that into the code to make it work? Or do I really need a complete other script? Wich means I have to rebuilt 20+ galleries ...

If anyone can help, that would be great.

The script i'm using: http://www.bretteleben.de/lang-en/joomla/very-simple-image-gallery.html

And i'm using it as a plugin within Joomla!

Thanks !

- Mir
 
Does the URL have a unique id (for each picture) in it? such as pic.php?id=23 or /pictures/23/
 
Check the Joomla website for some kind of Codex, check their forums too. Perhaps also the designers of the theme you are using too. You see, WordPress for example has functions already created to do this kind of thing. I'm sure Joomla would have with it being a CMS.

http://codex.wordpress.org/Template_tags - Overall tags, but these are the ones I'm talking about.

http://codex.wordpress.org/Template_Tags/next_post_link - next_post_link(); would be all you have to enter in the template files where you want the links for the next post to be.
http://codex.wordpress.org/Template_Tags/previous_post_link - And likewise for the backwards.

Joomla must have something similar.
 
I'm not too sure about joomla specifically but if you can put in your own php this should do the job.

PHP:
<?php

$curr_id = explode("/", $_SERVER['REQUEST_URI']);
$curr_id = explode("?", $curr_id[(count($curr_id)-1)]);

$prev = "<a href=\"".($curr_id[0]-1)."\">Previous</a>";
$next = "<a href=\"".($curr_id[0]+1)."\">Next</a>";

echo $prev; // previous link
echo $next; // next link
?>
 
Back
Top