\documentclass{article}
\usepackage{ulem}
\pagestyle{headings}
\begin{document}
\tableofcontents

\part{ Themes HowTo}
\textbf{Colortext: NIThis information is valid for Horde 4 only. See Doc/Dev/ThemesH3\footnote{http://example.com/index.php?page=Doc/Dev/ThemesH3} for Horde 3 or Doc/Dev/Themes\footnote{http://example.com/index.php?page=Doc/Dev/Themes} for Horde 5 and later.Colortext: NI}

\section{ Default Theme}
Each application defines a default theme.  This default theme is used as the base of all other themes.  The default theme is not accessible to end users, and should not be altered when developing a new theme.

\section{ User Preference Theme}
The default theme is then extended by the theme defined in the user's 'theme' preference entry.

\section{ Theme Inheritance}
Theme elements are inherited in the following order:

\renewcommand{\labelenumi}{\arabic{enumi}}
\begin{enumerate}
\item{\textbf{application}/themes/\textbf{theme}/graphics}
\item{horde/themes/\textbf{theme}/graphics}
\item{\textbf{application}/themes/default/graphics}
\item{horde/themes/default/graphics}
\end{enumerate}
(The \textbf{application} entries listed above will not be skipped if horde is the current application.)

For images \& sounds, the first matching item is used working down the inheritance tree.

For CSS, the inheritance order determines the order the stylesheets are output.  CSS files located at the top of the inheritance tree will be loaded \textsl{LAST}, horde default stylesheets will be loaded \textsl{FIRST}.

\section{ Theme Layout}
Themes are located in the themes/[themename] directory.

\subsection{ Subdirectories}
Applications that have multiple views can also store files in a subdirectory (e.g. imp stores dynamic view formatting in the \texttt{dimp} subdirectory and minimal view formatting in the \texttt{mimp} subdirectory.

The following subdirectories are reserved for special Horde use:

\begin{tabular}{|l|l|}
\hline
Directory & Description\\
\hline
\texttt{block} & CSS to use for an application's portal block (as of Horde 4.1)\\
\hline
\end{tabular}
\subsection{ CSS}
CSS files should normally go into the base theme directory.  There are several filenames that have special meaning in Horde:

\begin{tabular}{|l|l|}
\hline
Filename & Description\\
\hline
\texttt{screen.css} & The default CSS definition\\
\hline
\texttt{rtl.css} & Styles to use if the current language is a Right-to-Left language\\
\hline
\texttt{embed.css} & Used for embedded display\\
\hline
\end{tabular}
Additionally, the following CSS files will be automatically added based on the current browser:

\begin{tabular}{|l|l|}
\hline
Filename & Browser\\
\hline
\texttt{ie8.css} & Internet Explorer 8\\
\hline
\texttt{ie7.css} & Internet Explorer 7\\
\hline
\texttt{ie6\_or\_less.css} & Internet Explorer <= 6\\
\hline
\texttt{opera.css} & Opera\\
\hline
\texttt{mozilla.css} & Mozilla-based browser (i.e. Firefox)\\
\hline
\texttt{webkit.css} & Webkit-based browser (i.e. Google Chrome, Safari)\\
\hline
\end{tabular}
URLs contained in CSS should be relative URLs.

\subsection{ Graphics}
Graphics live in the \texttt{graphics/} folder of your theme's base directory.

\subsection{ Sounds}
Sounds live in the \texttt{sounds/} folder of your theme's base directory.

Sounds must be in WAV format (with a \texttt{.wav} file suffix).

\subsection{ Information File}
\textbf{Colortext: NIThis file is only needed in the horde theme directory. It is not needed in an applications' theme directoryColortext: NI}

The \texttt{info.php} contains information regarding the theme.  It must be a file that can be parsed by PHP.  It should contain the following variables:

\begin{tabular}{|l|l|}
\hline
Variable Name & Description\\
\hline
\$theme\_name & This is the theme name as it will appear in the theme list in the users' display options.\\
\hline
\end{tabular}
An example for info.php:

\begin{verbatim}

<?php
/**
 * This is my personal theme.
 * It is based on the colors of my bike when I was five.
 *
 * @author John Doe <john@example.com>
 */
$theme_name = _("My Theme Name");
\end{verbatim}

\end{document}
