name = 'CustomReporterPlugin'; # Proper name of plugin $this->description = ''; # Short description of the plugin $this->page = ''; # Default plugin page $this->version = '1.0'; # Plugin version string $this->requires = array( # Plugin dependencies, array of basename => version pairs 'MantisCore' => '1.2.0', # Should always depend on an appropriate version of MantisBT ); $this->author = 'carlos proensa'; # Author/team name $this->contact = ''; # Author/team e-mail address $this->url = ''; # Support webpage } function hooks() { return array( 'EVENT_REPORT_BUG_FORM_TOP' => 'reportBugFormTop', 'EVENT_REPORT_BUG' => 'reportBug' ); } function reportBugFormTop ( $p_event, $p_project_id){ # #/ allow to change reporter_id (if access level is higher than reporter) # $user_id= auth_get_current_user_id(); $access_level= user_get_access_level( $user_id, $p_project_id ); if ($access_level > REPORTER) { echo ''; echo 'Reporter: '; echo ''; echo ' Monitor this bug'; } echo ''; } function reportBug($p_event, $p_bug_data, $p_bug_id) { // this custom input was created on bug_report page event $t_add_user= gpc_get_int('user_monitor',0); if ($t_add_user!=0){ bug_monitor($p_bug_id, $t_add_user); } } } ?>