[cvs] [Wiki] changed: ThemesHowTo
Jan Schneider
jan at horde.org
Sat May 22 14:46:06 PDT 2004
jan Sat, 22 May 2004 14:46:06 -0700
Modified page: http://wiki.horde.org/display.php?page=ThemesHowTo
New Revision: 1.1
@@ -1 +1,35 @@
++ Themes !HowTo
+Creating a new theme for Horde is as simple as creating a new PHP file in {{horde/config/themes/}} **not** beginning with {{html-}}.
+This file only needs to contain a single line:
+
+<php>
+<?php
+$theme_name = _("My Theme Name");
+</php>
+
+This is the theme name as it will appear in the theme list in the users' display options. The internally used theme name that you can use to set a default theme in {{horde/config/prefs.php}} is determined from the file name you use.
+
+Let's say you store this code in {{horde/config/themes/mytheme.php}}, then the internal name of this
+theme would be "mytheme" while the users will see it as "My Theme Name".
+
+If you want to contribute your theme to the Horde Project or make it publically available elsewhere, you should add some comments to the file header to explain where the theme comes from:
+
+<php>
+<?php
+/**
+ * This is my personal theme.
+ * It is based on the colors of my bike when I was five.
+ *
+ * Copyright 2004 John Doe
+ */
+
+$theme_name = _("My Theme Name");
+</php>
+
+
+++ Defining theme colors and styles
+
+This alone doesn't make a theme of course, now you want to create you own set of colors and styles for your theme. These are defined in a PHP array in the file {{html-mytheme.php}}. You can see this file name is simply created by prefixing your internal style name with "html-".
+
+The syntax of this file is pretty straight forward. If you know how CSS works and look at some of the existing theme files you should easily find out how to change certain colors, fonts, lines etc. You should //not// start with a copy of the "master" theme file {{horde/config/html.php}} but you should instead only define those CSS rules that you want to overwrite. This way you make sure that your theme doesn't miss any important style if the master theme file gets extend at some point in the future.
More information about the cvs
mailing list