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 14845 2020-01-07 08:09:34Z 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. {
  22.    global $oTemplate$nbsp;
  23.  
  24.    sq_change_text_domain('demo');
  25.    $output makeInternalLink('plugins/demo/demo.php'_("Demo")'')
  26.            . $nbsp $nbsp;
  27.    sq_change_text_domain('squirrelmail');
  28.  
  29.    return array('menuline' => $output);
  30. }
  31.  
  32.  
  33.  
  34. /**
  35.   * Inserts an option block in the main SM options page
  36.   *
  37.   */
  38. {
  39.  
  40.    global $optpage_blocks;
  41.  
  42.    sq_change_text_domain('demo');
  43.  
  44.    $optpage_blocks[array(
  45.       'name' => _("Demo"),
  46.       'url' => sqm_baseuri('plugins/demo/demo.php',
  47.       'desc' => _("This is where you would describe what your plugin does."),
  48.       'js' => FALSE
  49.    );
  50.  
  51.    sq_change_text_domain('squirrelmail');
  52.  
  53. }
  54.  
  55.  
  56.  
  57. /**
  58.   * Validate that this plugin is configured correctly
  59.   *
  60.   * @return boolean Whether or not there was a
  61.   *                  configuration error for this plugin.
  62.   *
  63.   */
  64. {
  65.  
  66.    // test for something that this plugin requires, print error if
  67.    // misconfigured or requirements are missing
  68.    //
  69.    if (FALSE)  // put something meaningful here
  70.    {
  71.       do_err('Demo plugin is missing something important'FALSE);
  72.       return TRUE;  // return FALSE if you only want to display a non-critical error
  73.    }
  74.  
  75.    return FALSE;
  76.  
  77. }

Documentation generated on Mon, 13 Jan 2020 04:22:32 +0100 by phpDocumentor 1.4.3