Im trying to add lightbox to my forum for all images posted with [IMG] tags, but im having problems making it work...
I've downloaded a jQuery lightbox called Colorbox, uploaded it to the root. Then put this in my headerinclude template:
Code:
<link rel="stylesheet" href="colorbox.css" />
<script src="jquery.min.js"></script>
<script src="jquery.colorbox-min.js"></script>
But then im not shore what i need to edit into this part of the class_bbcode.php:
Code:
return '<img src="' . $link . '" border="0" alt="" />';
This is the link to the developers site, where i downloaded it from:
Code:
http://www.jacklmoore.com/colorbox/
Could someone please help me with this
--------------- Added [DATE]1393854383[/DATE] at [TIME]1393854383[/TIME] ---------------
I got a response from the developer on twitter, he said this:
Code:
You could do something like this $('img').colorbox({href: function(){ return this.src; }, title: function(){ return this.alt; });
But that looks a totally different format from the default vb code:
Code:
return '<img src="' . $link . '" border="0" alt="" />';
Anyone?