7.3.2. functions/prefs.php (from 1.5.1)
7.4. functions/constants.php
7.5. do_hook('loading_prefs')
+ 7.5.1. files loaded by plugins that use 'loading_prefs'
8. functions/page_header.php
8.1. functions/strings.php
8.2. functions/html.php
8.4. functions/global.php
9. functions/prefs.php
9.1. functions/global.php
- 9.2. $prefs_backend (from 1.4.3rc1 and 1.5.0)
+ 9.2. $prefs_backend (only in 1.4.3 and 1.5.0)
+ do_hook_function('prefs_backend') (since 1.4.4 and 1.5.1)
functions/db_prefs.php
functions/file_prefs.php
+ 9.2.1. functions/display_messages.php
+ (loaded only by file_prefs.php)
+ 9.2.2. files loaded by plugin that uses 'prefs_backend'
Hook Types: Parameters and Return Values
-----------------------------------------
get_pref_override functions/file_prefs.php hook_func
get_pref functions/file_prefs.php hook_func
special_mailbox functions/imap_mailbox.php hook_func
- % rename_or_delete_folder functions/imap_mailbox.php hook_func
+% rename_or_delete_folder functions/imap_mailbox.php hook_func
mailbox_index_before functions/mailbox_display.php do_hook
mailbox_form_before functions/mailbox_display.php do_hook
mailbox_index_after functions/mailbox_display.php do_hook
mailbox_display_buttons functions/mailbox_display.php do_hook
mailbox_display_button_action functions/mailbox_display.php hook_func
message_body functions/mime.php do_hook
- ^ attachment $type0/$type1 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
+ prefs_backend functions/prefs.php hook_func
loading_prefs include/load_prefs.php do_hook
addrbook_html_search_below src/addrbook_search_html.php do_hook
addressbook_bottom src/addressbook.php do_hook
login_top src/login.php do_hook
login_form src/login.php do_hook
login_bottom src/login.php do_hook
- * optpage_set_loadinfo src/options.php do_hook
- * optpage_loadhook_personal src/options.php do_hook
- * optpage_loadhook_display src/options.php do_hook
- * optpage_loadhook_highlight src/options.php do_hook
- * optpage_loadhook_folder src/options.php do_hook
- * optpage_loadhook_order src/options.php do_hook
- * options_personal_save src/options.php do_hook
- * options_display_save src/options.php do_hook
- * options_folder_save src/options.php do_hook
- * options_save src/options.php do_hook
- * optpage_register_block src/options.php do_hook
- * options_link_and_description src/options.php do_hook
- * options_personal_inside src/options.php do_hook
- * options_display_inside src/options.php do_hook
- * options_highlight_inside src/options.php do_hook
- * options_folder_inside src/options.php do_hook
- * options_order_inside src/options.php do_hook
- * options_personal_bottom src/options.php do_hook
- * options_display_bottom src/options.php do_hook
- * options_highlight_bottom src/options.php do_hook
- * options_folder_bottom src/options.php do_hook
- * options_order_bottom src/options.php do_hook
- * options_highlight_bottom src/options_highlight.php do_hook
- & options_identities_process src/options_identities.php do_hook
- & options_identities_top src/options_identities.php do_hook
- &% options_identities_renumber src/options_identities.php do_hook
- & options_identities_table src/options_identities.php concat_hook
- & options_identities_buttons src/options_identities.php concat_hook
+* optpage_set_loadinfo src/options.php do_hook
+* optpage_loadhook_personal src/options.php do_hook
+* optpage_loadhook_display src/options.php do_hook
+* optpage_loadhook_highlight src/options.php do_hook
+* optpage_loadhook_folder src/options.php do_hook
+* optpage_loadhook_order src/options.php do_hook
+* options_personal_save src/options.php do_hook
+* options_display_save src/options.php do_hook
+* options_folder_save src/options.php do_hook
+* options_save src/options.php do_hook
+* optpage_register_block src/options.php do_hook
+* options_link_and_description src/options.php do_hook
+* options_personal_inside src/options.php do_hook
+* options_display_inside src/options.php do_hook
+* options_highlight_inside src/options.php do_hook
+* options_folder_inside src/options.php do_hook
+* options_order_inside src/options.php do_hook
+* options_personal_bottom src/options.php do_hook
+* options_display_bottom src/options.php do_hook
+* options_highlight_bottom src/options.php do_hook
+* options_folder_bottom src/options.php do_hook
+* options_order_bottom src/options.php do_hook
+* options_highlight_bottom src/options_highlight.php do_hook
+& options_identities_process src/options_identities.php do_hook
+& options_identities_top src/options_identities.php do_hook
+&% options_identities_renumber src/options_identities.php do_hook
+& options_identities_table src/options_identities.php concat_hook
+& options_identities_buttons src/options_identities.php concat_hook
message_body src/printer_friendly_bottom.php do_hook
read_body_header src/read_body.php do_hook
read_body_menu_top src/read_body.php hook_func
webmail_top src/webmail.php do_hook
webmail_bottom src/webmail.php concat_hook
logout_above_text src/signout.php concat_hook
- O info_bottom plugins/info/options.php do_hook
+O info_bottom plugins/info/options.php do_hook
% = This hook is used in multiple places in the given file
# = Called with hook type (see below)
& = Special identity hooks (see below)
^ = Special attachments hook (see below)
* = Special options hooks (see below)
-O = optional hook used by plugin
+O = Optional hook provided by a particular plugin
(#) Called With
$Args[1]['<plugin_name>']['href'] = 'URL to link to';
$Args[1]['<plugin_name>']['text'] = _("What to display");
+ $Args[1]['<plugin_name>']['extra'] = 'extra stuff, such as an <img ...> tag';
Note: _("What to display") is explained in the section about
internationalization.
+You can leave the 'text' empty and put an image tag in 'extra' to show an
+image-only link for the attachment, or do the opposite (leave 'extra' empty)
+to display a text-only link.
+
It's also possible to specify a hook as "attachment type0/*",
for example "attachment text/*". This hook will be executed whenever there's
no more specific rule available for that type.
or other code to the user input
post_script You may specify some script (usually Javascript) that
will be placed after (outside of) the INPUT tag.
+ htmlencoded disables html sanitizing. WARNING - don't use it, if user
+ input is possible in option or use own sanitizing functions.
+ Currently works only with SMOPT_TYPE_STRLIST.
Note that you do not have to create a whole new section on the options
page if you merely want to add a simple input item or two to an options
echo _("This is what I want to eat before noon: ") . $fruitName;
+ Note:
+ Support for single quotes in gettext was added somewhere along gettext
+ 0.11.x (release dates 2002-01-31--08-06). This means that strings could
+ be written as:
+
+ echo _('Hello');
+
+ However, gettext 0.10.40 is currently the oldest version available at the
+ GNU site. It's still used in some Linux and BSD distributions/versions.
+ Since it's still in common use and it doesn't support single quoted
+ strings, double quoted strings are the preferred way when writing a
+ plugin.
+
2. By default, the SquirrelMail gettext domain is always in use. That
means that any text in the format described above will be translated
using the locale files found in the main SquirrelMail locale directory.
You should change the header to look something more like:
- # Copyright (c) 1999-2003 The Squirrelmail Development Team
+ # Copyright (c) 1999-2005 The SquirrelMail Project Team
# Roland Bauerschmidt <rb@debian.org>, 1999.
# $Id$
msgid ""
"POT-Creation-Date: 2003-01-21 19:21+0100\n"
"PO-Revision-Date: 2003-01-21 21:01+0100\n"
"Last-Translator: Juergen Edner <juergen.edner@epost.de>\n"
- "Language-Team: German <squirrelmail-i18n@lists.squirrelmail.net>\n"
+ "Language-Team: German <squirrelmail-i18n@lists.sourceforge.net>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=ISO-8859-1\n"
"Content-Transfer-Encoding: 8bit\n"
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 &
+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
+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>
+ * Copyright (c) 2005 My Name <my-email-address>
* Licensed under the GNU GPL. For full terms see the file COPYING.
*
* @package plugins
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.
+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: