6 * Copyright (c) 1999-2004 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.
13 * @subpackage bug_report
16 /* This button fills out a form with your setup information already
17 gathered -- all you have to do is type. */
21 * Initialize the bug report plugin
24 function squirrelmail_plugin_init_bug_report() {
25 global $squirrelmail_plugin_hooks;
27 $squirrelmail_plugin_hooks['menuline']['bug_report'] = 'bug_report_button';
28 $squirrelmail_plugin_hooks['options_display_inside']['bug_report'] = 'bug_report_options';
29 $squirrelmail_plugin_hooks['options_display_save']['bug_report'] = 'bug_report_save';
30 $squirrelmail_plugin_hooks['loading_prefs']['bug_report'] = 'bug_report_load';
34 /* Show the button in the main bar */
35 function bug_report_button() {
36 global $color, $bug_report_visible;
38 if (! $bug_report_visible) {
42 displayInternalLink('plugins/bug_report/bug_report.php', 'Bug', '');
43 echo " \n";
47 function bug_report_save() {
48 global $username,$data_dir;
50 if( sqgetGlobalVar('bug_report_bug_report_visible', $vis, SQ_POST
) ) {
51 setPref($data_dir, $username, 'bug_report_visible', '1');
53 setPref($data_dir, $username, 'bug_report_visible', '');
58 function bug_report_load() {
59 global $username, $data_dir;
60 global $bug_report_visible;
62 $bug_report_visible = getPref($data_dir, $username, 'bug_report_visible');
66 function bug_report_options() {
67 global $bug_report_visible;
69 echo '<tr>' . html_tag('td',_("Bug Reports:"),'right','','nowrap') . "\n" .
70 '<td><input name="bug_report_bug_report_visible" type=CHECKBOX';
71 if ($bug_report_visible) {
74 echo '> ' . _("Show button in toolbar") . "</td></tr>\n";