File: CUSTOMIZATION

package info (click to toggle)
mantis 1.1.6+dfsg-2lenny6
  • links: PTS, VCS
  • area: main
  • in suites: lenny
  • size: 9,576 kB
  • ctags: 14,851
  • sloc: php: 54,817; sql: 348; sh: 181; makefile: 56
file content (66 lines) | stat: -rw-r--r-- 3,022 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
-------------------------------------------------------------------------------
Mantis - a php based bugtracking system
Copyright (C) 2000-2002  Kenzaburo Ito - kenito@300baud.org
Copyright (C) 2002-2004  Mantis Team   - mantisbt-dev@lists.sourceforge.net
-------------------------------------------------------------------------------

CONFIGURATION

* Also see configuration.html

This file contains information to help you customize Mantis.  A more
detailed doc can be found at:
http://manual.mantisbugtracker.com/manual.customizing.mantis.php

* config_defaults_inc.php
  - this file contains the default values for all the site-wide variables.
* config_inc.php
  - You should create this file to change config variable values.  Your
    values from this file will be used instead of the defaults.  This file
    will not be overwritten when you upgrade, but config_defaults_inc.php will.
    Look at config_inc.php.sample for an example.

* core/*_api.php - these files contains all the API library functions.

* global variables are prefixed by g_
* parameters in functions are prefixed with p_
* form variables are prefixed with f_
* variables that have been cleaned for db insertiong are prefixed with c_
* user related variables are prefixed with u_
* other variables are usually either prefixed with v_ or t_
* count variables have the word count in the variable name

More detail can be seen in the coding guidelines at:
http://www.mantisbugtracker.com/guidelines.php

Also at:
http://utvikler.start.no/code/php_coding_standard.html

* The files are split into three basic categories, viewable pages,
include files and pure scripts. Examining the viewable pages (suffix _page)
should make the basic file format fairly easy to see.  The file names
themselves should make their purpose apparent.  I decided to break the
work into many small files rather than have a small number of really
large files.

* Most of the action scripts have a confirmation page to make sure the action
completed successfully.  The pages will automatically redirect you after a
short amount of time.  You can shorten of lengthen the time by editing
$g_default_redirect_delay in config_inc.php.

* Edit css_inc.php to make your own page formatting.

* You can edit the print_header() and print_footer() functions in core_API.php
  to alter what should be visible at the top and bottom of each page.

* All files were edited with TAB SPACES set to 4.  I'm sorry if this causes
a problem, but I can't stand 8 (wastes space) and tabs are helpful.  I've
tried to alleviate this in the config file by using spaces for the most part.

*** A note on globals: globals are a rather quirky item in php.  Basically
all variables are always local in scope unless declared global.  This is why
some of the include() files have global declarations in them.

As a general debugging tip you should be extremely generous in using echo,
print and exit functions.  This is the quickest way to see if a database
query actually contains what you want, etc.