Source for file function.html_select_themes.php
Documentation is available at function.html_select_themes.php
* Zikula Application Framework
* @copyright (c) 2004, Zikula Development Team
* @link http://www.zikula.org
* @version $Id: outputfilter.pagevars.php 19321 2006-06-29 13:15:10Z markwest $
* @license GNU/GPL - http://www.gnu.org/copyleft/gpl.html
* @package Zikula_Template_Plugins
* Smarty function to display a drop down list of themes
* - name: Name for the control (optional) if not present then only the option tags are output
* - id: ID for the control
* - selected: Selected value
* - filter: Filter themes use (possible values: PNTHEME_FILTER_ALL (default) PNTHEME_FILTER_USER, PNTHEME_FILTER_SYSTEM, PNTHEME_FILTER_ADMIN
* - state: Filter themes by state (possible values: PNTHEME_STATE_ALL (default), PNTHEME_STATE_ACTIVE, PNTHEME_STATE_INACTIVE
* - type: Filter themes by type (possible values: PNTHEME_TYPE_ALL (default), PNTHEME_TYPE_LEGACY, PNTHEME_TYPE_XANTHIA2, PNTHEME_TYPE_XANTHIA3, PNTHEME_TYPE_AUTOTHEME
* - assign: If set, the results are assigned to the corresponding variable instead of printed out
* <!--[html_select_themes name=mytheme selected=mythemechoice]-->
* <select name="mytheme">
* <option value=""><!--[pnml name=_DEFAULT]--></option>
* <!--[html_select_themes selected=$mythemechoice]-->
* @param array $params All attributes passed to this function from the template
* @param object &$smarty Reference to the Smarty object
* @return string the value of the last status message posted, or void if no status message exists
unset ($params['selected']);
unset ($params['filter']);
if (!isset ($filter) || !defined($filter)) {
if (!isset ($state) || !defined($state)) {
if (!isset ($type) || !defined($type)) {
foreach ($themes as $theme) {
$themelist[$theme['name']] = $theme['displayname'];
require_once $smarty->_get_plugin_filepath('function','html_options');
'id' => isset ($id) ? $id : null),
$smarty->assign($assign, $output);
|