Plugin Directory

Changeset 338456


Ignore:
Timestamp:
01/29/2011 06:54:26 AM (15 years ago)
Author:
DanCoulter
Message:

Bug fixes.

Location:
flickr-gallery/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • flickr-gallery/trunk/flickr-gallery.php

    r293403 r338456  
    55Description: Use easy shortcodes to insert Flickr galleries and photos (and videos) in your blog.
    66Author: Dan Coulter
    7 Version: 1.5.2
     7Version: 1.5.3-dev1
    88Author URI: http://dancoulter.com/
    99*/
     
    3131 * @copyright  Copyright 2009 Dan Coulter
    3232 * @license    http://www.gnu.org/licenses/gpl.txt GPL 2.0
    33  * @version    1.5.2
     33 * @version    1.5.3-dev1
    3434 * @link       http://co.deme.me/projects/flickr-gallery/
    3535 */
     
    4343    define('CM_FLICKR_GALLERY_VERSION', rand());
    4444} else {
    45     define('CM_FLICKR_GALLERY_VERSION', '1.5.2');
     45    define('CM_FLICKR_GALLERY_VERSION', '1.5.3-dev1');
    4646}
    4747   
     
    9292                $phpFlickr->enableCache('custom', array(array('DC_FlickrGallery', 'cache_get'), array('DC_FlickrGallery', 'cache_set')));
    9393            }
    94             wp_enqueue_script('jquery-ui-tabs');           
    95             wp_enqueue_script('jquery-flightbox', DC_FlickrGallery::getURL() . 'flightbox/jquery.flightbox.js', array(), CM_FLICKR_GALLERY_VERSION);           
    96             wp_enqueue_style('flickr-gallery', DC_FlickrGallery::getURL() . 'flickr-gallery.css', array(), CM_FLICKR_GALLERY_VERSION, 'all');           
    97             if ( DC_FlickrGallery::get_major_version() >= 2.8 ) {
    98                 wp_enqueue_style('fg-jquery-ui', DC_FlickrGallery::getURL() . 'tab-theme/jquery-ui-1.7.3.css', array(), '1.7.3', 'all');           
    99             } else {
    100                 wp_enqueue_style('fg-jquery-ui', DC_FlickrGallery::getURL() . 'tab-theme/jquery-ui-1.5.2.css', array(), '1.5.2', 'all');
    101             }
    102             wp_enqueue_style('jquery-flightbox', DC_FlickrGallery::getURL() . 'flightbox/jquery.flightbox.css', array(), CM_FLICKR_GALLERY_VERSION, 'all');         
    10394        }
    10495       
     
    115106        }
    116107       
    117         if ( !is_admin() && (get_option('fg-flightbox') === false || get_option('fg-flightbox')) ) {
     108        if ( !is_admin() ) {
     109            wp_enqueue_script('jquery-ui-tabs');           
     110            wp_enqueue_script('jquery-flightbox', DC_FlickrGallery::getURL() . 'flightbox/jquery.flightbox.js', array(), CM_FLICKR_GALLERY_VERSION);           
     111            wp_enqueue_style('flickr-gallery', DC_FlickrGallery::getURL() . 'flickr-gallery.css', array(), CM_FLICKR_GALLERY_VERSION, 'all');           
     112            if ( DC_FlickrGallery::get_major_version() >= 2.8 ) {
     113                wp_enqueue_style('fg-jquery-ui', DC_FlickrGallery::getURL() . 'tab-theme/jquery-ui-1.7.3.css', array(), '1.7.3', 'all');           
     114            } else {
     115                wp_enqueue_style('fg-jquery-ui', DC_FlickrGallery::getURL() . 'tab-theme/jquery-ui-1.5.3-dev1.css', array(), '1.5.2', 'all');
     116            }
     117            wp_enqueue_style('jquery-flightbox', DC_FlickrGallery::getURL() . 'flightbox/jquery.flightbox.css', array(), CM_FLICKR_GALLERY_VERSION, 'all');         
     118
    118119            add_action('wp_head', array('DC_FlickrGallery', 'header'));
    119120            add_action('wp_footer', array('DC_FlickrGallery', 'footer'));
    120121        }
     122       
    121123    }
    122124   
     
    298300                                                        $("#photostream .flickr-thumb").css("visibility", "hidden");
    299301                                                        //$("#photostream").css("background", "transparent url(<?php echo DC_FlickrGallery::getURL() ?>flightbox/images/loading-2.gif) scroll no-repeat center center");
    300                                                         $.post("<?php echo get_bloginfo('wpurl') ?>", {
     302                                                        $.post("<?php echo apply_filters('fg-ajax-endpoint', get_bloginfo('wpurl')) ?>", {
    301303                                                            action: 'flickr-gallery-page',
    302304                                                            pager: "<?php echo str_replace('"', '\\"', serialize($pager)) ?>",
     
    358360                                                    function flickr_gallery_load_photoset($display, id, page) {
    359361                                                        $display.find(".flickr-thumb").css("visibility", "hidden");
    360                                                         $display.load("<?php echo trailingslashit(get_bloginfo('wpurl')) ?>?action=flickr-gallery-photoset&pagination=<?php echo $attr['pagination'] ?>&page=" + page + "&id=" + id, null, function(){
     362                                                        $display.load("<?php echo apply_filters('fg-ajax-endpoint', trailingslashit(get_bloginfo('wpurl'))) ?>?action=flickr-gallery-photoset&pagination=<?php echo $attr['pagination'] ?>&page=" + page + "&id=" + id, null, function(){
    361363                                                            <?php if ( get_option('fg-flightbox') === false || get_option('fg-flightbox') ) : ?>
    362364                                                                $display.find(".flickr-thumb img").flightbox({size_callback: get_sizes});
     
    422424                                                    function flickr_gallery_load_photoset($display, id, page) {
    423425                                                        $display.find(".flickr-thumb").css("visibility", "hidden");
    424                                                         $display.load("<?php echo trailingslashit(get_bloginfo('wpurl')) ?>?action=flickr-gallery-photoset&pagination=<?php echo $attr['pagination'] ?>&page=" + page + "&id=" + id, null, function(){
     426                                                        $display.load("<?php echo apply_filters('fg-ajax-endpoint', trailingslashit(get_bloginfo('wpurl'))) ?>?action=flickr-gallery-photoset&pagination=<?php echo $attr['pagination'] ?>&page=" + page + "&id=" + id, null, function(){
    425427                                                            <?php if ( get_option('fg-flightbox') === false || get_option('fg-flightbox') ) : ?>
    426428                                                                $display.find(".flickr-thumb img").flightbox({size_callback: get_sizes});
     
    10421044   
    10431045    function header() {
    1044         ?>
    1045             <script type="text/javascript">
    1046                 var get_sizes = null;
    1047                 <?php if ( get_option('fg-flightbox-large') ) : ?>
    1048                     (function($){
    1049                         get_sizes = function(id){
    1050                             var sizes;
    1051                             $.ajax({
    1052                                 async: false,
    1053                                 data: {
    1054                                     action: "flickr-gallery-sizes",
    1055                                     id: id
    1056                                 },
    1057                                 dataType: "json",
    1058                                 type: "POST",
    1059                                 url: "<?php echo trailingslashit(get_bloginfo('wpurl')) ?>",
    1060                                 success: function(rsp) {
    1061                                     sizes = rsp;
    1062                                 }
    1063                             });
    1064                             return sizes;
    1065                         };
    1066                     })(jQuery);
    1067                 <?php endif ?>
    1068             </script>
    1069         <?php
     1046        if ( get_option('fg-flightbox') === false || get_option('fg-flightbox') ) {
     1047            ?>
     1048                <script type="text/javascript">
     1049                    var get_sizes = null;
     1050                    <?php if ( get_option('fg-flightbox-large') ) : ?>
     1051                        (function($){
     1052                            get_sizes = function(id){
     1053                                var sizes;
     1054                                $.ajax({
     1055                                    async: false,
     1056                                    data: {
     1057                                        action: "flickr-gallery-sizes",
     1058                                        id: id
     1059                                    },
     1060                                    dataType: "json",
     1061                                    type: "POST",
     1062                                    url: "<?php echo apply_filters('fg-ajax-endpoint', trailingslashit(get_bloginfo('wpurl'))) ?>",
     1063                                    success: function(rsp) {
     1064                                        sizes = rsp;
     1065                                    }
     1066                                });
     1067                                return sizes;
     1068                            };
     1069                        })(jQuery);
     1070                    <?php endif ?>
     1071                </script>
     1072            <?php
     1073        }
    10701074    }
    10711075   
  • flickr-gallery/trunk/flightbox/jquery.flightbox.js

    r293149 r338456  
    2121 * @copyright  Copyright 2009 Dan Coulter
    2222 * @license    http://www.gnu.org/licenses/gpl.txt GPL 2.0
    23  * @version    1.0.2
     23 * @version    1.0.3
    2424 * @link       http://co.deme.me/projects/flickr-gallery/
    2525 */
     
    114114            $image.attr("src", $calling.attr("src").replace(/_[stm]\./g, "."));
    115115        } else {
    116             info = options.size_callback($calling.attr("src").match(/[^\/]+_[^\/]+_[st].jpg/g)[0].split("_")[0]);
     116            info = options.size_callback($calling.attr("src").match(/[^\/]+_[^\/]+_[stm].jpg/g)[0].split("_")[0]);
    117117            $("#flightbox-description").html(info.description);
    118118            max_width = $(window).width() - 30;
Note: See TracChangeset for help on using the changeset viewer.