setup.php 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. <?php
  2. /**
  3. * Bug Report plugin - setup script
  4. *
  5. * @copyright &copy; 1999-2008 The SquirrelMail Project Team
  6. * @license http://opensource.org/licenses/gpl-license.php GNU Public License
  7. * @version $Id$
  8. * @package plugins
  9. * @subpackage bug_report
  10. */
  11. /**
  12. * Initialize the bug report plugin
  13. *
  14. * @return void
  15. *
  16. * @access private
  17. *
  18. */
  19. function squirrelmail_plugin_init_bug_report() {
  20. global $squirrelmail_plugin_hooks;
  21. $squirrelmail_plugin_hooks['template_construct_page_header.tpl']['bug_report']
  22. = 'bug_report_button';
  23. $squirrelmail_plugin_hooks['optpage_loadhook_display']['bug_report']
  24. = 'bug_report_block';
  25. }
  26. /**
  27. * Show the button in the main bar
  28. *
  29. * @access private
  30. *
  31. */
  32. function bug_report_button() {
  33. include_once(SM_PATH . 'plugins/bug_report/functions.php');
  34. return bug_report_button_do();
  35. }
  36. /**
  37. *
  38. * Register bug report option block
  39. *
  40. * @since 1.5.1
  41. *
  42. * @access private
  43. *
  44. */
  45. function bug_report_block() {
  46. include_once(SM_PATH.'plugins/bug_report/functions.php');
  47. bug_report_block_do();
  48. }
  49. /**
  50. * Returns info about this plugin
  51. *
  52. */
  53. function bug_report_info() {
  54. return array(
  55. 'english_name' => 'Bug Report',
  56. 'authors' => array(
  57. 'SquirrelMail Team' => array(),
  58. ),
  59. 'version' => 'CORE',
  60. 'required_sm_version' => 'CORE',
  61. 'requires_configuration' => 0,
  62. 'summary' => 'Helps with sending bug reports to the SquirrelMail Developers. Collects a lot of useful information about your system.',
  63. 'details' => 'When people stumble across a bug, which may happen in a work-in-progress, often times they would like to help out the software and get rid of the bug. Sometimes, these people don\'t know much about the system and how it is set up -- they know enough to make the bug happen for them. This bug report plugin is designed to gather all of the non-private information for the user automatically, so that the user doesn\'t need to know more than how to trigger the bug.',
  64. );
  65. }
  66. /**
  67. * Returns version info about this plugin
  68. *
  69. */
  70. function bug_report_version() {
  71. $info = bug_report_info();
  72. return $info['version'];
  73. }