Bump version
[gitphp.git] / config / gitphp.conf.php.example
1 <?php
2 /*
Chris Han 3 * gitphp.conf.php
4 * gitphp: A PHP git repository browser
5 * Component: Configuration
6 *
7 * Copyright (C) 2006 Christopher Han <xiphux@gmail.com>
8 */
9
10 /*
11 * projectroot
12 * Absolute filesystem path prepended to project paths
xiphux 13 * (don't forget trailing slash!)
14 */
Chris Han 15 //$gitphp_conf['projectroot'] = "/pub/gitprojects/";
16
17
18
19
Chris Han 20 /*
21 * stylesheet
22 * Path to page stylesheet
23 */
24 $gitphp_conf['stylesheet'] = "gitphp.css";
25
26 /*
27 * gitbin
Chris Han 28 * Path to git binary
29 * For example, /usr/bin/git on Linux
Chris Han 30 * or C:\\Program Files\\Git\\bin\\git.exe on Windows
Chris Han 31 * with msysgit. You can also omit the full path and just
32 * use the executable name to search the user's $PATH.
Chris Han 33 * Note: Versions of PHP below 5.2 have buggy handling of spaces
34 * in paths. Use the 8.3 version of the filename if you're
Chris Han 35 * having trouble, e.g. C:\\Progra~1\\Git\\bin\\git.exe
36 */
Chris Han 37 $gitphp_conf['gitbin'] = "/usr/bin/git";
38
Chris Han 39 /*
40 * diffbin
41 * Path to diff binary
42 * Same rules as gitbin
Chris Han 43 * Windows (msysgit): C:\\Progra~1\\Git\\bin\\diff.exe
Chris Han 44 */
45 $gitphp_conf['diffbin'] = "/usr/bin/diff";
46
47 /*
48 * gittmp
49 * Location for temporary files for diffs
xiphux 50 * (don't forget trailing slash!)
51 */
Chris Han 52 $gitphp_conf['gittmp'] = "/tmp/";
53
xiphux 54 /*
55 * title
56 * The string that will be used as the page title
57 * The variable '$gitphp_appstring' will expand to
58 * the name (gitphp) and version
Chris Han 59 * The variable '$gitphp_version' will expand to the
60 * version number only
xiphux 61 */
Chris Han 62 $gitphp_conf['title'] = "$gitphp_appstring";
xiphux 63
xiphux 64 /*
65 * self
66 * This is the path to the script that will be inserted
Chris Han 67 * in urls. If you leave this blank/commented the script
68 * will try to guess the correct URL, but you can override
69 * it here if it's not being guessed correctly.
70 *
xiphux 71 * If only specifying the directory path (and omitting the
72 * index.php filename), make sure to include the trailing
73 * slash!
74 */
Chris Han 75 //$gitphp_conf['self'] = "http://localhost/gitphp/";
xiphux 76
xiphux 77 /*
78 * smarty_prefix
79 * This is the prefix where smarty is installed.
80 * (including trailing slash)
81 * If an absolute (starts with /) path is given,
82 * Smarty.class.php will be searched for in that directory.
83 * If a relative (doesn't start with /) path is given,
84 * that subdirectory inside the php include dirs will be
85 * searched. So, for example, if you specify the path as
86 * "/usr/share/Smarty/" then the script will look for
87 * /usr/share/Smarty/Smarty.class.php.
88 * If you specify the path as "smarty/" then it will search
89 * the include directories in php.ini's include_path directive,
90 * so it would search in places like /usr/share/php and /usr/lib/php:
91 * /usr/share/php/smarty/Smarty.class.php,
92 * /usr/lib/php/smarty/Smarty.class.php, etc.
93 * Leave blank to just search in the root of the php include directories
94 * like /usr/share/php/Smarty.class.php, /usr/lib/php/Smarty.class.php, etc.
95 */
Chris Han 96 $gitphp_conf['smarty_prefix'] = "lib/smarty/libs/";
xiphux 97
xiphux 98 /*
Chris Han 99 * compressformat
Chris Han 100 * Indicates what kind of compression will be done on the
101 * snapshot archive. Recognized settings are:
102 *
Chris Han 103 * GITPHP_COMPRESS_BZ2 - create a tar.bz2 file (php must have bz2 support)
104 * GITPHP_COMPRESS_GZ - create a tar.gz file (php must have gzip support)
Chris Han 105 * GITPHP_COMPRESS_ZIP - create a zip file
Chris Han 106 *
107 * Any other setting, or no setting, will create uncompressed tar archives
108 * If you choose a compression format and your php does not support it,
109 * gitphp will fall back to uncompressed tar archives
xiphux 110 */
Chris Han 111 $gitphp_conf['compressformat'] = GITPHP_COMPRESS_ZIP;
xiphux 112
113 /*
Chris Han 114 * compresslevel
115 * Sets the compression level for snapshots. Ranges from 1-9, with
xiphux 116 * 9 being the most compression but requiring the most processing
Chris Han 117 * (bzip defaults to 4, gzip defaults to -1)
xiphux 118 */
Chris Han 119 $gitphp_conf['compresslevel'] = 9;
xiphux 120
xiphux 121 /*
122 * geshi
123 * Run blob output through geshi syntax highlighting
124 * and line numbering
125 */
Chris Han 126 $gitphp_conf['geshi'] = TRUE;
xiphux 127
128 /*
129 * geshiroot
130 * Directory where geshi is installed
131 * NOTE: this is the path to the base geshi.php file to include,
132 * NOT the various other geshi php source files!
133 * Leave blank if geshi.php is in the gitphp root
134 * (don't forget trailing slash!)
135 */
Chris Han 136 $gitphp_conf['geshiroot'] = "lib/geshi/";
xiphux 137
Chris Han 138 /*
139 * filemimetype
140 * Attempt to read the file's mimetype when displaying
141 * (for example, displaying an image as an actual image
142 * in a browser)
143 * This requires either PHP >= 5.3.0, PECL fileinfo, or
144 * Linux
145 */
Chris Han 146 $gitphp_conf['filemimetype'] = TRUE;
Chris Han 147
148 /*
149 * magicdb
150 * Path to the libmagic db used to read mimetype
151 * You can leave this as null and let the system
152 * try to find the database for you, but that method
153 * is known to have issues
154 * If the path is correct but it's still not working,
155 * try removing the file extension if you have it on,
156 * or vice versa
157 */
158 $gitphp_conf['magicdb'] = "/usr/share/misc/magic.mgc";
159 //$gitphp_conf['magicdb'] = "C:\\wamp\\php\\extras\\magic"; // Windows
160
Chris Han 161 /*
162 * search
163 * Set this to false or comment it out to disable searching
164 */
165 $gitphp_conf['search'] = TRUE;
166
Chris Han 167 /*
168 * filesearch
169 * Set this to false to disable searching within files
170 * (it can be resource intensive)
171 */
172 $gitphp_conf['filesearch'] = TRUE;
173
Chris Han 174 /*
175 * debug
176 * Turns on extra warning messages and benchmarking.
177 * Not recommended for production systems
178 */
179 $gitphp_conf['debug'] = FALSE;
180
Chris Han 181 /*
182 * cache
183 * Turns on smarty caching
Chris Han 184 * Be careful with this. If in doubt, leave it off
Chris Han 185 */
186 $gitphp_conf['cache'] = FALSE;
187
Chris Han 188 /*
189 * cacheexpire
190 * Attempts to automatically expire cache when a new commit renders
191 * it out of date.
Chris Han 192 * This is a good option for most users because it ensures the cache
193 * is always up to date and users are seeing correct information,
194 * although it is a slight performance hit.
195 * However, if your commits are coming in so quickly that the cache
196 * is constantly being expired, turn this off.
Chris Han 197 */
198 $gitphp_conf['cacheexpire'] = TRUE;
199
Chris Han 200 /*
201 * cachelifetime
202 * Sets how long a page will be cached, in seconds
Chris Han 203 * If you are automatically expiring the cache
204 * (see the 'cacheexpire' option above), then this can be set
205 * relatively high - 3600 seconds (1 hour) or even longer.
206 * -1 means no timeout.
207 * If you have turned cacheexpire off because of too many
Chris Han 208 * cache expirations, set this low (5-10 seconds).
Chris Han 209 */
210 $gitphp_conf['cachelifetime'] = 3600;
Chris Han 211
Chris Han 212 /*
213 * cloneurl
214 * Sets the base clone url to display for a project.
215 * This is the publicly-accessible url of the projectroot
216 * that gets prepended to the project path to create the clone
217 * url. It can be any format, for example:
218 *
219 * http://server.com/
220 * ssh://server.com/git/
221 * git://server.com/gitprojects/
222 * (don't forget trailing slash)
223 *
224 * If left blank/commented, no clone url will display.
225 */
226 //$gitphp_conf['cloneurl'] = "http://localhost/git/";
227
228 /*
229 * pushurl
230 * Sets the base push url to display for a project.
231 * Works the same as cloneurl.
232 */
233 //$gitphp_conf['pushurl'] = "ssh://localhost/git/";
234
xiphux 235 /*
236 * git_projects
Chris Han 237 * List of projects
238 *
239 * There are three ways to list projects:
240 *
241 * 1. Two dimensional array of projects with categories
xiphux 242 * First array index is the name of the category the projects
243 * belong to, and the second array index is a human-readable
244 * name for the project (not used, just for organizational
245 * purposes), and the value is the path to the project
246 * (minus the projectroot).
247 * Any projects belonging to the special category "none"
248 * will be listed without a category.
249 */
Chris Han 250 //$git_projects['Core']['FBX'] = "core/fbx.git";
251 //$git_projects['PHP']['gitphp'] = "php/gitphp.git";
252 //$git_projects['PHP']['MDB'] = "php/mdb.git";
253 //$git_projects['PHP']['xxcache'] = "php/xxcache.git";
254 //$git_projects['Websites']['bth'] = "websites/bth.git";
xiphux 255
Chris Han 256 /*
257 * 2. Path to file with list of projects
258 * Points to a flat file with a list of projects,
259 * one on each line. Can also read Gitosis project lists.
260 */
261 //$git_projects = "/git/projectlist.txt";
262
263 /*
264 * 3. Leave commented to read all projects in the project root
265 */
266
267 ?>
268
comments