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

Phoca Gallery - image gallery extension
phidias81
Phoca Enthusiast
Phoca Enthusiast
Posts: 70
Joined: 05 Jan 2012, 01:20
Contact:

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

Post 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!
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 49149
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

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

Post 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
If you find Phoca extensions useful, please support the project
phidias81
Phoca Enthusiast
Phoca Enthusiast
Posts: 70
Joined: 05 Jan 2012, 01:20
Contact:

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

Post by phidias81 »

What code should I add to apply the thumb ID? Unfortunetely I'm not a programmer :(
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 49149
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

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

Post by Jan »

Hi, unfortunatelly, I didn't do such customization so cannot give any exact advice for this. :-(

Jan
If you find Phoca extensions useful, please support the project
Post Reply