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
-----------------------------------------
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");
+
+Note: _("What to display") is explained in the section about
+internationalization.
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