Search was broken. fixed. List all is weird however, it works but does not alternate...
[squirrelmail.git] / plugins / bug_report / setup.php
1 <?php
2
3 /**
4 * setup.php
5 *
6 * Copyright (c) 1999-2002 The SquirrelMail development team
7 * Licensed under the GNU GPL. For full terms see the file COPYING.
8 *
9 * This is a standard Squirrelmail-1.2 API for plugins.
10 *
11 * $Id$
12 */
13
14 /* This button fills out a form with your setup information already
15 gathered -- all you have to do is type. */
16
17
18 /* Initialize the bug report plugin */
19 function squirrelmail_plugin_init_bug_report() {
20 global $squirrelmail_plugin_hooks;
21
22 $squirrelmail_plugin_hooks['menuline']['bug_report'] = 'bug_report_button';
23 $squirrelmail_plugin_hooks['options_display_inside']['bug_report'] = 'bug_report_options';
24 $squirrelmail_plugin_hooks['options_display_save']['bug_report'] = 'bug_report_save';
25 $squirrelmail_plugin_hooks['loading_prefs']['bug_report'] = 'bug_report_load';
26 }
27
28
29 /* Show the button in the main bar */
30 function bug_report_button() {
31 global $color, $bug_report_visible;
32
33 if (! $bug_report_visible) {
34 return;
35 }
36
37 displayInternalLink('plugins/bug_report/bug_report.php', 'Bug', '');
38 echo "&nbsp;&nbsp;\n";
39 }
40
41
42 function bug_report_save() {
43 global $username,$data_dir;
44 global $bug_report_bug_report_visible;
45
46 if (isset($bug_report_bug_report_visible)) {
47 setPref($data_dir, $username, 'bug_report_visible', '1');
48 } else {
49 setPref($data_dir, $username, 'bug_report_visible', '');
50 }
51 }
52
53
54 function bug_report_load() {
55 global $username, $data_dir;
56 global $bug_report_visible;
57
58 $bug_report_visible = getPref($data_dir, $username, 'bug_report_visible');
59 }
60
61
62 function bug_report_options() {
63 global $bug_report_visible;
64
65 echo '<tr><td align=right nowrap>' . _("Bug Reports:") . "</td>\n" .
66 '<td><input name="bug_report_bug_report_visible" type=CHECKBOX';
67 if ($bug_report_visible) {
68 echo ' CHECKED';
69 }
70 echo '> ' . _("Show button in toolbar") . "</td></tr>\n";
71 }
72
73 ?>