Jquery Lightbox theme

joemonster
joemonster's picture

Joined: 2006-04-12
Posts: 236
Posted: Mon, 2009-08-17 08:06

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

 
lvthunder

Joined: 2003-09-12
Posts: 808
Posted: Mon, 2009-08-17 18:30

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.

 
talmdal

Joined: 2006-12-06
Posts: 358
Posted: Tue, 2009-08-18 12:21

@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

 
lvthunder

Joined: 2003-09-12
Posts: 808
Posted: Tue, 2009-08-18 20:23

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

 
joemonster
joemonster's picture

Joined: 2006-04-12
Posts: 236
Posted: Wed, 2009-08-19 12:29

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!

 
lvthunder

Joined: 2003-09-12
Posts: 808
Posted: Wed, 2009-08-19 14:29

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.