Integrate ThickBox into {ImageGallery} tag (and other mods)
Posted: Sun Nov 18, 2007 2:33 am
This modification replaces function.ImageGallery.php found in ./plugins. It requires that you place the requisite ThickBox scripts and CSS in your template or in the page metadata where the new ThickBox parameter is to be used. See the ThickBox site for those files and instructions.
Something like:
When you put styles into a page's metadata, I suggest putting {stylesheet} BEFORE {metadata} in your template to ensure the added styles are not overridden by the template styles.
How to use:
Works just like the {ImageGallery} tag does now; but there's a new parameter, ThickBox, to enable ThickBox links on either 'thumbs' (the thumbnail pages) or the 'bigpic' (the generated single-pic page).. and do not specify a 'type' (i.e. click vs popup). Simply add ThickBox='thumbs' or ThickBox='bigpic' to the {ImageGallery} tag. If ThickBox is omitted, the tag will function as if it were unmodified.
Make a backup of your original function.ImageGallery.php and put somewhere outside the ./plugins directory; rename the .txt file attached to this post to a .php file and upload to ./plugins
This is released as WFM and YMMV ("works for me" and "your mileage may vary"). Base was the ImageGallery plugin as found in the CMSMS 1.2 core.
Something like:
Code: Select all
<__script__ type="text/javascript" src="uploads/thickbox/jquery-latest.js"></__script>
<__script__ type="text/javascript" src="uploads/thickbox/thickbox.js"></__script>
<link rel="stylesheet" href="uploads/thickbox/thickbox.css" type="text/css" media="screen" />
How to use:
Works just like the {ImageGallery} tag does now; but there's a new parameter, ThickBox, to enable ThickBox links on either 'thumbs' (the thumbnail pages) or the 'bigpic' (the generated single-pic page).. and do not specify a 'type' (i.e. click vs popup). Simply add ThickBox='thumbs' or ThickBox='bigpic' to the {ImageGallery} tag. If ThickBox is omitted, the tag will function as if it were unmodified.
Make a backup of your original function.ImageGallery.php and put somewhere outside the ./plugins directory; rename the .txt file attached to this post to a .php file and upload to ./plugins
This is released as WFM and YMMV ("works for me" and "your mileage may vary"). Base was the ImageGallery plugin as found in the CMSMS 1.2 core.