Initial import
[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 'summary' => 'This plugin provides test/sample code for many of the hook points in the SquirrelMail core.',
56 'details' => 'This plugin provides test/sample code for many of the hook points in the SquirrelMail core.',
57 'requires_configuration' => 0,
58 'requires_source_patch' => 0,
59 );
60
61 }
62
63
64
65 /**
66 * Returns version info about this plugin
67 *
68 */
69 function demo_version()
70 {
71 $info = demo_info();
72 return $info['version'];
73 }
74
75
76
77 /**
78 * Add link to menu at top of content pane
79 *
80 * @return void
81 *
82 */
83 function demo_page_header_template()
84 {
85 include_once(SM_PATH . 'plugins/demo/functions.php');
86 return demo_page_header_template_do();
87 }
88
89
90