Page 1 of 1

How to post a link to the viewer instead of to the image?

Posted: 06 Jan 2013, 23:36
by phidias81
Hello, I already found the solution through highslide forum, but I need help to apply it.
The original discussion is here
http://highslide.com/forum/viewtopic.ph ... 117#p90117

To have a specific URL for each single image, first, apply id's to all the thumbnails:
from this

Code: Select all

    <a class="highslide" title="" href="/images/phocagallery/World/Asia/India/Udaipur_Rajasthan/thumbs/phoca_thumb_l_Udaipur_Rajasthan_India_2010_4742.JPG" onclick="return hs.expand(this, { slideshowGroup: 'groupC0',  wrapperClassName: 'dark', dimmingOpacity: 0.7,  align : 'center',  transitions : ['expand', 'crossfade'], fadeInOut: true });" ><img src="/images/phocagallery/World/Asia/India/Udaipur_Rajasthan/thumbs/phoca_thumb_m_Udaipur_Rajasthan_India_2010_4742.JPG" alt="" class="pg-image" /></a>
to this

<a id="thumb01" class="highslide" title="" href="/images/phocagallery/World/Asia/India/Udaipur_Rajasthan/thumbs/phoca_thumb_l_Udaipur_Rajasthan_India_2010_4742.JPG" onclick="return hs.expand(this, { slideshowGroup: 'groupC0', wrapperClassName: 'dark', dimmingOpacity: 0.7, align : 'center', transitions : ['expand', 'crossfade'], fadeInOut: true });" ><img src="/images/phocagallery/World/Asia/India/Udaipur_Rajasthan/thumbs/phoca_thumb_m_Udaipur_Rajasthan_India_2010_4742.JPG" alt="" class="pg-image" /></a>
Now you need to add the autoload function to the page. Place the following in the <head> section of the page, somewhere after highslide-full.js is loaded. You could insert it just before the Google Analytics code section:

Code: Select all

  <script type="text/javascript">
    hs.addEventListener(window, "load", function() {
       var autoload = /[?&]autoload=([^&#]*)/.exec(window.location.href);
       if (autoload) document.getElementById(autoload[1]).onclick();
    });
    </script>


Now, in theory at least, you should be able to go to the page and automatically expand, say, the third thumbnail by using a URL like:

Code: Select all


    http://www.nomadtravellers.com/photo-albums/category/111-udaipur-rajasthan?layout=default%20-%20Copia&autoload=thumb03
1) How to add to each thumb this parameter id="thumb01"? Which file should I edit and what code to add?
2) The second part I guess it should be possible using the phoca site plugin

Thanks for the help!

Re: How to post a link to the viewer instead of to the image

Posted: 15 Jan 2013, 01:07
by Jan
Hi, it should be added in:

components/com_phocagallery/views/category/view.html.php
components/com_phocagallery/views/category/tmpl/default_images.php

Jan

Re: How to post a link to the viewer instead of to the image

Posted: 18 Jan 2013, 16:42
by phidias81
What code should I add to apply the thumb ID? Unfortunetely I'm not a programmer :(

Re: How to post a link to the viewer instead of to the image

Posted: 27 Jan 2013, 19:22
by Jan
Hi, unfortunatelly, I didn't do such customization so cannot give any exact advice for this. :-(

Jan