Changeset 1138

Show
Ignore:
Timestamp:
06/01/08 08:10:33 (6 months ago)
Author:
A1ex
Message:

--

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • bb-lightbox2/trunk/bb-lightbox2.php

    r1137 r1138  
    44Plugin URI: http://bbpress.ru/ 
    55Description: 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.15 
     6Version: 0.2 
    77Author: A1ex 
    88Author URI: http://bbpress.ru 
     
    2626 
    2727function 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>'; 
    2929} 
    3030 
    3131function bb_removeLinks($content) { 
    3232 
    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); 
    3535         
    3636  return $content;