Source for file setup.php

Documentation is available at setup.php

  1. <?php
  2.  
  3. /**
  4.   * SquirrelMail Demo Plugin
  5.   * @copyright 2006-2020 The SquirrelMail Project Team
  6.   * @license http://opensource.org/licenses/gpl-license.php GNU Public License
  7.   * @version $Id: setup.php 14845 2020-01-07 08:09:34Z pdontthink $
  8.   * @package plugins
  9.   * @subpackage demo
  10.   */
  11.  
  12.  
  13.  
  14. /**
  15.   * Register this plugin with SquirrelMail
  16.   *
  17.   * @return void 
  18.   *
  19.   */
  20. {
  21. //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
  22. //FIXME: many hooks have examples in the original demo plugin in trunk/plugins/demo
  23.  
  24.    global $squirrelmail_plugin_hooks;
  25.  
  26. //FIXME: this hook not yet implemented below
  27.    $squirrelmail_plugin_hooks['login_cookie']['demo']
  28.       = 'demo_login_cookie';
  29.  
  30. //FIXME: not all of the above hooks are yet implemented below
  31.    $squirrelmail_plugin_hooks['login_bottom']['demo']
  32.       = 'demo_login_bottom';
  33.  
  34. //FIXME: this template may have more plugin output sections that are not yet implemented below
  35.    $squirrelmail_plugin_hooks['template_construct_page_header.tpl']['demo']
  36.       = 'demo_page_header_template';
  37.  
  38.    $squirrelmail_plugin_hooks['optpage_register_block']['demo']
  39.       = 'demo_option_link';
  40.  
  41.    $squirrelmail_plugin_hooks['configtest']['demo']
  42.       = 'demo_check_configuration';
  43. }
  44.  
  45.  
  46.  
  47. /**
  48.   * Returns info about this plugin
  49.   *
  50.   * @return array An array of plugin information.
  51.   *
  52.   */
  53. function demo_info()
  54. {
  55.  
  56.    return array(
  57.              'english_name' => 'Demo',
  58.              'version' => 'CORE',
  59.              'summary' => 'This plugin provides test/sample code for many of the hook points in the SquirrelMail core.',
  60.              'details' => 'This plugin provides test/sample code for many of the hook points in the SquirrelMail core.'
  61.              'requires_configuration' => 0,
  62.              'requires_source_patch' => 0,
  63.           );
  64.  
  65. }
  66.  
  67.  
  68.  
  69. /**
  70.   * Returns version info about this plugin
  71.   *
  72.   */
  73. function demo_version()
  74. {
  75.    $info demo_info();
  76.    return $info['version'];
  77. }
  78.  
  79.  
  80.  
  81. /**
  82.   * Add link to menu at top of content pane
  83.   *
  84.   * @return void 
  85.   *
  86.   */
  87. {
  88.    include_once(SM_PATH 'plugins/demo/functions.php');
  89. }
  90.  
  91.  
  92.  
  93. /**
  94.   * Inserts an option block in the main SM options page
  95.   *
  96.   * @return void 
  97.   *
  98.   */
  99. function demo_option_link()
  100. {
  101.    include_once(SM_PATH 'plugins/demo/functions.php');
  102. }
  103.  
  104.  
  105.  
  106. /**
  107.   * Validate that this plugin is configured correctly
  108.   *
  109.   * @return boolean Whether or not there was a
  110.   *                  configuration error for this plugin.
  111.   *
  112.   */
  113. {
  114.    include_once(SM_PATH 'plugins/demo/functions.php');
  115. }

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