setup.php 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. <?php
  2. /**
  3. * setup.php - Generic Change Password plugin
  4. *
  5. * This plugin aims to provide a general framework for all password
  6. * changing methods that currently have their own plugins.
  7. *
  8. * @copyright &copy; 2003-2007 The SquirrelMail Project Team
  9. * @license http://opensource.org/licenses/gpl-license.php GNU Public License
  10. * @version $Id$
  11. * @package plugins
  12. * @subpackage change_password
  13. */
  14. /**
  15. * Plugin init function
  16. */
  17. function squirrelmail_plugin_init_change_password() {
  18. global $squirrelmail_plugin_hooks;
  19. $squirrelmail_plugin_hooks['optpage_register_block']['change_password'] = 'change_password_optpage';
  20. $squirrelmail_plugin_hooks['optpage_set_loadinfo']['change_password'] = 'change_password_loadinfo';
  21. }
  22. /**
  23. * Add plugin option block
  24. */
  25. function change_password_optpage() {
  26. global $optpage_blocks;
  27. $optpage_blocks[] = array(
  28. 'name' => _("Change Password"),
  29. 'url' => '../plugins/change_password/options.php',
  30. 'desc' => _("Use this to change your email password."),
  31. 'js' => FALSE
  32. );
  33. }
  34. /**
  35. * Displays information after "Successfully Saved Options:"
  36. * @since 1.5.1
  37. */
  38. function change_password_loadinfo() {
  39. global $optpage, $optpage_name;
  40. if ($optpage=='change_password') {
  41. // i18n: is displayed after "Successfully Saved Options:"
  42. $optpage_name=_("User's Password");
  43. }
  44. }
  45. /**
  46. * Return version information
  47. * @return string version number
  48. */
  49. function change_password_version() {
  50. return '0.2';
  51. }