Source for file functions.php

Documentation is available at functions.php

  1. <?php
  2.  
  3.  
  4. /**
  5.   * SquirrelMail Demo Plugin
  6.   *
  7.   * @copyright 2006-2020 The SquirrelMail Project Team
  8.   * @license http://opensource.org/licenses/gpl-license.php GNU Public License
  9.   * @version $Id: functions.php 14840 2020-01-07 07:42:38Z pdontthink $
  10.   * @package plugins
  11.   * @subpackage demo
  12.   */
  13.  
  14.  
  15. /**
  16.   * Add link to menu at top of content pane
  17.   *
  18.   * @return void 
  19.   *
  20.   */
  21. function demo_menuline_do()
  22. {
  23.    sq_change_text_domain('demo');
  24.    displayInternalLink('plugins/demo/demo.php'_("Demo")'');
  25.    echo "&nbsp;&nbsp;\n";
  26.    sq_change_text_domain('squirrelmail');
  27. }
  28.  
  29.  
  30.  
  31. /**
  32.   * Inserts an option block in the main SM options page
  33.   *
  34.   */
  35. {
  36.  
  37.    global $optpage_blocks;
  38.  
  39.    sq_change_text_domain('demo');
  40.  
  41.    $optpage_blocks[array(
  42.       'name' => _("Demo"),
  43.       'url' => sqm_baseuri('plugins/demo/demo.php',
  44.       'desc' => _("This is where you would describe what your plugin does."),
  45.       'js' => FALSE
  46.    );
  47.  
  48.    sq_change_text_domain('squirrelmail');
  49.  
  50. }
  51.  
  52.  
  53.  
  54. /**
  55.   * Validate that this plugin is configured correctly
  56.   *
  57.   * @return boolean Whether or not there was a
  58.   *                  configuration error for this plugin.
  59.   *
  60.   */
  61. {
  62.  
  63.    // test for something that this plugin requires, print error if 
  64.    // misconfigured or requirements are missing
  65.    //
  66.    if (FALSE)  // put something meaningful here
  67.    {
  68.       do_err('Demo plugin is missing something important'FALSE);
  69.       return TRUE;  // return FALSE if you only want to display a non-critical error
  70.    }
  71.  
  72.    return FALSE;
  73.  
  74. }

Documentation generated on Mon, 13 Jan 2020 04:24:39 +0100 by phpDocumentor 1.4.3