they are anything AFTER the hook name in the actual hook call in the
source.
- bool_hook_function
- ------------------
+ boolean_hook_function
+ ---------------------
The newest of the SquirrelMail hooks, this type is used to let all
plugins registered against the hook to "vote" for some action. What
that action is is entirely dependent on how the hook is used in the
Hook Name Found In Called With(#)
--------- -------- --------------
+ abook_init functions/addressbook.php do_hook
+ abook_add_class functions/addressbook.php do_hook
loading_constants functions/constants.php do_hook
+ logout_error functions/display_messages.php do_hook
+ error_box functions/display_messages.php concat_hook
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
- msg_envelope functions/mailbox_display.php do_hook
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
left_main_after_each_folder src/left_main.php concat_hook
left_main_before src/left_main.php do_hook
left_main_after src/left_main.php do_hook
- create_collapse_link src/left_main.php hook_func
login_cookie src/login.php do_hook
login_top src/login.php do_hook
login_form src/login.php do_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 do_hook
+ read_body_menu_top src/read_body.php hook_func
read_body_menu_bottom src/read_body.php do_hook
read_body_header_right src/read_body.php do_hook
- html_top src/read_body.php do_hook
read_body_top src/read_body.php do_hook
read_body_bottom src/read_body.php do_hook
- html_bottom src/read_body.php do_hook
login_before src/redirect.php do_hook
login_verified src/redirect.php do_hook
generic_header src/right_main.php do_hook
search_bottom src/search.php do_hook
logout src/signout.php do_hook
webmail_top src/webmail.php do_hook
- webmail_bottom 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
% = 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
(#) Called With
holds each identity. The arguments to this hook are:
[0] = color of table (use it like this in your plugin:
- <tr bgcolor="<?PHP echo $info[1]?>">
+ <tr bgcolor="<?php echo $info[1]; ?>">
[1] = is this an empty section (the one at the end of the list)?
[2] = what is the 'post' value? (ident # or empty string if default)
The second way to add options to one of the SquirrelMail preferences page is
to use one of the "optpage_loadhook_<pref page>" hooks. The sent_subfolders
-plugin is an excellent example of this method. Briefly, this way of adding
+plugin has an excellent example of this method. Briefly, this way of adding
options consists of adding some plugin-specific information to a predefined
data structure which SquirrelMail then uses to build the HTML input forms
for you. This is the preferred method of building options lists going forward.
SMOPT_TYPE_INTEGER Integer input
SMOPT_TYPE_FLOAT Floating point number input
SMOPT_TYPE_BOOLEAN Boolean (yes/no radio buttons)
- input
+ input
SMOPT_TYPE_HIDDEN Hidden input (not actually
shown on preferences page)
SMOPT_TYPE_COMMENT Text is shown (specified by the
post_script You may specify some script (usually Javascript) that
will be placed after (outside of) the INPUT tag.
+ 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
+ section that already exists. For example, the Display Options page has
+ these groups:
+
+ 0 - General Display Options
+ 1 - Mailbox Display Options
+ 2 - Message Display and Composition
+
+ To add our previous input drop-down to the Mailbox Display Options,
+ we would not have to create our own group; just add it to group
+ number one:
+
+ global $optpage_data;
+ $optpage_data['vals'][1][] = array(
+ 'name' => 'plugin_demo_favorite_color',
+ 'caption' => 'Please Choose Your Favorite Color',
+ 'type' => SMOPT_TYPE_STRLIST,
+ 'refresh' => SMOPT_REFRESH_ALL,
+ 'posvals' => array(0 => 'red',
+ 1 => 'blue',
+ 2 => 'green',
+ 3 => 'orange'),
+ 'save' => 'save_plugin_demo_favorite_color'
+ );
+
3. If you indicated a 'save' attribute for any of your options, you must
create that function (you'll only need to do this if you need to do
some special processing for one of your settings). The function gets
# Copyright (c) 1999-2003 The Squirrelmail Development Team
# Roland Bauerschmidt <rb@debian.org>, 1999.
+ # $Id$
msgid ""
msgstr ""
- "Project-Id-Version: $Id: squirrelmail.po,v 1.10 2003/06/04 15:01:59
- philippe_mingo Exp $\n"
+ "Project-Id-Version: plugin-name version\n"
"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"