web design, England, Britain, UK, belgium
 

Separate links for Briask ImageSlideShow module images Part 2 - Joomla & VirtueMart Tips & How To's

How to link any Joomla ImageSlideShow module images to any url. The Joomla ImageSlideShow module from briask.com is an excellent and simple image gallery which shows any images from a designated folder.

Home Joomla VirtueMart Tips Separate links for Briask ImageSlideShow module images Part 2

Mon

14

Dec

Separate links for Briask ImageSlideShow module images Part 2
  • Joomla 1.5

The ImageSlideShow module from briask.com is an excellent and simple image gallery which shows any images from a designated folder and have one link from the images. Clients (and I see on Briask's own forum) have asked whether it would be possible to have individual links to individual images.
This hack allows you to link any image to any url.

Separate links for ImageSlideShow module First rename your images with a sequence of numbers like so -
  • image1.jpg
  • image2.jpg
  • image3.jpg
etc...

Upload them to your image folder for the ImageSlideShow module.

Open up the file modules/mod_briaskISS/mod_briaskISS.xml in your editor and go to line 55 and add these lines underneath. Add as many new input boxes as you need for your links. -->
 
<param name="URL1" type="text" size="100" default = "http://www.joomla.org" label="URL1"  description = "URL1 to link to when Slideshow image is clicked."/>
 
<param name="URL2" type="text" size="100" default = "http://www.joomla.org" label="URL2"  description = "URL2 to link to when Slideshow image is clicked."/>
 
<param name="URL3" type="text" size="100" default = "http://www.joomla.org" label="URL3"  description = "URL3 to link to when Slideshow image is clicked."/>
 
<param name="URL4" type="text" size="100" default = "http://www.joomla.org" label="URL4"  description = "URL4 to link to when Slideshow image is clicked."/>
 

Separate links for each ImageSlideShow module image The ImageSlideShow module backend will look like this now.



Now open up the file modules/mod_briaskISS/mod_briaskUtility.php in your editor and go to line 221 and add these lines underneath. These just fetch the new url parameters. -->
 
$picURL1 = $params->get('URL1', 0);
  $picURL2 = $params->get('URL2', 0);
  $picURL3 = $params->get('URL3', 0);
  $picURL4 = $params->get('URL4', 0);
 

Then down to line approx. 347
 
echo '<li><a href="'.$picURL.'"><img src="'.$picDir.'/'.$file.'" alt="'.$picTitle.'" /></a></li>';
 

Comment this out and add the following ->
 
//echo '<li><a href="'.$picURL.'"><img src="'.$picDir.'/'.$file.'" alt="'.$picTitle.'" /></a></li>';
      $number = preg_replace("/[^0-9]/", '', $file); // ditch anything that is not a number
 
      switch ($number) {
      case 1:
       $picURLx = $picURL1;
        break;
 
        case 2:
       $picURLx = $picURL2;
        break;
 
        case 3:
       $picURLx = $picURL3;
        break;
 
        case 4:
       $picURLx = $picURL4;
        break;
        }
 
 
 
 
       echo '<li><a href="'.$picURLx.'"><img src="'.$picDir.'/'.$file.'" alt="'.$picTitle.'" /></a></li>';
 
and again for the Case 2 (open in new window)
 
echo '<li><a href="'.$picURL.'" target="_blank"><img src="'.$picDir.'/'.$file.'" alt="'.$picTitle.'" /></a></li>';
 
Change to..
 
//echo '<li><a href="'.$picURL.'" target="_blank"><img src="'.$picDir.'/'.$file.'" alt="'.$picTitle.'" /></a></li>';
      $number = preg_replace("/[^0-9]/", '', $file); // ditch anything that is not a number
 
      switch ($number) {
      case 1:
       $picURLx = $picURL1;
        break;
 
        case 2:
       $picURLx = $picURL2;
        break;
 
        case 3:
       $picURLx = $picURL3;
        break;
 
        case 4:
       $picURLx = $picURL4;
        break;
        }
 
 
 
 
       echo '<li><a href="'.$picURLx.'" target="_blank"><img src="'.$picDir.'/'.$file.'" alt="'.$picTitle.'" /></a></li>';
 



Now the individual images will link to the required links.
Last Updated on Saturday, 26 December 2009 00:35
 
VirtueMart
Your Cart is currently empty.

Latest Joomla & VirtueMart Tips

See all tips & examples



Separate links for Briask ImageSlideShow module images Part 2|Joomla & VirtueMart Tips & How To's



How to link any Joomla ImageSlideShow module images to any url. The Joomla ImageSlideShow module from briask.com is an excellent and simple image gallery which shows any images from a designated folder.


picurl, case, picurlx, break, image, echo, url, number, images, file, params, add, mod, line, jpg, open, briaskiss, links, link, individual, module, imageslideshow, switch, editor, lines, replace, modules, preg, briask, ditch, underneath, folder, like, rename, allows, sequence, following, comment, hack, excellent

|

We use cookies to improve our website and your experience when using it. Cookies used for the essential operation of the site have already been set.
To find out more about the cookies we use and how to delete them, see our privacy policy.

I accept cookies from this site.