Been playing with Colorbox more and found this little peace of js
The code needs to be placed after the get content output function.
The get content output function is in your theme = <?php $page->GetContent(); ?>
After playing with it for a while I don't recommend using it on the front page of your site if you have lots of images there. It seems to take a while to fully load everything when you have many images and you definitely don't want the front page loading slowly.
I made a tutorial for this, see this gpEasy tutorial
What do I insert here : "/foler/File_Name.js" ?
Sorry, made a little mistake there. . . corrected.
You can see the full tutorial now - auto add name rel to img in gpEasy
Also note that the gpEasy 1.7 will only need name="gallery" to open in colorbox
rel="gallery_gallery" will link them as a gallery
That's the proper way for it to work. Colorbox is not magically picking up the full sized image. If you look at a gallery in gpEasy you will see the <a href=""> linking the main image and the <img > is linking the thumbnail.
You can do the same thing with single images; however, once you link the image with an <a href=""> the script won't work--it's designed not to work on images that are already linked as that would be very problematic.
So, if you want to use your thumbnail and link the main image you are back to adding the href, name, and rel manually.
Adding colorbox like this has its own set of problems. Now all the images included in a page are linked to themselves even if I have used them at full resolution. Is there any way to remove this? Ideally there should be a code that adds the colorbox coding only to those images which are linked to something.
Find out more about our Provider Spotlight