- Added options to conf.pl to enable automated plugin installation:
./conf.pl --install-plugin <pluginname>. This allows plugins to be
distributed in packages. Conf.pl now also reports when saving fails.
+ - Attachment hooks now also allow specification of generic rules like
+ text/* which will be used when no specific rule is available.
Version 1.2.4 -- 25 January 2002
--------------------------------
addressbook_bottom src/addressbook.php
^ attachment $type0/$type1 functions/mime.php (see note on attachments)
-
(*) Options
-----------
There are two ways to do options for your plugin. First, you can incorporate it
$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
-------------------------
/* Register HTML */
register_attachment_common('text/html', 'link_html');
+
/* Register vcards */
register_attachment_common('text/x-vcard', 'link_vcard');
+/* Register rules for general types.
+ * These will be used if there isn't a more specific rule available. */
+register_attachment_common('text/*', 'link_text');
+register_attachment_common('message/*', 'link_text');
+
/* Register "unknown" attachments */
register_attachment_common('application/octet-stream', 'octet_stream');
}
}
-?>
\ No newline at end of file
+?>
"../src/download.php?absolute_dl=true&passed_id=$id&mailbox=$urlMailbox&passed_ent_id=$ent";
$ImageURL = '';
+ / * this executes the attachment hook with a specific MIME-type.
+ * if that doens't have results, it tries if there's a rule
+ * for a more generic type. */
$HookResults = do_hook("attachment $type0/$type1", $Links,
$startMessage, $id, $urlMailbox, $ent, $DefaultLink,
$display_filename, $where, $what);
+ if(count($HookResults[1]) <= 1) {
+ $HookResults = do_hook("attachment $type0/*", $Links,
+ $startMessage, $id, $urlMailbox, $ent, $DefaultLink,
+ $display_filename, $where, $what);
+ }
$Links = $HookResults[1];
$DefaultLink = $HookResults[6];