Been having a great conversation with myself here, thought I’d tell you (me) what I ended up doing to fix the problem.
So, step 1 was to write a function call in the colorbox snippet so that colorbox is looking for a specific class when you make your MG link:
$(".maxicolor").colorbox({transition:"fade"}); with the "maxicolor" being the class you’re defining for the MG link
Now, I wanted to use the single thumbnail + full gallery on click thing from the MG wiki, so I took the template chunks from there:
mgGalPicTpl:
<li>
<a href="[(base_url)][+maxigallery.path_to_gal+][+maxigallery.picture.filename+]"
rel="lightbox[set[+maxigallery.picture.gal_id+]]"
title="[+maxigallery.picture.title:htmlent+]
[+maxigallery.picture.descr:htmlent+]">
<img src="[(base_url)][+maxigallery.path_to_gal+]tn_[+maxigallery.picture.filename+]"
class="thumbnail" title="[+maxigallery.picture.title:htmlent+]
[+maxigallery.strings.click_to_zoom+]"
alt="[+maxigallery.picture.title:htmlent+]
[+maxigallery.strings.click_to_zoom+]" />
</a>
</li>
HOWEVER, I changed the link part of it to look like this:
<a class="maxicolor" href="[(base_url)][+maxigallery.path_to_gal+][+maxigallery.picture.filename+]" rel="gallery" with the rest of the code being the same
I then changed mgGalPicTplHidden:
<li>
<a style="display:none;"
href="[(base_url)][+maxigallery.path_to_gal+][+maxigallery.picture.filename+]"
rel="lightbox[set[+maxigallery.picture.gal_id+]]"
title="[+maxigallery.picture.title:htmlent+] -
[+maxigallery.picture.descr:htmlent+]"> </a>
</li>
adding class="maxicolor" and changing the rel="lightbox[set[+maxigallery.picture.gal_id+]]" to rel="gallery"
To actually call MG, I use the calls in the wiki, but slightly modified:
[!MaxiGallery? &order_by=`pos` &limit=`1` &galleryPictureTpl=`mgGalPicTpl`!]
[!MaxiGallery? &order_by=`pos` &limit=`99999` &galleryPictureTpl=`mgGalPicTplHidden` &manageOuterTpl=`@CODE:` &manageButtonTpl=`@CODE:`!]
And that’s it! I also noticed that it
seems unnecessary to set the style="display:none;" on the hidden template, as that template just makes a link with a blank in it, which isn’t visible anyway. But whatever float yer boat, I guess.
I realize that this is pretty simple stuff, but it took me a while to get it to behave properly, so I thought ’hey, maybe somebody else is having as much trouble with this as me’ and here it is
One thing of note, which I haven’t quite nailed down yet: As it stands right now, when you click on the thumbnail and open the gallery, it displays the first picture twice. I’m not quite sure what the deal is there, maybe somebody else can provide some insight? Add &offset=`1` to the second MG call and this problem evaporates