Changeset 29005 for extensions/LLGBO2
- Timestamp:
- Jul 8, 2014, 1:55:14 PM (10 years ago)
- Location:
- extensions/LLGBO2
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/LLGBO2/admin.php
r29004 r29005 32 32 // Setup plugin Language 33 33 load_language('plugin.lang', LLGBO_PATH); 34 include _once(LLGBO_PATH.'defaultvalues.php');35 34 include(LLGBO_PATH.'defaultvalues.php'); 35 36 36 /* ****************************************************** */ 37 37 /* Plugin template initialisation for admin panel display */ 38 38 /* ****************************************************** */ 39 global $template,$prefixeTable,$ CF_LLGBO,$lang;39 global $template,$prefixeTable,$conf,$lang; 40 40 $template->assign( 'LLGBO_VERSION' ,LLGBO_VERSION); 41 41 $template->assign('LLGBO_PATH',LLGBO_PATH); … … 52 52 $page['tab'] = (isset($_GET['tab'])) ? $_GET['tab'] : 'settings'; 53 53 if ((empty($_POST['submit'])) or ($page['tab'] != 'settings')) 54 { $disptabframe = $ CF_LLGBO['frame'];55 $disptabheader = $ CF_LLGBO['manageheader'];56 $disptabtoolt1 = $ CF_LLGBO['tooltipdisp'];57 $disptabtoolt2 = $ CF_LLGBO['exifunderbt'];54 { $disptabframe = $conf['LLGBO2']['frame']; 55 $disptabheader = $conf['LLGBO2']['manageheader']; 56 $disptabtoolt1 = $conf['LLGBO2']['tooltipdisp']; 57 $disptabtoolt2 = $conf['LLGBO2']['exifunderbt']; 58 58 } 59 59 else -
extensions/LLGBO2/defaultvalues.php
r28990 r29005 3 3 // -------- LLGBO valeurs par défaut ---- 4 4 // --------------------------------------------- 5 $default_ Main = array(5 $default_main = array( 6 6 'version' => 1, 7 7 'frame' => False, -
extensions/LLGBO2/include/manage_header.php
r28990 r29005 4 4 //---------------------------------------------------- 5 5 if (!isset($page_name)) {$page_name ='index';} 6 if ($ CF_LLGBO['manageheader'])6 if ($conf['LLGBO2']['manageheader']) 7 7 {$no_header = false; 8 8 $input= $_SERVER['PHP_SELF']; … … 13 13 14 14 if ( strpos( $input,'index') == true ) 15 { foreach($ CF_LLGBO['HD-dispheader'] as $cle => $valeur)15 { foreach($conf['LLGBO2']['HD-dispheader'] as $cle => $valeur) 16 16 { if ($valeur == false) { 17 17 if($cle == 'home' ) {$cle = 'index.php';} … … 23 23 else 24 24 { 25 if (isset($ CF_LLGBO['HD-dispheader'][$page_name]) and ($CF_LLGBO['HD-dispheader'][$page_name] == false) ) {$no_header = true;}25 if (isset($conf['LLGBO2']['HD-dispheader'][$page_name]) and ($conf['LLGBO2']['HD-dispheader'][$page_name] == false) ) {$no_header = true;} 26 26 } 27 27 if ($no_header == true) -
extensions/LLGBO2/include/manage_picture_content.php
r28990 r29005 6 6 /* LLGBO Manage Picture_content */ 7 7 //---------------------------------------------------- 8 global $template,$conf ,$CF_LLGBO;8 global $template,$conf; 9 9 10 10 $template->assign('LLGBO_PATH',LLGBO_PATH); 11 11 include_once(LLGBO_PATH.'/css/sweettitles.css.php'); 12 $ CF_LLGBO['rendercontent'] = false;12 $conf['LLGBO2']['rendercontent'] = false; 13 13 //----------------------------------------------------------------- 14 14 // ----------- add CSS tooltip in footer -------------------- 15 15 //----------------------------------------------------------------- 16 If (($ CF_LLGBO['tooltipdisp'] ) or ($CF_LLGBO['exifunderbt']))16 If (($conf['LLGBO2']['tooltipdisp'] ) or ($conf['LLGBO2']['exifunderbt'])) 17 17 { $template->append('footer_elements',$sweetcss); 18 18 $template->append('llgbo', array( 'TOOLTIP' => 'ok' ), true);} … … 23 23 if (!in_array($ext, $conf['picture_ext'])) 24 24 {return $content;} 25 $ CF_LLGBO['rendercontent'] = true; // $content ok for update25 $conf['LLGBO2']['rendercontent'] = true; // $content ok for update 26 26 27 27 //----------------------------------------------------------------- … … 32 32 $autosize_in_place = $template->get_template_vars('is_automatic_size'); 33 33 $autosize_selected = $template->get_template_vars('automatic_size'); 34 unset ($ CF_LLGBO['PictSizeWH'] );34 unset ($conf['LLGBO2']['PictSizeWH'] ); 35 35 if ((isset($autosize_in_place)) and (isset($autosize_selected)) ) 36 {$ CF_LLGBO['PictSizeWH'] = $element_info['derivatives'][$autosize_selected]->get_size();36 {$conf['LLGBO2']['PictSizeWH'] = $element_info['derivatives'][$autosize_selected]->get_size(); 37 37 } 38 38 else … … 44 44 //---------------------------------------------------- 45 45 46 If ($ CF_LLGBO['tooltipdisp'] )// tooltip46 If ($conf['LLGBO2']['tooltipdisp'] )// tooltip 47 47 { $prev = $template->get_template_vars('previous'); 48 48 $next = $template->get_template_vars('next'); … … 53 53 } 54 54 55 If (($ CF_LLGBO['frame']) ) //Frame55 If (($conf['LLGBO2']['frame']) ) //Frame 56 56 { $template->set_prefilter('default_content', 'LLGBO_prefilter_Content_Frame'); 57 57 //---------------------------------------------------- … … 68 68 {$themestyle = 'default';} 69 69 $frame_end = ''; 70 foreach ($ CF_LLGBO['FR-sizes'] as $value)70 foreach ($conf['LLGBO2']['FR-sizes'] as $value) 71 71 {if ( $value > 0) // boder value > 0 72 72 { $frame_end = $frame_end.'</div>';} -
extensions/LLGBO2/main.inc.php
r29004 r29005 2 2 /* 3 3 Plugin Name: Look_like_gbo2 4 Version: 2.7.A4 Version: 2.7.A 5 5 Plugin URI: http://phpwebgallery.net/ext/extension_view.php?eid=251 6 6 Author: GBo … … 50 50 function llgbo_init() 51 51 { 52 global $conf,$CF_LLGBO; 53 load_language('plugin.lang', LLGBO_PATH); 54 55 $CF_LLGBO2settings = unserialize($conf['LLGBO2settings']); 56 $CF_LLGBO2tooltip = unserialize($conf['LLGBO2tooltip']); 57 $CF_LLGBO2frame = unserialize($conf['LLGBO2frame']); 58 $CF_LLGBO2header = unserialize($conf['LLGBO2header']); 59 $CF_LLGBO =array_merge((array)$CF_LLGBO2settings, (array)$CF_LLGBO2tooltip,(array) $CF_LLGBO2frame,(array) $CF_LLGBO2header); 60 } 52 global $conf; 53 Load_language('plugin.lang', LLGBO_PATH); 54 55 $conf['LLGBO2'] = safe_unserialize($conf['LLGBO2_Settings']); 56 } 61 57 62 58 … … 66 62 function llgbo_BeginPicture() 67 63 /******************************************************************/ 68 {global $ CF_LLGBO,$template;69 If ($ CF_LLGBO['exifunderbt']) // exif under bt64 {global $conf,$template; 65 If ($conf['LLGBO2']['exifunderbt']) // exif under bt 70 66 {$_GET['metadata'] = 'O';} 71 67 72 If ($ CF_LLGBO['alwaysdisplayexif']) //always display metadata68 If ($conf['LLGBO2']['alwaysdisplayexif']) //always display metadata 73 69 {if ( pwg_get_session_var('show_metadata') == null ) 74 70 { pwg_set_session_var('show_metadata', 1 ); } … … 81 77 function llgbo_beginheader() 82 78 /******************************************************************/ 83 { global $page,$ CF_LLGBO;84 If ($ CF_LLGBO['exifunderbt'] ) // reset nofollow, noindex79 { global $page,$conf; 80 If ($conf['LLGBO2']['exifunderbt'] ) // reset nofollow, noindex 85 81 { unset ($page['meta_robots']);} 86 82 } … … 90 86 function llgbo_endHeader() 91 87 /******************************************************************/ 92 {global $template,$conf ,$CF_LLGBO;88 {global $template,$conf; 93 89 $page_name = script_basename(); 94 90 include_once(LLGBO_PATH.'include/manage_header.php'); … … 101 97 function llgbo_EndPicture() 102 98 /******************************************************************/ 103 { global $template,$ CF_LLGBO,$conf,$page,$lang;99 { global $template,$conf,$page,$lang; 104 100 //---------------------------------------------------- 105 101 /* HTML End frame on Picture.tpl */ 106 102 //---------------------------------------------------- 107 103 108 If (($ CF_LLGBO['frame']) //Frame109 and ($ CF_LLGBO['rendercontent']) )// $content ok for update104 If (($conf['LLGBO2']['frame']) //Frame 105 and ($conf['LLGBO2']['rendercontent']) )// $content ok for update 110 106 { $target = 'picture'; 111 107 if ($page['slideshow'] and $conf['light_slideshow']) … … 114 110 //$PictSizeWH is not already defined by auto_size 115 111 $current= $template->get_template_vars('current'); 116 if (empty($ CF_LLGBO['PictSizeWH']))117 {$ CF_LLGBO['PictSizeWH'] = $current['selected_derivative']->get_size();}118 $PictSizeWH = $ CF_LLGBO['PictSizeWH'];112 if (empty($conf['LLGBO2']['PictSizeWH'])) 113 {$conf['LLGBO2']['PictSizeWH'] = $current['selected_derivative']->get_size();} 114 $PictSizeWH = $conf['LLGBO2']['PictSizeWH']; 119 115 $frame_width = $PictSizeWH[0]; 120 116 $frame_height = $PictSizeWH[1]; 121 117 $frame_begin =''; 122 foreach ($ CF_LLGBO['FR-sizes'] as $cle => $value)118 foreach ($conf['LLGBO2']['FR-sizes'] as $cle => $value) 123 119 { if ( $value > 0) // boder value > 0 124 120 { $frame_width = $frame_width + ( 2 * $value); 125 121 $frame_height = $frame_height + ( 2* $value); 126 $frame_begin = '<div class="llgboFR" style="border:'.$value.'px solid '.$ CF_LLGBO['FR-colors'][$cle].'">'."\n".$frame_begin;122 $frame_begin = '<div class="llgboFR" style="border:'.$value.'px solid '.$conf['LLGBO2']['FR-colors'][$cle].'">'."\n".$frame_begin; 127 123 } 128 124 } … … 133 129 'FRAME_BEGIN' => $frame_begin), true); 134 130 135 If ($ CF_LLGBO['titleframe'] )131 If ($conf['LLGBO2']['titleframe'] ) 136 132 { $template->append('llgbo', array( 137 'TITLE_FRAME_COLOR' => $ CF_LLGBO['FR-titlecolor'],133 'TITLE_FRAME_COLOR' => $conf['LLGBO2']['FR-titlecolor'], 138 134 'TITLE_FRAME' => $current['name'] ), true); 139 135 $template->assign('SHOW_PICTURE_NAME_ON_TITLE' , false); … … 151 147 $u_metadata = $template->get_template_vars('U_METADATA'); 152 148 $swt = ""; 153 If ($ CF_LLGBO['exifunderbt']) // exif under bt149 If ($conf['LLGBO2']['exifunderbt']) // exif under bt 154 150 { $metadata = $template->get_template_vars('metadata'); 155 151 if (is_array($metadata)) … … 251 247 add_event_handler('loc_begin_page_header', 'llgbo_beginheader'); 252 248 add_event_handler('loc_end_page_header', 'llgbo_endHeader'); 253 ad_event_handler( 'loc_begin_picture','llgbo_BeginPicture');254 add_event_handler( 'loc_end_picture', 'llgbo_EndPicture');249 Add_event_handler( 'loc_begin_picture','llgbo_BeginPicture'); 250 Add_event_handler( 'loc_end_picture', 'llgbo_EndPicture'); 255 251 add_event_handler('render_element_content', 'llgbo_RenderContent', EVENT_HANDLER_PRIORITY_NEUTRAL-1, 20 ); 256 252 } -
extensions/LLGBO2/maintain.class.php
r29004 r29005 29 29 class Look_like_gbo2_maintain extends PluginMaintain 30 30 { 31 private $default_ Main;31 private $default_main; 32 32 private $default_tooltip; 33 33 private $default_frame; … … 40 40 include(PHPWG_PLUGINS_PATH . basename(dirname(__FILE__)) . '/' .'defaultvalues.php'); 41 41 // variable declared in include 42 $this->default_ Main = $default_Main;42 $this->default_main = $default_main; 43 43 $this->default_tooltip = $default_tooltip; 44 44 $this->default_frame = $default_frame; … … 55 55 global $conf; 56 56 // +-----------------------------------------------------------------------+ 57 if (empty($conf['LLGBO2 settings']))57 if (empty($conf['LLGBO2_Settings'])) 58 58 { if (isset($conf['LLGBO'])) // compatibility 2.6 --> 2.7 59 59 { $Oldvalues = explode("," , $conf['LLGBO']); … … 62 62 {$Oldvalues[$cle] = (boolean)true ;} else { $Oldvalues[$cle] = (boolean)false;} 63 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];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 71 conf_delete_param('LLGBO'); // old values before 2.7 72 72 } 73 conf_update_param('LLGBO2settings',serialize($this->default_Main), true);74 }73 74 75 75 // +-----------------------------------------------------------------------+ 76 if (empty($conf['LLGBO2tooltip'])) 77 { if (isset($conf['LLGBOTOOLTIP'])) // compatibility 2.6 --> 2.7 76 if (isset($conf['LLGBOTOOLTIP'])) // compatibility 2.6 --> 2.7 78 77 { $Oldvalues = explode("," , $conf['LLGBOTOOLTIP']); 79 78 … … 85 84 $this->default_tooltip['TT-textcolor'] = $Oldvalues[5]; 86 85 87 86 conf_delete_param('LLGBOTOOLTIP'); // old values before 2.7 88 87 } 89 conf_update_param('LLGBO2tooltip',serialize($this->default_tooltip), true); 90 } 88 91 89 // +-----------------------------------------------------------------------+ 92 if (empty($conf['LLGBO2frame']))93 {if (isset($conf['LLGBOFRAME'])) // compatibility 2.6 --> 2.790 91 if (isset($conf['LLGBOFRAME'])) // compatibility 2.6 --> 2.7 94 92 { $Oldvalues = explode("," , $conf['LLGBOFRAME']); 95 93 $i=0; … … 106 104 conf_delete_param('LLGBOFRAME'); // old values before 2.7 107 105 } 108 conf_update_param('LLGBO2frame', serialize($this->default_frame), true); 109 } 106 110 107 // +-----------------------------------------------------------------------+ 111 if (empty($conf['LLGBO2header']))112 {if (isset($conf['LLGBOHEADER'])) // compatibility 2.6 --> 2.7108 109 if (isset($conf['LLGBOHEADER'])) // compatibility 2.6 --> 2.7 113 110 { $Oldvalues = explode("," , $conf['LLGBOHEADER']); 114 111 $i = 0; … … 119 116 conf_delete_param('LLGBOHEADER'); // old values before 2.7 120 117 } 121 conf_update_param('LLGBO2header',serialize($this->default_header), true); 122 } 123 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 } 124 123 } 125 124 … … 134 133 // +-----------------------------------------------------------------------+ 135 134 function uninstall() { 136 conf_delete_param('LLGBO2settings'); 137 conf_delete_param('LLGBO2tooltip'); 138 conf_delete_param('LLGBO2frame'); 139 conf_delete_param('LLGBO2header'); 135 conf_delete_param('LLGBO2_Settings'); 136 140 137 } 141 138 }
Note: See TracChangeset
for help on using the changeset viewer.