Mantis Logo
Mantis Manual
Manual
Modifications

Phorum
phpWebSite
Anonymous Reports
Daily Reports


Partner Links


Anonymous Reports
Last Modified: August 11, 2003 07:08AM
(Any)
Description

#############################################################################
### HOWTO-anonymous-reports ####
#############################################################################

Thie file details the basic steps needed to add anonymous reports capability.
Users can file bugs from this form but not have any other access to the bug
tracker. Essentially they can report but not view any other bugs.
Furthermore, this page can be placed outside the mantis web tree to further
isolate the bug tracker from the user.

This form only supports reporting for one project. A good addition would be
capability for multiple projects. Another modification would be to include
some advanced bug fields on the report form.

This is extremely simple and is more of an example or springboard for further
modifications. I will only give general advice (not code) for requests for
customizations or enhancements.

### Required:

* Mantis 0.15.x or later
* anonymous_report.tar.gz
URL: http://mantisbt.sourceforge.net/mods/anonymous_report.tar.gz
Contains:

- report_anon_page.php
- report_anon.php

### Setup: We will proceed assuming the following setup:

* Your web root (usually htdocs for apache) is /usr/local/apache/htdocs/
(On a windows box it would look something like this
C:\\apache\\htdocs\\mantis\\ instead. Adapt to reflect your setup)
* Mantis is installed in /usr/local/apache/htdocs/mantis/
* Anonymous posting will be in /usr/local/apache/htdocs/products/p1
This is accessible via http://yourdomain/products/p1/report_anon_page.php


### Steps:

0. Prerequisites
1. Copy the Files
2. Setup Anonymous User
3. Obtain User ID
4. Obtain Project ID
5a. Config report_anon_page.php
5b. Config report_anon.php

#################################
Step 0: Prerequisites
#################################

Mantis is installed and running properly.

#################################
Step 1: Copy the Files
#################################

Install the files by unzipping it to a web accessible directory. This
directory should NOT be your mantis directory.

On unix use the tar command:

tar zxvf anonymous_report.tar.gz

On Windows use Winzip or your favorite archiver.

###########################################
Step 2: Setup Anonymous User
###########################################

You will need to create a user with at least reporting privileges. You may
want to set the email to something useful, like a mailing list.

###########################################
Step 3: Obtain User ID
###########################################

Next grab the grab the user ID and keep the info handy. You can get this from
the "Manage -> Edit User" page. The user ID will be in the URL:

eg. http://mysite/mantis/manage_user_page.php3?f_id=<USER_ID>

#####################################
Step 4: Obtain Project ID
#####################################

Grab the project ID of the project you want the reporter to enter by going to
"Mange -> Manage Projects -> Edit". The project ID will be in the URL:

eg. http://mysite/mantis/manage_proj_edit_page.php3?f_project_id=<PROJECT_ID>

######################################
Step 5a: Config report_anon_page.php
######################################

This is the file that users will go to for bug reports. You may want to
modify the html for company/project branding and add more detailed
instructions.

You will need to edit the portions at the top of the page.

Change the paths in the include() to reflect the location of your mantis
package. In our example this would mean:

Change:
include( "../mantis/strings_english.txt" );
To:
include( "../../mantis/strings_english.txt" );
OR
include( "/usr/local/apache/htdocs/mantis/strings_english.txt" );

Perform the same change for all the include() statements.

######################################
Step 5b: Config report_anon_page.php
######################################

Next, set the following variables:

$f_go_to_page = "report_anon_page.php";
$g_project_cookie_val = 0000002;
$f_reporter_id = 0000005;

Replace $g_project_cookie_val with the project ID.
Replace $f_reporter_id with the user ID.
Replace $f_go_to_page with the URL that you want the user to be redirected
to after submitting a bug.

#################################
Step 6: Config report_anon.php
#################################

This file does the actual work of adding the report. It is almost exactly the
same as report_bug.php3 and does almost the exact same thing except do access
checks.

Perform the same steps in Step 5a to this file.

###################################
FINISHED!
###################################

You're now finished adding anonymous bug posting! Simply create a link that
users can use to get to the report_anon_page.php3 file. Go ahead and test to
make sure that bugs are reported correctly.

If you wish to report any errors, comments, or suggestions please send email
to kenito@300baud.org

User Contributed Notes
Anonymous Reports
Add Notes About Notes
mtb14@IDONTNEEDMORESPAMcornell.edu
09-Jun-2004 11:55
#151
The link is broken, but this works:
http://www.mantisbt.org/mods/anonymous_report.tar.gz
burnettr@orbitec.com
19-Jul-2004 11:23
#176
I was not able to get this mod to work correctly. If followed the "how-to" instructions. But I was getting errors with strings_english.txt (undeclared variables); so i moved "include( "../Mantis/lang/strings_english.txt" );" below "include( "../Mantis/config_inc.php" );" Then i started to get this following errors:

Notice: Undefined variable: g_db_type in c:\program files\easyphp1-7\www\Mantis\core\database_API.php on line 19

ADONewConnection: Unable to load database driver ''


Notice: Undefined variable: g_use_persistent_connections in c:\program files\easyphp1-7\www\Mantis\core\database_API.php on line 329

Fatal error: Call to a member function on a non-object in c:\program files\easyphp1-7\www\Mantis\core\database_API.php on line 32

Does anyone know who to resolve these errors.

Thanks...Mantis v0.19.0a2
michaelggreer@earthlink.net
08-Aug-2004 16:38
#183
I think this addition is out of sync with the current version. Few of the included files match the 18.x or 19.x versions. Could this get updated? I'll try and figure it out myself, but it is a bit baffling.
yamada@ct.unicamp.br
21-Sep-2004 12:27
#205
Hi, I discover why occur this problem below:

Notice: Undefined variable: g_db_type in c:\program files\easyphp1-7\www\Mantis\core\database_API.php on line 19

ADONewConnection: Unable to load database driver ''

Notice: Undefined variable: g_use_persistent_connections in c:\program files\easyphp1-7\www\Mantis\core\database_API.php on line 329

Fatal error: Call to a member function on a non-object in c:\program files\easyphp1-7\www\Mantis\core\database_API.php on line 32

To resolv this problem, just write in /mantis/config_inc.php this line:

$g_db_type = "mysql"; (if you're using mySQL).

I don't know about the variable $g_use_persistent_connections but the others problems will disappear.
yamada@ct.unicamp.br
21-Sep-2004 13:09
#206
Notice: Undefined variable: g_use_persistent_connections in c:\program files\easyphp1-7\www\Mantis\core\database_API.php on line 329

I was reading the config_defaults_inc.php and on line 1134 I found the variable $g_use_persistent_connections.

In this case, set this variable $g_use_persistent_connections = OFF; in the config_inc.php file.
me@example.com
02-Nov-2004 5:59
#252
everything seems to be broken in the report_anon_page.php. I fixed, about 10 bugs and no end. Is there a new version somewhere?
me@example.com
02-Nov-2004 6:27
#253
I found new versions of the files, but no manual: http://sourceforge.net/forum/message.php?msg_id=2638343
pyby85@mac.com
13-Apr-2006 3:50
#1001
The link doesn't exist anymore...
The first solution is for a old old version of Mantis.
And the second solution had a link, but doesn't point to a web page.

Some one has a solution now ?
Thanks'
devnull@canassist.ca
13-May-2006 16:47
#1067
To enable anonymous bug reporting in Mantis 1.0.X complete the following steps:

1. Install Mantis and verify that it is installed correctly
2. Create projects and users
3. Login as an administrator
4. Click Manage | Create New Account
5. Create a new account with the username: anonymous
6. Select appropriate access level, 'reporter' is probably suficient
7. Ensure that 'Enabled' and 'Protected' checkboxes are selected
8. Click 'Create User'
9. Edit your config_inc.php file in a text editor. Add the following:

   # --- anonymous login -----------
   # Allow anonymous login
   $g_allow_anonymous_login = ON;
   $g_anonymous_account = 'Guest';

10. Now, add the anonymous user to the projects that you want to have anonymous reporting. Under Manage | Manage Accounts:anonymous, select 'Unassigned Projects', Access Level to 'Reporter' and click 'Add User'.
11. That's it.
NeOqSPAM@NOStPiAM.com
31-Aug-2006 13:39
#1254
The direct link for an anonymous bug report is
http://<server>/mantis/login.php?username=<anonymous>&return=set_project.php%3Fref=bug_report_page.php%26project_id=<project>
inslide@gmail.com
17-Sep-2006 6:10
#1260
hi, finally i set up the anonymous login, but I still have a problem.
I would like to add on my site a form that directly insert the request in the bug tracker. But when I insert it I would like to redirect the user to a thank you page or something like this out of the bug tracker, not to the view_all_bug_page.php, it is possible?
Add Notes About Notes
Last updated: Sat, 17 May 2008 - 5:18:26

Mantis @ SourceForge