diff --git a/phpgwapi/inc/phpgw_common.inc.php b/phpgwapi/inc/phpgw_common.inc.php index a28c1685ee..8b3d8df6f5 100644 --- a/phpgwapi/inc/phpgw_common.inc.php +++ b/phpgwapi/inc/phpgw_common.inc.php @@ -334,6 +334,19 @@ } } + function list_themes(){ + global $phpgw_info; + $dh = opendir($phpgw_info["server"]["server_root"] . "/phpgwapi/themes"); + while ($file = readdir($dh)) { + if (eregi("\.theme$", $file)) { + $list[] = substr($file,0,strpos($file,".")); + } + } + //$dh->close(); + reset ($list); + return $list; + } + function list_templates(){ global $phpgw_info; $d = dir($phpgw_info["server"]["server_root"]."/phpgwapi/templates"); diff --git a/preferences/changetheme.php b/preferences/changetheme.php deleted file mode 100755 index 01187cfdfc..0000000000 --- a/preferences/changetheme.php +++ /dev/null @@ -1,56 +0,0 @@ - * - * -------------------------------------------- * - * This program is free software; you can redistribute it and/or modify it * - * under the terms of the GNU General Public License as published by the * - * Free Software Foundation; either version 2 of the License, or (at your * - * option) any later version. * - \**************************************************************************/ - - /* $Id$ */ - - $phpgw_info["flags"] = array("noheader" => True, "nonavbar" => True, "currentapp" => "preferences"); - - include("../header.inc.php"); - - if ($theme) { - $phpgw->preferences->change("common","theme"); - $phpgw->preferences->commit(); - if ($phpgw_info["server"]["useframes"] != "never") { - Header("Location: " . $phpgw->link("/preferences/index.php","cd=yes")); - Header("Window-Target: _top"); - } else { - Header("Location: " . $phpgw->link("changetheme.php")); - } - $phpgw->common->phpgw_exit(); - } - - $dh = opendir($phpgw_info["server"]["server_root"] . "/phpgwapi/themes"); - while ($file = readdir($dh)) { - if (eregi("\.theme$", $file)) { - $installed_themes[] = substr($file,0,strpos($file,".")); - } - } - - $phpgw->common->phpgw_header(); - echo parse_navbar(); - - echo "
" . lang("your current theme is: x",$phpgw_info["user"]["preferences"]["theme"]); - echo "
" . lang("please, select a new theme") . ":"; - echo "
"; - - for ($i=0; $i' . $installed_themes[$i] . ''; - - if ($phpgw_info["server"]["useframes"] != "never") { -// echo '
' . $installed_themes[$i] . ''; - } - } - - $phpgw->common->phpgw_footer(); -?> diff --git a/preferences/inc/hook_preferences.inc.php b/preferences/inc/hook_preferences.inc.php index e4b059a32f..d15b74a48b 100644 --- a/preferences/inc/hook_preferences.inc.php +++ b/preferences/inc/hook_preferences.inc.php @@ -29,8 +29,6 @@ // Actual content echo "link("changepassword.php") . "\">" . lang("change your password") . ""; - echo "
link("changetheme.php") . "\">" - . lang("select different theme") . ""; echo "
link("settings.php") . "\">" . lang("change your settings") . ""; // echo "
link("changeprofile.php") . "\">" diff --git a/preferences/settings.php b/preferences/settings.php index 316fc8b585..cc686d043d 100755 --- a/preferences/settings.php +++ b/preferences/settings.php @@ -50,6 +50,21 @@ + + + + Theme (colors/fonts) Selection:
+ + + + :