Changeset 5269 in spip-zone
- Timestamp:
- Sep 12, 2006, 8:19:31 AM (15 years ago)
- Location:
- _plugins_/habillages
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
_plugins_/habillages/exec/config_habillages.php
r5267 r5269 68 68 if ($theme != "" AND $theme != "initial" AND file_exists($options_file)) { 69 69 // Si le fichier inc/mes_options.php existe deja 70 ###echo "option existe";70 echo "option existe"; 71 71 # Ouvrir et lire le fichier... 72 72 $open_options_file = fopen($options_file, 'r'); … … 79 79 80 80 if ($search_comment_backup) { 81 ###echo "commentaire backup trouve dans mes options";81 echo "commentaire backup trouve dans mes options"; 82 82 fclose($open_options_file); 83 83 84 84 # Debut routine. 85 85 if (file_exists($theme_duplicated) AND file_exists($theme_xml)) { 86 ###echo "theme.xml existe dans img_pack";86 echo "theme.xml existe dans img_pack"; 87 87 $open_theme_xml = fopen($theme_xml, 'r'); 88 88 $theme_xml_size = filesize ($theme_xml); … … 98 98 99 99 if ($theme_name[1] != $duplicated_name[1]) { 100 ###echo "le theme choisi n'est pas le même que dans img_pack";100 echo "le theme choisi n'est pas le même que dans img_pack UN"; 101 101 if (is_dir('img_pack_backup') AND !is_dir('img_pack')) { 102 102 mkdir ("img_pack", 0700); … … 135 135 } 136 136 else if ($theme_name[1] == $duplicated_name[1]) { 137 ###echo "le theme choisi est le même que dans img_pack";137 echo "le theme choisi est le même que dans img_pack TROIS"; 138 138 if (($duplicated_version[1] != $theme_version[1]) AND ($duplicated_version[1] < $theme_version[1])) { 139 139 … … 176 176 177 177 else if (file_exists($theme_duplicated) AND !file_exists($theme_xml)) { 178 ###echo "fichier theme.xml n'exite pas dans le theme";178 echo "fichier theme.xml n'exite pas dans le theme"; 179 179 if (is_dir('img_pack_backup') AND !is_dir('img_pack')) { 180 ###echo "backup existe, pas img_pack";181 mkdir ("img_pack", 0700); 182 mkdir ("img_pack/icones_barre", 0700); 183 mkdir ("img_pack/icones", 0700); 184 } 185 else if (!is_dir('img_pack_backup') AND is_dir('img_pack')){ 186 ###echo "backup n'existe pas, img_pack si";180 echo "backup existe, pas img_pack"; 181 mkdir ("img_pack", 0700); 182 mkdir ("img_pack/icones_barre", 0700); 183 mkdir ("img_pack/icones", 0700); 184 } 185 else if (!is_dir('img_pack_backup') AND is_dir('img_pack')){ 186 echo "backup n'existe pas, img_pack si"; 187 187 rename ("img_pack", "img_pack_backup"); 188 188 mkdir ("img_pack", 0700); … … 191 191 } 192 192 else if (is_dir('img_pack_backup') AND is_dir('img_pack')){ 193 ###echo "backup existe, img_pack aussi";193 echo "backup existe, img_pack aussi"; 194 194 } 195 195 … … 218 218 219 219 else if (!file_exists($theme_duplicated)){ 220 ###echo "le theme.xml existe pas dans img_pack";220 echo "le theme.xml existe pas dans img_pack"; 221 221 if (is_dir('img_pack_backup') AND !is_dir('img_pack')) { 222 222 mkdir ("img_pack", 0700); … … 257 257 258 258 else if (!$search_comment_backup AND $search_define) { 259 ###echo "commentaire backup options pas trouvé mais define";259 echo "commentaire backup options pas trouvé mais define"; 260 260 fclose($open_options_file); 261 261 # Definir un fichier de sauvegarde. … … 275 275 # Debut routine. 276 276 if (file_exists($theme_duplicated)) { 277 ###echo "theme.xml existe dans img_pack";277 echo "theme.xml existe dans img_pack"; 278 278 $open_theme_xml = fopen($theme_xml, 'r'); 279 279 $theme_xml_size = filesize ($theme_xml); … … 289 289 290 290 if ($theme_name[1] != $duplicated_name[1]) { 291 ###echo "le theme choisi n'est pas le même que dans img_pack";291 echo "le theme choisi n'est pas le même que dans img_pack"; 292 292 if (is_dir('img_pack_backup') AND !is_dir('img_pack')) { 293 293 mkdir ("img_pack", 0700); … … 326 326 } 327 327 else if ($theme_name[1] == $duplicated_name[1]) { 328 ###echo "le theme choisi est le même que dans img_pack";328 echo "le theme choisi est le même que dans img_pack UN"; 329 329 if (($duplicated_version[1] != $theme_version[1]) AND ($duplicated_version[1] < $theme_version[1])) { 330 330 … … 368 368 369 369 else if (!file_exists($theme_duplicated)){ 370 ###echo "le theme.xml existe pas dans img_pack";370 echo "le theme.xml existe pas dans img_pack"; 371 371 if (is_dir('img_pack_backup') AND !is_dir('img_pack')) { 372 372 mkdir ("img_pack", 0700); … … 412 412 # Routines a mettre en fonction. 413 413 if (file_exists($theme_duplicated)) { 414 ###echo "theme.xml existe dans img_pack";414 echo "theme.xml existe dans img_pack"; 415 415 $open_theme_xml = fopen($theme_xml, 'r'); 416 416 $theme_xml_size = filesize ($theme_xml); … … 422 422 $theme_duplicated_size = filesize ($theme_duplicated); 423 423 $read_theme_duplicated = fread ($open_theme_duplicated, $theme_duplicated_size); 424 $search_duplicated_name = eregi("\<prefixe \>(.*)\<\/prefixe\>", $read_theme_duplicated, $duplicated_name);424 $search_duplicated_name = eregi("\<prefixe>(.*)</prefixe>", $read_theme_duplicated, $duplicated_name); 425 425 $search_duplicated_version = eregi("<version>(.*)</version>", $read_theme_duplicated, $duplicated_version); 426 426 427 427 if ($theme_name[1] != $duplicated_name[1]) { 428 ###echo "le theme choisi n'est pas le meme que dans img_pack";428 echo "le theme choisi n'est pas le meme que dans img_pack"; 429 429 if (is_dir('img_pack_backup') AND !is_dir('img_pack')) { 430 430 mkdir ("img_pack", 0700); … … 463 463 } 464 464 else if ($theme_name[1] == $duplicated_name[1]) { 465 ###echo "le theme choisi est le même que dans img_pack";465 echo "le theme choisi est le même que dans img_pack DEUX"; 466 466 if (($duplicated_version[1] != $theme_version[1]) AND ($duplicated_version[1] < $theme_version[1])) { 467 467 … … 505 505 506 506 else if (!file_exists($theme_duplicated)){ 507 ###echo "le theme.xml existe pas dans img_pack";507 echo "le theme.xml existe pas dans img_pack"; 508 508 if (is_dir('img_pack_backup') AND !is_dir('img_pack')) { 509 509 mkdir ("img_pack", 0700); … … 543 543 544 544 else if ($theme == "initial") { 545 ###echo "veut revenir initial";545 echo "veut revenir initial"; 546 546 if (is_dir('img_pack_backup')) { 547 547 mkdir ("img_pack", 0700); … … 571 571 } 572 572 else if (!is_dir('img_pack_backup')) { 573 ###echo "mettre in img_pack natif quelque part pour le restaurer et restaurer mes options";573 echo "mettre in img_pack natif quelque part pour le restaurer et restaurer mes options"; 574 574 } 575 575 } … … 590 590 echo "<a name='access-c' href='#access-c' accesskey='c'></a><div class='cadre-r'><div style='position: relative;'><div class='cadre-titre' style='margin: 0px;'>"; 591 591 echo '<INPUT type=radio name="theme" value="'.$fichier.'"'; 592 $input_begin = '<INPUT type=radio name="theme" value="'.$fichier.'"'; 593 if ($_REQUEST['theme'] == "" AND file_exists($options_file)) { 594 $open_options_file = fopen($options_file, 'r'); 595 $options_file_size = filesize ($options_file); 596 $read_options_file = fread ($open_options_file, $options_file_size); 597 $search_template_name = eregi("$plugin_directory/prive/themes/(.*)/img_pack/", $read_options_file, $template_name); 598 if ($template_name[1] == $fichier) { 592 if ($_REQUEST['theme'] == "" AND file_exists($theme_duplicated)) { 593 echo "Pas de theme choisi et le fichier theme est reconnu dans img_pack"; 594 $open_theme_duplicated_file = fopen($theme_duplicated, 'r'); 595 $theme_duplicated_file_size = filesize ($theme_duplicated); 596 $read_theme_duplicated = fread ($open_theme_duplicated_file, $theme_duplicated_file_size); 597 # Mettre dans l'expression reguliere ci-dessous la possibilite de reconnaitre le prefixe 598 # meme si le prefixe n'est pas colle aux balises <prefixes>. 599 $search_duplicated_name = eregi("<prefixe>(.*)</prefixe>", $read_theme_duplicated, $duplicated_name); 600 echo $duplicated_name[1]; 601 if ($duplicated_name[1] == $fichier) { 599 602 echo " checked"; 600 $input_checked = ' checked';601 603 } 602 fclose($open_ options_file);604 fclose($open_theme_duplicated_file); 603 605 } 604 606 else if ($_REQUEST['theme'] == $fichier) { … … 658 660 fclose($open_plugin_options_file); 659 661 } 660 661 // else if ($squelette == "") { 662 // $cleaned_path = str_replace('../', "", _DIR_PLUGIN_HABILLAGES); 663 // $open_plugin_options_file = fopen($plugin_options_file, 'r'); 664 // $plugin_options_file_size = filesize ($plugin_options_file); 665 // $read_options_file = fread ($open_plugin_options_file, $plugin_options_file_size); 666 // $search_skel_name = eregi("\$GLOBALS\[\'dossier_squelettes\'\]\=$cleaned_path\.\'\/public\/themes\/(.*)\/squelettes\'\;", $read_options_file, $skel_name); 667 // fclose($open_plugin_options_file); 668 // } 662 669 663 670 664 echo '<INPUT type=radio name="squelette" value="initial"'; -
_plugins_/habillages/prive/themes/iko/theme.xml
r5267 r5269 9 9 0.1 10 10 </version> 11 <prefixe> 12 iko 13 </prefixe> 11 <prefixe>iko</prefixe> 14 12 <description> 15 13 Insertion du jeu d'icones "Iko" (voir http://www.koakidi.com/article.php3?id_article=230). -
_plugins_/habillages/prive/themes/realistik/theme.xml
r5267 r5269 9 9 0.1 10 10 </version> 11 <prefixe> 12 realistik 13 </prefixe> 11 <prefixe>realistik</prefixe> 14 12 <description> 15 13 Change les icônes de l'administration avec des icones "realistes". -
_plugins_/habillages/prive/themes/smooth/theme.xml
r5267 r5269 9 9 0.4 10 10 </version> 11 <prefixe> 12 smooth 13 </prefixe> 11 <prefixe>smooth</prefixe> 14 12 <description> 15 13 Change les icônes de l'administration avec des icones "douces". L'avantage de ces icônes est qu'elles gardent la couleur de fond que vous avez choisi pour l'espace privé.
Note: See TracChangeset
for help on using the changeset viewer.