X-Git-Url: https://vcs.fsf.org/?p=squirrelmail.git;a=blobdiff_plain;f=plugins%2Fdemo%2Fsetup.php;h=5c99b1b7dbc9dc3fc85277d8bd3c901fbc4aac95;hp=c304463300c35b929741566f1545a90c30119fd5;hb=c69bc63529c64510bdccbfb74bfcecc1d9d0d07b;hpb=0aa6aa6f4867b8f847c5dd3cdb1fcdce24735166 diff --git a/plugins/demo/setup.php b/plugins/demo/setup.php index c304463..5c99b1b 100644 --- a/plugins/demo/setup.php +++ b/plugins/demo/setup.php @@ -19,24 +19,28 @@ */ function squirrelmail_plugin_init_demo() { +//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 +//FIXME: many hooks have examples in the original demo plugin in trunk/plugins/demo global $squirrelmail_plugin_hooks; +//FIXME: this hook not yet implemented below $squirrelmail_plugin_hooks['login_cookie']['demo'] = 'demo_login_cookie'; - $squirrelmail_plugin_hooks['login_top']['demo'] - = 'demo_login_top'; - +//FIXME: not all of the above hooks are yet implemented below $squirrelmail_plugin_hooks['login_bottom']['demo'] = 'demo_login_bottom'; +//FIXME: this template may have more plugin output sections that are not yet implemented below $squirrelmail_plugin_hooks['template_construct_page_header.tpl']['demo'] = 'demo_page_header_template'; -//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 -//FIXME: not all of the above hooks are yet implemented below -//FIXME: many hooks have examples in the original demo plugin in trunk/plugins/demo + $squirrelmail_plugin_hooks['optpage_register_block']['demo'] + = 'demo_option_link'; + + $squirrelmail_plugin_hooks['configtest']['demo'] + = 'demo_check_configuration'; } @@ -52,6 +56,7 @@ function demo_info() return array( 'english_name' => 'Demo', + 'version' => 'CORE', 'summary' => 'This plugin provides test/sample code for many of the hook points in the SquirrelMail core.', 'details' => 'This plugin provides test/sample code for many of the hook points in the SquirrelMail core.', 'requires_configuration' => 0, @@ -88,3 +93,32 @@ function demo_page_header_template() +/** + * Inserts an option block in the main SM options page + * + * @return void + * + */ +function demo_option_link() +{ + include_once(SM_PATH . 'plugins/demo/functions.php'); + demo_option_link_do(); +} + + + +/** + * Validate that this plugin is configured correctly + * + * @return boolean Whether or not there was a + * configuration error for this plugin. + * + */ +function demo_check_configuration() +{ + include_once(SM_PATH . 'plugins/demo/functions.php'); + return demo_check_configuration_do(); +} + + +