[5] | 1 | <?php |
---|
| 2 | |
---|
| 3 | // --------------------------------------------------------------------- |
---|
| 4 | // |
---|
| 5 | // Sktheme : manage themes under SPIP (squelettes + habillages) |
---|
| 6 | // |
---|
| 7 | // Copyright (c) 2006 - Skedus |
---|
| 8 | // |
---|
| 9 | // This program is free software; you can redistribute it and/or modify |
---|
| 10 | // it under the terms of the GNU General Public License as published by |
---|
| 11 | // the Free Software Foundation; either version 2 of the License, or |
---|
| 12 | // (at your option) any later version. |
---|
| 13 | // |
---|
| 14 | // You should have received a copy of the GNU General Public License |
---|
| 15 | // along with this program; |
---|
| 16 | // |
---|
| 17 | // --------------------------------------------------------------------- |
---|
| 18 | |
---|
| 19 | |
---|
| 20 | include_spip('inc/sktheme_list'); |
---|
| 21 | |
---|
| 22 | // @param p est un objet SPIP |
---|
| 23 | function balise_SKTHEME_THEMES_SWITCHER ($p) { |
---|
| 24 | $sktheme_list = sktheme_list(); |
---|
| 25 | $code.='<form action="" method="post">'; |
---|
| 26 | $code.='<select name="selecteurTheme" style="'.$GLOBALS['meta']['sktheme_theme_switcher_style'].'" onchange="sktheme_gotof(this.options[this.selectedIndex].value)">'; |
---|
| 27 | $code.='<option selected="selected" value="">'._T('themes').'</option>'; |
---|
| 28 | foreach( $sktheme_list as $value ) $code.='<option value="'.parametre_url(self(),'var_sktheme',$value).'"> -> '.$value.'</option>'; |
---|
| 29 | $code.='</select>'; |
---|
| 30 | $code.='</form>'; |
---|
| 31 | |
---|
| 32 | $p->code = "'$code'"; |
---|
| 33 | return ($p); |
---|
| 34 | } |
---|
| 35 | |
---|
| 36 | // @param p est un objet SPIP |
---|
| 37 | function balise_SKTHEME_HABILLAGES_SWITCHER ($p) { |
---|
| 38 | $sktheme_habillage_list = sktheme_habillage_list(); |
---|
| 39 | $code.='<form action="" method="post">'; |
---|
| 40 | $code.='<select name="selecteurHabillage" style="'.$GLOBALS['meta']['sktheme_habillage_switcher_style'].'" onchange="sktheme_gotof(this.options[this.selectedIndex].value)">'; |
---|
| 41 | $code.='<option selected="selected" value="">'._T('habillages').'</option>'; |
---|
| 42 | foreach( $sktheme_habillage_list as $value ) { |
---|
| 43 | $code.='<option value="'.parametre_url(self(),'var_sktheme',"__current::".$value).'"> -> '.$value.'</option>'; |
---|
| 44 | } |
---|
| 45 | $code.='</select>'; |
---|
| 46 | $code.='</form>'; |
---|
| 47 | $p->code = "'$code'"; |
---|
| 48 | return ($p); |
---|
| 49 | } |
---|
| 50 | |
---|
| 51 | ?> |
---|