Update of /cvsroot/squirrelmail/documentation/devel
In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv15992
1.5.2 fixes, minor linguistic changes, new section for pages called directly
RCS file: /cvsroot/squirrelmail/documentation/devel/devel.sgml,v
retrieving revision 1.42
retrieving revision 1.43
diff -u -w -r1.42 -r1.43
--- devel.sgml 15 Oct 2006 13:20:21 -0000 1.42
+++ devel.sgml 24 Oct 2006 02:52:56 -0000 1.43
@@ -1084,11 +1084,11 @@
name of the subdirectory is considered to be the name of the plugin. Note that
the plugin will not function correctly if this is not the case.
-To start using a plugin, its name must be added to the <tt/$plugins/> array in
+To start using a plugin, its name must be added to the <tt/$plugins/ array in
<tt/config.php/ like this:
-$plugins = 'plugin_name';
+$plugins = 'plugin_name';
When a plugin is registered, the file <tt>plugins/plugin_name/setup.php</tt> is
@@ -1122,10 +1122,10 @@
-Please note that as of SquirrelMail 1.5.0, this function will no longer be
-called at run time and will instead be called only once at configuration time.
-Thus, the inclusion of any dynamic code (anything except hook registration) here
-is strongly discouraged.
+Please note that as of SquirrelMail 1.5.2, this function is no longer
+called at run time and is instead called (actually, just parsed) only
+once at configuration time. Thus, the inclusion of any dynamic code
+(anything except hook registration) here is strongly discouraged.
@@ -1805,12 +1805,12 @@
<sect2>Requesting new hooks
-It's impossible to foresee all of the places where hooks might be useful and
-it's also impossible to put in hooks everywhere, so you might need to negotiate
-the insertion of a new hook to make your plugin work. Start by writing a patch
-which will insert the hook you want to add, and mail your request (with the
-patch attached) to the SquirrelMail plugins mailing list. Don't forget to
-motivate the need for a new hook in your mail.
+It's impossible for the SquirrelMail team to foresee all of the places where
+hooks might be useful, so you might need to negotiate the insertion of a new
+hook to make your plugin work. Start by writing a patch which will insert the
+hook you want to add, and mail your request (with the patch attached) to the
+SquirrelMail development mailing list. Don't forget to explain the need for the
+new hook in your message.
@@ -2110,12 +2110,16 @@
+bindtextdomain('demo', SM_PATH . 'locale');
$optpage_blocks = array(
'name' => _("Favorite Color Settings"),
'url' => SM_PATH . 'plugins/demo/options.php',
'desc' => _("Change your favorite color and find new exciting colors"),
'js' => FALSE
+bindtextdomain('squirrelmail', SM_PATH . 'locale');
The array must have four elements:
@@ -2123,24 +2127,54 @@
The title of the plugin's preference page as it will be displayed at the Options
+page. Note that the text domain has to be changed to properly translate this text.
The URI that points to your plugin's custom preferences page.
A description of what the preferences page offers the user. This is displayed at
-the Options page below the title.
+the Options page below the title. Note that the text domain has to be changed to
+properly translate this text.
Indicates if this preference page requires the client browser to be
-TODO: Complete this section.
+The next step is to create your custom options page, keeping in mind the guidelines
+in <ref id="pagescalleddirectly" name="pages called directly"> and possibly using
+the techniques described in <ref id="savepref" name="Saving and retrieving
<sect2>Saving and retrieving preferences<label id="savepref">
TODO: Complete this section. (What happened to the text for this section from
+<sect1>Plugin pages called directly by the client browser<label id="pagescalleddirectly">
+There are a few places in a plugin, such as when hooking into the "menuline" or
+"optpage_register_block" hooks, where you can provide a link to a file that is
+called directly by the client browser. No matter what that page does, it should
+always validate that the calling client has a current login session. Thus, all
+such pages should start with the following code:
+else if (file_exists('../../include/validate.php'))
+ define('SM_PATH', '../../');
+ include_once(SM_PATH . 'include/validate.php');
+ define('SM_PATH', '../');
+ include_once(SM_PATH . 'src/validate.php');
+TODO: Possibly provide link to the include hierarchy provided by init.php/validate.php
<sect1>Compatibility with older versions of SquirrelMail
Whenever new versions of SquirrelMail are released, there is always a