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
-----------------------------------------
$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.
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.