[commits] [Wiki] changed: CreatingYourFirstModule

Wiki Guest wikiguest at horde.org
Wed Feb 1 10:55:24 UTC 2012


guest [212.14.24.184]  Wed, 01 Feb 2012 10:55:24 +0000

Modified page: http://wiki.horde.org/CreatingYourFirstModule
New Revision:  17
Change log:  Revert

@@ -11,9 +11,9 @@
   cd horde
   cp -R skeleton/ /your/install/path/to/horde/
  </code>

-2. Create the following script as projectrename.php - save it  
somewhere sensible, like your home directory:
+2. Create the following script as prjrename.php - save it somewhere  
sensible, like your home directory:

  <code type="php">
  #!/usr/bin/php -q
  <?
@@ -68,10 +68,10 @@
  if (count($_SERVER['argv'])==3)
  {
    // Preparation
    $list = array();
-  $path = trim($_SERVER['argv'][1]);
-  $modul = trim($_SERVER['argv'][2]);
+  $path = trim($_SERVER[argv][1]);
+  $modul = trim($_SERVER[argv][2]);

    // Fetch Filelist
    $list = analysedir( $path, $list );

@@ -91,25 +91,8 @@

  <code type="sh">
  projectrename.php /path/to/skeleton/Checkout/ modulname
  </code>
-
-3.1:
-
-Edit your Name into all files, for example with this snippet under  
bash (Unix, Linux or Windows with cygwin):
-
-<code>find ./ -type f -exec sed -i 's/Your Name <you at example.com>/Me  
Myself <me at myselfandi.com>/g' {} \;
-</code>
-
-3.2 Rename
-
-<code>mv horde/appname/test/Skeleton horde/appname/test/Appname
-</code>
-and
-<code>mv horde/appname/locale/skeleton.pot horde/appname/locale/appname.pot
-</code>
-
-

  4. Perform some file modifications:

  <code type="sh">
@@ -119,14 +102,10 @@

  5. Upload a PNG icon at 16x16 for the module to the path created  
above, this one is available if you're stuck:

  http://spriggs.org.uk/projects/horde_dev/fitlog/themes/graphics/fitlog.png
-(The link doesn't work for me anymore, try this one:)
-http://groupware.ralf-lang.de/ajaxadmin/themes/graphics/ajaxadmin.png

  6. In /path/to/horde/config/registry.d/ create a file called  
modulename.php. Please note the lack of ?> at the end of the php  
block, and also the menu parent. If you want your object to go  
*ANYWHERE ELSE* you will need to change this!
-
-+++ registry.d example for horde 3

  <code type="php">
  <?php
  $this->applications['modulename'] = array(
@@ -135,21 +114,7 @@
      'name' => _("A description of your module"),
      'status' => 'active',
      'menu_parent' => 'horde'
  );
-</code>
-
-+++ registry.de example for horde 4
-
-<code type="php">
-<?php
-$this->applications['tickplug'] = array(
-        'name' => _("Tickplug"),
-        'provides' => array(
-        'Tickets/Import'
-        )
-        // This is sufficient. More options possible if needed
-    );
-
  </code>

  OK, so you now have your first module. Now, you need to populate it  
with content. This will be the subject of the next section:  
PopulatingYourFirstModule



More information about the commits mailing list