\documentclass{article}
\usepackage{ulem}
\pagestyle{headings}
\begin{document}
Notes on converting apps from Horde 4 to Horde 5.

These are by far not complete.

\section{ Mandatory}
\subsection{Use Horde\_PageOutput }
* There is a new class Horde\_PageOutput which is an OO-style output buffer

\subsubsection{ common header to \$page\_output->header}
horde/templates/common-header.inc does not exist anymore

\sout{require \$registry->get('templates', 'horde') . '/common-header.inc'; \newline
echo Horde::menu();}\newline
\underline{ \$page\_output->header(array(\newline
    'title' => \_("List")\newline
));\newline
}

\subsubsection{ Page Footer}
\sout{require \$registry->get('templates', 'horde') . '/common-footer.inc';}\newline
\$page\_output->footer();

\subsubsection{ Adding Javascript}
\sout{Horde::addScriptFile('jquery-ui/jquery-1.7.min.js', 'insysgui');}\newline
\underline{\$page\_output->addScriptFile('jquery-ui/jquery-1.7.min.js');}

\subsection{ New parameter format for entries in menu}
In Application.php's menu function, entries now go like this

\begin{verbatim}

            $menu->add(Horde::url('data.php'), _("_Import/Export"), 'horde-data');
\end{verbatim}

It's link, caption, css class. The Icon now has to be defined in css:

\begin{verbatim}

.turba-edit, #tabEditContact a {
    background-image: url("graphics/edit.png");
}
\end{verbatim}

\section{}
\section{ UI}
\subsection{Topbar search bar}
* If your app sported a custom search bar (like wicked, sesha or whups), convert it to the Horde Topbar

\begin{verbatim}

$topbar = $injector->getInstance('Horde_View_Topbar');
/* Make topbar visible */
$topbar->search = true;
/* Define where to redirect when the button is clicked */
$topbar->searchAction = new Horde_Url('list.php');
/* Define the grayed-out hint text in the search field */
$topbar->searchLabel =  $session->get('sesha', 'search') ?: _("Stock Id");
/* Define a search icon. Leave away if you want the default */
$topbar->searchIcon = Horde_Themes::img('search-topbar.png');
\end{verbatim}

\subsection{ Custom apps handling}
If your conf.xml had such a section

\begin{verbatim}

<configsection name="menu">
  <configheader>Menu Settings</configheader>
  <configmultienum name="apps" desc="Select any applications that should be
  linked in Insysgui's menu" required="false">
   <values>
    <configspecial application="horde" name="apps" />
   </values>
  </configmultienum>
 </configsection>
\end{verbatim}

drop it. It won't work anymore now that the app-specific menu lives in the sidebar.

\subsection{ The New Button}
Horde 5 introduces a visually enhanced "New Item" button. In the default theme, it is green and enlarged. There can be only one "New" Button per application. It is expected that the button creates the primary domain item of the app (like in a app calendar, it would add a new event, not a new calendar - in an addressbook app, it would add a new addressbook entry, not a new address book\ldots)

Use the ->addNewButton() call

TODO: Code example here

\end{document}
