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
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
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
=================================
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.
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