Changeset 790495
- Timestamp:
- 10/19/2013 01:44:43 PM (12 years ago)
- Location:
- shashin/trunk
- Files:
-
- 7 edited
-
ShashinWp.php (modified) (1 diff)
-
public/ShashinPhotoDisplayerPicasaPrettyphoto.php (modified) (1 diff)
-
public/display/prettyphoto/jquery.prettyPhoto.js (modified) (23 diffs)
-
public/display/prettyphoto/prettyPhoto.css (modified) (3 diffs)
-
public/display/shashin.js (modified) (3 diffs)
-
readme.txt (modified) (3 diffs)
-
start.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
shashin/trunk/ShashinWp.php
r785273 r790495 2 2 3 3 class ShashinWp { 4 private $version = '3.4. 5';4 private $version = '3.4.6'; 5 5 6 6 public function __construct() { -
shashin/trunk/public/ShashinPhotoDisplayerPicasaPrettyphoto.php
r687969 r790495 13 13 } 14 14 15 $this->linkRel .= " prettyPhoto[$groupNumber]";15 $this->linkRel .= "shashinPrettyPhoto[$groupNumber]"; 16 16 return $this->linkRel; 17 17 } -
shashin/trunk/public/display/prettyphoto/jquery.prettyPhoto.js
r775272 r790495 6 6 ------------------------------------------------------------------------- */ 7 7 (function($) { 8 $. prettyPhoto = {version: '3.1.5'};8 $.shashinPrettyPhoto = {version: '3.1.5'}; 9 9 10 10 $.fn.shashinPrettyPhoto = function(pp_settings) { … … 36 36 ie6_fallback: true, 37 37 /* edit for Shashin - added pp_closeMoble and customized social_tools */ 38 markup: '<div class=" pp_pic_holder"> \38 markup: '<div class="shashin_pp_pic_holder"> \ 39 39 <div class="ppt"> </div> \ 40 40 <div class="pp_top"> \ … … 119 119 switch(e.keyCode){ 120 120 case 37: 121 $. prettyPhoto.changePage('previous');121 $.shashinPrettyPhoto.changePage('previous'); 122 122 e.preventDefault(); 123 123 break; 124 124 case 39: 125 $. prettyPhoto.changePage('next');125 $.shashinPrettyPhoto.changePage('next'); 126 126 e.preventDefault(); 127 127 break; 128 128 case 27: 129 129 if(!settings.modal) 130 $. prettyPhoto.close();130 $.shashinPrettyPhoto.close(); 131 131 e.preventDefault(); 132 132 break; … … 141 141 * Initialize prettyphoto. 142 142 */ 143 $. prettyPhoto.initialize = function() {143 $.shashinPrettyPhoto.initialize = function() { 144 144 145 145 settings = pp_settings; … … 175 175 176 176 177 $. prettyPhoto.open();177 $.shashinPrettyPhoto.open(); 178 178 179 179 return false; … … 187 187 * @param description {String,Array} The description to be displayed with the picture, can also be an array containing all the descriptions. 188 188 */ 189 $. prettyPhoto.open = function(event) {189 $.shashinPrettyPhoto.open = function(event) { 190 190 if(typeof settings == "undefined"){ // Means it's an API call, need to manually get the settings and set the variables 191 191 settings = pp_settings; … … 296 296 imgPreloader.onerror = function(){ 297 297 alert('Image cannot be loaded. Make sure the path is correct and image exist.'); 298 $. prettyPhoto.close();298 $.shashinPrettyPhoto.close(); 299 299 }; 300 300 … … 417 417 * @param direction {String} Direction of the paging, previous or next. 418 418 */ 419 $. prettyPhoto.changePage = function(direction){419 $.shashinPrettyPhoto.changePage = function(direction){ 420 420 currentGalleryPage = 0; 421 421 … … 437 437 } 438 438 439 _hideContent(function(){ $. prettyPhoto.open(); });439 _hideContent(function(){ $.shashinPrettyPhoto.open(); }); 440 440 }; 441 441 … … 445 445 * @param direction {String} Direction of the paging, previous or next. 446 446 */ 447 $. prettyPhoto.changeGalleryPage = function(direction){447 $.shashinPrettyPhoto.changeGalleryPage = function(direction){ 448 448 if(direction=='next'){ 449 449 currentGalleryPage ++; … … 469 469 * Start the slideshow... 470 470 */ 471 $. prettyPhoto.startSlideshow = function(){471 $.shashinPrettyPhoto.startSlideshow = function(){ 472 472 if(typeof pp_slideshow == 'undefined'){ 473 473 $pp_pic_holder.find('.pp_play').unbind('click').removeClass('pp_play').addClass('pp_pause').click(function(){ 474 $. prettyPhoto.stopSlideshow();474 $.shashinPrettyPhoto.stopSlideshow(); 475 475 return false; 476 476 }); 477 pp_slideshow = setInterval($. prettyPhoto.startSlideshow,settings.slideshow);477 pp_slideshow = setInterval($.shashinPrettyPhoto.startSlideshow,settings.slideshow); 478 478 }else{ 479 $. prettyPhoto.changePage('next');479 $.shashinPrettyPhoto.changePage('next'); 480 480 }; 481 481 } … … 485 485 * Stop the slideshow... 486 486 */ 487 $. prettyPhoto.stopSlideshow = function(){487 $.shashinPrettyPhoto.stopSlideshow = function(){ 488 488 $pp_pic_holder.find('.pp_pause').unbind('click').removeClass('pp_pause').addClass('pp_play').click(function(){ 489 $. prettyPhoto.startSlideshow();489 $.shashinPrettyPhoto.startSlideshow(); 490 490 return false; 491 491 }); … … 498 498 * Closes prettyphoto. 499 499 */ 500 $. prettyPhoto.close = function(){500 $.shashinPrettyPhoto.close = function(){ 501 501 if($pp_overlay.is(":animated")) return; 502 502 503 $. prettyPhoto.stopSlideshow();503 $.shashinPrettyPhoto.stopSlideshow(); 504 504 505 505 $pp_pic_holder.stop().find('object,embed').css('visibility','hidden'); 506 506 507 $('div. pp_pic_holder,div.ppt,.pp_fade').fadeOut(settings.animation_speed,function(){ $(this).remove(); });507 $('div.shashin_pp_pic_holder,div.ppt,.pp_fade').fadeOut(settings.animation_speed,function(){ $(this).remove(); }); 508 508 509 509 $pp_overlay.fadeOut(settings.animation_speed, function(){ … … 567 567 } 568 568 569 if(settings.autoplay_slideshow && !pp_slideshow && !pp_open) $. prettyPhoto.startSlideshow();569 if(settings.autoplay_slideshow && !pp_slideshow && !pp_open) $.shashinPrettyPhoto.startSlideshow(); 570 570 571 571 settings.changepicturecallback(); // Callback! … … 775 775 goToPage = (Math.floor(set_position/itemsPerPage) < totalPage) ? Math.floor(set_position/itemsPerPage) : totalPage; 776 776 777 $. prettyPhoto.changeGalleryPage(goToPage);777 $.shashinPrettyPhoto.changeGalleryPage(goToPage); 778 778 779 779 $pp_gallery_li.filter(':eq('+set_position+')').addClass('selected'); … … 793 793 $('body').append(settings.markup); // Inject the markup 794 794 795 $pp_pic_holder = $('. pp_pic_holder') , $ppt = $('.ppt'), $pp_overlay = $('div.pp_overlay'); // Set my global selectors795 $pp_pic_holder = $('.shashin_pp_pic_holder') , $ppt = $('.ppt'), $pp_overlay = $('div.pp_overlay'); // Set my global selectors 796 796 797 797 // Inject the inline gallery! … … 815 815 $pp_pic_holder.find('#pp_full_res').after(toInject); 816 816 817 $pp_gallery = $('. pp_pic_holder .pp_gallery'), $pp_gallery_li = $pp_gallery.find('li'); // Set the gallery selectors817 $pp_gallery = $('.shashin_pp_pic_holder .pp_gallery'), $pp_gallery_li = $pp_gallery.find('li'); // Set the gallery selectors 818 818 819 819 $pp_gallery.find('.pp_arrow_next').click(function(){ 820 $. prettyPhoto.changeGalleryPage('next');821 $. prettyPhoto.stopSlideshow();820 $.shashinPrettyPhoto.changeGalleryPage('next'); 821 $.shashinPrettyPhoto.stopSlideshow(); 822 822 return false; 823 823 }); 824 824 825 825 $pp_gallery.find('.pp_arrow_previous').click(function(){ 826 $. prettyPhoto.changeGalleryPage('previous');827 $. prettyPhoto.stopSlideshow();826 $.shashinPrettyPhoto.changeGalleryPage('previous'); 827 $.shashinPrettyPhoto.stopSlideshow(); 828 828 return false; 829 829 }); … … 842 842 .find('a') 843 843 .click(function(){ 844 $. prettyPhoto.changePage(i);845 $. prettyPhoto.stopSlideshow();844 $.shashinPrettyPhoto.changePage(i); 845 $.shashinPrettyPhoto.stopSlideshow(); 846 846 return false; 847 847 }); … … 854 854 $pp_pic_holder.find('.pp_nav').prepend('<a href="#" class="pp_play">Play</a>') 855 855 $pp_pic_holder.find('.pp_nav .pp_play').click(function(){ 856 $. prettyPhoto.startSlideshow();856 $.shashinPrettyPhoto.startSlideshow(); 857 857 return false; 858 858 }); 859 859 } 860 860 861 $pp_pic_holder.attr('class',' pp_pic_holder ' + settings.theme); // Set the proper theme861 $pp_pic_holder.attr('class','shashin_pp_pic_holder ' + settings.theme); // Set the proper theme 862 862 863 863 $pp_overlay … … 868 868 }) 869 869 .bind('click',function(){ 870 if(!settings.modal) $. prettyPhoto.close();870 if(!settings.modal) $.shashinPrettyPhoto.close(); 871 871 }); 872 872 873 $('a.pp_close').bind('click',function(){ $. prettyPhoto.close(); return false; });873 $('a.pp_close').bind('click',function(){ $.shashinPrettyPhoto.close(); return false; }); 874 874 875 875 … … 885 885 }; 886 886 887 _hideContent(function(){ $. prettyPhoto.open(); });887 _hideContent(function(){ $.shashinPrettyPhoto.open(); }); 888 888 889 889 return false; … … 892 892 893 893 $pp_pic_holder.find('.pp_previous, .pp_nav .pp_arrow_previous').bind('click',function(){ 894 $. prettyPhoto.changePage('previous');895 $. prettyPhoto.stopSlideshow();894 $.shashinPrettyPhoto.changePage('previous'); 895 $.shashinPrettyPhoto.stopSlideshow(); 896 896 return false; 897 897 }); 898 898 899 899 $pp_pic_holder.find('.pp_next, .pp_nav .pp_arrow_next').bind('click',function(){ 900 $. prettyPhoto.changePage('next');901 $. prettyPhoto.stopSlideshow();900 $.shashinPrettyPhoto.changePage('next'); 901 $.shashinPrettyPhoto.stopSlideshow(); 902 902 return false; 903 903 }); … … 920 920 } 921 921 922 return this.unbind('click.prettyphoto').bind('click.prettyphoto',$. prettyPhoto.initialize); // Return the jQuery object for chaining. The unbind method is used to avoid click conflict when the plugin is called more than once922 return this.unbind('click.prettyphoto').bind('click.prettyphoto',$.shashinPrettyPhoto.initialize); // Return the jQuery object for chaining. The unbind method is used to avoid click conflict when the plugin is called more than once 923 923 }; 924 924 -
shashin/trunk/public/display/prettyphoto/prettyPhoto.css
r782190 r790495 15 15 16 16 @media screen and (max-device-width: 768px) { 17 . pp_pic_holder {17 .shashin_pp_pic_holder { 18 18 width: 100% !important; 19 19 left: 0 !important; … … 451 451 ------------------------------------------------------------------------- */ 452 452 453 div. pp_pic_holder a:focus { outline:none; }453 div.shashin_pp_pic_holder a:focus { outline:none; } 454 454 455 455 div.pp_overlay { … … 463 463 } 464 464 465 div. pp_pic_holder {465 div.shashin_pp_pic_holder { 466 466 display: none; 467 467 position: absolute; -
shashin/trunk/public/display/shashin.js
r785273 r790495 47 47 } 48 48 49 $("a[rel^=' prettyPhoto']").shashinPrettyPhoto(prettyPhotoSettings);49 $("a[rel^='shashinPrettyPhoto']").shashinPrettyPhoto(prettyPhotoSettings); 50 50 } 51 51 … … 143 143 144 144 if (shashinJs.imageDisplayer == 'prettyphoto') { 145 $('#shashinAlbumPhotos_' + linkIdParts[2] + " a[rel^=' prettyphoto']").shashinPrettyPhoto(prettyPhotoSettings);145 $('#shashinAlbumPhotos_' + linkIdParts[2] + " a[rel^='shashinPrettyPhoto']").shashinPrettyPhoto(prettyPhotoSettings); 146 146 } 147 147 … … 264 264 ); 265 265 266 // truncate captions 267 $shashinCaption.trunk8(); 266 // parsing html when truncating captions is expensive, so do it only 267 // where we need to (on album captions) 268 if ($shashinCaption.find('.shashinAlbumCaptionTitle').length > 0) { 269 $shashinCaption.trunk8({ parseHTML: true }); 270 } 271 else { 272 $shashinCaption.trunk8(); 273 } 268 274 269 275 // don't display captions if they'll cover more than 45% of the thumbnail -
shashin/trunk/readme.txt
r785273 r790495 5 5 Requires at least: 3.0 6 6 Tested up to: 3.6.1 7 Stable tag: 3.4. 57 Stable tag: 3.4.6 8 8 License: GPLv2 or later 9 9 … … 59 59 * PHP 5.1.2 or higher 60 60 * mySQL 4.1 or higher 61 * jQuery 1.7 or higher 61 62 62 63 **First time installation** … … 93 94 94 95 == Changelog == 96 97 = 3.4.6 = 98 99 * Bug fix: do smart truncation of text in album thumbnail captions (don't truncate the HTML!) 100 * Do more namepsacing of Shashin's version of prettyPhoto, to avoid conflicts with any already installed versions of prettyPhoto 101 * Add jQuery version requirement to readme 95 102 96 103 = 3.4.5 = -
shashin/trunk/start.php
r785273 r790495 5 5 Description: A plugin for integrating photos and videos from Picasa, YouTube, and Twitpic in WordPress. 6 6 Author: Michael Toppa 7 Version: 3.4. 57 Version: 3.4.6 8 8 Author URI: http://www.toppa.com 9 9 License: GPLv2 or later
Note: See TracChangeset
for help on using the changeset viewer.