[commits] [Wiki] created: Doc/Dev/ConversionH5

Wiki Guest wikiguest at horde.org
Tue Jan 22 17:12:52 UTC 2013


guest [82.119.8.98]  Tue, 22 Jan 2013 17:12:52 +0000

Created page: http://wiki.horde.org/Doc/Dev/ConversionH5

Notes on converting apps from Horde 4 to Horde 5.

These are by far not complete.

== Mandatory ==
=== Use Horde_PageOutput ===
  * There is a new class Horde_PageOutput which is an OO-style output buffer
  * horde/templates/common-header.inc does not exist anymore

=== New parameter format for entries in menu ===
In Application.php's menu function, entries now go like this

<code>
             $menu->add(Horde::url('data.php'), _("_Import/Export"),  
'horde-data');
</code>

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

<code>
.turba-edit, #tabEditContact a {
     background-image: url("graphics/edit.png");
}
</code>



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

<code>
$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');
</code>
=== Custom apps handling ===
If your conf.xml had such a section

<code>
<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>
</code>

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



More information about the commits mailing list