[cvs] [Wiki] changed: PopulatingYourFirstModule

Wiki Guest wikiguest at horde.org
Mon Feb 9 00:17:44 UTC 2009


guest [129.187.43.121]  Sun, 08 Feb 2009 19:17:44 -0500

Modified page: http://wiki.horde.org/PopulatingYourFirstModule
New Revision:  1.4
Change log:  content added

@@ -12,8 +12,14 @@
  * Calling-procedure at entering the application
  * Permissions
  * All Content-Pages which are accessible through on oh the menus
  * Services offered to external modules
+
+usually it is useful to nalyse another horde Module to learn how this  
work. I analysed Kronolith and it helped me a lot.
+
+Obviously it is neccesarry to know the provied horde API zu wirte a  
horde module. Because a beginner (and this tutorial is adressed to  
them) has no clue about it, it is very usefull to read the  
package-documentation at http://dev.horde.org/api/framework/.
+
+

  + Menus

  In Horde there are two standard menus: The Top Menu an the Side Menu.
@@ -22,16 +28,25 @@

  ++ Top Menu

  The Top Menü is devided in to 4 sections:
-* left: Menuitems provided by this module
-* mid left: Menuitems added manually
-* mid right: Menuitems added in the administrator's setup
+* left: Menuitems provided by this module: see below
+* mid left: Menuitems added manually: see below
+* mid right: Menuitems added in the administrator's module setup
  * right: Menuitems provided by horde as default

-+++ left
++++ left
+the Menuitmes this module intentionally provide are located in the  
file <module>/lib/Module.php in the function ::getMenu()
+
+Add Items like this:
+<code type="php">
+ $menu->add(Horde::applicationUrl('pagetoshow.php'),  
_("MenuItemName"), 'icon.png', $registry->getImageDir() );
+
+</code>
+
++++ mid left
  Items ar added in <module>/config/menu.php:
-<code>
+<code type="php">
  $_menu[] = array(
        'url' =>        'http://www.example.com/',
        'text' =>       'Example, Inc.',
        'icon' =>       'example.png',
@@ -41,13 +56,18 @@
    );

  </code>

++++


  ++ Side Menu

  + Calling procedure at entering the application
+
+If a module is entered via the side-menu, usualy the url to the  
module-folder was provided. The link ist  
http://<myHordeInstallation>/<mymodule> without any file. So the  
calling Procedure starts by executing the index.php bye the webserver.
+
+

  + Permissions

  The module's permissiontree which includes the logical structure of  
all permissions available in this module is defined in  
<module>/lib/api.php


More information about the cvs mailing list