Changeset 11948 for extensions/imgpreview
- Timestamp:
- Aug 14, 2011, 7:07:14 PM (13 years ago)
- Location:
- extensions/imgpreview
- Files:
-
- 1 deleted
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/imgpreview/admin/admin.php
r11098 r11948 16 16 $newconf_plugin .= '#'; 17 17 $newconf_plugin .= (isset($_POST['max-height']) and preg_match("#^[0-9]+$#",$_POST['max-height'])) ? $_POST['max-height'] : $conf_imgp[1]; 18 $newconf_plugin .= '#'; 19 $newconf_plugin .= (isset($_POST['show-title'])) ? "true" : "false"; 20 $newconf_plugin .= '#'; 21 $newconf_plugin .= (isset($_POST['opacity'])) ? "true" : "false"; 18 22 conf_update_param('imgpreview', pwg_db_real_escape_string($newconf_plugin)); 19 23 array_push($page['infos'], l10n('imgp_conf_updated')); … … 22 26 load_conf_from_db(); 23 27 $conf_imgp = explode("#" , $conf['imgpreview']); 24 28 $val_title=(isset($conf_imgp[2]) and $conf_imgp[2]=="true") ? "checked" : ""; 29 $val_opacity=(isset($conf_imgp[3]) and $conf_imgp[3]=="true") ? "checked" : ""; 25 30 $template->assign( 26 31 array( 27 32 'MAX_W' => 'value="'.$conf_imgp[0].'"', 28 33 'MAX_H' => 'value="'.$conf_imgp[1].'"', 34 'SHOW_TITTLE' => $val_title, 35 'OPACITY' => $val_opacity, 29 36 'PWG_TOKEN' => get_pwg_token() 30 37 ) -
extensions/imgpreview/admin/admin.tpl
r11098 r11948 10 10 <input name="max-height" type="text" size="5" {$MAX_H} /> 11 11 px<br /> 12 <br /> 13 {'imgp_showtitle'|@translate}<input type="checkbox" name="show-title" {$SHOW_TITTLE}><br /> 14 {'imgp_opacity'|@translate}<input type="checkbox" name="opacity" {$OPACITY}><br /> 15 <br /> 12 16 <input name="envoi_config" type="hidden" value="imgpreview" /> 13 17 <input type="hidden" name="pwg_token" value="{$PWG_TOKEN}"> … … 15 19 </form> 16 20 </fieldset> 17 <hr /> 21 22 <fieldset> 18 23 <div style="text-align:left"> 19 24 {'imgp_howitworks'|@translate} 20 25 </div> 26 </fieldset> -
extensions/imgpreview/css_js.tpl
r11086 r11948 1 1 {combine_script id='jquery.imgpreview' load='header' require='jquery' path='plugins/imgpreview/js/imgpreview.js'} 2 {combine_script id='imgpreview.init' load='footer' require='jquery.imgpreview' path='plugins/imgpreview/js/init.js'} 2 3 {footer_script require='jquery.imgpreview'} 4 {if isset($imgpreview)} 5 {literal} 6 $('.thumbnails a, #thumbnails a').imgPreview({ 7 containerID: 'tooltip', 8 srcAttr: 'imgsrc', 9 considerBorders:'true', 10 // When container is shown: 11 onShow: function(link){ 12 {/literal}{if $imgpreview.title=="true"}{literal} 13 $('<span>' + $(link).children().attr("title") + '</span>').appendTo(this); 14 15 {/literal}{/if}{if $imgpreview.opacity=="true"}{literal} 16 $(link).stop().animate({opacity:0.4}); 17 // Reset image: 18 $('img', this).stop().css({opacity:0}); 19 {/literal}{/if}{literal} 20 }, 21 onLoad: function(){ 22 {/literal}{if $imgpreview.opacity=="true"}{literal} 23 $(this).animate({opacity:1}, 300); 24 {/literal}{/if}{literal} 25 }, 26 // When container hides: 27 onHide: function(link){ 28 {/literal}{if $imgpreview.title=="true"}{literal} 29 $('span', this).remove(); 30 {/literal}{/if}{if $imgpreview.opacity=="true"}{literal} 31 $(link).stop().animate({opacity:1}); 32 {/literal}{/if}{literal} 33 } 34 }); 35 36 {/literal} 37 {/if} 38 {/footer_script} 39 3 40 {combine_css path="plugins/imgpreview/css/imgpreview.css"} 4 41 {if isset($imgpreview)} -
extensions/imgpreview/language/fr_FR/plugin.lang.php
r11086 r11948 2 2 $lang['imgp_max_width'] = 'largeur maximum de l\'image'; 3 3 $lang['imgp_max_height'] = 'hauteur maximum de l\'image'; 4 $lang['imgp_showtitle'] = 'Afficher le nom de l\'image'; 5 $lang['imgp_opacity'] = 'Faire un effet de transparence au survol'; 4 6 $lang['imgp_send'] = 'Envoyer !'; 5 7 … … 8 10 9 11 10 $lang['imgp_howitworks'] = 'utilise :<br> 12 $lang['imgp_howitworks'] = ' 13 L\'auteur de ce plugin <a href="http://www.planete-flop.fr">Flop25</a> vous recommande : 14 <ul> 15 <li><a href="http://piwigo.org/ext/extension_view.php?eid=190">PWG Stuff</a> par P@t : ce plugin permet l\'ajout de blocs (Bloc personnel-Derniers commentaires-Images au hasard...) sur votre galerie</li> 16 <li><a href="http://piwigo.org/ext/extension_view.php?eid=527">Icons Set</a> par Flop25 : ce plugin permet d\'attribuer à n\'importe quels thèmes, un autre set d\'icônes</li> 17 <li><a href="http://piwigo.org/ext/extension_view.php?eid=231">Flop Style</a> par Flop25 : flop_style est un "Template (modèle)" ou "template-extension" : il permet de modifier une petite partie de votre galerie telle que les catégories ou les miniatures sans changer de thème</li> 18 <li><a href="http://piwigo.org/ext/">et bien plus d\'extensions sur piwigo.org</a></li> 19 </ul> 20 <br> 21 Pour les designers : sachez que la vignette est entièrement personnalisable avec l\'id #tooltip (img pour l\'image ou span pour le texte) 22 <br> 23 <br> 24 Ce plugin utilise une version modifiée de :<br> 11 25 * imgPreview jQuery plugin <br> 12 26 * Copyright (c) 2009 James Padolsey<br> … … 16 30 * @author James Padolsey<br> 17 31 * @version 0.22<br> 32 <br> 33 <br> 34 <a href="http://fr.piwigo.org/forum/">En cas de problèmes, le forum de Piwigo -fort de sa communauté très active- vous aidera.</a> 18 35 '; 19 36 -
extensions/imgpreview/main.inc.php
r11086 r11948 30 30 31 31 $conf_imgp = explode("#" , $conf['imgpreview']); 32 $imgpreview=array( 'width' => $conf_imgp[0], 'height' => $conf_imgp[1] );32 $imgpreview=array( 'width' => $conf_imgp[0], 'height' => $conf_imgp[1], 'title' => $conf_imgp[2], 'opacity' => $conf_imgp[3] ); 33 33 $template->assign(array( 34 34 'imgpreview' => $imgpreview -
extensions/imgpreview/maintain.inc.php
r11091 r11948 7 7 INSERT INTO ' . CONFIG_TABLE . ' (param,value,comment) 8 8 VALUES 9 ("imgpreview" , "600#600 " , "max-width#max-height");';9 ("imgpreview" , "600#600#true#true" , "max-width#max-height#title#opacity");'; 10 10 pwg_query($q); 11 11 … … 16 16 function plugin_activate() 17 17 { 18 global $prefixeTable; 18 global $prefixeTable, $conf; 19 //////////// Check Config 20 $query = ' 21 SELECT COUNT(*) AS result FROM '.CONFIG_TABLE.' 22 WHERE param IN (\'imgpreview\') 23 ;'; 24 $data_table = pwg_db_fetch_assoc(pwg_query($query)); 25 $exist = $data_table['result']; 26 if ( $exist == 0 ) 27 { 28 plugin_install(); 29 } 30 else { 31 load_conf_from_db(); 32 33 if (count(explode("#" , $conf['imgpreview']))!=4) 34 { 35 pwg_query('DELETE FROM '.CONFIG_TABLE.' WHERE param IN (\'imgpreview\')'); 36 pwg_query($q); 37 plugin_install(); 38 } 39 } 19 40 }//fin active 20 41
Note: See TracChangeset
for help on using the changeset viewer.