6.0.0-git
2024-04-19
Last Modified 2005-06-04 by Guest

Modifying Horde Aspect

Currently being written by: Ciro DurĂ¡n <ciro - at - ldc - dot - usb - dot - ve>


Document status

This document (in the traditional Wikipedia style) is a stub. You can help Horde Wiki by expanding it.

Introduction

This tutorial is intended to give designers a first insight on how to modify the default Horde 3 layout. We are not talking here about creating a new theme for the default layout (you can consult more about that in the ThemesHowTo page), but to alter completely the layout (frames included). At the current version of Horde, this requires a substantial amount of work, as you need to mess with a good deal of HTML and CSS files.

Motivation

Let's start saying that you don't have any trouble with the default layout. It's well done, has nice bright colors, and is very attractive in general, and it's surprising that despite the ease of use the Horde Framework and Horde Applications have achieved, you have to learn a lot of stuff about the Horde Framework just to start mangling with the .inc files in the /templates directory. And when you want to deliver the power Horde has for, say, a client, you need the layout to be customizable, as they want to establish the graphic style their new portal will have.

In this tutorial we have saved that amount of work for you, and if you want to learn more about the functions the default layout uses, we have provided links to the API in http://dev.horde.org, thus you can consult the links in the References section, in the end of this document.

Prerrequisites

If you are a web designer, you should know a good deal of HTML, Javascript, CSS, and PHP. This tutorial assumes you know all this, thus the HTML, CSS and Javascript conflicts between Mozilla and Internet Explorer. About Horde Framework knowledge, we will assume you don't know its internals, so we will give as well a short insight of the process Horde follows in order to deliver the applications the user needs.

What is Horde?

Horde is an "Application Framework," this is, a set of tools created in order to aid a programmer to easily implement a web application. Thus, with Horde, you can make your application be used by other Horde applications, i.e., you can use the contacts module, Turba, to store contact mails to be used when sending mail using IMP, the webmail application.

The Horde default download only includes the framework. When you install it, you will see the most basic functions only, that is, nothing useful to the user. You need to install other modules in order to give your site more features. As of June 2005, the features you can install from the Horde site are:

  • Webmail - Implemented by IMP. The most popular Horde module.
    • Contacts book - Implemented by Turba. Almost always installed together with IMP, but is capable of working with other modules.
    • News - Implemented by Jonah.
    • Bookmarks storage - See Trean.
    • Web calendar - See Kronolith.
    • Other features you can see in the projects page.

Getting started

(An introduction to this section. This section explains some standard procedures Horde follows to do common tasks)

In this section, we will explain some standard things Horde does, so you can understand the workflow it follows to serve user requests.

What does Horde do when someone enters it?

How does Horde authenticate?

How does Horde keep sessions? What values does it keep?

What are templates? What's the difference with themes?

How does Horde standarize its interface?

The Menu class

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.

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

References