Changeset 14986 for extensions/Shadogo/trunk
- Timestamp:
- May 15, 2012, 12:50:20 PM (12 years ago)
- Location:
- extensions/Shadogo/trunk
- Files:
-
- 39 added
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/Shadogo/trunk/admin/template/shadogo_admin.tpl
r10016 r14986 3 3 </div> 4 4 5 <script type="text/javascript"> 6 {literal} 7 function addEvent( obj, type, fn ) { 8 if ( obj.attachEvent ) { 9 obj['e'+type+fn] = fn; 10 obj[type+fn] = function(){obj['e'+type+fn]( window.event );} 11 obj.attachEvent( 'on'+type, obj[type+fn] ); 12 } else 13 obj.addEventListener( type, fn, false ); 14 } 15 16 17 //$(document).ready(function() { 18 //window.addEvent('domready', function() { 19 addEvent(window, 'load', function() { 20 // hide the erpert parameters 21 $('.expert-param').hide(); 22 23 // add the event handlers 24 var libs = window.document.getElementById('modalOverlayLib'); 25 var themes = window.document.getElementById('modalOverlayTheme'); 26 //libs.addEvent('change', function () { 27 addEvent(libs, 'change', function () { 28 var libName = this.options[this.selectedIndex].value; 29 if (libName) { 30 var selectedTheme = themes.options[themes.selectedIndex]; 31 // check if the selected theme is defined in the selected lib 32 if (selectedTheme.parentElement.label != libName) { 33 // if not, select the first theme defined in the selected lib 34 for (var i = 0; i < themes.length; i++) { 35 if (themes[i].parentElement.label == libName) { 36 themes.selectedIndex = i; 37 break; 38 } 39 } 40 } 41 } 42 }); 43 44 addEvent(themes, 'change', function () { 45 var libName = this.options[this.selectedIndex].parentElement.label; 46 // check if the selected theme is defined in the selected lib 47 if (libs.options[libs.selectedIndex].value != libName) { 48 // if not, select the first lib defining the selected theme 49 for (var i = 0; i < libs.length; i++) { 50 if (libs.options[i].value == libName) { 51 libs.selectedIndex = i; 52 break; 53 } 54 } 55 } 56 }); 57 }); 58 59 60 61 {/literal} 62 </script> 5 63 6 64 <form name="piwishadow_mainform" method="post" action="{$SHADOGO_F_ACTION}" class="general"> 7 65 8 66 <div style="padding-left:1em; margin:2em 0"> 9 {html_options name=modalOverlayLib values=$modalOverlayLibs output=$modalOverlayLibs selected=$modalOverlayLibsSelected}67 {html_options id=modalOverlayLib name=modalOverlayLib values=$modalOverlayLibs output=$modalOverlayLibs selected=$modalOverlayLibsSelected} 10 68 <label style="margin-left:1em"> 11 69 {'shadogo_overlaylibs'|@translate} … … 14 72 15 73 <div style="padding-left:1em; margin:2em 0"> 16 {html_options name=modalOverlayTheme options=$modalOverlayThemes selected=$modalOverlayThemesSelected}74 {html_options id=modalOverlayTheme name=modalOverlayTheme options=$modalOverlayThemes selected=$modalOverlayThemesSelected} 17 75 <label style="margin-left:1em"> 18 76 {'shadogo_overlaythemes'|@translate} … … 21 79 22 80 <div style="padding-left:1em; margin:2em 0"> 23 <script type="text/javascript">24 {literal}25 $(document).ready(function() {26 $('.expert-param').hide();27 });28 {/literal}29 </script>30 81 <input type="checkbox" onclick="if (this.checked) $('.expert-param').show(); else $('.expert-param').hide();"/> 31 82 <label style="margin-left:1em"> -
extensions/Shadogo/trunk/config.inc.php
r10016 r14986 29 29 // global parameters 30 30 // 31 'mediaFilePattern' => '/^(?<path>.*)\\/(?<file>[^\\/]*)_-_(?<media>flv|mp4|swf|mp3 )(?:_(?<width>\\d+)x(?<height>\\d+))?/i',31 'mediaFilePattern' => '/^(?<path>.*)\\/(?<file>[^\\/]*)_-_(?<media>flv|mp4|swf|mp3|webm)(?:_(?<width>\\d+)x(?<height>\\d+))?/i', 32 32 // 33 33 // overlaylib parameters -
extensions/Shadogo/trunk/libs/mediaboxAdvanced/index.php
r10016 r14986 1 1 <?php 2 2 // +-----------------------------------------------------------------------+ 3 // | Piwishadow - plugin for piwigo, a PHP based photo gallery|3 // | Shadogo - plugin for piwigo, a PHP based photo gallery | 4 4 // +-----------------------------------------------------------------------+ 5 5 // | Copyright(C) 2010-2011 BinaryWorld http://binaryworld.hd.free.fr | -
extensions/Shadogo/trunk/libs/mediaboxAdvanced/mediaboxAdv-1.3.4b.js
r10016 r14986 235 235 params[keyValue[0].trim()] = (keyValue.lenght == 1) ? true : keyValue[1].trim(); 236 236 } 237 params["el"] = el; 237 238 // parse: lightbox[gallery_name width height] 238 239 elrel = mediaboxRel.split(/[\[\]]/); 239 240 elrel = elrel[1]; 240 241 // [VB] add optional params at the end of the array 241 return [el.href, el.title, elrel, params]; 242 //return [el.href, el.title, elrel, params]; 243 return [el.get('href'), el.title, elrel, params]; 242 244 }; 243 245 … … 438 440 var fav = (images[activeImage][3]["fav"] == 0) ? 1 : 0; 439 441 images[activeImage][3]["fav"] = fav; 442 var el = images[activeImage][3]["el"]; 443 // "lightbox[pscontent 80% 80%];id=3;fav=1" 444 el.rel = el.rel.replace(/fav=(0|1)/gi,"fav="+fav) 440 445 favoriteLink.className = ''; 441 446 favoriteLink.set('html', options.text[6 + fav]); -
extensions/Shadogo/trunk/main.inc.php
r14889 r14986 2 2 /* 3 3 Plugin Name: Shadogo 4 Version: 0. 1.124 Version: 0.2.0 5 5 Description: Display pictures, videos and piwigo pages in modal overlay window. 6 6 Plugin URI: http://piwigo.org/ext/extension_view.php?eid=521 -
extensions/Shadogo/trunk/overlaylibs.inc.php
r10021 r14986 140 140 } 141 141 142 class MediaboxAdvanced15Wrapper implements iModalOverlayLib { 143 public static $LIB_NAME = 'mediaboxAdvanced_1_5_x'; 144 145 static function getName() { 146 return self::$LIB_NAME; 147 } 148 149 static public function isInstalled() { 150 $filename = ModalOverlayLibFactory::getFactoryPath() .DS. self::getName() .DS. 'mediaboxAdv-1.5.4.js'; 151 return file_exists($filename); 152 } 153 154 public function getFlashVarsTemplate() { 155 //return 'mediaURL={$VIDEO_URL}&teaserURL={$SRC_IMG}&allowSmoothing=true&autoPlay=false&buffer=6&showTimecode=true&loop=false&controlColor=0xFFFFFF&controlBackColor=0x000000&scaleIfFullScreen=true&showScalingButton=true&defaultVolume=100&crop=false'; 156 return 'file={$VIDEO_URL}&image={$SRC_IMG}&controlbar.position=over'; 157 } 158 159 public function getPlayerUrl() { 160 //$path = ModalOverlayLibFactory::getFactoryUrl() .'/'. self::getName() .'/NonverBlaster.swf'; 161 $path = ModalOverlayLibFactory::getFactoryUrl() .'/'. self::getName() .'/player.swf'; 162 return $path; 163 } 164 165 public function getDefaultLinkRelationship() { 166 return 'lightbox'; 167 } 168 169 public function appendHeaderContent($template, $tpl_var, $config) { 170 global $page; 171 $libPath = ModalOverlayLibFactory::getFactoryUrl() .'/'. self::getName(); 172 $content = ''; 173 174 // add script for services (used for "add to caddie") 175 //{combine_script id='core.scripts' load='async' path='themes/default/js/scripts.js'} 176 /* Not available for Piwigo 2.1.6 177 $template->func_combine_script( 178 array( 179 'id' => 'core.scripts', 180 'load' => 'async', 181 'path' => 'themes/default/js/scripts.js' 182 ), 183 $template->smarty 184 ); 185 */ 186 $content .= '<script src="themes/default/js/scripts.js" type="text/javascript"></script>'; 187 188 $theme = $config->modalOverlayTheme; 189 if ( !empty( $theme )) { 190 //$content .= '<link rel="stylesheet" href="'. $libPath .'/themes/style.css" type="text/css" media="screen" />'; 191 $content .= '<link rel="stylesheet" href="'. $libPath .'/themes/'. $theme .'/style.css" type="text/css" media="screen,projection" />'; 192 } 193 194 //$content .= '<script src="'. $libPath .'/mootools-core-1.3.2.js" type="text/javascript"></script>'; 195 $content .= '<script src="'. $libPath .'/mootools-core-1.4.5.js" type="text/javascript"></script>'; 196 $content .= '<script src="'. $libPath .'/Quickie.js" type="text/javascript"></script>'; 197 $content .= '<script src="'. $libPath .'/mediaboxAdv-1.5.4.js" type="text/javascript"></script>'; 198 199 $content .= '<script type="text/javascript">var ShadogoOverlayWnd=Mediabox; shadogoOptions = {'; 200 $content .= 'piwigoRootUrl: "'. get_root_url() .'"'; 201 if (isset($page['category'])) { 202 $content .= ', piwigoCategory: '. $page['category']['id']; 203 } 204 $content .= ', displayAddToBasket: '. (int) (is_admin() && $config->addToBasket && isset($page['category'])); 205 $content .= ', displayFavorite: '. (int) (!is_a_guest() && $config->favoritePicture && isset($page['category'])); 206 $content .= ', displayHdPicture: '. (int) $config->hdPicture; 207 $content .= ', displayDownload: '. (int) $config->downloadPicture; 208 $content .= '};</script>'; 209 210 $template->append($tpl_var, $content); 211 } 212 213 public function getCloseThumbnailJavaScript() { 214 return 'parent.window.Shadowbox.close(); return false;'; 215 } 216 217 static public function getThemes() { 218 return ModalOverlayLibFactory::getDirectoriesFromPath(ModalOverlayLibFactory::getFactoryPath() .DS. self::getName() .DS. 'themes'); 219 } 220 } 221 142 222 143 223 class ModalOverlayLibFactory { … … 159 239 $libs = array(); 160 240 if (MediaboxAdvancedWrapper::isInstalled() === true) $libs[] = MediaboxAdvancedWrapper::getName(); 241 if (MediaboxAdvanced15Wrapper::isInstalled() === true) $libs[] = MediaboxAdvanced15Wrapper::getName(); 161 242 if (ShadowboxWrapper::isInstalled() === true) $libs[] = ShadowboxWrapper::getName(); 162 243 return $libs; … … 175 256 if (0 === strcmp($libName, MediaboxAdvancedWrapper::getName())) { 176 257 return new MediaboxAdvancedWrapper(); 258 } else if (0 === strcmp($libName, MediaboxAdvanced15Wrapper::getName())) { 259 return new MediaboxAdvanced15Wrapper(); 177 260 } else if (0 === strcmp($libName, ShadowboxWrapper::getName())) { 178 261 return new ShadowboxWrapper(); -
extensions/Shadogo/trunk/release_note.txt
r14890 r14986 15 15 The my_video.flv is displayed in the modal overlay window when the user click the thumbnail. 16 16 17 18 Shadogo v0.2.0 19 =============== 20 21 - Fix: favorite button is well updated when the overlay window is closed and opened again 22 - Add the support of the webm video file 23 - Add the support of the mediaboxAvanced v1.5.x (must be selected in the administration console of the plugin) 17 24 18 25 Shadogo v0.1.12 … … 107 114 - Add play and video overlay images on the thumbnail 108 115 - HTML5 Support 116 - simplify expert parameters
Note: See TracChangeset
for help on using the changeset viewer.