Source for file function.themelist.php
Documentation is available at function.themelist.php
* This file is a plugin for pnRender, the Zikula implementation of Smarty
* @package Xanthia_Templating_Environment
* @version $Id: function.themelist.php 24342 2008-06-06 12:03:14Z markwest $
* @author The Zikula development team
* @link http://www.zikula.org The Zikula Home Page
* @copyright Copyright (C) 2002 by the Zikula Development Team
* @license http://www.gnu.org/copyleft/gpl.html GNU General Public License
* Smarty function to display a drop down list of themes
* - assign: If set, the results are assigned to the corresponding variable instead of printed out
* - selected: Selected value
* <!--[themelist selected=ExtraLite]-->
* @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
$selected = $params['selected'];
while (false !== ($f = readdir($handle))) {
$themelist[$f] = "themes/$f/images/preview_medium.png";
$themestring = '<table id="themeselector" width="100%">';
foreach ($themelist as $theme => $imagepath) {
if ($theme == $selected) $themestring .= ' checked="checked"';
$themestring .= ' /></td>';
$themestring .= '</table>';
if (isset ($params['assign'])) {
$smarty->assign($params['assign'], $themestring);
|