array to string comparision. sqimap_retrieve_imap_response function, that
[squirrelmail.git] / doc / plugin.txt
index 7acbc5beb497b9008a91d27ae0b06d16eceb8e32..4530e580ef177e7c9bd0ebecaaf64201029f3fd9 100644 (file)
@@ -204,6 +204,7 @@ but may be out of date soon thereafter.  You never know.  ;-)
   message_body                   functions/mime.php              do_hook
   ^ attachment $type0/$type1     functions/mime.php              do_hook
   attachments_bottom             functions/mime.php              hook_func
+  decode_body                    functions/mime.php              hook_func
   generic_header                 functions/page_header.php       do_hook
   menuline                       functions/page_header.php       do_hook
   internal_link                  functions/page_header.php       hook_func
@@ -1044,11 +1045,11 @@ files.
       After you're done translating, you can create the .mo file very simply 
       by running the following command (available on most linux systems):
 
-         msgfmt -0 <plugin name>.mo <plugin name>.po
+         msgfmt -o <plugin name>.mo <plugin name>.po
 
       In the case of the "demo" plugin:
 
-         msgfmt -0 demo.mo demo.po
+         msgfmt -o demo.mo demo.po
 
       Please be sure that the .po and .mo files both are named exactly the
       same as the domain you bound in step 2 above and everything else works
@@ -1056,6 +1057,41 @@ files.
       and change your Language setting to see the translations in action!
 
 
+
+Documenting the Code (Optional)
+-------------------------------
+
+If you wish, you can use phpdoc (Javadoc-style) comments, when documenting your
+code.
+
+If you follow the standards that are followed between Squirrelmail core &
+plugin developers, the resulted documentation can be included with the rest of
+the Squirrelmail code & API documentation. Specifically, in the page-level
+docblock, declare the package to be 'plugins', and the subpackage to be the
+name of your plugin. For instance:
+  
+/**
+ * demo.php
+ *
+ * Copyright (c) 2003 My Name <my-email-address>
+ * Licensed under the GNU GPL. For full terms see the file COPYING.
+ *
+ * @package plugins
+ * @subpackage demo
+ */
+
+The rest is up to you. Try to follow some common sense and document what is
+really needed. Documenting the code properly can be a big help not only to
+yourself, but to those who will take a look at your code, fix the bugs and even
+improve it, in the true open-source spirit that Squirrelmail was built upon.
+
+For more information about phpdocumentor and how to write proper-tagged
+comments, you are directed at:
+
+http://phpdocu.sourceforge.net/
+
+
+
 PLUGIN STANDARDS AND REQUIREMENTS
 =================================
 
@@ -1077,7 +1113,7 @@ Small setup.php
 
 In order for SquirrelMail to remain fast and lean, we are now asking
 that all plugin authors remove all unnecessary functionality from setup.php
-and refactoring it into another file.  There are a few ways to accomplish
+and refactor it into another file.  There are a few ways to accomplish
 this, none of which are difficult.  At a minimum, you'll want to have the
 squirrelmail_plugin_init_<plugin name>() function in setup.php, and naturally,
 you'll need functions that are merely stubs for each hook that you are using.
@@ -1116,7 +1152,7 @@ When you are developing your plugin, you should always have error reporting
 turned all the way up.  You can do this by changing two settings in your
 php.ini and restarting your web server:
 
-   display_errors = Off
+   display_errors = On
    error_reporting  =  E_ALL
 
 This way, you'll be sure to see all Notices, Warnings and Errors that your