Well, I must confess I could not get Fancy Box to work on my test system. I tried both the WordPress plugin (v1.0.7) and the native version (v2.1.4) and neither one would run without JavaScript errors.
However, if you can get it to work then here is an approach I think you can use. You can define a custom markup template (call it “fancybox”), copy the default template parts into it and then change the “Item:” part to something like:
<[+itemtag+] class='gallery-item'>
<[+icontag+] class='gallery-icon'>
<a title="[+title+]" class="fancybox" href="[+link_url+]"><img width="[+thumbnail_width+]" height="[+thumbnail_height+]" class="attachment-thumbnail" alt="[+title+]" src="[+thumbnail_url+]" /></a>
</[+icontag+]>
<[+captiontag+] class='wp-caption-text gallery-caption'>
[+caption+]
</[+captiontag+]>
</[+itemtag+]>
The only change is to replace the default template line that has [+link+]
with a line that breaks the value down into all its component parts:
<a title="[+title+]" class="fancybox" href="[+link_url+]"><img width="[+thumbnail_width+]" height="[+thumbnail_height+]" class="attachment-thumbnail" alt="[+title+]" src="[+thumbnail_url+]" /></a>
I’ve added the class="fancybox"
attribute to the link, which should be all that’s required to activate the fancy box when you click on a gallery item. Once the template is defined, you can code an [mla_gallery]
shortcode in your post/page along these lines:
[mla_gallery ids="293,264,265,351" link=file mla_markup=fancybox]
Replace the ids="293,264,265,351"
parameter with whatever you need to select the images you want in your gallery. You might also find some helpful tips in this recent support topic:
single image short code
I hope that gives you enough information to get started, and that Fancy Box works for you. If you have problems or further questions, let me know.