MyBB Hacks

Full Version: Open pictures with Fancybox
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello I wanted to ask if there is a possibility to open images in the Xthreads plugins modal with the  Fancybox Plugin from mybb?

Among other things I use the Restaurant Review plugin.

greetings
lenox
It seems the plugin uses this:
https://fancyapps.com/fancybox/3/

If so, you can add this to the img tags:

Code:
data-fancybox


Example for the Restaurant Review, edit your Display Format of File for restaurant Photo/resrev_photo into:

Code:
<if THIS_SCRIPT == 'forumdisplay.php' then><a href="{$threadurl}"><img src="{URL}/thumb120x90" alt="{FILENAME}" /></a><else><a href="{URL}" data-fancybox><img src="{URL}/thumb200x150" alt="{FILENAME}" /></a></if>


Reference:
https://fancyapps.com/fancybox/3/docs/

Thanks that works without problems.
Reference URL's