3 * Plugin Zen-Garden pour Spip 2.0
4 * Licence GPL (c) 2006-2008 Cedric Morin
8 if (!defined("_ECRIRE_INC_VERSION")) return;
10 function action_zengarden_activer_theme_dist(){
11 $securiser_action = charger_fonction('securiser_action','inc');
12 $arg = $securiser_action();
14 if (strncmp('defaut:',$arg,7) == 0){
15 $dir_theme = _DIR_THEMES
. substr($arg,7);
16 $flux = pipeline('zengarden_activer_theme', array('args' => array('dir' =>$dir_theme, 'action'=>'effacer'), 'data' => true));
18 include_spip('inc/meta');
19 effacer_meta("zengarden_theme");
22 elseif (strncmp('apercu:',$arg,7) == 0){
23 $theme = substr($arg,7);
24 $dir_theme = _DIR_THEMES
. $theme;
25 if (is_dir($dir_theme)) {
26 $flux = pipeline('zengarden_activer_theme', array('args' => array('dir' =>$dir_theme, 'action'=>'apercevoir'), 'data' => true));
28 include_spip('inc/cookie');
29 spip_setcookie('spip_zengarden_theme', $theme);
33 elseif (strncmp('activation:',$arg,11) == 0) {
34 $theme = substr($arg,11);
35 $dir_theme = _DIR_THEMES
. $theme;
36 if (is_dir($dir_theme)) {
37 $flux = pipeline('zengarden_activer_theme', array('args' => array('dir' => $dir_theme, 'action'=>'activer'), 'data' => true));
39 include_spip('inc/meta');
40 ecrire_meta("zengarden_theme", $theme);