6 * Copyright (c) 1999-2002 The SquirrelMail development team
7 * Licensed under the GNU GPL. For full terms see the file COPYING.
9 * This is a standard Squirrelmail-1.2 API for plugins.
14 /* This button fills out a form with your setup information already
15 gathered -- all you have to do is type. */
18 /* Initialize the bug report plugin */
19 function squirrelmail_plugin_init_bug_report()
21 global $squirrelmail_plugin_hooks;
23 $squirrelmail_plugin_hooks['menuline']['bug_report'] = 'bug_report_button';
24 $squirrelmail_plugin_hooks['options_display_inside']['bug_report'] = 'bug_report_options';
25 $squirrelmail_plugin_hooks['options_display_save']['bug_report'] = 'bug_report_save';
26 $squirrelmail_plugin_hooks['loading_prefs']['bug_report'] = 'bug_report_load';
30 /* Show the button in the main bar */
31 function bug_report_button()
33 global $color, $bug_report_visible;
35 if (! $bug_report_visible)
38 displayInternalLink('plugins/bug_report/bug_report.php', 'Bug', '');
39 echo " \n";
43 function bug_report_save()
45 global $username,$data_dir;
46 global $bug_report_bug_report_visible;
48 if (isset($bug_report_bug_report_visible))
50 setPref($data_dir, $username, 'bug_report_visible', '1');
54 setPref($data_dir, $username, 'bug_report_visible', '');
59 function bug_report_load()
61 global $username, $data_dir;
62 global $bug_report_visible;
64 $bug_report_visible = getPref($data_dir, $username, 'bug_report_visible');
68 function bug_report_options()
70 global $bug_report_visible;
72 echo "<tr><td align=right nowrap>Bug Reports:</td>\n";
73 echo "<td><input name=\"bug_report_bug_report_visible\" type=CHECKBOX";
74 if ($bug_report_visible)
76 echo "> Show button in toolbar</td></tr>\n";