Dj Smuggla
03-02-2014, 03:25 PM
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:
<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:
return '<img src="' . $link . '" border="0" alt="" />';
This is the link to the developers site, where i downloaded it from:
http://www.jacklmoore.com/colorbox/
Could someone please help me with this :)
--------------- Added 1393854383 at 1393854383 ---------------
I got a response from the developer on twitter, he said this:
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:
return '<img src="' . $link . '" border="0" alt="" />';
Anyone? :)
I've downloaded a jQuery lightbox called Colorbox, uploaded it to the root. Then put this in my headerinclude template:
<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:
return '<img src="' . $link . '" border="0" alt="" />';
This is the link to the developers site, where i downloaded it from:
http://www.jacklmoore.com/colorbox/
Could someone please help me with this :)
--------------- Added 1393854383 at 1393854383 ---------------
I got a response from the developer on twitter, he said this:
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:
return '<img src="' . $link . '" border="0" alt="" />';
Anyone? :)