[cvs] [Wiki] changed: ModifyingHordeAspect

Wiki Guest wiki at wiki.horde.org
Sat Jul 9 17:24:29 PDT 2005


guest [200.44.78.98]  Sat, 09 Jul 2005 17:24:29 -0700

Modified page: http://wiki.horde.org/ModifyingHordeAspect
New Revision:  3.0
Change log:  Adding more content

@@ -45,26 +45,87 @@
 +++ What does Horde do when someone enters it?
 
 +++ How does Horde authenticate?
 
-+++ How does Horde keep sessions? What values does it keep?
++++ How does Horde keep preferences? What values does it keep?
 
 +++ What are templates? What's the difference with themes?
+
+Templates are the files Horde uses in order to separate the page presentation from the application logic. Each Horde module has its set of templates in order to give structure to the information they generate. The templates are usually in the {{$MODULE_WEBROOT/templates}} directory.
+
+Although some templates use a tag delimiter to mark where the generated information should go (as Jonah does), others still use a bit of PHP (like the basic Horde templates) in order to accomplish the same. From my point of view, this complicates the page design for web designers. The Horde authors have expressed their concern about this, and promise in following versions of Horde to simplify the template creation. For now, we have to conform to the current version :-).
+
+The themes are CSS files which mostly change the colors and small details of a template. A theme usually can change the font colors, the border colors, their roundness, the appearance of the input elements, add a background image somewhere. The templates should use the CSS IDs and classes Horde provides in order to use those colors. In the creation of a new template, if you add more classes, you should create and establish the characteristics of those classes in all the themes.
+
+++++ I don't want to change the structure of the templates. I just want to change the colors.
+
+If you want to do this for the login screen, you should locate in the preferences file ({{'$HORDE_WEBROOT/config/prefs.php'}} this snippet:
+
+<code type="php">
+// UI theme
+$_prefs['theme'] = array(
+    'value' => 'bluewhite',
+    'locked' => false,
+    'shared' => true,
+    'type' => 'select',
+    'desc' => _("Select your color scheme.")
+);
+</code>
+
+This snippet establishes what theme will be set for a user. The value specified in {{'value'}} tell Horde the default theme to use in the login page, or in the user pages when he has not  specified a theme to use. Change it to any title present in the {{$HORDE_WEBROOT/themes}} directory. If you want to lock this style for all the users, you should set the {{'locked'}} key to true, and delete all the rows in the {{horde_prefs}} table which {{pref_name}} is {{'theme'}}.
 
 +++ How does Horde standarize its interface?
 
-++++ The Menu class
+Horde provides two common widgets across all the applications: the Sidepanel and the Menu. The sidepanel provides access to the user to all the modules' functionality in  a convenient tree-like structure. The menu provides access to the currently used module's features in a list; it also provides some other common features across all the applications (like the "Problem", "Help", and "Log out" icons).
 
+++++ The Sidepanel
+
+The Sidepanel is a tree-like structure where all the active modules and its features are presented for the user. Each module locates itself in the sidepanel using the registry, and puts its features in folders. Some modules create an entire new folder (like Imp), and other modules just add their functions below a folder (like Ingo, which add the Filter function below the Mail folder). This organization is completely customized in the registry.
+
++++++ Customizing the sidepanel organization
+
+In order to change the sidepanel organization, you must change some things in the registry file. In particular, you should watch the {{'name'}} and {{'menu_parent'}} keys in the application hash in the registry. If the {{'name'}} key is present in an application, it must specify a title, the sidepanel will create a folder with the title specified there, and put its functions there. If the {{'menu_parent'}} key is present, it must specify a module present in the applications hash, and the functions this module provides will be put in the folder created by the module specified, provided that this one has a {{'name'}} key.
+
+Let's see an example so you can watch what Horde does. Here's an excerpt from the registry file:
+
+<code type="php">
+$this->applications['imp'] = array(
+    'fileroot' => dirname(__FILE__) . '/../imp',
+    'webroot' => $this->applications['horde']['webroot'] . '/imp',
+    'name' => _("Mail"),
+    'status' => 'active',
+    'provides' => 'mail',
+);
+
+$this->applications['ingo'] = array(
+    'fileroot' => dirname(__FILE__) . '/../ingo',
+    'webroot' => $this->applications['horde']['webroot'] . '/ingo',
+    'name' => _("Filters"),
+    'status' => 'active',
+    'provides' => array('mail/blacklistFrom', 'mail/showBlacklist', 'mail/whitelistFrom', 'mail/showWhitelist', 'mail/applyFilters', 'mail/canApplyFilters', 'mail/showFilters'),
+    'menu_parent' => 'imp'
+);
+</code>
+
+As you can see, the {{'imp'}} application's functions will be put in the "Mail" folder (the name can change depending on the language the user has established), while the {{'ingo'}} functions will not created a new folder, but rather will put them in the same "Mail" folder. Here's an screenshot of the sidepanel using this configuration.
+
+[[image http://www.ldc.usb.ve/~ciro/horde/Horde-Sidepanel-mailfolder.png alt="A picture of the functions put by the registry file. Note that the filters function is provided by Ingo, while the rest of functions are provided by Imp"]]
+
+++++ The Menu
+
+The Menu provides 
 The Menu class allows you to render the current application utilities' links in an HTML unordered list, allowing you to set the style of it using CSS. The default Horde layout uses the {{menu}} ID to fix the menu on the top right corner of its templates.
 
 If you wish to customize the menu, you need to create a Menu class. The constructor function accepts one parameter, called {{$mask}}, which is useful to add common links in the menu, like a Help link, or a Problems link.
 
-||[[image http://www.ldc.usb.ve/~ciro/horde/Menu-Masks.png alt="A picture of the icons whose appeareance is determined by the Menu mask."]]||
+[[image http://www.ldc.usb.ve/~ciro/horde/Menu-Masks.png alt="A picture of the icons whose appeareance is determined by the Menu mask."]]
 
 In the image above, you can see the icons that can be masked by the Menu class. Number 1 corresponds to HORDE_MENU_MASK_PROBLEM'.
 
 ++ An introductory example: The login screen
+
+##CCCCCC|TODO: An easy example of changing the login screen structure.##
 
 ++ References
 
 * Hagenbuch, Chuck, //Horde Framework Tutorial//, http://www.horde.org/papers/oscon2001-horde_tutorial/
 * Hagenbuch, Chuck, //Developing with Horde Framework//, http://www.horde.org/papers/kongress2001-horde_tutorial/


More information about the cvs mailing list