Update pot file
[squirrelmail.git] / plugins / demo / setup.php
CommitLineData
0aa6aa6f 1<?php
2
3/**
4 * SquirrelMail Demo Plugin
5 * @copyright &copy; 2006-2007 The SquirrelMail Project Team
6 * @license http://opensource.org/licenses/gpl-license.php GNU Public License
7 * @version $Id$
8 * @package plugins
9 * @subpackage demo
10 */
11
12
13
14/**
15 * Register this plugin with SquirrelMail
16 *
17 * @return void
18 *
19 */
20function squirrelmail_plugin_init_demo()
21{
e04de0b9 22//FIXME: put *ALL* SM hooks in here... which includes template_construct hooks for any templates that have plugin output sections in them... and put them all in the right order
23//FIXME: many hooks have examples in the original demo plugin in trunk/plugins/demo
0aa6aa6f 24
25 global $squirrelmail_plugin_hooks;
26
e04de0b9 27//FIXME: this hook not yet implemented below
0aa6aa6f 28 $squirrelmail_plugin_hooks['login_cookie']['demo']
29 = 'demo_login_cookie';
30
e04de0b9 31//FIXME: not all of the above hooks are yet implemented below
0aa6aa6f 32 $squirrelmail_plugin_hooks['login_top']['demo']
33 = 'demo_login_top';
34
e04de0b9 35//FIXME: not all of the above hooks are yet implemented below
0aa6aa6f 36 $squirrelmail_plugin_hooks['login_bottom']['demo']
37 = 'demo_login_bottom';
38
e04de0b9 39//FIXME: this template may have more plugin output sections that are not yet implemented below
0aa6aa6f 40 $squirrelmail_plugin_hooks['template_construct_page_header.tpl']['demo']
41 = 'demo_page_header_template';
42
e04de0b9 43 $squirrelmail_plugin_hooks['optpage_register_block']['demo']
44 = 'demo_option_link';
45
0aa6aa6f 46}
47
48
49
50/**
51 * Returns info about this plugin
52 *
53 * @return array An array of plugin information.
54 *
55 */
56function demo_info()
57{
58
59 return array(
60 'english_name' => 'Demo',
6d31bea8 61 'version' => 'CORE',
0aa6aa6f 62 'summary' => 'This plugin provides test/sample code for many of the hook points in the SquirrelMail core.',
63 'details' => 'This plugin provides test/sample code for many of the hook points in the SquirrelMail core.',
64 'requires_configuration' => 0,
65 'requires_source_patch' => 0,
66 );
67
68}
69
70
71
72/**
73 * Returns version info about this plugin
74 *
75 */
76function demo_version()
77{
78 $info = demo_info();
79 return $info['version'];
80}
81
82
83
84/**
85 * Add link to menu at top of content pane
86 *
87 * @return void
88 *
89 */
90function demo_page_header_template()
91{
92 include_once(SM_PATH . 'plugins/demo/functions.php');
93 return demo_page_header_template_do();
94}
95
96
97
e04de0b9 98/**
99 * Inserts an option block in the main SM options page
100 *
101 * @return void
102 *
103 */
104function demo_option_link()
105{
106 include_once(SM_PATH . 'plugins/demo/functions.php');
107 demo_option_link_do();
108}
109
110
111