X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=plugins%2Fdemo%2Ffunctions.php;h=45c8ff6f11a2cb95809745691e3c3a4dc817b289;hb=8ed1923822b383ddb338e9eef75bb7f110cc47b4;hp=8b3ad3dd71d86021ad780f38b231238f6260184c;hpb=0aa6aa6f4867b8f847c5dd3cdb1fcdce24735166;p=squirrelmail.git diff --git a/plugins/demo/functions.php b/plugins/demo/functions.php index 8b3ad3dd..45c8ff6f 100644 --- a/plugins/demo/functions.php +++ b/plugins/demo/functions.php @@ -4,7 +4,7 @@ /** * SquirrelMail Demo Plugin * - * @copyright © 2006-2007 The SquirrelMail Project Team + * @copyright 2006-2019 The SquirrelMail Project Team * @license http://opensource.org/licenses/gpl-license.php GNU Public License * @version $Id$ * @package plugins @@ -20,10 +20,9 @@ */ function demo_page_header_template_do() { - global $oTemplate; + global $oTemplate, $nbsp; sq_change_text_domain('demo'); - $nbsp = $oTemplate->fetch('non_breaking_space.tpl'); $output = makeInternalLink('plugins/demo/demo.php', _("Demo"), '') . $nbsp . $nbsp; sq_change_text_domain('squirrelmail'); @@ -33,3 +32,52 @@ function demo_page_header_template_do() +/** + * Inserts an option block in the main SM options page + * + */ +function demo_option_link_do() +{ + + global $optpage_blocks; + + sq_change_text_domain('demo'); + + $optpage_blocks[] = array( + 'name' => _("Demo"), + 'url' => sqm_baseuri() . 'plugins/demo/demo.php', + 'desc' => _("This is where you would describe what your plugin does."), + 'js' => FALSE + ); + + sq_change_text_domain('squirrelmail'); + +} + + + +/** + * Validate that this plugin is configured correctly + * + * @return boolean Whether or not there was a + * configuration error for this plugin. + * + */ +function demo_check_configuration_do() +{ + + // test for something that this plugin requires, print error if + // misconfigured or requirements are missing + // + if (FALSE) // put something meaningful here + { + do_err('Demo plugin is missing something important', FALSE); + return TRUE; // return FALSE if you only want to display a non-critical error + } + + return FALSE; + +} + + +