SF.net SVN: postfixadmin: [299] trunk
Brought to you by:
christian_boltz,
gingerdog
From: <Gin...@us...> - 2008-02-21 21:43:56
|
Revision: 299 http://postfixadmin.svn.sourceforge.net/postfixadmin/?rev=299&view=rev Author: GingerDog Date: 2008-02-21 13:43:58 -0800 (Thu, 21 Feb 2008) Log Message: ----------- applied patch from lenix - theme support for postfixadmin; see http://sourceforge.net/tracker/index.php?func=detail&aid=1898481&group_id=191583&atid=937966 - thank you Modified Paths: -------------- trunk/config.inc.php trunk/images/postfixadmin2.xcf trunk/index.php trunk/templates/header.php Added Paths: ----------- trunk/css/ trunk/css/default.css trunk/images/logo-default.png Removed Paths: ------------- trunk/stylesheet.css Modified: trunk/config.inc.php =================================================================== --- trunk/config.inc.php 2008-01-20 20:28:23 UTC (rev 298) +++ trunk/config.inc.php 2008-02-21 21:43:58 UTC (rev 299) @@ -33,10 +33,10 @@ // Postfix Admin Path // Set the location of your Postfix Admin installation here. -// You must enter complete url (http://domain.tld/) +// YOU MUST ENTER THE COMPLETE URL e.g. http://domain.tld/postfixadmin $CONF['postfix_admin_url'] = ''; -// leave this alone... +// shouldn't need changing. $CONF['postfix_admin_path'] = dirname(__FILE__); // Language config @@ -312,6 +312,11 @@ // http://www.php.net/manual/en/function.imap-open.php +// Theme Config +// Specify your own logo and CSS file +$CONF['theme_logo'] = 'images/logo-default.png'; +$CONF['theme_css'] = 'css/default.css'; + // If you want to keep most settings at default values and/or want to ensure // that future updates work without problems, you can use a separate config // file (config.local.php) instead of editing this file and override some Added: trunk/css/default.css =================================================================== --- trunk/css/default.css (rev 0) +++ trunk/css/default.css 2008-02-21 21:43:58 UTC (rev 299) @@ -0,0 +1,296 @@ +body { + background: #ffffff; + color: #000000; + font-family: "BitStream Vera Sans", Verdana, Arial, Helvetica, sans-serif; + font-size: 11px; + font-weight: normal; + text-align: center; +} + +a { + text-decoration: none; + color: #888888; +} + +a:hover { + text-decoration: underline; + color: #888888; +} + +a:visited, a:active { + color: #888888; +} + +table { + /* border-spacing: 0; */ + /* padding: 0; */ + border-collapse: collapse; /* for IE */ +} + +.button { + border: 1px solid #aaaaaa; + color: #777777; + background: #dddddd; + padding: 3px 3px 3px 3px; + font-size: 11px; +} + +.button:hover { + background: #BCFF36; + color: #888888; +} + +.flat { + border: 1px solid #888888; +} + +.error_msg { + color: #d01313; +} + +.standout { + color: maroon; + padding: 3px 3px 3px 3px; + text-align: center; +} + +#login_header { + width: 750px; + margin: 0 auto; + padding-bottom: 10px; + text-align: left; +} + +#login { + width: 750px; + margin: 0 auto; +} + +#login_table { + border-left: 8px solid gray; + border-right: 8px solid gray; + background: #eeeeee; + width: 350px; + margin: 0 auto; + border-collapse: separate; + border-spacing: 10px; +} + +#login_table h4 { + font-size: 13px; +} + +#menu { + width: 750px; + margin: 0 auto; + padding-top: 10px; + white-space: nowrap; +} + +#menu ul { + padding: 0; + margin: 0; + margin-left:auto; + margin-right:auto; + list-style: none; +} + +#menu li { + float: left; + background: #efefef; + margin-right: 3px; + border-top: 4px solid #aaaaaa; +} + +#menu li:hover, #menu li.sfhover { + background: #BFFF00; +} + +#menu li ul { + position: absolute; + width: auto; + left: -999em; + border:2px solid white; + border-top:none; +} +#menu li:hover ul, #menu li.sfhover ul { + left: auto; +} + + +#menu li ul li { + float: none; + margin-right: 0px; + border-top:2px solid white;; + text-align:left; +} + + + + +#menu a { + display: block; + width: auto; + padding: 20px 5px 5px 5px; + color: #888888; +} + +#menu a:hover { + color: #888888; +} + + + +#menu li ul li a { + padding: 5px 5px 5px 5px; +} + + + +#main_menu, #edit_form { + width: 750px; + margin: 0 auto; +} + +#edit_form table { + margin: 0 auto; + padding-top: 10px; + text-align: left; + width: 500px; + border: 1px solid #efefef; +} + +#edit_form h3 { + text-align: center; + font-size: 12px; + margin: 0; + background: #AFE1A6; /*#b4004a;*/ + border: 1px solid #bbb; + line-height: 25px; + color: #555555; +} + +.hlp_center { + text-align: center; +} + +.help_text { + background: #efefef; + border-left: 1px solid #bbbbbb; + border-right: 1px solid #bbbbbb; + text-align: center; + padding-top: 5px; + padding-bottom: 5px; +} + +#main_menu table { + margin: 0 auto; + text-align: left; + padding-top: 20px; + padding-bottom: 20px; +} + +#main_menu table td { + padding-left: 30px; + padding-bottom: 5px; +} + +#main_menu a { + color: #888888; + padding-left: 8px; +} + +#main_menu a:hover { + color: #40B33C; /*#CD6A6A;*/ + text-decoration: none; + padding-left: 4px; + border-bottom: 1px solid #40B33C; + border-left: 4px solid #40B33C; +} + +#overview, #admin_domains, #admin_virtual { + width: 750px; + margin: 0 auto; + background: #AFE1A6; /*#9ACD32;*/ + border: 1px solid #bbb; +} + +#overview h4, #overview P, #overview FORM, #admin_virtual h4, #admin_virtual P, #admin_virtual FORM { + display: inline; + padding-right: 10px; + line-height: 30px; +} + +#nav_bar { + text-align: right; + width: 750px; + margin: 0 auto; +} + +#alias_table, #mailbox_table, #overview_table, #log_table, #admin_table { + width: 750px; + margin: 0px auto; + border: 1px solid #efefef; +} + +#alias_table .header, #mailbox_table .header, #overview_table .header, #log_table .header, #admin_table .header { + line-height: 20px; + background: #efefef; + color: black; +} + +#alias_table .hilightoff, #mailbox_table .hilightoff, #overview_table .hilightoff, #log_table .hilightoff, #admin_table .hilighoff { + background: white; +} + +#alias_table .hilighton, #mailbox_table .hilighton, #overview_table .hilighton, #log_table .hilighton, #admin_table .hilighton { + background: #D9FF43; /*#D6FF85;*/ /*#ffdddd;*/ +} + +#alias_table tr:hover, #mailbox_table tr:hover, #overview_table tr:hover, #log_table tr:hover, #admin_table tr:hover { + background: #D9FF43; /*#D6FF85;*/ /*#ffdddd;*/ +} + + +#alias_table h3, #mailbox_table h3, #overview_table h3, #log_table h3, #admin_table h3 { + background: silver; + text-align: left; + font-size: 12px; + font-weight: bold; + padding-left: 20px; + line-height: 25px; + margin: 0; +} + +#footer { + width: 750px; + margin: 20px auto; + border-top: 1px solid #bbbbbb; + background: #efefef; + color: #999999; + line-height: 20px; + text-align: left; + padding-left: 15px; + font-size: 9px; +} + +#footer a { + text-decoration: none; + color: #999999; +} + +#footer a:hover { + text-decoration: underline; + color: #777777; +} + +div.setup { + width:700px; + margin-left:auto; + margin-right:auto; + text-align: left; +} + +div.setup li { + padding-bottom:1em; +} Added: trunk/images/logo-default.png =================================================================== (Binary files differ) Property changes on: trunk/images/logo-default.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Modified: trunk/images/postfixadmin2.xcf =================================================================== (Binary files differ) Modified: trunk/index.php =================================================================== --- trunk/index.php 2008-01-20 20:28:23 UTC (rev 298) +++ trunk/index.php 2008-02-21 21:43:58 UTC (rev 299) @@ -35,8 +35,7 @@ <title>Welcome to Postfix Admin</title> </head> <body> - <img id="login_header_logo" src="images/postbox.png" /> - <img id="login_header_logo2" src="images/postfixadmin2.png" /> + <img id="login_header_logo" src="images/logo-default.png" /> <h1>Welcome to Postfix Admin</h1> <h2>What is it?</h2> <p>Postfix Admin is a web based interface to configure and manage a Postfix based email server for many users.</p> Deleted: trunk/stylesheet.css =================================================================== --- trunk/stylesheet.css 2008-01-20 20:28:23 UTC (rev 298) +++ trunk/stylesheet.css 2008-02-21 21:43:58 UTC (rev 299) @@ -1,296 +0,0 @@ -body { - background: #ffffff; - color: #000000; - font-family: "BitStream Vera Sans", Verdana, Arial, Helvetica, sans-serif; - font-size: 11px; - font-weight: normal; - text-align: center; -} - -a { - text-decoration: none; - color: #888888; -} - -a:hover { - text-decoration: underline; - color: #888888; -} - -a:visited, a:active { - color: #888888; -} - -table { - /* border-spacing: 0; */ - /* padding: 0; */ - border-collapse: collapse; /* for IE */ -} - -.button { - border: 1px solid #aaaaaa; - color: #777777; - background: #dddddd; - padding: 3px 3px 3px 3px; - font-size: 11px; -} - -.button:hover { - background: #BCFF36; - color: #888888; -} - -.flat { - border: 1px solid #888888; -} - -.error_msg { - color: #d01313; -} - -.standout { - color: maroon; - padding: 3px 3px 3px 3px; - text-align: center; -} - -#login_header { - width: 750px; - margin: 0 auto; - padding-bottom: 10px; - text-align: left; -} - -#login { - width: 750px; - margin: 0 auto; -} - -#login_table { - border-left: 8px solid gray; - border-right: 8px solid gray; - background: #eeeeee; - width: 350px; - margin: 0 auto; - border-collapse: separate; - border-spacing: 10px; -} - -#login_table h4 { - font-size: 13px; -} - -#menu { - width: 750px; - margin: 0 auto; - padding-top: 10px; - white-space: nowrap; -} - -#menu ul { - padding: 0; - margin: 0; - margin-left:auto; - margin-right:auto; - list-style: none; -} - -#menu li { - float: left; - background: #efefef; - margin-right: 3px; - border-top: 4px solid #aaaaaa; -} - -#menu li:hover, #menu li.sfhover { - background: #BFFF00; -} - -#menu li ul { - position: absolute; - width: auto; - left: -999em; - border:2px solid white; - border-top:none; -} -#menu li:hover ul, #menu li.sfhover ul { - left: auto; -} - - -#menu li ul li { - float: none; - margin-right: 0px; - border-top:2px solid white;; - text-align:left; -} - - - - -#menu a { - display: block; - width: auto; - padding: 20px 5px 5px 5px; - color: #888888; -} - -#menu a:hover { - color: #888888; -} - - - -#menu li ul li a { - padding: 5px 5px 5px 5px; -} - - - -#main_menu, #edit_form { - width: 750px; - margin: 0 auto; -} - -#edit_form table { - margin: 0 auto; - padding-top: 10px; - text-align: left; - width: 500px; - border: 1px solid #efefef; -} - -#edit_form h3 { - text-align: center; - font-size: 12px; - margin: 0; - background: #AFE1A6; /*#b4004a;*/ - border: 1px solid #bbb; - line-height: 25px; - color: #555555; -} - -.hlp_center { - text-align: center; -} - -.help_text { - background: #efefef; - border-left: 1px solid #bbbbbb; - border-right: 1px solid #bbbbbb; - text-align: center; - padding-top: 5px; - padding-bottom: 5px; -} - -#main_menu table { - margin: 0 auto; - text-align: left; - padding-top: 20px; - padding-bottom: 20px; -} - -#main_menu table td { - padding-left: 30px; - padding-bottom: 5px; -} - -#main_menu a { - color: #888888; - padding-left: 8px; -} - -#main_menu a:hover { - color: #40B33C; /*#CD6A6A;*/ - text-decoration: none; - padding-left: 4px; - border-bottom: 1px solid #40B33C; - border-left: 4px solid #40B33C; -} - -#overview, #admin_domains, #admin_virtual { - width: 750px; - margin: 0 auto; - background: #AFE1A6; /*#9ACD32;*/ - border: 1px solid #bbb; -} - -#overview h4, #overview P, #overview FORM, #admin_virtual h4, #admin_virtual P, #admin_virtual FORM { - display: inline; - padding-right: 10px; - line-height: 30px; -} - -#nav_bar { - text-align: right; - width: 750px; - margin: 0 auto; -} - -#alias_table, #mailbox_table, #overview_table, #log_table, #admin_table { - width: 750px; - margin: 0px auto; - border: 1px solid #efefef; -} - -#alias_table .header, #mailbox_table .header, #overview_table .header, #log_table .header, #admin_table .header { - line-height: 20px; - background: #efefef; - color: black; -} - -#alias_table .hilightoff, #mailbox_table .hilightoff, #overview_table .hilightoff, #log_table .hilightoff, #admin_table .hilighoff { - background: white; -} - -#alias_table .hilighton, #mailbox_table .hilighton, #overview_table .hilighton, #log_table .hilighton, #admin_table .hilighton { - background: #D9FF43; /*#D6FF85;*/ /*#ffdddd;*/ -} - -#alias_table tr:hover, #mailbox_table tr:hover, #overview_table tr:hover, #log_table tr:hover, #admin_table tr:hover { - background: #D9FF43; /*#D6FF85;*/ /*#ffdddd;*/ -} - - -#alias_table h3, #mailbox_table h3, #overview_table h3, #log_table h3, #admin_table h3 { - background: silver; - text-align: left; - font-size: 12px; - font-weight: bold; - padding-left: 20px; - line-height: 25px; - margin: 0; -} - -#footer { - width: 750px; - margin: 20px auto; - border-top: 1px solid #bbbbbb; - background: #efefef; - color: #999999; - line-height: 20px; - text-align: left; - padding-left: 15px; - font-size: 9px; -} - -#footer a { - text-decoration: none; - color: #999999; -} - -#footer a:hover { - text-decoration: underline; - color: #777777; -} - -div.setup { - width:700px; - margin-left:auto; - margin-right:auto; - text-align: left; -} - -div.setup li { - padding-bottom:1em; -} Modified: trunk/templates/header.php =================================================================== --- trunk/templates/header.php 2008-01-20 20:28:23 UTC (rev 298) +++ trunk/templates/header.php 2008-02-21 21:43:58 UTC (rev 299) @@ -12,10 +12,10 @@ <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <?php -if (file_exists (realpath ("./stylesheet.css"))) { - print "<link rel=\"stylesheet\" type=\"text/css\" href=\"stylesheet.css\" />\n"; -} elseif (file_exists (realpath ("../stylesheet.css"))) { - print "<link rel=\"stylesheet\" type=\"text/css\" href=\"../stylesheet.css\" />\n"; +if (file_exists (realpath ("../".$CONF['theme_css']))) { + print "<link rel=\"stylesheet\" type=\"text/css\" href=\"../".htmlentities($CONF['theme_css'])."\" />\n"; +} else { + print "<link rel=\"stylesheet\" type=\"text/css\" href=\"".htmlentities($CONF['theme_css'])."\" />\n"; } ?> <title>Postfix Admin - <?php print $_SERVER['HTTP_HOST']; ?></title> @@ -23,14 +23,11 @@ <body> <div id="login_header"> <?php -if (file_exists (realpath ("./stylesheet.css"))) +if (file_exists (realpath ("../".$CONF['theme_logo']))) { - print "<img id=\"login_header_logo\" src=\"images/postbox.png\" />\n"; - print "<img id=\"login_header_logo2\" src=\"images/postfixadmin2.png\" />\n"; -} elseif (file_exists (realpath ("../stylesheet.css"))) -{ - print "<img id=\"login_header_logo\" src=\"../images/postbox.png\" />\n"; - print "<img id=\"login_header_logo2\" src=\"../images/postfixadmin2.png\" />\n"; + print "<img id=\"login_header_logo\" src=\"../".htmlentities($CONF['theme_logo'])."\" />\n"; +} else { + print "<img id=\"login_header_logo\" src=\"".htmlentities($CONF['theme_logo'])."\" />\n"; } if (($CONF['show_header_text'] == "YES") and ($CONF['header_text'])) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |