Changeset 46123

Show
Ignore:
Timestamp:
05/16/08 05:50:03 (2 months ago)
Author:
stimuli
Message:

--

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • lightbox-2/tags/2.6.0/lightbox2.php

    r26899 r46123  
    33Plugin Name: Lightbox 2 
    44Plugin URI: http://www.stimuli.ca/lightbox/ 
    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>. 
    6 Version: 2.5.0 
     5Description: 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>. Mad props to Krembo99 for the auto-lightbox code! 
     6Version: 2.6.0 
    77Author: Rupert Morris 
    88Author URI: http://www.stimuli.ca/ 
     
    4646} 
    4747 
     48/* Added a code to automatically insert rel="lightbox[nameofpost]" to every image with no manual work. */ 
     49 
     50function krembo99_replace ($content) 
     51{    
     52      global $post; 
     53      $pattern = "/<a(.*?)href=('|\")([A-Za-z0-9\/_\.\~\:-]*?)(\.bmp|\.gif|\.jpg|\.jpeg|\.png)('|\")([^\>]*?)>/i"; /*this was inside the tag K99---- (\.bmp|\.gif|\.jpg|\.jpeg|\.png|\.swf)-----*/ 
     54      $replacement = '<a$1href=$2$3$4$5 rel="lightbox[%LIGHTID%]"$6>';  /*Krembo99- this was inside the tag KREMBO99--- rel="gallery[%LIGHTID%]"$6----*/ 
     55      $content = preg_replace($pattern, $replacement, $content); 
     56      $content = str_replace("%LIGHTID%", $post->ID, $content); 
     57       
     58      return $content; 
     59} 
     60add_filter('the_content', 'krembo99_replace'); 
     61 
    4862/* we want to add the above xhtml to the header of our pages: */ 
    4963add_action('wp_head', 'lightbox_styles'); 
  • lightbox-2/tags/2.6.0/options.php

    r26899 r46123  
    2020        <th scope="row"><?php _e('Lightbox Appearance:') ?></th>  
    2121        <td> 
    22 <? 
     22 
     23<?php 
    2324/* Check if there are themes: */ 
    2425$lightbox_2_theme_path =  get_option('lightbox_2_theme_path'); 
  • lightbox-2/tags/2.6.0/readme.txt

    r26901 r46123  
    33Tags: AJAX, image, lightbox, photo, picture 
    44Requires at least: 1.5 
    5 Tested up to: 2.3.1 
    6 Stable tag: 2.5.0 
     5Tested up to: 2.5 
     6Stable tag: 2.6.0 
    77 
    88== Description == 
  • lightbox-2/trunk/lightbox2.php

    r26899 r46123  
    33Plugin Name: Lightbox 2 
    44Plugin URI: http://www.stimuli.ca/lightbox/ 
    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>. 
    6 Version: 2.5.0 
     5Description: 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>. Mad props to Krembo99 for the auto-lightbox code! 
     6Version: 2.6.0 
    77Author: Rupert Morris 
    88Author URI: http://www.stimuli.ca/ 
     
    4646} 
    4747 
     48/* Added a code to automatically insert rel="lightbox[nameofpost]" to every image with no manual work. */ 
     49 
     50function krembo99_replace ($content) 
     51{    
     52      global $post; 
     53      $pattern = "/<a(.*?)href=('|\")([A-Za-z0-9\/_\.\~\:-]*?)(\.bmp|\.gif|\.jpg|\.jpeg|\.png)('|\")([^\>]*?)>/i"; /*this was inside the tag K99---- (\.bmp|\.gif|\.jpg|\.jpeg|\.png|\.swf)-----*/ 
     54      $replacement = '<a$1href=$2$3$4$5 rel="lightbox[%LIGHTID%]"$6>';  /*Krembo99- this was inside the tag KREMBO99--- rel="gallery[%LIGHTID%]"$6----*/ 
     55      $content = preg_replace($pattern, $replacement, $content); 
     56      $content = str_replace("%LIGHTID%", $post->ID, $content); 
     57       
     58      return $content; 
     59} 
     60add_filter('the_content', 'krembo99_replace'); 
     61 
    4862/* we want to add the above xhtml to the header of our pages: */ 
    4963add_action('wp_head', 'lightbox_styles'); 
  • lightbox-2/trunk/options.php

    r26899 r46123  
    2020        <th scope="row"><?php _e('Lightbox Appearance:') ?></th>  
    2121        <td> 
    22 <? 
     22 
     23<?php 
    2324/* Check if there are themes: */ 
    2425$lightbox_2_theme_path =  get_option('lightbox_2_theme_path'); 
  • lightbox-2/trunk/readme.txt

    r26901 r46123  
    33Tags: AJAX, image, lightbox, photo, picture 
    44Requires at least: 1.5 
    5 Tested up to: 2.3.1 
    6 Stable tag: 2.5.0 
     5Tested up to: 2.5 
     6Stable tag: 2.6.0 
    77 
    88== Description ==