X-Git-Url: http://git.cyclocoop.org/?a=blobdiff_plain;ds=sidebyside;f=www%2Fplugins%2Fauto%2Fzen-garden%2Faction%2Fzengarden_activer_theme.php;fp=www%2Fplugins%2Fauto%2Fzen-garden%2Faction%2Fzengarden_activer_theme.php;h=fe89801f6a5758495edc65b6a93320522084a9e2;hb=80b4d3e85f78d402ed2e73f8f5d1bf4c19962eed;hp=0000000000000000000000000000000000000000;hpb=aaf970bf4cdaf76689ecc10609048e18d073820c;p=velocampus%2Fweb%2Fwww.git diff --git a/www/plugins/auto/zen-garden/action/zengarden_activer_theme.php b/www/plugins/auto/zen-garden/action/zengarden_activer_theme.php new file mode 100644 index 0000000..fe89801 --- /dev/null +++ b/www/plugins/auto/zen-garden/action/zengarden_activer_theme.php @@ -0,0 +1,46 @@ + array('dir' =>$dir_theme, 'action'=>'effacer'), 'data' => true)); + if ($flux) { + include_spip('inc/meta'); + effacer_meta("zengarden_theme"); + } + } + elseif (strncmp('apercu:',$arg,7) == 0){ + $theme = substr($arg,7); + $dir_theme = _DIR_THEMES . $theme; + if (is_dir($dir_theme)) { + $flux = pipeline('zengarden_activer_theme', array('args' => array('dir' =>$dir_theme, 'action'=>'apercevoir'), 'data' => true)); + if ($flux) { + include_spip('inc/cookie'); + spip_setcookie('spip_zengarden_theme', $theme); + } + } + } + elseif (strncmp('activation:',$arg,11) == 0) { + $theme = substr($arg,11); + $dir_theme = _DIR_THEMES . $theme; + if (is_dir($dir_theme)) { + $flux = pipeline('zengarden_activer_theme', array('args' => array('dir' => $dir_theme, 'action'=>'activer'), 'data' => true)); + if ($flux) { + include_spip('inc/meta'); + ecrire_meta("zengarden_theme", $theme); + } + } + } +} + +?>