Changeset 48979 in spip-zone
- Timestamp:
- Jun 21, 2011, 9:14:26 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
_plugins_/compositions/compositions_fonctions.php
r48971 r48979 16 16 */ 17 17 function compositions_chemin(){ 18 $config_chemin = defined('_DIR_PLUGIN_Z')?'contenu/':'compositions/'; 18 $config_chemin = 'compositions/'; 19 if (defined('_DIR_PLUGIN_Z') OR defined('_DIR_PLUGIN_ZCORE')) 20 $config_chemin = (isset($GLOBALS['z_blocs'])?reset($GLOBALS['z_blocs']):'contenu/'); 21 19 22 if (isset($GLOBALS['meta']['compositions'])){ 20 23 $config = unserialize($GLOBALS['meta']['compositions']); … … 29 32 /** 30 33 * Tester si la stylisation auto est activee 31 * @return <type>34 * @return string 32 35 */ 33 36 function compositions_styliser_auto(){ 34 $config_styliser = true; 35 if (isset($GLOBALS['meta']['compositions'])){ 36 $config = unserialize($GLOBALS['meta']['compositions']); 37 $config_styliser = $config['styliser_auto'] != 'non'; 38 } 39 return $config_styliser?' ':''; 37 $config_styliser = true; 38 if (defined('_DIR_PLUGIN_Z') OR defined('_DIR_PLUGIN_ZCORE')){ 39 $config_styliser = false; // Z s'occupe de styliser les compositions 40 } 41 elseif (isset($GLOBALS['meta']['compositions'])){ 42 $config = unserialize($GLOBALS['meta']['compositions']); 43 $config_styliser = $config['styliser_auto'] != 'non'; 44 } 45 return $config_styliser?' ':''; 40 46 } 41 47 … … 67 73 if (preg_match(",$match,ims",$s,$regs) 68 74 AND ($composition = !$informer 69 75 OR $composition = compositions_charger_infos($base))) 70 76 $res[$regs[1]][$regs[3]] = $composition; 71 77 // retenir les skels qui ont un xml associe … … 177 183 $desc = $trouver_table($table,$serveur); 178 184 if (isset($desc['field']['composition']) AND $id){ 179 180 181 182 183 184 185 186 187 188 185 $composition = sql_getfetsel('composition', $table_sql, "$_id_table=".intval($id), '', '', '', '', $serveur); 186 if ($composition != '') 187 $retour = $composition; 188 elseif (!$etoile AND isset($desc['field']['id_rubrique'])) { 189 $_id_rubrique = ($type == 'rubrique') ? 'id_parent' : 'id_rubrique'; 190 $id_rubrique = sql_getfetsel($_id_rubrique,$table_sql,"$_id_table=".intval($id),'','','','',$serveur); 191 $retour = compositions_heriter($type, $id_rubrique, $serveur); 192 } 193 else 194 $retour = ''; 189 195 } 190 196 return ($retour == '-') ? '' : $retour;
Note: See TracChangeset
for help on using the changeset viewer.