phpdoc updates
[squirrelmail.git] / plugins / message_details / setup.php
CommitLineData
bbdea028 1<?php
2/** Message Source
3*
4* Plugin to view the RFC822 raw message output and the bodystructure of a message
5*
6* Copyright (c) 2002 Marc Groot Koerkamp, The Netherlands
7* Licensed under the GNU GPL. For full terms see the file COPYING.
8*
9* $Id$
ea5f4b8e 10* @package plugins
11* @subpackage message_details
bbdea028 12**/
13
ea5f4b8e 14/**
15 * Initialize the plugin
16 */
bbdea028 17function squirrelmail_plugin_init_message_details()
18{
19 global $squirrelmail_plugin_hooks;
20
04f6008a 21 do_hook('read_body_header_right');
22 $squirrelmail_plugin_hooks['read_body_header_right']['message_details'] = 'show_message_details';
bbdea028 23}
24
25function show_message_details() {
26 global $passed_id, $mailbox, $ent_num, $color,
bbdea028 27 $javascript_on;
28
29 if (strlen(trim($mailbox)) < 1) {
30 $mailbox = 'INBOX';
31 }
32
33 $params = '?passed_ent_id=' . $ent_num .
34 '&mailbox=' . urlencode($mailbox) .
35 '&passed_id=' . $passed_id;
36
37 $print_text = _("View Message details");
38
bbdea028 39 $result = '';
40 /* Output the link. */
41 if ($javascript_on) {
04f6008a 42 $result = '<script type="text/javascript" language="javascript">' . "\n" .
bbdea028 43 '<!--' . "\n" .
44 " function MessageSource() {\n" .
45 ' window.open("../plugins/message_details/message_details_main.php' .
04f6008a 46 $params . '","MessageDetails","width=800,height=600");' . "\n".
bbdea028 47 " }\n" .
48 "// -->\n" .
49 "</script>\n" .
50 "&nbsp;|&nbsp;<A HREF=\"javascript:MessageSource();\">$print_text</A>\n";
51 }
52 echo $result;
53}
04f6008a 54
dcc1cc82 55?>