fixing some strings that can't be extracted with gettext 0.10.40.
[squirrelmail.git] / plugins / bug_report / setup.php
CommitLineData
15e6162e 1<?php
2
3/**
4 * setup.php
5 *
82d304a0 6 * Copyright (c) 1999-2004 The SquirrelMail development team
15e6162e 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$
ea5f4b8e 12 * @package plugins
13 * @subpackage bug_report
15e6162e 14 */
15
16/* This button fills out a form with your setup information already
17 gathered -- all you have to do is type. */
18
19
ea5f4b8e 20/**
21 * Initialize the bug report plugin
22 * @return void
23 */
d79e01f5 24function squirrelmail_plugin_init_bug_report() {
25 global $squirrelmail_plugin_hooks;
26
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';
15e6162e 31}
32
33
34/* Show the button in the main bar */
d79e01f5 35function bug_report_button() {
36 global $color, $bug_report_visible;
37
38 if (! $bug_report_visible) {
39 return;
40 }
41
42 displayInternalLink('plugins/bug_report/bug_report.php', 'Bug', '');
43 echo "&nbsp;&nbsp;\n";
15e6162e 44}
45
46
d79e01f5 47function bug_report_save() {
48 global $username,$data_dir;
15e6162e 49
3c66c567 50 if( sqgetGlobalVar('bug_report_bug_report_visible', $vis, SQ_POST) ) {
d79e01f5 51 setPref($data_dir, $username, 'bug_report_visible', '1');
52 } else {
53 setPref($data_dir, $username, 'bug_report_visible', '');
54 }
15e6162e 55}
56
57
d79e01f5 58function bug_report_load() {
59 global $username, $data_dir;
60 global $bug_report_visible;
15e6162e 61
d79e01f5 62 $bug_report_visible = getPref($data_dir, $username, 'bug_report_visible');
15e6162e 63}
64
65
d79e01f5 66function bug_report_options() {
67 global $bug_report_visible;
68
a75e70b1 69 echo '<tr>' . html_tag('td',_("Bug Reports:"),'right','','nowrap') . "\n" .
d79e01f5 70 '<td><input name="bug_report_bug_report_visible" type=CHECKBOX';
71 if ($bug_report_visible) {
72 echo ' CHECKED';
73 }
74 echo '> ' . _("Show button in toolbar") . "</td></tr>\n";
15e6162e 75}
76
04f6008a 77?>