\documentclass{article}
\usepackage{ulem}
\usepackage{graphicx}
\usepackage{hyperref}
\pagestyle{headings}
\begin{document}
\part{Customizing menus in Horde 5}
There are two main menus in Horde. The topbar contains links to all different horde applications, configuration and administration options available to the user.<br />
If the application has a search facility, the topbar will also provide a search field.<br />
The sidebar on the left contains module-specific entries.

\section{Topbar customisation ++}
You can regroup applications into submenus by adding \texttt{heading} and \texttt{menu\_parent} entries to the \texttt{registry.local.php} file.

For example, let's group nag and whups into a "chores" menu.

<pre><code class="language-php">
\$this->applications['chores'] = array('name' => 'chores',
                                      'status' => 'heading'
                                     );
\$this->applications['nag']['menu\_parent'] = 'chores';
\$this->applications['whups']['menu\_parent'] = 'chores';
</code></pre>
The chores-menu will only be displayed if either nag or whups are available and active. You can also add an 'url' parameter to a 'heading' to make it clickable. Unfortunately, headings which have no apps below them will not be shown.

Horde 5.1 adds 'link' items which allow proper external URLs

<pre><code class="language-php">
<?php
/* Example registry.local.php file*/
\$this->applications['mywebsite'] =
array('name' => 'Website', 'status' => 'link', 'url' =>
'http://www.ralf-lang.de', 'menu\_parent' => 'others', 'target' => '\_new');
</code></pre>
Prior to Horde 5.1 you can use a workaround: Register your links as apps.

<pre><code class="language-php">
// Custom Menus
  'intranet' => array(
      'name' => \_("Intranet Links"),
      'status' => 'heading',
  ),

  'xyz' => array(
      'webroot' => 'http://applications.horde.org/',
      'name' => \_("Application 1"),
      'status' => 'active',
      'target' => '\_blank',
      'menu\_parent' => 'intranet',
      'fileroot' => '/tmp',
      'icon' => ''
  ),
</code></pre>
This has a side effect though. The new pseudo app will show a useless entry in the "preferences" menu.

\part{Customizing menus in Horde 3 and 4}
There are two main menus in Horde. Each module has its own application menu on the top. And then there is what is called the "Sidebar", the menu on the left in a separate browser frame, which is always the same and contains links to the different Horde applications.

\section{Application menus}
The application menus are aggregated from several places. You can configure menus in three places:

\begin{itemize}
\item Horde Setup, where you can configure Help, Options, Problems, and Logout/Login menu items: you need to login as an administrator and then go to \texttt{Administration -> Setup -> Horde -> Menu Settings}


\item Application Setup, where you can configure links to all installed applications and application-specific items: \texttt{Adminstration -> Setup -> Application -> Menu Settings}


\item Arbitrary items: can be configured in \texttt{config/menu.php}. Copy \texttt{menu.php.dist} to \texttt{menu.php}, read the comments in the file header, and create your own menu entries


\end{itemize}
\section{Sidebar}
To add new items to the sidebar menu, you need to edit \texttt{config/registry.php}. Make sure to read the comments at the top of \texttt{registry.php} carefully. The only required configuration values for a menu entry are \texttt{'name'} and \texttt{'status'}, but  \texttt{'webroot'} and \texttt{'fileroot'} are useful entries.

Let's say you want to add a link to your intranet:

<pre><code class="language-php">
// Custom Menus
\$this->applications['intranet'] = array(
     'name' => \_('Intranet Links'),
     'status' => 'heading',
     'icon' => '',
);
\$this->applications['intranet\_link\_1'] = array(
 'webroot' => 'https://www.example.com',
 'name' => \_("Example Link"),
 'status' => 'active',
 'target' => '\_parent',
 'menu\_parent' => 'intranet',
 'fileroot' => '/tmp',
 'icon' => '',
);
</code></pre>
This adds a top-level menu entry with the link text "Intranet Links" and a sub link to \texttt{https://www.example.com} to your sidebar. We also set the \texttt{'icon'} value to an empty string. This is to keep the browser from loading an icon from a default location, creating a lot entries in your web server's error log. If you put an icon with a size of 16x16 pixel somewhere on your web server, you can put the (web) location into the \texttt{'icon'} value, and it will be displayed in the menu.

Following works in Horde 4.

<pre><code class="language-php">
// Custom Menus
  'intranet' => array(
      'name' => \_("Intranet Links"),
      'status' => 'heading',
  ),

  'xyz' => array(
      'webroot' => 'http://applications.horde.org/',
      'name' => \_("Application 1"),
      'status' => 'notoolbar',
      'target' => '\_blank',
      'menu\_parent' => 'intranet',
      'fileroot' => '/tmp',
      'icon' => ''
  ),
</code></pre>
\end{document}
