Changeset 1138
- Timestamp:
- 06/01/08 08:10:33 (6 months ago)
- Files:
-
- bb-lightbox2/trunk/bb-lightbox2.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
bb-lightbox2/trunk/bb-lightbox2.php
r1137 r1138 4 4 Plugin URI: http://bbpress.ru/ 5 5 Description: Used to overlay images on the current page. Lightbox JS v2.2 by <a href="http://www.huddletogether.com/projects/lightbox2/" title="Lightbox JS v2.2 ">Lokesh Dhakar</a>. This plugin is based on "Lightbox 2" plugin for WordPress. 6 Version: 0. 156 Version: 0.2 7 7 Author: A1ex 8 8 Author URI: http://bbpress.ru … … 26 26 27 27 function bb_preg_callback2($matches) { 28 return '<a href="'.$matches[2].'" rel="lightbox ">'.'<img src="'.ImgTumb($matches[2],$matches[4]).'" /></a>';28 return '<a href="'.$matches[2].'" rel="lightbox'.get_post_id().'">'.'<img src="'.ImgTumb($matches[2],$matches[4]).'" /></a>'; 29 29 } 30 30 31 31 function bb_removeLinks($content) { 32 32 33 $content = preg_replace_callback('@(<img.* src="(([^>"]*/)(.*[^"]))"[^<]*>)(?!<\/a>)@i', "bb_preg_callback2", $content);34 $content = preg_replace_callback('@(<img.* src=\'(([^>\']*/)(.*[^\']))\'[^<]*>)(?!<\/a>)@i', "bb_preg_callback2", $content);33 $content = preg_replace_callback('@(<img.*?src="(([^>"]*/)(.*?[^"]))"[^<]*?>)(?!<\/a>)@i', "bb_preg_callback2", $content); 34 $content = preg_replace_callback('@(<img.*?src=\'(([^>\']*/)(.*?[^\']))\'[^<]*?>)(?!<\/a>)@i', "bb_preg_callback2", $content); 35 35 36 36 return $content;
