Don't start message ID with a dot when no remote port is available
[squirrelmail.git] / plugins / demo / functions.php
CommitLineData
0aa6aa6f 1<?php
2
3
4/**
5 * SquirrelMail Demo Plugin
6 *
7 * @copyright &copy; 2006-2007 The SquirrelMail Project Team
8 * @license http://opensource.org/licenses/gpl-license.php GNU Public License
9 * @version $Id$
10 * @package plugins
11 * @subpackage demo
12 */
13
14
15/**
16 * Add link to menu at top of content pane
17 *
18 * @return void
19 *
20 */
21function demo_page_header_template_do()
22{
23 global $oTemplate;
24
25 sq_change_text_domain('demo');
26 $nbsp = $oTemplate->fetch('non_breaking_space.tpl');
27 $output = makeInternalLink('plugins/demo/demo.php', _("Demo"), '')
28 . $nbsp . $nbsp;
29 sq_change_text_domain('squirrelmail');
30
31 return array('menuline' => $output);
32}
33
34
35
e04de0b9 36/**
37 * Inserts an option block in the main SM options page
38 *
39 */
40function demo_option_link_do()
41{
42
43 global $optpage_blocks;
44
45 sq_change_text_domain('demo');
46
47 $optpage_blocks[] = array(
48 'name' => _("Demo"),
49 'url' => sqm_baseuri() . 'plugins/demo/demo.php',
50 'desc' => _("This is where you would describe what your plugin does."),
51 'js' => FALSE
52 );
53
54 sq_change_text_domain('squirrelmail');
55
56}
57
58
59
6b5eb340 60/**
61 * Validate that this plugin is configured correctly
62 *
63 * @return boolean Whether or not there was a
64 * configuration error for this plugin.
65 *
66 */
67function demo_check_configuration_do()
68{
69
70 // test for something that this plugin requires, print error if
71 // misconfigured or requirements are missing
72 //
73 if (FALSE) // put something meaningful here
74 {
75 do_err('Demo plugin is missing something important', FALSE);
76 return TRUE; // return FALSE if you only want to display a non-critical error
77 }
78
79 return FALSE;
80
81}
82
83
84