WordPress.org

Plugin Directory

Changeset 529508


Ignore:
Timestamp:
04/10/12 15:25:36 (2 years ago)
Author:
sivel
Message:

Fix issue with 3.0.3.10 where the FLV player could not be found due to a URL change, and make sure we get rid of the missing file nag if the source files were manually downloaded. Bump to 3.0.3.10.1 and tag for release.

Location:
shadowbox-js
Files:
8 edited
1 copied

Legend:

Unmodified
Added
Removed
  • shadowbox-js/tags/3.0.3.10.1/inc/admin.php

    r496740 r529508  
    418418        } 
    419419        //$this->build_shadowbox ( true ); // Attempt to build and cache shadowbox.js 
    420         if ( ! $this->check_for_src_file () ) 
    421             update_option ( 'shadowbox-js-missing-src', true ); 
     420        $this->check_for_src_file (); 
    422421    } 
    423422 
     
    493492            $status = false; 
    494493 
    495         if ( $status === false ) 
     494        $option = get_option( 'shadowbox-js-missing-src' ); 
     495 
     496        if ( $status === false && ! $option ) 
    496497            update_option ( 'shadowbox-js-missing-src', true ); 
     498        else if ( $status === true && $option ) 
     499            update_option ( 'shadowbox-js-missing-src', false ); 
    497500 
    498501        return $status; 
     
    601604 
    602605        $uploads = wp_upload_dir (); 
    603         if ( empty( $uploads['error'] ) && ! empty( $uploads['basedir'] ) ) 
     606        if ( empty( $uploads['error'] ) && ! empty( $uploads['basedir'] ) ) { 
     607            $baseurl = $uploads['baseurl']; 
    604608            $basedir = $uploads['basedir']; 
    605         else 
     609        } else { 
     610            $baseurl = WP_CONTENT_URL . '/uploads'; 
    606611            $basedir = WP_CONTENT_DIR . '/uploads'; 
     612        } 
    607613 
    608614        $shadowbox_dir = "$basedir/shadowbox-js/"; 
    609615        $shadowbox_src_dir = "{$shadowbox_dir}src"; 
     616        $shadowbox_src_url = "{$baseurl}/shadowbox-js/src"; 
    610617 
    611618        // Ouput correct content-type, and caching headers 
     
    623630                // Replace S.path with the correct path, so we don't have to rely on autodetection which is broken with this method 
    624631                if ( $include == 'core' ) 
    625                     $output .= str_replace ( 'S.path=null;' , "S.path='$plugin_url/shadowbox/';" , file_get_contents ( "$shadowbox_src_dir/$include.js" ) ); 
     632                    $output .= str_replace ( 'S.path=null;' , "S.path='{$shadowbox_src_url}/';" , file_get_contents ( "$shadowbox_src_dir/$include.js" ) ); 
    626633                else 
    627                     $output .= file_get_contents ( "$shadowbox_src_dir/$include.js" ); 
     634                    $output .= file_get_contents ( "{$shadowbox_src_dir}/{$include}.js" ); 
    628635            } 
    629636 
    630637            $library = $this->get_option ( 'library' ); 
    631             $output .= file_get_contents ( "$shadowbox_src_dir/adapters/$library.js" ); 
     638            $output .= file_get_contents ( "{$shadowbox_src_dir}/adapters/{$library}.js" ); 
    632639 
    633640            foreach ( array ( 'load' , 'plugins' , 'cache' ) as $include ) 
    634                 $output .= file_get_contents ( "$shadowbox_src_dir/$include.js" ); 
     641                $output .= file_get_contents ( "{$shadowbox_src_dir}/{$include}.js" ); 
    635642 
    636643            if ( $this->get_option ( 'useSizzle' ) == 'true' && $this->get_option ( 'library' ) != 'jquery' ) 
    637                 $output .= file_get_contents ( "$shadowbox_src_dir/find.js" ); 
     644                $output .= file_get_contents ( "{$shadowbox_src_dir}/find.js" ); 
    638645 
    639646            $players = (array) $this->get_option ( 'players' ); 
    640647            if ( in_array ( 'flv' , $players ) || in_array ( 'swf' , $players ) ) 
    641                 $output .= file_get_contents ( "$shadowbox_src_dir/flash.js" ); 
     648                $output .= file_get_contents ( "{$shadowbox_src_dir}/flash.js" ); 
    642649 
    643650            $language = $this->get_option ( 'language' ); 
    644             $output .= file_get_contents ( "$shadowbox_src_dir/languages/$language.js" ); 
     651            $output .= file_get_contents ( "{$shadowbox_src_dir}/languages/{$language}.js" ); 
    645652 
    646653            foreach ( $players as $player ) 
    647                 $output .= file_get_contents ( "$shadowbox_src_dir/players/$player.js" ); 
     654                $output .= file_get_contents ( "{$shadowbox_src_dir}/players/{$player}.js" ); 
    648655 
    649656            foreach ( array ( 'skin' , 'outro' ) as $include ) 
    650                 $output .= file_get_contents ( "$shadowbox_src_dir/$include.js" ); 
     657                $output .= file_get_contents ( "{$shadowbox_src_dir}/{$include}.js" ); 
    651658 
    652659            wp_cache_set ( $this->md5 () , 'shadowbox-js' ); 
  • shadowbox-js/tags/3.0.3.10.1/readme.txt

    r518933 r529508  
    44Tags: shadowbox-js, shadowbox, js, javascript, overlay, images, movies, audio, youtube, formatting, links, post, posts, lightbox, thickbox, lightview 
    55Requires at least: 3.3 
    6 Tested up to: 3.3 
    7 Stable tag: 3.0.3.10 
     6Tested up to: 3.4 
     7Stable tag: 3.0.3.10.1 
    88 
    99Shadowbox is an online media vieiwing application similar to Lightbox and Thickbox but with more functionality. Supports all types of media. 
     
    156156== Upgrade Notice == 
    157157 
     158= 3.0.3.10.1 = 
     159 
     160Fix issue with 3.0.3.10 where the FLV player could not be found due to a URL change, and make sure we get rid of the missing file nag if the source files were manually downloaded. 
     161 
    158162= 3.0.3.10 = 
    159163 
     
    189193 
    190194== Changelog == 
     195 
     196= 3.0.3.10.1 (2012-04-10): = 
     197* Update S.path in shadowbox to the new URL of where the source files are located 
     198* Clear the missing files nag if the files were downloaded manually 
    191199 
    192200= 3.0.3.10 (2012-03-13): = 
  • shadowbox-js/tags/3.0.3.10.1/shadowbox-js.php

    r518933 r529508  
    88 * 
    99 * @author Matt Martz <matt@sivel.net> 
    10  * @version 3.0.3.10 
     10 * @version 3.0.3.10.1 
    1111 * @package shadowbox-js 
    1212 */ 
     
    1616Plugin URI:   http://sivel.net/wordpress/shadowbox-js/ 
    1717Description:  A javascript media viewer similar to Lightbox and Thickbox. Supports all types of media, not just images. 
    18 Version:      3.0.3.10 
     18Version:      3.0.3.10.1 
    1919Author:       Matt Martz 
    2020Author URI:   http://sivel.net/ 
  • shadowbox-js/tags/3.0.3.10.1/shadowbox-title-push.php

    r518933 r529508  
    1414Plugin URI:   http://sivel.net/wordpress/shadowbox-js/ 
    1515Description:  Push the title attribute from the img tag to the anchor tag 
    16 Version:      3.0.3.10 
     16Version:      3.0.3.10.1 
    1717Author:       Matt Martz 
    1818Author URI:   http://sivel.net/ 
  • shadowbox-js/trunk/inc/admin.php

    r496740 r529508  
    418418        } 
    419419        //$this->build_shadowbox ( true ); // Attempt to build and cache shadowbox.js 
    420         if ( ! $this->check_for_src_file () ) 
    421             update_option ( 'shadowbox-js-missing-src', true ); 
     420        $this->check_for_src_file (); 
    422421    } 
    423422 
     
    493492            $status = false; 
    494493 
    495         if ( $status === false ) 
     494        $option = get_option( 'shadowbox-js-missing-src' ); 
     495 
     496        if ( $status === false && ! $option ) 
    496497            update_option ( 'shadowbox-js-missing-src', true ); 
     498        else if ( $status === true && $option ) 
     499            update_option ( 'shadowbox-js-missing-src', false ); 
    497500 
    498501        return $status; 
     
    601604 
    602605        $uploads = wp_upload_dir (); 
    603         if ( empty( $uploads['error'] ) && ! empty( $uploads['basedir'] ) ) 
     606        if ( empty( $uploads['error'] ) && ! empty( $uploads['basedir'] ) ) { 
     607            $baseurl = $uploads['baseurl']; 
    604608            $basedir = $uploads['basedir']; 
    605         else 
     609        } else { 
     610            $baseurl = WP_CONTENT_URL . '/uploads'; 
    606611            $basedir = WP_CONTENT_DIR . '/uploads'; 
     612        } 
    607613 
    608614        $shadowbox_dir = "$basedir/shadowbox-js/"; 
    609615        $shadowbox_src_dir = "{$shadowbox_dir}src"; 
     616        $shadowbox_src_url = "{$baseurl}/shadowbox-js/src"; 
    610617 
    611618        // Ouput correct content-type, and caching headers 
     
    623630                // Replace S.path with the correct path, so we don't have to rely on autodetection which is broken with this method 
    624631                if ( $include == 'core' ) 
    625                     $output .= str_replace ( 'S.path=null;' , "S.path='$plugin_url/shadowbox/';" , file_get_contents ( "$shadowbox_src_dir/$include.js" ) ); 
     632                    $output .= str_replace ( 'S.path=null;' , "S.path='{$shadowbox_src_url}/';" , file_get_contents ( "$shadowbox_src_dir/$include.js" ) ); 
    626633                else 
    627                     $output .= file_get_contents ( "$shadowbox_src_dir/$include.js" ); 
     634                    $output .= file_get_contents ( "{$shadowbox_src_dir}/{$include}.js" ); 
    628635            } 
    629636 
    630637            $library = $this->get_option ( 'library' ); 
    631             $output .= file_get_contents ( "$shadowbox_src_dir/adapters/$library.js" ); 
     638            $output .= file_get_contents ( "{$shadowbox_src_dir}/adapters/{$library}.js" ); 
    632639 
    633640            foreach ( array ( 'load' , 'plugins' , 'cache' ) as $include ) 
    634                 $output .= file_get_contents ( "$shadowbox_src_dir/$include.js" ); 
     641                $output .= file_get_contents ( "{$shadowbox_src_dir}/{$include}.js" ); 
    635642 
    636643            if ( $this->get_option ( 'useSizzle' ) == 'true' && $this->get_option ( 'library' ) != 'jquery' ) 
    637                 $output .= file_get_contents ( "$shadowbox_src_dir/find.js" ); 
     644                $output .= file_get_contents ( "{$shadowbox_src_dir}/find.js" ); 
    638645 
    639646            $players = (array) $this->get_option ( 'players' ); 
    640647            if ( in_array ( 'flv' , $players ) || in_array ( 'swf' , $players ) ) 
    641                 $output .= file_get_contents ( "$shadowbox_src_dir/flash.js" ); 
     648                $output .= file_get_contents ( "{$shadowbox_src_dir}/flash.js" ); 
    642649 
    643650            $language = $this->get_option ( 'language' ); 
    644             $output .= file_get_contents ( "$shadowbox_src_dir/languages/$language.js" ); 
     651            $output .= file_get_contents ( "{$shadowbox_src_dir}/languages/{$language}.js" ); 
    645652 
    646653            foreach ( $players as $player ) 
    647                 $output .= file_get_contents ( "$shadowbox_src_dir/players/$player.js" ); 
     654                $output .= file_get_contents ( "{$shadowbox_src_dir}/players/{$player}.js" ); 
    648655 
    649656            foreach ( array ( 'skin' , 'outro' ) as $include ) 
    650                 $output .= file_get_contents ( "$shadowbox_src_dir/$include.js" ); 
     657                $output .= file_get_contents ( "{$shadowbox_src_dir}/{$include}.js" ); 
    651658 
    652659            wp_cache_set ( $this->md5 () , 'shadowbox-js' ); 
  • shadowbox-js/trunk/readme.txt

    r518933 r529508  
    44Tags: shadowbox-js, shadowbox, js, javascript, overlay, images, movies, audio, youtube, formatting, links, post, posts, lightbox, thickbox, lightview 
    55Requires at least: 3.3 
    6 Tested up to: 3.3 
    7 Stable tag: 3.0.3.10 
     6Tested up to: 3.4 
     7Stable tag: 3.0.3.10.1 
    88 
    99Shadowbox is an online media vieiwing application similar to Lightbox and Thickbox but with more functionality. Supports all types of media. 
     
    156156== Upgrade Notice == 
    157157 
     158= 3.0.3.10.1 = 
     159 
     160Fix issue with 3.0.3.10 where the FLV player could not be found due to a URL change, and make sure we get rid of the missing file nag if the source files were manually downloaded. 
     161 
    158162= 3.0.3.10 = 
    159163 
     
    189193 
    190194== Changelog == 
     195 
     196= 3.0.3.10.1 (2012-04-10): = 
     197* Update S.path in shadowbox to the new URL of where the source files are located 
     198* Clear the missing files nag if the files were downloaded manually 
    191199 
    192200= 3.0.3.10 (2012-03-13): = 
  • shadowbox-js/trunk/shadowbox-js.php

    r518933 r529508  
    88 * 
    99 * @author Matt Martz <matt@sivel.net> 
    10  * @version 3.0.3.10 
     10 * @version 3.0.3.10.1 
    1111 * @package shadowbox-js 
    1212 */ 
     
    1616Plugin URI:   http://sivel.net/wordpress/shadowbox-js/ 
    1717Description:  A javascript media viewer similar to Lightbox and Thickbox. Supports all types of media, not just images. 
    18 Version:      3.0.3.10 
     18Version:      3.0.3.10.1 
    1919Author:       Matt Martz 
    2020Author URI:   http://sivel.net/ 
  • shadowbox-js/trunk/shadowbox-title-push.php

    r518933 r529508  
    1414Plugin URI:   http://sivel.net/wordpress/shadowbox-js/ 
    1515Description:  Push the title attribute from the img tag to the anchor tag 
    16 Version:      3.0.3.10 
     16Version:      3.0.3.10.1 
    1717Author:       Matt Martz 
    1818Author URI:   http://sivel.net/ 
Note: See TracChangeset for help on using the changeset viewer.