Changeset 29484 for extensions
- Timestamp:
- Sep 11, 2014, 2:03:20 PM (10 years ago)
- Location:
- extensions/LLGBO2
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/LLGBO2/include/manage_picture_content.php
r29049 r29484 89 89 if ($conf['LLGBO2']['tooltipdisp'] )// tooltip 90 90 { $prev = $template->get_template_vars('previous'); 91 $next = $template->get_template_vars('next'); 92 $swtimg = '||<img src='; 93 if (isset($prev)){$template->append('previous', array('TITLE_ESC' => $prev['TITLE_ESC'].$swtimg.$prev['THUMB_SRC'].'>'),TRUE);} 94 if (isset($next)){$template->append('next', array('TITLE_ESC' => $next['TITLE_ESC'].$swtimg.$next['THUMB_SRC'].'>'),TRUE);} 91 $next = $template->get_template_vars('next'); 92 93 if (isset($prev)){ 94 $prev_thumbimg = '||<img src='.$prev['derivatives']['thumb']->get_url(); 95 $template->append('previous', array('TITLE_ESC' => $prev['TITLE_ESC'].$prev_thumbimg.'>'),TRUE); 96 } 97 if (isset($next)){ 98 $next_thumbimg = '||<img src='.$next['derivatives']['thumb']->get_url(); 99 $template->append('next', array('TITLE_ESC' => $next['TITLE_ESC'].$next_thumbimg.'>'),TRUE); 100 } 95 101 $template->append('llgbo', array('tooltipCSS' => $sweetcss), true); 96 } 97 // 2.6 paticular case automatic size and modus management 102 } 103 // ----------------------------------------------------------- 104 // 2.6 paticular case automatic size and modus management 105 // ----------------------------------------------------------- 98 106 if ($update_tpl) 99 107 {return $template->parse( 'default_content', true);} … … 107 115 // -------------------------------------- 108 116 $patern = '/'.'<img(.*)id="theMainImage"(.*)>'.'/'; 109 $replacement = $replacement.'{$llgbo.FRAME_TITLE}'.'{$llgbo.FRAME_SIZE}'.'{$llgbo.FRAME_BEGIN}'."\n".'<img $1 id="theMainImage" $2> 117 $replacement = $replacement.'{$llgbo.FRAME_TITLE}'.'{$llgbo.FRAME_SIZE}'.'{$llgbo.FRAME_BEGIN}'."\n".'<img $1 id="theMainImage" $2>'.'{$llgbo.FRAME_END}'; 110 118 $content = preg_replace($patern, $replacement, $content); 111 119 return $content; -
extensions/LLGBO2/js/jquery_llgboframeresize.js
r29049 r29484 10 10 var FrLstBdr = 0; var frbdr=0; 11 11 jQuery(".llgboFR").each(function(){ 12 13 12 frbdr = parseInt(jQuery(this).css('border-top-width')); 13 FrLstBdr = (frbdr * 2)+FrLstBdr; 14 14 }); 15 15 } -
extensions/LLGBO2/main.inc.php
r29049 r29484 9 9 Add a border around picture ...... 10 10 -- 01-07-2014 11 2.7.A Compliance Piwigo 2.7 new administration management 11 2.7.A Compliance Piwigo 2.7 béta new administration management 12 -- 10-09-2014 13 2.7.A Compliance Piwigo 2.7rc1 new administration management 12 14 */ 13 15 if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!'); -
extensions/LLGBO2/maintain.class.php
r29005 r29484 34 34 private $default_header; 35 35 36 function __construct(){36 function __construct(){ 37 37 // +-----------------------------------------------------------------------+ 38 38 // +----------------- default values ---------------------------+ 39 39 // +-----------------------------------------------------------------------+ 40 include(PHPWG_PLUGINS_PATH . basename(dirname(__FILE__)) . '/' .'defaultvalues.php');40 include(PHPWG_PLUGINS_PATH . basename(dirname(__FILE__)) . '/' .'defaultvalues.php'); 41 41 // variable declared in include 42 42 $this->default_main = $default_main; … … 44 44 $this->default_frame = $default_frame; 45 45 $this->default_header = $default_header; 46 } 47 // +-----------------------------------------------------------------------+ 48 // +----------------- default values ---------------------------+ 49 // +-----------------------------------------------------------------------+ 46 } 50 47 51 48 // +-----------------------------------------------------------------------+ 52 49 // +--------------- Install all settings --------------------------------+ 53 50 // +-----------------------------------------------------------------------+ 54 55 51 function install($plugin_version, &$errors=array()) { 52 global $conf; 56 53 // +-----------------------------------------------------------------------+ 57 if (empty($conf['LLGBO2_Settings'])) 58 { if (isset($conf['LLGBO'])) // compatibility 2.6 --> 2.7 59 { $Oldvalues = explode("," , $conf['LLGBO']); 60 foreach($Oldvalues as $cle => $valeur) 61 { if ($Oldvalues[$cle] == 'true' ) 62 {$Oldvalues[$cle] = (boolean)true ;} else { $Oldvalues[$cle] = (boolean)false;} 63 } 64 $this->default_main['version'] = 1; 65 $this->default_main['frame'] = $Oldvalues[0]; 66 $this->default_main['tooltipdisp'] = $Oldvalues[1]; 67 $this->default_main['exifunderbt'] = $Oldvalues[2]; 68 $this->default_main['titleframe'] = $Oldvalues[5]; 69 $this->default_main['manageheader'] = $Oldvalues[6]; 70 $this->default_main['alwaysdisplayexif'] = $Oldvalues[10]; 71 conf_delete_param('LLGBO'); // old values before 2.7 54 if (empty($conf['LLGBO2_Settings'])) 55 { if (isset($conf['LLGBO'])) // compatibility 2.6 --> 2.7 56 { $Oldvalues = explode("," , $conf['LLGBO']); 57 foreach($Oldvalues as $cle => $valeur) 58 { if ($Oldvalues[$cle] == 'true' ) 59 {$Oldvalues[$cle] = (boolean)true ;} else { $Oldvalues[$cle] = (boolean)false;} 72 60 } 73 61 $this->default_main['version'] = 1; 62 $this->default_main['frame'] = $Oldvalues[0]; 63 $this->default_main['tooltipdisp'] = $Oldvalues[1]; 64 $this->default_main['exifunderbt'] = $Oldvalues[2]; 65 $this->default_main['titleframe'] = $Oldvalues[5]; 66 $this->default_main['manageheader'] = $Oldvalues[6]; 67 $this->default_main['alwaysdisplayexif'] = $Oldvalues[10]; 68 conf_delete_param('LLGBO'); // old values before 2.7 69 } 70 71 // +-----------------------------------------------------------------------+ 72 if (isset($conf['LLGBOTOOLTIP'])) // compatibility 2.6 --> 2.7 73 { $Oldvalues = explode("," , $conf['LLGBOTOOLTIP']); 74 75 $this->default_tooltip['TT-width'] = $Oldvalues[0]; 76 $this->default_tooltip['TT-size'] = $Oldvalues[1]; 77 $this->default_tooltip['TT-bordercolor'] = $Oldvalues[2]; 78 $this->default_tooltip['TT-bgcolor'] = $Oldvalues[3]; 79 $this->default_tooltip['TT-titlecolor'] = $Oldvalues[4]; 80 $this->default_tooltip['TT-textcolor'] = $Oldvalues[5]; 81 82 conf_delete_param('LLGBOTOOLTIP'); // old values before 2.7 83 } 74 84 75 85 // +-----------------------------------------------------------------------+ 76 if (isset($conf['LLGBOTOOLTIP'])) // compatibility 2.6 --> 2.777 { $Oldvalues = explode("," , $conf['LLGBOTOOLTIP']);78 86 79 $this->default_tooltip['TT-width'] = $Oldvalues[0]; 80 $this->default_tooltip['TT-size'] = $Oldvalues[1]; 81 $this->default_tooltip['TT-bordercolor'] = $Oldvalues[2]; 82 $this->default_tooltip['TT-bgcolor'] = $Oldvalues[3]; 83 $this->default_tooltip['TT-titlecolor'] = $Oldvalues[4]; 84 $this->default_tooltip['TT-textcolor'] = $Oldvalues[5]; 85 86 conf_delete_param('LLGBOTOOLTIP'); // old values before 2.7 87 } 88 89 // +-----------------------------------------------------------------------+ 87 if (isset($conf['LLGBOFRAME'])) // compatibility 2.6 --> 2.7 88 { $Oldvalues = explode("," , $conf['LLGBOFRAME']); 89 $i=0; 90 for ($x = 1 ;$x < 32 ; $x =$x +2) 91 { $newcolors[$i] = $Oldvalues[$x]; 92 $newsizes[$i] = $Oldvalues[$x +1]; 93 $i = $i +1; 94 } 95 $this->default_frame['FR-titlecolor'] = $Oldvalues[0]; 96 $this->default_frame['FR-sizes'] = $newsizes; 97 $this->default_frame['FR-colors'] = $newcolors; 98 99 conf_delete_param('LLGBOFRAME'); // old values before 2.7 100 } 90 101 91 if (isset($conf['LLGBOFRAME'])) // compatibility 2.6 --> 2.792 { $Oldvalues = explode("," , $conf['LLGBOFRAME']);93 $i=0;94 for ($x = 1 ;$x < 32 ; $x =$x +2)95 { $newcolors[$i] = $Oldvalues[$x];96 $newsizes[$i] = $Oldvalues[$x +1];97 $i = $i +1;98 }99 100 $this->default_frame['FR-titlecolor'] = $Oldvalues[0];101 $this->default_frame['FR-sizes'] = $newsizes;102 $this->default_frame['FR-colors'] = $newcolors;103 104 conf_delete_param('LLGBOFRAME'); // old values before 2.7105 }106 107 102 // +-----------------------------------------------------------------------+ 103 104 if (isset($conf['LLGBOHEADER'])) // compatibility 2.6 --> 2.7 105 { $Oldvalues = explode("," , $conf['LLGBOHEADER']); 106 $i = 0; 107 foreach($this->default_header['HD-dispheader'] as $cle => $valeur) 108 { if ($Oldvalues[$i] == 'true' ) {$Oldvalues[$i] = (boolean)true ;} else { $Oldvalues[$i] = (boolean)false;} 109 $this->default_header['HD-dispheader'][$cle] = $Oldvalues[$i]; 110 $i = $i +1;} 111 conf_delete_param('LLGBOHEADER'); // old values before 2.7 112 } 108 113 109 if (isset($conf['LLGBOHEADER'])) // compatibility 2.6 --> 2.7 110 { $Oldvalues = explode("," , $conf['LLGBOHEADER']); 111 $i = 0; 112 foreach($this->default_header['HD-dispheader'] as $cle => $valeur) 113 { if ($Oldvalues[$i] == 'true' ) {$Oldvalues[$i] = (boolean)true ;} else { $Oldvalues[$i] = (boolean)false;} 114 $this->default_header['HD-dispheader'][$cle] = $Oldvalues[$i]; 115 $i = $i +1;} 116 conf_delete_param('LLGBOHEADER'); // old values before 2.7 117 } 118 119 $conf['LLGBO2'] =array_merge((array)$this->default_main, (array)$this->default_tooltip,(array) $this->default_frame,(array) $this->default_header); 120 print_r($this->default_main); 121 conf_update_param('LLGBO2_Settings', $conf['LLGBO2']); 122 } 114 $conf['LLGBO2'] =array_merge((array)$this->default_main, (array)$this->default_tooltip,(array) $this->default_frame,(array) $this->default_header); 115 print_r($this->default_main); 116 conf_update_param('LLGBO2_Settings', $conf['LLGBO2']); 123 117 } 124 118 } 125 119 126 // +-----------------------------------------------------------------------+127 120 // +-----------------------------------------------------------------------+ 128 121 function update($old_version, $new_version, &$errors=array()) 129 122 { 130 123 $this->install($new_version, $errors); 131 124 } 132 125 133 126 // +-----------------------------------------------------------------------+ 134 function uninstall() { 127 function uninstall() 128 { 135 129 conf_delete_param('LLGBO2_Settings'); 136 137 130 } 138 131 } -
extensions/LLGBO2/template/llgbo_content.tpl
r29049 r29484 1 1 <!-- LLGBO2 picture_content --> 2 3 {if isset($llgbo.TOOLTIPCSS)} 4 {$llgbo.TOOLTIPCSS} 5 {/if} 6 {if isset($llgbo.GBOCSS)} 7 {combine_css path=$llgbo.GBOCSS order=+10} 8 {/if} 9 10 {if !isset($llgbo.NOJS)} 11 {if isset($llgbo.TOOLTIP)} 12 {combine_script id='llgbojqtooltip' load='footer' require='jquery' path=$LLGBO_PATH|@cat:"js/jquery_llgbotip.js"} 13 {/if} 14 {if isset($llgbo.FRAME_BEGIN)} 15 {combine_script id='llgbojqframe' load='footer' require='jquery' path=$LLGBO_PATH|@cat:"js/jquery_llgboframeresize.js" } 16 {/if} 2 {if isset($llgbo.TOOLTIPCSS)} 3 {$llgbo.TOOLTIPCSS} 4 {/if} 5 {if isset($llgbo.GBOCSS)} 6 {combine_css path=$llgbo.GBOCSS order=+10} 7 {/if} 8 9 {if !isset($llgbo.NOJS)} 10 {if isset($llgbo.TOOLTIP)} 11 {combine_script id='llgbojqtooltip' load='footer' require='jquery' path=$LLGBO_PATH|@cat:"js/jquery_llgbotip.js"} 12 {/if} 13 {if isset($llgbo.FRAME_BEGIN)} 14 {combine_script id='llgbojqframe' load='footer' require='jquery' path=$LLGBO_PATH|@cat:"js/jquery_llgboframeresize.js" } 17 15 {/if} 16 {/if} 18 17 19 18 20 19 21
Note: See TracChangeset
for help on using the changeset viewer.