In function prepare_bbcode_template($bbcode_tpl):
After:
Code: Select all
$bbcode_tpl['img'] = str_replace('{URL}', '\\1', $bbcode_tpl['img'])
Code: Select all
$bbcode_tpl['xligthbox'] = str_replace('{URL}', '\\1', $bbcode_tpl['xligthbox']);
In function bbencode_second_pass($text, $uid):
After:
Code: Select all
$replacements[] = $bbcode_tpl['img'];
Code: Select all
$patterns[] = "#\[xligthbox:$uid\]([^?](?:[^\[]+|\[(?!url))*?)\[/xligthbox:$uid\]#si";
$replacements[] = $bbcode_tpl['xligthbox'];
After:
Code: Select all
$text = preg_replace("#\[img\]((http|ftp|https|ftps)://)([^ \?&=\#\"\n\r\t<]*?(\.(jpg|jpeg|gif|png)))\[/img\]#sie", "'[img:$uid]\\1' . str_replace(' ', '%20', '\\3') . '[/img:$uid]'", $text);
Code: Select all
preg_replace("#\[xligthbox\]((http|ftp|https|ftps)://)([^ \?&=\#\"\n\r\t<]*?(\.(jpg|jpeg|gif|png)))\[/xligthbox\]#sie", "'[xligthbox:$uid]\\1' . str_replace(' ', '%20', '\\3') . '[/xligthbox:$uid]'", $text);
Code: Select all
<!-- BEGIN xligthbox --><a rel="lightbox" href="{URL}"><img src="{URL}" style="border: 0;" onLoad="if(this.width > 550) {this.width = 550;}" onmouseout="unpointercursor();" onmouseover="if(this.width == 550) {pointercursor();}" /></a><!-- END xligthbox -->
Any idea?
Thanks a lot