[Wiki] changed: PopulatingYourFirstModule

Wiki Guest <[email protected]>
Newsgroups gmane.comp.horde.cvs
Message-ID <[email protected]>
guest [129.187.43.121]  Sun, 08 Feb 2009 19:30:33 -0500

Modified page: http://wiki.horde.org/PopulatingYourFirstModule
New Revision:  1.6
Change log:  typo correction

@@ -13,39 +13,39 @@
  * 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.
+Usually it is useful to analyse another hordemodule 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/.
+Obviously it is necessary to know the provided horde API zu write 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.
+In Horde there are two standard menus: The top menu an the side menu.

-ToDo: Add Links to Wikipages describing menus in detail.
+ToDo: Add links to Wikipages describing menus in detail.

  ++ Top Menu

-The Top Menü is devided in to 4 sections:
-* 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
+The top menu is devided in to 4 sections:
+* 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
-the Menuitmes this module intentionally provide are located in the  
file <module>/lib/Module.php in the function ::getMenu()
+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:
+Items are added in <module>/config/menu.php:
  <code type="php">
  $_menu[] = array(
        'url' =>        'http://www.example.com/',
        'text' =>       'Example, Inc.',
@@ -55,22 +55,19 @@
        'onclick' =>    ''
    );

  </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 oh the webserver.
+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 suffix. So  
the calling procedure starts by executing the index.php on the  
webserver.

  Procedure:
  * Executing index.php: initialzing, load configfiles and load the  
page which should be displayed at the beginning (e.g. in Skeleton:  
list.php).
-* list.php calls >module>/lib/base.php.
-* now lists.php is displayed. By Clicking on any Menu-Item another  
Contentpage as list.php (but of course also list.php again) could be  
displayed (->executed).
+* list.php calls >module>/lib/base.php to initialize the module and  
then proceeds with its content.
+* now lists.php is displayed. By Clicking on any menuitem another  
contentpage as list.php (but of course also list.php again) could be  
displayed (->executed).

  + Permissions

  The module's permissiontree which includes the logical structure of  
all permissions available in this module is defined in  
<module>/lib/api.php
@@ -78,15 +75,15 @@
  Further information about permissions is available at  
http://wiki.horde.org/Doc/Dev/PermsPackage

  + Content-Page

-Basic Procedure to create Content-Pages:
+The basic procedure to create Content-Pages is:
  * create .inc files that display the elements on the screen
  * create any php files needed to fill in forms

  It is a good point to start a contentpage by copying the Skeleton's list.php

-All viewable pages ar located in the module's root-folder. All  
businesslogic (classes etc) are located in separate files in  
<module>/lib.
+All viewable pages ar located in the module's root-folder. All  
businesslogic (classes etc,) are located in separate files in  
<module>/lib.

  + Services

  + Misc

--
To unsubscribe, mail: [email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.