Changeset 6552 for extensions
- Timestamp:
- Jun 17, 2010, 11:00:18 PM (14 years ago)
- Location:
- extensions/nbc_ThemeChanger
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/nbc_ThemeChanger/admin/nbc_ThemeChanger_admin.php
r3954 r6552 43 43 array_push($themes, $selected); 44 44 } 45 45 46 46 47 // Configuration du template … … 62 63 $listcategory = array(); 63 64 $newconf_nbc_ThemeChanger = ''; 64 $theme = explode("/" , $_POST['template']); 65 //evol $theme = explode("/" , $_POST['template']); 66 $theme = $_POST['template']; 65 67 $add_ok = false; 66 68 … … 96 98 if ($newconf_nbc_ThemeChanger <> '') 97 99 $newconf_nbc_ThemeChanger .= ';'; 98 $newconf_nbc_ThemeChanger .= $thecategory.','.$theme [0].','.$theme[1];100 $newconf_nbc_ThemeChanger .= $thecategory.','.$theme; 99 101 $listcategory[$i] = -1; 100 102 $add_ok = true; … … 109 111 $newconf_nbc_ThemeChanger .= ';'; 110 112 //echo ' Recup : '.$element_ThemeChanger[0]; 111 $newconf_nbc_ThemeChanger .= $element_ThemeChanger[0].','.$element_ThemeChanger[1] .','.$element_ThemeChanger[2];113 $newconf_nbc_ThemeChanger .= $element_ThemeChanger[0].','.$element_ThemeChanger[1]; 112 114 } 113 115 } … … 119 121 //echo ' Nouveau: '.$thecategory; 120 122 if ($thecategory <> -1) 121 $newconf_nbc_ThemeChanger .= $thecategory.','.$theme [0].','.$theme[1];123 $newconf_nbc_ThemeChanger .= $thecategory.','.$theme; 122 124 } 123 125 … … 143 145 $element_ThemeChanger = explode("," , $Theme_Cat); 144 146 145 if ($element_ThemeChanger[0] <> '' and $element_ThemeChanger[1] <> '' and $element_ThemeChanger[2] <> '')147 if ($element_ThemeChanger[0] <> '' and $element_ThemeChanger[1] <> '') 146 148 { 147 149 array_push($catsused, $element_ThemeChanger[0]); … … 158 160 $assoc_ThemeChanger[$element_ThemeChanger[0]] = array( 159 161 'CATEGORY_NAME' => get_cat_display_name_cache($row['uppercats'], null, false), 160 'TEMPLATE' => $element_ThemeChanger[1] .'/'.$element_ThemeChanger[2],162 'TEMPLATE' => $element_ThemeChanger[1], 161 163 ); 162 164 } … … 179 181 $newconf_nbc_ThemeChanger .= ';'; 180 182 181 $newconf_nbc_ThemeChanger .= $element_ThemeChanger[0].','.$element_ThemeChanger[1] .','.$element_ThemeChanger[2];183 $newconf_nbc_ThemeChanger .= $element_ThemeChanger[0].','.$element_ThemeChanger[1]; 182 184 } 183 185 } … … 287 289 $element_ThemeChanger = explode("," , $Theme_Cat); 288 290 289 if ($element_ThemeChanger[0] <> '' and $element_ThemeChanger[1] <> '' and $element_ThemeChanger[2] <> '')291 if ($element_ThemeChanger[0] <> '' and $element_ThemeChanger[1] <> '') 290 292 { 291 293 array_push($catsused, $element_ThemeChanger[0]); … … 304 306 'CATEGORY_NAME' => get_cat_display_name_cache($row['uppercats'], null, false), 305 307 'CATEGORY_ID' => $element_ThemeChanger[0], 306 'TEMPLATE' => $element_ThemeChanger[1] .'/'.$element_ThemeChanger[2],308 'TEMPLATE' => $element_ThemeChanger[1], 307 309 'U_MODIFY' => add_url_params($page_ThemeChanger_admin, array( 308 310 'action' => 'mod_assoc', … … 316 318 $assoc_ThemeChanger[$element_ThemeChanger[0]] = array( 317 319 'CATEGORY_NAME' => get_cat_display_name_cache($row['uppercats'], null, false), 318 'TEMPLATE' => $element_ThemeChanger[1] .'/'.$element_ThemeChanger[2],320 'TEMPLATE' => $element_ThemeChanger[1], 319 321 ); 320 322 } -
extensions/nbc_ThemeChanger/main.inc.php
r3893 r6552 2 2 /* 3 3 Plugin Name: NBC ThemeChanger 4 Version: 2. 0.1.b5 Description: Permet d imposer un theme à une categorie (merci a P@t).4 Version: 2.1.0.a 5 Description: Permet d'associer à chaque catégorie virtuel ou physique un thème spécifique. 6 6 ThemeChanger vous permet de spécifier pour chaque catégorie un thème différent. 7 7 Pour les catégories non spécifiées, le thème par défaut s'applique. 8 ThemeChanger allow you to specify for each category a differenttheme.8 ThemeChanger allow you to associate for each category a specific theme. 9 9 For the unspecified categories, the theme by default is applied. 10 10 ThemeChanger permette di precisare per ogni categoria un tema diverso. 11 11 Per le categorie non precisato, il tema da difetto è applicato. 12 12 Plugin URI: http://phpwebgallery.net/ext/extension_view.php?eid=214 13 Author: Nicco 14 Author URI: http://gallery-nicco.no-ip.org 15 Author Portage piwigo 2.0.X : Datajulien 16 Author Portage piwigo 2.0.X URI : http://morgane.quoirez.com 13 Author: Datajulien 14 Author URI: http://morgane.quoirez.com 17 15 */ 18 16 … … 54 52 $element_ThemeChanger = explode("," , $Theme_Cat); 55 53 56 if ($element_ThemeChanger[0] <> '' and $element_ThemeChanger[1] <> '' and $element_ThemeChanger[2] <> '')57 $category_theme[$element_ThemeChanger[0]] = array( $element_ThemeChanger[1] , $element_ThemeChanger[2] );54 if ($element_ThemeChanger[0] <> '' and $element_ThemeChanger[1] <> '') 55 $category_theme[$element_ThemeChanger[0]] = $element_ThemeChanger[1]; 58 56 } 59 57 60 58 if (isset($page['category']['id']) and isset($category_theme[$page['category']['id']])) 61 59 { 62 $user['template'] = $category_theme[$page['category']['id']][0]; 63 $user['theme'] = $category_theme[$page['category']['id']][1]; 64 65 $template->Template(PHPWG_ROOT_PATH.'template/'.$user['template'], $user['theme']); 60 $user['theme'] = $category_theme[$page['category']['id']]; 61 $template = new Template(PHPWG_ROOT_PATH.'themes', $user['theme'] ); 66 62 } 67 63 }
Note: See TracChangeset
for help on using the changeset viewer.