Source for file functions.php

Documentation is available at functions.php

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

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

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