95ef58ad3af09bba529614e0d3c16c778ff40b55
[squirrelmail.git] / plugins / demo / setup.php
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 */
20 function squirrelmail_plugin_init_demo()
21 {
22
23 global $squirrelmail_plugin_hooks;
24
25 $squirrelmail_plugin_hooks['login_cookie']['demo']
26 = 'demo_login_cookie';
27
28 $squirrelmail_plugin_hooks['login_top']['demo']
29 = 'demo_login_top';
30
31 $squirrelmail_plugin_hooks['login_bottom']['demo']
32 = 'demo_login_bottom';
33
34 $squirrelmail_plugin_hooks['template_construct_page_header.tpl']['demo']
35 = 'demo_page_header_template';
36
37 //FIXME: put *ALL* SM hooks in here... which includes template_construct hooks for any templates that have plugin output sections in them and put page_header_template in right order
38 //FIXME: not all of the above hooks are yet implemented below
39 //FIXME: many hooks have examples in the original demo plugin in trunk/plugins/demo
40 }
41
42
43
44 /**
45 * Returns info about this plugin
46 *
47 * @return array An array of plugin information.
48 *
49 */
50 function demo_info()
51 {
52
53 return array(
54 'english_name' => 'Demo',
55 'version' => 'CORE',
56 'summary' => 'This plugin provides test/sample code for many of the hook points in the SquirrelMail core.',
57 'details' => 'This plugin provides test/sample code for many of the hook points in the SquirrelMail core.',
58 'requires_configuration' => 0,
59 'requires_source_patch' => 0,
60 );
61
62 }
63
64
65
66 /**
67 * Returns version info about this plugin
68 *
69 */
70 function demo_version()
71 {
72 $info = demo_info();
73 return $info['version'];
74 }
75
76
77
78 /**
79 * Add link to menu at top of content pane
80 *
81 * @return void
82 *
83 */
84 function demo_page_header_template()
85 {
86 include_once(SM_PATH . 'plugins/demo/functions.php');
87 return demo_page_header_template_do();
88 }
89
90
91