Add a config to turn off javascript
[gitphp.git] / config / gitphp.conf.defaults.php
blob:a/config/gitphp.conf.defaults.php -> blob:b/config/gitphp.conf.defaults.php
--- a/config/gitphp.conf.defaults.php
+++ b/config/gitphp.conf.defaults.php
@@ -26,7 +26,6 @@
 /*
  * projectroot
  * Full directory on server where projects are located
- * (don't forget trailing slash!)
  */
 //$gitphp_conf['projectroot'] = '/pub/gitprojects/';
 
@@ -44,6 +43,13 @@
 /*********************************************************
  * Appearance
  */
+
+/*
+ * locale
+ * This is the default locale/language used in the interface.
+ * The locale must exist in the locale/ directory
+ */
+$gitphp_conf['locale'] = 'en_US';
 
 /*
  * title
@@ -56,6 +62,13 @@
 $gitphp_conf['title'] = "$gitphp_appstring";
 
 /*
+ * homelink
+ * This is the text of the link in the upper left corner
+ * that takes you back to the project list.
+ */
+$gitphp_conf['homelink'] = 'projects';
+
+/*
  * cloneurl
  * Sets the base clone url to display for a project.
  * This is the publicly-accessible url of the projectroot
@@ -65,7 +78,6 @@
  * http://server.com/
  * ssh://server.com/git/
  * git://server.com/gitprojects/
- * (don't forget trailing slash)
  * 
  * If left blank/commented, no clone url will display.
  */
@@ -77,6 +89,28 @@
  * Works the same as cloneurl.
  */
 $gitphp_conf['pushurl'] = 'ssh://localhost/git/';
+
+/*
+ * bugpattern
+ * Sets the regular expression to use to find bug number
+ * references in log messages.  The pattern should have a
+ * group that extracts just the bug ID to pass to the 
+ * bug tracker.
+ * For example, '/#([0-9]+)/' will recognize any number
+ * with a '#' in front of it, and groups the numeric part
+ * only.  Another common example is '/bug:([0-9]+)/' to
+ * extract bug numbers with 'bug:' in front of them.
+ */
+//$gitphp_conf['bugpattern'] = '/#([0-9]+)/';
+
+/*
+ * bugurl
+ * Sets the URL for the bug tracker.  This URL must have
+ * a backreference to the group in the bug pattern that
+ * contains the ID.  For example, ${1} uses the first
+ * group.
+ */
+//$gitphp_conf['bugurl'] = 'http://localhost/mantis/view.php?id=${1}';
 
 /*
  * self
@@ -84,18 +118,14 @@
  * in urls.  If you leave this blank/commented the script
  * will try to guess the correct URL, but you can override
  * it here if it's not being guessed correctly.
- *
- * If only specifying the directory path (and omitting the
- * index.php filename), make sure to include the trailing
- * slash!
  */
 $gitphp_conf['self'] = 'http://localhost/gitphp/';
 
 /*
  * stylesheet
- * Path to page stylesheet
- */
-$gitphp_conf['stylesheet'] = 'gitphp.css';
+ * Path to look and feel (skin) stylesheet
+ */
+$gitphp_conf['stylesheet'] = 'gitphpskin.css';
 
 /*
  * javascript
@@ -103,11 +133,63 @@
  */
 $gitphp_conf['javascript'] = true;
 
+/*
+ * googlejs
+ * Toggles whether to use the Google Libraries API to
+ * load javascript libraries, which takes advantage of the
+ * speed and caching of Google's servers and content
+ * delivery network.
+ * http://developers.google.com/speed/libraries/
+ * The libraries are served from Google's servers, which
+ * means your users must have an internet connection,
+ * so this may not be appropriate for closed intranets.
+ * By enabling this you agree to Google's terms for their
+ * library API.
+ */
+$gitphp_conf['googlejs'] = false;
+
 
 
 /*********************************************************
  * Features
  */
+
+/*
+ * compat
+ * Set this to true to turn on compatibility mode.  This will cause
+ * GitPHP to rely more on the git executable for loading data,
+ * which will bypass some of the limitations of PHP at the expense
+ * of performance.
+ * Turn this on if you are experiencing issues viewing data for
+ * your projects.
+ */
+$gitphp_conf['compat'] = false;
+
+/**
+ * largeskip
+ * When GitPHP is reading through the history for pages of the shortlog/log
+ * beyond the first, it needs to read from the tip but skip a number of commits
+ * for the previous pages.  The more commits it needs to skip, the longer it takes.
+ * Calling the git executable is faster when skipping a large number of commits,
+ * ie reading a log page significantly beyond the first.  This determines
+ * the threshold at which GitPHP will fall back to using the git exe for the log.
+ * Currently each log page shows 100 commits, so this would be calculated at
+ * page number * 100.  So for example at the default of 200, pages 0-2 would be
+ * loaded natively and pages 3+ would fall back on the git exe.
+ */
+$gitphp_conf['largeskip'] = 200;
+
+/*
+ * uniqueabbrev
+ * If this is turned on, when GitPHP abbreviates hashes, it will ensure
+ * that the abbreviated hash is unique for the project, extending the
+ * abbreviated hash if necessary until it becomes unique.
+ * Searching through every single pack in the repository for collisions is a
+ * performance intensive process that can slow down page loads.  If you turn
+ * this on, it's highly recommended to merge all of your existing packs into
+ * a single pack using git gc --aggressive (or git repack -a -d).
+ */
+$gitphp_conf['uniqueabbrev'] = false;
 
 /*
  * compressformat
@@ -121,6 +203,10 @@
  * Any other setting, or no setting, will create uncompressed tar archives
  * If you choose a compression format and your php does not support it,
  * gitphp will fall back to uncompressed tar archives
+ *
+ * Note that users with javascript get to choose their snapshot format when
+ * they request it, so this only applies to users without javascript or if
+ * you turn the javascript setting off
  */
 $gitphp_conf['compressformat'] = GITPHP_COMPRESS_ZIP;
 
@@ -162,7 +248,55 @@
  */
 $gitphp_conf['filemimetype'] = true;
 
-
+/*
+ * abbreviateurl
+ * Generates urls using abbreviated hashes instead of
+ * full hashes.
+ * Note that urls with abbreviated hashes are not safe
+ * to be saved long term (eg bookmarks), as future objects
+ * may be added to the repository that cause an abbreviated
+ * hash to no longer be unique.
+ * This option only takes effect with the 'compat' option
+ * turned off.
+ * Additionally, this option will automatically enable
+ * 'uniqueabbrev', as an abbreviated hash must be unique
+ * in order to resolve it to a full hash.
+ */
+$gitphp_conf['abbreviateurl'] = false;
+
+/*
+ * cleanurl
+ * Uses clean, rest-style urls throughout gitphp.
+ * This requires additional setup in your web server
+ * to rewrite urls (mod_rewrite on Apache, HttpRewriteModule
+ * on Nginx, etc).  URLs must be rewritten to point
+ * to index.php?q={query}.
+ * For more instructions on how to set this up, see
+ * http://www.gitphp.org/projects/gitphp/wiki/Clean_URLs
+ */
+$gitphp_conf['cleanurl'] = false;
+
+/*
+ * feedfilter
+ * Sets a regular expression to use to filter commits out
+ * of the project atom/rss feed.  Commits that have a
+ * commit message matching this pattern will be excluded.
+ * For example, '/GIT_SILENT/' will exclude any commit
+ * with the string GIT_SILENT in the commit message.
+ */
+//$gitphp_conf['feedfilter'] = '/GIT_SILENT/';
+
+/*
+ * showrestrictedprojects
+ * By default, when user-based restrictions are enabled,
+ * projects that are not available to the logged in user
+ * will be hidden in the project list.  Setting this option
+ * will instead display these projects as disabled in the
+ * project list.
+ */
+$gitphp_conf['showrestrictedprojects'] = false;
+
+/*
 
 
 /*********************************************************
@@ -187,23 +321,6 @@
 $gitphp_conf['gitbin'] = 'C:\\Progra~1\\Git\\bin\\git.exe';
 
 /*
- * diffbin
- * Path to diff binary
- * Same rules as gitbin
- */
-// Linux:
-$gitphp_conf['diffbin'] = 'diff';
-// Windows (msysgit):
-$gitphp_conf['diffbin'] = 'C:\\Progra~1\\Git\\bin\\diff.exe';
-
-/*
- * gittmp
- * Location for temporary files for diffs
- * (don't forget trailing slash!)
- */
-$gitphp_conf['gittmp'] = '/tmp/gitphp/';
-
-/*
  * magicdb
  * Path to the libmagic db used to read mimetype
  * Only applies if filemimetype = true
@@ -229,11 +346,21 @@
 
 /*
  * cache
- * Turns on caching. If in doubt, leave it off
+ * Turns on template caching. If in doubt, leave it off
  * You will need to create a directory 'cache' and make it
  * writable by the server
  */
 $gitphp_conf['cache'] = false;
+
+/*
+ * objectcache
+ * Turns on object caching.  This caches immutable pieces of
+ * data from the git repository.  You will need to create a
+ * directory 'cache' and make it writable by the server.
+ * This can be used in place of the template cache, or
+ * in addition to it for the maximum benefit.
+ */
+$gitphp_conf['objectcache'] = false;
 
 /*
  * cacheexpire
@@ -259,44 +386,58 @@
  */
 $gitphp_conf['cachelifetime'] = 3600;
 
-
-
-
-/*******************************************************
- * Paths to php libraries
- */
-
-/*
- * smarty_prefix
- * This is the prefix where smarty is installed.
- * (including trailing slash)
- * If an absolute (starts with /) path is given,
- * Smarty.class.php will be searched for in that directory.
- * If a relative (doesn't start with /) path is given,
- * that subdirectory inside the php include dirs will be
- * searched.  So, for example, if you specify the path as
- * "/usr/share/Smarty/" then the script will look for
- * /usr/share/Smarty/Smarty.class.php.
- * If you specify the path as "smarty/" then it will search
- * the include directories in php.ini's include_path directive,
- * so it would search in places like /usr/share/php and /usr/lib/php:
- * /usr/share/php/smarty/Smarty.class.php,
- * /usr/lib/php/smarty/Smarty.class.php, etc.
- * Leave blank to just search in the root of the php include directories
- * like /usr/share/php/Smarty.class.php, /usr/lib/php/Smarty.class.php, etc.
- */
-$gitphp_conf['smarty_prefix'] = 'lib/smarty/libs/';
-
-/*
- * geshiroot
- * Directory where geshi is installed, only applies if geshi is enabled
- * NOTE: this is the path to the base geshi.php file to include,
- * NOT the various other geshi php source files!
- * Leave blank if geshi.php is in the gitphp root
- * (don't forget trailing slash!)
- */
-$gitphp_conf['geshiroot'] = 'lib/geshi/';
-
+/*
+ * objectcachelifetime
+ * Sets how long git objects will be cached, in seconds
+ * The object cache only stores immutable objects from
+ * the git repository, so there's no harm in setting
+ * this to a high number.  Set to -1 to never expire.
+ */
+$gitphp_conf['objectcachelifetime'] = 86400;
+
+/*
+ * objectcachecompress
+ * Sets the size threshold at which objects will be compressed
+ * when being stored into the object cache.  Compression saves
+ * cache space but adds a very slight decompression overhead.
+ * Set to 0 to disable compression.
+ */
+$gitphp_conf['objectcachecompress'] = 500;
+
+/*
+ * memcache
+ * Enables memcache support for caching data, instead of
+ * Smarty's standard on-disk cache.
+ * Only applies if cache = true or objectcache = true (or both)
+ * Requires either the Memcached or Memcache PHP extensions.
+ * This is an array of servers.  Each server is specified as an
+ * array.
+ * Index 0 (required): The server hostname/IP
+ * Index 1 (optional): The port, default is 11211
+ * Index 2 (optional): The weight, default is 1
+ */
+//$gitphp_conf['memcache'] = array(
+//	array('127.0.0.1', 11211, 2),
+//	array('memcacheserver1', 11211),
+//	array('memcacheserver2')
+//);
+
+/*
+ * objectmemory
+ * If set, this will limit the number of git objects GitPHP
+ * keeps in PHP's memory during execution, to this specific number.
+ * This can be set if you have a low memory limit on your
+ * webserver.
+ * Please note that setting this too low will severely degrade
+ * performance, as GitPHP will have to repeatedly load the same
+ * objects off of the disk since the limit prevents them from
+ * being kept in memory.  It's strongly recommended that you
+ * turn debug mode on and view the MemoryCache size on various
+ * pages (in the debug output) to get a feel for the size of
+ * your projects before setting this.
+ * 0 means no limit.
+ */
+$gitphp_conf['objectmemory'] = 0;
 
 
 
@@ -306,11 +447,18 @@
 
 /*
  * debug
- * Turns on extra warning messages and benchmarking.
+ * Turns on extra warning messages
  * Not recommended for production systems, as it will give
- * way more benchmarking info than you care about, and
+ * way more info about what's happening than you care about, and
  * will screw up non-html output (rss, opml, snapshots, etc)
  */
 $gitphp_conf['debug'] = false;
 
-
+/*
+ * benchmark
+ * Turns on extra timestamp and memory benchmarking info
+ * when debug mode is turned on.  Generates lots of output.
+ */
+$gitphp_conf['benchmark'] = false;
+
+

comments