Hi all,
I modify the default theme using jquery lightbox to display images.
This is working as I want!
However, I probably achieved this by the wrong way.
I had to write links in theme/vews/album.html.php so that every image in the album has a link and not only the thumbnail displayed.
I'm not sure if I am clear: if I want to browse the whole gallery, I had to write empty links for evvery image which is not displayed as a thumbnail:
<a href="<?=$child->file_url()?>" rel="lightbox[1]" class="lightboxlink"></a>
To achieve this, I had to know the offset of the page and to know all children. What I did is modifying the modules/gallery/controllers/albums.php to insert this
$template->set_global("children_all", $album->viewable()->children());
$template->set_global("children_offset", $offset);
Would there be a way to it without modifying gallery core????
To view (if I am such not clear...): http://gallery.3nids.ch/index.php/2008/2008_05_16_YKAK/1._Whitehorse_-_Haines?page=6
Thanks a lot!
Denis
Posts: 808
I wrote a module that did this without changing anything. It's been a while since I've touched it though. So let me make sure it still works and I'll upload it somewhere. I was waiting until there was some official place to put these, but last time I checked there wasn't.
Posts: 358
@lvthunder: Fork gallery3-contrib on github.com and add it under the modules directory. bharat or i will then move it to the main trunk.
http://www.timalmdal.com
Posts: 808
Denis,
I have a couple issues with my module at the moment. The first is I was using some direct paths that won't because everyone's setup is different. The other issue is there is something breaking it when you are logged in. I have asked the questions I need in the Troubleshooting forum, but in the mean time you can take a look at how it works http://g3.lvthunder.com/gallery3
Posts: 236
Hi,
Thanks for your answer.
At the moment I have no problem to run a jquery lightbox theme as you can see on the link upper.
The main thing, is how to link every children in page (all the pictures of the album or of the tag, and not the only 9 displayed).
I had to modify the core to do that, and I'm not proud of it!
Thanks again!
Posts: 808
There is probably a way to do that change in a module much like I did for G2. You would probably have to get on IRC when some of the core developers are on and ask about it. I find it easier to get help writing something that way.