39324ea715882c26d6dc3d5c27a6b7b45cc67cbe
4 * Message Details plugin - main setup script
6 * Plugin to view the RFC822 raw message output and the bodystructure of a message
8 * @author Marc Groot Koerkamp
9 * @copyright © 2002 Marc Groot Koerkamp, The Netherlands
10 * @copyright © 2002-2005 The SquirrelMail Project Team
11 * @license http://opensource.org/licenses/gpl-license.php GNU Public License
14 * @subpackage message_details
18 * Initialize the plugin
21 function squirrelmail_plugin_init_message_details()
23 global $squirrelmail_plugin_hooks;
25 $squirrelmail_plugin_hooks['read_body_header_right']['message_details'] = 'show_message_details';
29 * Add message details link in message view
32 function show_message_details() {
33 global $passed_id, $mailbox, $ent_num,
36 if (strlen(trim($mailbox)) < 1) {
40 $params = '?passed_ent_id=' . $ent_num .
41 '&mailbox=' . urlencode($mailbox) .
42 '&passed_id=' . $passed_id;
44 $print_text = _("View Message details");
47 /* Output the link. */
49 $result = '<script type="text/javascript" language="javascript">' . "\n" .
51 " function MessageSource() {\n" .
52 ' window.open("../plugins/message_details/message_details_main.php' .
53 $params . '","MessageDetails","width=800,height=600");' . "\n".
57 " | <a href=\"javascript:MessageSource();\">$print_text</a>\n";