git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@2262
7612ce4b-ef26-0410-bec9-
ea0150e637f0
they are no longer viable.
If you have any questions or problems, please address them to
they are no longer viable.
If you have any questions or problems, please address them to
-the squirrelmail-list@lists.sourceforge.net to have them
+the squirrelmail-users@lists.sourceforge.net to have them
around there as well to find out more details of how this works.
If you have questions about this, please direct them to our mailing list:
around there as well to find out more details of how this works.
If you have questions about this, please direct them to our mailing list:
-squirrelmail-list@sourceforge.net
+squirrelmail-users@sourceforge.net
A FEW NOTES ON THE PLUGIN ARCHITECTURE
======================================
A FEW NOTES ON THE PLUGIN ARCHITECTURE
======================================
-The plugin architecture of SquirrelMail is designed to make it
-possible to add new features without having to patch SquirrelMail
-itself. At the moment the plugin part of SquirrelMail should be
-considered "alpha" or "beta" quality code.
-
-Until the functionality and code is more stable, be prepared for
-plugins to suddenly stop working.
-
-Functionality like password changing, displaying ads and calendars
-should be possible to add as plugins.
+The plugin architecture of SquirrelMail is designed to make it possible to
+add new features without having to patch SquirrelMail itself. Functionality
+like password changing, displaying ads and calendars should be possible to
+add as plugins.
In the main SquirrelMail files the file functions/plugin.php. In
places where hooks are made available they are executed by calling the
In the main SquirrelMail files the file functions/plugin.php. In
places where hooks are made available they are executed by calling the
-function do_hook("hookname").
+function do_hook('hookname').
-The do_hook traverses the array $squirrelmail_plugin_hooks["hookname"]
+The do_hook traverses the array $squirrelmail_plugin_hooks['hookname']
and executes all the functions that are named in that array.
A plugin must reside in a subdirectory in the plugins/ directory. The
and executes all the functions that are named in that array.
A plugin must reside in a subdirectory in the plugins/ directory. The
To start using a plugin, its name must be added to the $plugins array
in config.php like this:
To start using a plugin, its name must be added to the $plugins array
in config.php like this:
- $plugins[0] = "plugin_name";
+ $plugins[0] = 'plugin_name';
When a plugin is registered the file plugins/plugin_name/setup.php is
included and the function squirrelmail_plugin_init_plugin_name is
When a plugin is registered the file plugins/plugin_name/setup.php is
included and the function squirrelmail_plugin_init_plugin_name is
function squirrelmail_plugin_init_demo () {
global $squirrelmail_plugin_hooks;
function squirrelmail_plugin_init_demo () {
global $squirrelmail_plugin_hooks;
- $squirrelmail_plugin_hooks["generic_header"]["demo"] = "plugin_demo_header";
- $squirrelmail_plugin_hooks["menuline"]["demo"] = "plugin_demo_menuline";
+ $squirrelmail_plugin_hooks['generic_header']['demo'] = 'plugin_demo_header';
+ $squirrelmail_plugin_hooks['menuline']['demo'] = 'plugin_demo_menuline';
}
Note that the SquirrelMail files assume that all other SquirrelMail
files are available as ../directory/file. This means that if some file
}
Note that the SquirrelMail files assume that all other SquirrelMail
files are available as ../directory/file. This means that if some file
-in the plugin directory is requested, it must do a chdir("..") before
+in the plugin directory is requested, it must do a chdir('..') before
including any of the standard SquirrelMail files.
including any of the standard SquirrelMail files.
?>
<table width=50% cellpadding=3 cellspacing=0 border=0 align=center>
<tr>
?>
<table width=50% cellpadding=3 cellspacing=0 border=0 align=center>
<tr>
- <td bgcolor="<? echo $color[9] ?>">
+ <td bgcolor="<?php echo $color[9] ?>">
<a href="../plugins/YOUR_PLUGIN/YOUR_OPTIONS.php">YOUR OPTIONS NAME</a>
</td>
</tr>
<tr>
<a href="../plugins/YOUR_PLUGIN/YOUR_OPTIONS.php">YOUR OPTIONS NAME</a>
</td>
</tr>
<tr>
- <td bgcolor="<? echo $color[0] ?>">
+ <td bgcolor="<?php echo $color[0] ?>">
YOUR DESCRIPTION
</td>
</tr>
YOUR DESCRIPTION
</td>
</tr>
-
- # My Theme
- # Author: My Name
- # Date: Today's Date
- #
- # Optional description
- $color[0] = "#xxxxxx";
- $color[1] = "#xxxxxx";
- $color[2] = "#xxxxxx";
- $color[3] = "#xxxxxx";
- $color[4] = "#xxxxxx";
- $color[5] = "#xxxxxx";
- $color[6] = "#xxxxxx";
- $color[7] = "#xxxxxx";
- $color[8] = "#xxxxxx";
- $color[9] = "#xxxxxx";
- $color[10] = "#xxxxxx";
- $color[11] = "#xxxxxx";
- $color[12] = "#xxxxxx";
- $color[13] = "#xxxxxx";
- $color[14] = "#xxxxxx";
+ # My Theme
+ # Author: My Name
+ # Date: Today's Date
+ #
+ # Optional description
+
+ $color[0] = '#xxxxxx';
+ $color[1] = '#xxxxxx';
+ $color[2] = '#xxxxxx';
+ $color[3] = '#xxxxxx';
+ $color[4] = '#xxxxxx';
+ $color[5] = '#xxxxxx';
+ $color[6] = '#xxxxxx';
+ $color[7] = '#xxxxxx';
+ $color[8] = '#xxxxxx';
+ $color[9] = '#xxxxxx';
+ $color[10] = '#xxxxxx';
+ $color[11] = '#xxxxxx';
+ $color[12] = '#xxxxxx';
+ $color[13] = '#xxxxxx';
+ $color[14] = '#xxxxxx';
b 10: Darker version of #9
f 11: Special folders color [Inbox, Trash, Sent]
b 12: Alternate color for message list [alters between 4 and this one]
b 10: Darker version of #9
f 11: Special folders color [Inbox, Trash, Sent]
b 12: Alternate color for message list [alters between 4 and this one]
-f 13: Color for single-quoted text ("> text") when reading (default: #800000)
+f 13: Color for single-quoted text ('> text') when reading (default: #800000)
f 14: Color for text with more than one quote (default: #FF0000)
f 15: Non-selectable folders in the left frame (defaults to $color[6])
f 14: Color for text with more than one quote (default: #FF0000)
f 15: Non-selectable folders in the left frame (defaults to $color[6])