Source for file setup.php

Documentation is available at setup.php

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

Documentation generated on 2020年1月13日 04:25:19 +0100 by phpDocumentor 1.4.3

AltStyle によって変換されたページ (->オリジナル) /