+
+
+(&) Identity Hooks
+------------------
+Some hooks are passed special information in the array of arguments. See
+the SpamCop plugin for how to use them.
+
+options_identities_process
+ [0] = Hook's name
+ [1] = Should I run the SaveUpdateFunction() (alterable)
+
+options_identities_renumber
+ [0] = Hook's name
+ [1] = Renumber it from ('default' or 1 through # idents - 1)
+ [2] = Renumber it to (same thing)
+
+options_identities_table
+ [0] = Hook's name
+ [1] = Color of table (use it like <tr<?PHP echo $Info[1]?>> in your
+ plugin)
+ [2] = Is this an empty section?
+ [3] = What is the 'post' value?
+
+options_identities_buttons
+ [0] = Hook's name
+ [1] = Is this an empty section (the one at the end of the list)?
+ [2] = What is the 'post' value?
+
+
+(^) Attachment Hooks
+--------------------
+When a message has attachments, this hook is called with the MIME types. For
+instance, a .zip file hook is "attachment application/x-zip". The hook should
+probably show a link to do a specific action, such as "Verify" or "View" for a
+.zip file.
+
+This is a breakdown of the data passed in the array to the hook that is called:
+
+ [0] = Hook's name ('attachment text/plain')
+ [1] = Array of links of actions (more below) (Alterable)
+ [2] = Used for returning to mail message (startMessage)
+ [3] = Used for finding message to display (id)
+ [4] = Mailbox name, urlencode()'d (urlMailbox)
+ [5] = Entity ID inside mail message (ent)
+ [6] = Default URL to go to when filename is clicked on (Alterable)
+ [7] = Filename that is displayed for the attachment
+ [8] = Sent if message was found from a search (where)
+ [9] = Sent if message was found from a search (what)
+
+To set up links for actions, you assign them like this:
+
+ $Args[1]['your_plugin_name']['href'] = 'URL to link to';
+ $Args[1]['your_plugin_name']['text'] = 'What to display';
+
+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.
+
+
+Outputting Your Own Pages
+-------------------------
+
+Often, when you want to provide your own customized options screen or create
+another web page instead of just using standard hooks, you will be creating
+your own .php files. An example of this is the attachment_common plugin's
+image.php file.
+
+To make sure that security is maintained and standards are followed, the top
+of your PHP script should look very similar to this:
+
+ <?PHP
+ /* This is my php file.
+ * description goes here.
+ */
+
+ chdir('..');
+ include('../src/validate.php');
+
+The validate.php script will include internationalization support,
+config.php variables, strings.php functions, and also authenticate that the
+user is truly logged in. validate.php also calls stripslashes() on incoming
+data (if gpc_magic_quotes() is on). You should never need to worry about
+that stuff again. As a warning, this has only really been ironed out in
+1.1.1. If you create/modify a plugin to follow these rules, you must
+mention that it requires SquirrelMail 1.1.1 or later.
+
+After that, if you need further functions, just use
+
+ include('../functions/filename.php');
+
+in your script. Since 1.0.5, it was no longer necessary (nor recommended)
+to use the "if (! isset($filename_php))" syntax.