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 14840 2020-01-07 07:42:38Z 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... and put them 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: this hook not yet implemented below 
  31.    $squirrelmail_plugin_hooks['login_top']['demo']
  32.       = 'demo_login_top';
  33.  
  34. //FIXME: this hook not yet implemented below 
  35.    $squirrelmail_plugin_hooks['login_form']['demo']
  36.       = 'demo_login_form';
  37.  
  38. //FIXME: this hook not yet implemented below 
  39.    $squirrelmail_plugin_hooks['login_bottom']['demo']
  40.       = 'demo_login_bottom';
  41.  
  42.    $squirrelmail_plugin_hooks['menuline']['demo']
  43.       = 'demo_menuline';
  44.  
  45.    $squirrelmail_plugin_hooks['optpage_register_block']['demo']
  46.       = 'demo_option_link';
  47.  
  48.    $squirrelmail_plugin_hooks['configtest']['demo']
  49.       = 'demo_check_configuration';
  50. }
  51.  
  52.  
  53.  
  54. /**
  55.   * Returns info about this plugin
  56.   *
  57.   * @return array An array of plugin information.
  58.   *
  59.   */
  60. function demo_info()
  61. {
  62.  
  63.    return array(
  64.              'english_name' => 'Demo',
  65.              'version' => 'CORE',
  66.              'summary' => 'This plugin provides test/sample code for many of the hook points in the SquirrelMail core.',
  67.              'details' => 'This plugin provides test/sample code for many of the hook points in the SquirrelMail core.'
  68.              'requires_configuration' => 0,
  69.              'requires_source_patch' => 0,
  70.           );
  71.  
  72. }
  73.  
  74.  
  75.  
  76. /**
  77.   * Returns version info about this plugin
  78.   *
  79.   */
  80. function demo_version()
  81. {
  82.    $info demo_info();
  83.    return $info['version'];
  84. }
  85.  
  86.  
  87.  
  88. /**
  89.   * Add link to menu at top of content pane
  90.   *
  91.   * @return void 
  92.   *
  93.   */
  94. function demo_menuline(
  95. {
  96.    include_once(SM_PATH 'plugins/demo/functions.php');
  97. }
  98.  
  99.  
  100.  
  101. /**
  102.   * Inserts an option block in the main SM options page
  103.   *
  104.   * @return void 
  105.   *
  106.   */
  107. function demo_option_link()
  108. {
  109.    include_once(SM_PATH 'plugins/demo/functions.php');
  110. }
  111.  
  112.  
  113.  
  114. /**
  115.   * Validate that this plugin is configured correctly
  116.   *
  117.   * @return boolean Whether or not there was a
  118.   *                  configuration error for this plugin.
  119.   *
  120.   */
  121. {
  122.    include_once(SM_PATH 'plugins/demo/functions.php');
  123. }

Documentation generated on Mon, 13 Jan 2020 04:25:19 +0100 by phpDocumentor 1.4.3