9.2. $prefs_backend (from 1.4.3rc1 and 1.5.0)
functions/db_prefs.php
functions/file_prefs.php
+ 9.2.1. functions/display_messages.php
+ (loaded only by file_prefs.php)
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
To set up links for actions, you assign them like this:
$Args[1]['<plugin_name>']['href'] = 'URL to link to';
- $Args[1]['<plugin_name>']['text'] = 'What to display';
+ $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
$Args[1]['demo']['href'] = SM_PATH . 'plugins/demo/zip_handler.php?'
. 'passed_id=' . $Args[3] . '&mailbox=' . $Args[4]
. '&passed_ent_id=' . $Args[5];
- $Args[1]['demo']['text'] = 'show zip contents';
+ $Args[1]['demo']['text'] = _("Show zip contents");
}
The file plugins/demo/zip_handler.php can now do whatever it needs with the
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
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: