# GeekLog Configuration File

## Setting up config.php

Most of Geeklog's "static" settings (i.e. those that you aren't going to change often) are set in a text file called `config.php`. It is necessary to edit this file to get your system running as well as configuring it to your preferences. This file contains a set of variables as defined below:

- Database Settings
- Server Settings
- Site Settings
- Locale Settings
- Session Settings
- Cookie Names
- E-Mail Settings
- Login Settings
- Submission Settings
- Trackback, Pingback, and Ping Settings
- Topic, What's New, and Daily Digest Settings
- Story Settings
- Comment Settings
- Image Settings
  - User photo
- Syndication Settings
- Content Control Settings
- URL Rewriting

### Database Settings

Variable | Default Value | Description
--- | --- | ---
_DB_dbms | mysql | This option tells Geeklog which type of database it's running on. Can be either `'mysql'` (for MySQL) or `'mssql'` (for Microsoft SQL Server).
_DB_host | localhost | Database Server (to be entered in the form: hostname:port:unixsocket). In most cases you won't need to change the default value.
_DB_name | geeklog | Database Name
_DB_user | root | Database User Account
_DB_pass | null | Database User Password
_DB_table_prefix | gl_ | Prefix to put in front of all of Geeklog's table names (to avoid name collisions with tables used by other applications)
_DB_mysqldump_path | /usr/bin/mysqldump | Complete path to the mysqldump utility (part of MySQL) for making backups of your Geeklog database. (only used when running on a MySQL database)
allow_mysqldump | 1 | Enable or disable the backup functionality (1 = on, 0 = off). (only used when running on a MySQL database)
mysqldump_options | -Q | Here you can include additional options for the mysqldump call that Geeklog uses to create a backup from your database. (only used when running on a MySQL database)

### Server Settings

Variable | Default Value | Description
--- | --- | ---
path | /path/to/geeklog/ | Base file system path for your site (trailing slash necessary)
path_system | /path/to/geeklog/system/ | Path to your system directory for your site (trailing slash necessary). This directory holds the code libraries used throughout Geeklog
path_html | /path/to/geeklog/public_html/ | Path to your web tree directory for your site (trailing slash necessary). This directory holds all the web pages used by Geeklog.
path_images | /path/to/geeklog/public_html/images/ | Path where Geeklog expects to find its images, including user photos and images for stories.
path_log | /path/to/geeklog/logs/ | File system path for the log files
path_language | /path/to/geeklog/language/ | location of the Geeklog language files
backup_path | /path/to/geeklog/backups/ | location where mysqldump (see above) will store database backups
path_data | /path/to/geeklog/data/ | File system path for the data directory, used e.g. for the user batch add feature
have_pear | `false` | Whether you have PEAR installed on your server (`= true`) or not (`= false`). When set to `false`, Geeklog will use the PEAR packages installed in `$_CONF['path_pear']` (see below)
path_pear | `/path/to/geeklog/system/pear/` | When `$_CONF['have_pear']` (see above) is set to `false`, this is the path where Geeklog expects to find the PEAR packages it requires (e.g. PEAR::Mail for sending emails).

### Site Settings

Variable | Default Value | Description
--- | --- | ---
site_name | GeekLog Site | Name of your site
site_slogan | Another Nifty GeekLog Site | Slogan for your site. This is added to the HTML title field.
site_mail | admin@example.com | E-mail address for all admin mail
site_url | http://www.example.com | Base URL for your site (no trailing slash)
site_admin_url | http://www.example.com/admin | Base URL of the admin area of your site (no trailing slash). You won't have to change this normally, but some hosting services use a predefined "admin" directory for other purposes. In this case, you can rename Geeklog's `admin` directory and adjust the URL accordingly to avoid conflicts.
theme | professional | Default theme to use on the site
layout_url | Site URL path, with layout dir and default layout | Location of the default layout
path_themes | /path/to/geeklog/public_html/layout/ | Directory where all themes reside
path_layout | /path/to/geeklog/public_html/layout/professional/ | Path to current theme directory
allow_user_themes | Can be 1 or 0 | If set to 1, users can set their own theme that the site uses
allow_user_language | Can be 1 or 0 | If set to 1, users can select the language for the site navigation
allow_user_photo | Can be 1 or 0 | If set to 1, users can upload a photo to their profile
hide_author_exclusion | Can be 1 or 0 | If set to 1, the option to to exclude certain authors from being seen is hidden from the user's preferences.
show_fullname | 0 | Whether to display a user's full name (= 1) or only their username (= 0). For users that haven't entered their full name, Geeklog will always display the username.
remoteauthentication | false | Allow (when set to `true`) users who already have an account with some other service to log into your Geeklog site with the login for that service. Currently supported: Blogger and LiveJournal. Please note that to enable login for a specific service, you need an authorization class in `system/classes/authentication`. If you only want to allow Blogger but not LiveJournal users (or vice versa), simply remove the class file for the unwanted service(s).
show_servicename | true | If you allow users to log in with accounts on remote services (like Blogger or LiveJournal), this option will at the service's name to the username to avoid confusion with local users of the same name. Set to `false` to disable.
site_enabled | true | A Geeklog site can be disabled quickly (e.g. for maintenance) by setting this to 'false'.
site_disabled_msg | 'Geeklog Site is down. Please come back soon.' | This contains the message to display when a Geeklog site is disabled. If the text begins with "http:" then visitors are redirected to that URL.
sort_admin | false | If set to `true` will sort the entries in the Admin's block and the icons on the Submissions page (`moderation.php`) alphabetically.
link_documentation | 1 | Add a link to Geeklog's documentation to the Admin block. Set this to 0 if you don't want that link to show up.
menu_elements | `array('contribute', 'calendar', 'search', 'stats', 'directory', 'plugins')` | Specifies which entries are displayed in the site's menu bar (if your theme uses the `{menu_elements}` variable to display the menu bar). Can be any combination of `'home'`, `'contribute'`, `'calendar'`, `'search'`, `'directory'`, `'prefs'`, `'plugins'`, and `'custom'` where `'plugins'` is the same as the `{plg_menu_elements}` variable, i.e. a list of the menu entries provided by plugins, and `'custom'` displays the entries returned by a custom function `CUSTOM_menuEntries` (see `lib-custom.php` for details).
custom_registration | `false` | When set to `true`, Geeklog will let you use your own signup form for new user registrations. Please see the file `lib-custom.php` that ships with Geeklog for an example.
spamx | 128 | Tells Geeklog's Spam-X plugin what to do when a spam post has been detected. The value is the sum of all values that uniquely identify the Spam-X modules that should be executed. E.g. the "delete" action module uses 128, the "email admin" module uses 8, so if both modules should be executed, this option should be set to 128 + 8 = 136.
rootdebug | `false` | When a PHP error occurs, Geeklog's error handler will only display the actual error message to members of the Root group (to prevent leakage of possibly sensitive information). When set to `true`, this information will be displayed to all users. Use only for debugging purposes!
lastlogin | `true` | Whether to keep track of when a user last logged in (`= true`) or not (`= false`).
cron_schedule_interval | 86400 | Geeklog can emulate a cronjob, i.e. trigger a certain action at a given time. The code to be executed can be provided by a plugin or through the `CUSTOM_runScheduledTask` function in your `lib-custom.php`. The value given is in seconds and specifies the interval in which the code should be executed. Please note that to trigger this action, you will need to have someone visit your site at around the specified time. On a site with few visitors, the code may only be executed with considerable delay. Set to 0 to disable.

### Locale Settings

Variable | Default Value | Description
--- | --- | ---
language | english | Name of your language file. Additional language files may be available for download at http://www.geeklog.net. If you translate a language file, please send it to us. Also see Localization below.
locale | en_GB | Locale for the system. This defines both the language and the country that PHP will use when deciding how to display localized information such as dates (e.g. for the names of months).
date | %A, %B %d %Y @ %I:%M %p %Z | Date format used for most of the site, including story displays. See date formats below.
daytime | %m/%d %I:%M%p | Date format used when a shorter date is needed. See date formats below.
shortdate | %x | Date format this is the shortest date. See date formats below.
dateonly | %d-%b | Short date format (day and month only), to be used e.g. in the Upcoming Events and Older Stories blocks. See date formats below.
timeonly | %I:%M %p %Z | Format string for the time only, to be used e.g. on the Event Details page. See date formats below.
week_start | Sun | First day of the week in the calendar. Can be either `'Sun'` (Sunday) or `'Mon'` (Monday).
hour_mode | 12 | Which format to use when submitting or editing an object with a time setting (e.g. the publish time of a story). Can be 12 (for the 12 hour am/pm format) or 24 (for the 24 hour format).
default_charset | iso-8859-1 | Character encoding used by Geeklog when serving HTML pages or sending email. Only used if the language file did not already set another character encoding. For multi-language setups, using `'utf-8'` as the default character set is recommended.
thousand_separator | `,` | Character to use between every group of thousands.
decimal_separator | `.` | Character to use before decimals.
decimal_count | 2 | How many decimal places to display.
timezone | (commented out) | If your server is located in a different timezone, use this option to set your local (i.e. your own) timezone, so that the time and date on the site match your own. This option is known as the "timezone hack" and may not work on some servers.

### Session Settings

Variable | Default Value | Description
--- | --- | ---
cookie_ip | 0 | Session ID to contain IP address of user as well as random number. This is more secure but will more than likely require dialed up users to login each and every time. (0=no, 1=yes)
default_perm_cookie_timeout | 28800 | Permanent cookie timeout in seconds (28800 = 8 hours).
session_cookie_timeout | 7200 | Session cookie timeout (in seconds).
cookie_path | / | Cookie path (see the PHP manual for details).
cookiedomain | (empty) | The domain that the cookie is available. Geeklog will attempt to guess the correct value for this setting (based on the 'site_url' variable). See the PHP manual for details.
cookiesecure | 0 | Only set to 1 if your site uses HTTPS (see the PHP manual for details).

### Cookie Names

These variables define the names of all of Geeklog's cookies. They can easily be changed in case there's a name collision with the cookies used by some other software package that you may use on your site.

Variable | Default Value | Description
--- | --- | ---
cookie_session | gl_session | Name of the cookie that stores the session ID.
cookie_name | geeklog | Name of the permanent cookie.
cookie_password | password | Name of the password cookie.
cookie_theme | theme | Name of the theme cookie.
cookie_language | language | Name of the language cookie.

### E-Mail Settings

Starting with Geeklog 1.3.9, Geeklog uses the PEAR::Mail class to send all emails. You can then select whether emails should be sent through SMTP, sendmail, or PHP's `mail()` function.

Within `$_CONF['mail_settings']` you have the following options:

Variable | Default Value | Description
--- | --- | ---
backend | mail | Used to select how to send email. Can be one of 'smtp', 'sendmail', or 'mail'.
sendmail_path | `/usr/bin/sendmail` | If you chose 'sendmail' for the backend setting, this specifies the complete path to the sendmail binary.
sendmail_args | `''` (empty) | If you chose 'sendmail' for the backend setting, this variable can be used to pass additional parameters to the sendmail binary.
host | smtp.example.com | If you chose 'smtp' for the backend setting, this is the SMTP server to use.
port | 25 | If you chose 'smtp' for the backend setting, this is the port number to talk to on the SMTP server.
auth | false | If you chose 'smtp' for the backend setting, set this to `true` if your SMTP server requires authorization, and `false` if it doesn't.
username | smtp-username | If you chose 'smtp' for the backend setting, this is the name of your SMTP account.
password | smtp-password | If you chose 'smtp' for the backend setting, this is the password for your SMTP account.

### Login Settings

Variable | Default Value | Description
--- | --- | ---
loginrequired | 0 | Login is required to access any part of the site. When set to 1, this overrides the following settings. When you only want to block access to certain parts of the site, set this to 0 and select from the following settings.
submitloginrequired | 0 | When set to 1, only registered users can submit stories and items handled by plugins, e.g. links and events
commentsloginrequired | 0 | When set to 1, only registered users can submit comments
calendarloginrequired | 0 | When set to 1, only registered users can access the calendar
statsloginrequired | 0 | When set to 1, only registered users can access the site stats
searchloginrequired | 0 | When set to 1, only registered users can use the advanced search. When set to 2, the simple search is blocked for anonymous users, too.
profileloginrequired | 0 | When set to 1, only registered users can view another user's profile
emailuserloginrequired | 0 | When set to 1, only registered users can use the email submission form to send an email to another user
emailstoryloginrequired | 0 | When set to 1, only registered users can email stories
directoryloginrequired | 0 | When set to 1, only registered users can access the list of past articles

### Submission Settings

Variable | Default Value | Description
--- | --- | ---
storysubmission | 1 | Enable (1) or disable (0) the story submission queue
usersubmission | 0 | Enable (1) or disable (0) the user submission queue (i.e. new users must be approved before they receive their password)
disable_new_user_registration | false | When set to `true` completely disables all options to sign up as a new user.
allow_domains | '' | When the user submission queue is enabled this can contain a comma-separated list of domain names from which user submissions will not be queued (but approved automatically). Regular expressions are also allowed and interpreted. Example: `'mycompany.com,myothercompany.com'`
disallow_domains | '' | This is the opposite of `$_CONF['allow_domains']` (see above): A list of domain names that are not allowed in email addresses of new users. Note that this list is always used, even when the user submission queue has been switched off. Again, regular expression can be used. Example disallow email addresses with a certain domain name and from any ".edu" domain: `'somebaddomain.com,\.edu$'`
notification | array() | Send an email notification to `$_CONF['site_email']` when a new story, comment, trackback or pingback has been submitted or a new user has registered with the site. The `array()` can hold any combination of the strings `'story'`, `'comment'`, `'trackback'`, `'pingback'`, and `'user'` (separated by commas), depending on which notification(s) you want. Example: `array('story','user');` would send notifications when a new story has been submitted or a new user has registered. No notifications would be sent, for example, for new comments.
listdraftstories | 0 | When set to 1, this will display an additional block on the submissions page (`moderation.php`) that lists all the stories that have the 'draft' flag set.
postmode | plaintext | Sets the default submission mode to 'html' or 'plaintext'
speedlimit | 45 | Minimum delay between submissions in seconds. This helps prevent Denial of Service (DOS) attacks
skip_preview | 0 | If 1, allows submission of stories and comments without previewing (i.e. the submission form will always have a Preview and a Submit button).
advanced_editor | false | Enable (if set to `true`) a WYSIWYG editor for story and comment submissions and static pages. Geeklog ships with FCKeditor.

### Trackback, Pingback, and Ping Settings

Variable | Default Value | Description
--- | --- | ---
trackback_enabled | true | Enable (true) or disable (true) trackback comments. This applies to both sending and receiving trackback comments.
pingback_enabled | true | Enable (true) or disable (true) pingback support. This applies to both sending and receiving pingbacks.
ping_enabled | true | Enable (true) or disable (true) the ability to ping weblog directory services like Technorati.
trackback_code | 0 | Default value for new stories: Trackback enabled (0) or disabled (-1)
multiple_trackbacks | 0 | How to handle multiple trackbacks and pingbacks from the same source: 0 = keep only the first, reject any further trackbacks / pingbacks; 1 = overwrite, i.e. only keep the latest trackback / pingback; 2 = allow multiple trackbacks / pingbacks, i.e. list them all
trackbackspeedlimit | 300 | Number of seconds between two trackbacks / pingbacks from the same IP address.
check_trackback_link | 2 | This option can be used to check the validity of a trackback. You can check if the URL in the trackback actually contains a link back to your site (otherwise, it's probably spam). You can also check if the trackback was sent from the proper IP address, i.e. the IP of the site in the trackback URL (again, if they don't match, it's probably spam). Note that you can add up the values below to do more than one check (but using option 1 and 2 doesn't make sense and will be treated as if you requested option 2). Options are: 0 = don't perform any checks, 1 = check only for your site's main URL (`$_CONF['site_url']`), 2 = check for the exact URL of the entry (e.g. an article) on your site, 4 = check IP address of the sender of the trackback against the site referred to in the trackback URL. Example: `$_CONF['check_trackback_link'] = 6; // check for the exact URL (2) and proper IP address (4)`
pingback_self | 0 | Pingbacks are sent out automatically to all the URLs linked from a story - which includes stories on your own site that you may have linked in the article. This option lets you specify how these "self pingbacks" are to be handled: 0 = skip them, i.e. don't send pingbacks to stories on your own site; 1 = allow them, but obey the speed limit; 2 = allow them and ignore the speed limit. If your article contains more than one link to other stories on your site, then option 1 is probably of limited use, as it would only pingback the first linked story and run into the speed limit for the others.

### Topic, What's New, and E-mail Settings

Variable | Default Value | Description
--- | --- | ---
sortmethod | sortnum | alpha = Sort topics in topic list alphabetically sortnum = Sort topics in topic list by sort number
showstorycount | 1 | Show the number of stories in a topic in the Sections block (0=no, 1=yes)
showsubmissioncount | 1 | Show the number of story submissions for a topic in the Sections block (0=no, 1=yes)
hide_home_link | 0 | Hide the "Home" link from the Sections block (0=no, 1=yes)
whosonline_threshold | 300 | How long, in seconds, users can be idle before removing them from the whosonline block
whosonline_anonymous | 0 | If enabled (i.e. set to 1), anonymous users will only see the number of registered users currently online in the Who's Online block but not their names. Only logged-in users will see the names of other users that are currently online.
emailstories | 0 | Let users get stories e-mailed to them (0=no, 1=yes), aka Daily Digest. Please note that this requires cron and the use of PHP as a shell script.
emailstorieslength | 1 | When emailstories (above) is enabled, send only the title and the link to the new stories (0), or send the entire introtext (1) or send the first n characters from the introtext (where n = any other number)
emailstoriesperdefault | 0 | When set to 1, new users will be subscribed to the daily digest automatically when they register with the site.
newstoriesinterval | 86400 | Stories are "new" if they are this many seconds old.
newcommentsinterval | 172800 | Comments are "new" if they are this many seconds old.
newtrackbackinterval | 172800 | Trackback comments are "new" if they are this many seconds old.
hidenewstories | 0 | Set to 1 to hide new stories from the What's New block.
hidenewcomments | 0 | Set to 1 to hide new comments from the What's New block.
hidenewtrackbacks | 0 | Set to 1 to hide new trackback comments from the What's New block.
hidenewplugins | 0 | Set to 1 to hide new entries by plugins from the What's New block.
title_trim_length | 20 | Max. length of the title of items listed in the What's New block.
copyrightyear | (commented out) | Set this to the year you want to appear in the copyright notice of your site's footer. If not set, Geeklog will use the current year.
allow_username_change | 0 | If set to 1, users will be allowed to change their username (login name). Stories and comments posted under the old username will automatically show the new username.
allow_account_delete | 0 | If set to 1, users will be allowed to delete their accounts. Stories and comments posted under that account will be kept and show up as being posted by "Anonymous".
passwordspeedlimit | 300 | Minimum delay between two requests for a new password, in seconds.
login_attempts | 3 | Max. number of login attempts before the speedlimit (see below) kicks in and further logins are blocked for the given amount of time.
login_speedlimit | 300 | How many seconds have to pass before another login attempt can be made after `$_CONF['login_attempts']` (see above) login attempts have failed.
ip_lookup | not set | The IP addresses of comment posters are logged and displayed for admin users. When this variable is set to point to a service that can do IP address lookups, it's possible to lookup the owner of an IP address by clicking on it, making it easier to report abuse to ISPs, etc. `$_CONF['ip_lookup']` should hold the complete URL to the lookup service, with a '`*`' marking the place where the IP address should go. It's also possible to use Tom Willet's NetTools package, in which case the correct setting would be `$_CONF['ip_lookup'] = $_CONF['site_url'] . '/nettools/whois.php?domain=*';`
num_search_results | 10 | Number of search results per page (and per type).

### Story Settings

Variable | Default Value | Description
--- | --- | ---
maximagesperarticle | 5 | max. number of images you can have in a story
limitnews | 10 | Number of stories to limit the index page to, this same number will appear in the older stuff block
minnews | 1 | Minimum numbers of stories than can appear on a topic page
contributedbyline | 1 | Show author username to public, and enable search by username (0=no, 1=yes)
hideviewscount | 0 | Whether to show (= 0) or to hide (= 1) the number of views a story has had.
article_image_align | right | Which side of article the topic image should be shown (right or left)
show_topic_icon | 1 | Default setting for new stories and story submissions: Whether to show the topic icon (1) or not (0).
draft_flag | 0 | Default setting for new stories created by Story Admins: Whether the story's draft flag should be set (1) or not (0).
frontpage | 0 | Default setting for new stories and story submissions: Whether the story should appear on the site's frontpage (1) or only in its topic's page (0). Please note that for stories submitted to the archive topic, this setting will be ignored and the story will not appear on the frontpage.
onlyrootfeatures | 0 | When set to 1, this will only allow members of the Root group to make a story "featured", i.e. the sticky top story on the site.
hideemailicon | 0 | When set to 1, this will disable the ability to send a story by email. It will also hide the email icon from stories and the "Email Article To a Friend" from the Story Options block.
hideprintericon | 0 | When set to 1, this will disable display of a story in a "printer friendly" format. It will also hide the printer icon from stories and the "View Printable Version" from the Story Options block.
hide_no_news_msg | 0 | When set to 1, hide the "No News To Display" message on the index page (e.g. when viewing a topic without any stories in it)
hide_main_page_navigation | 0 | When set to 1, this option will hide the "Google paging" navigation from index.php, i.e. from the site's frontpage and all topic pages. This may come in handy for more advanced layouts but will of course prevent people from easily reaching older articles.
allow_page_breaks | 1 | Allow usage of the `[page_break]` tag in stories (when set to 1), so that stories can spread over multiple pages.
page_break_comments | last | When the `[page_break]` tag is allowed in stories (see above), where should the story's comments be displayed: `'last'` = on the story's last page only, `'first'` = on the first page only, `'all'` = on every page.
show_right_blocks | false | If set to `true`, the right-side column of blocks will be displayed on all pages (instead of only on the index page).
showfirstasfeatured | 0 | When set to 1, this will render the first story on any page using the templates for a featured story, even if that story is not featured. This will even be applied to the first story on page 2 of a topic page, for example.
onlyrootfeatures | 0 | This restricts the featuring of stories to root user(s). If you have several story admins that can create content that is not visible to other story admins, and such a content is featured, another admin might think its ok to feature his own content. To prevent that two admins unknowingly take features from each other away, only a user who can see all content (= root) should be able to feature a story.
left_blocks_in_footer | 0 | When set to 1, this will make the `{left_blocks}` variable available in `footer.thtml` (and disable it in `header.thtml`). This is really only useful for two-column layouts where you want the left column contain the stories and the right columni contain the standard blocks.

### Comment Settings

Variable | Default Value | Description
--- | --- | ---
commentspeedlimit | 45 | Number of seconds between posting a comment for the user
comment_limit | 100 | Most number of comments to show at any one time
comment_mode | threaded | How to display comments (threaded, nested, flat or nocomments)
comment_code | 0 | Default value for new stories: Comments enabled (0) or disabled (-1)

### Image Settings

Variable | Default Value | Description
--- | --- | ---
image_lib | '' (empty string) | Set this to either 'imagemagick', 'netpbm', or 'gdlib' if images should be resized during upload. Leave as '' if you don't want images to be resized or if you don't have those packages available.
path_to_mogrify | (commented out) | If you chose 'imagemagick' for `$_CONF['image_lib']` above, then this should hold the complete path to the mogrify executable (from the ImageMagick package), e.g. '/usr/bin/mogrify'. You will need a fairly recent version of ImageMagick for this to work (version 5.4.9 or newer is recommended).
path_to_netpbm | (commented out) | If you chose 'netpbm' for `$_CONF['image_lib']` above, then this should hold the complete path to the directory where the binaries from the netpbm package are kept, e.g. `'/usr/bin/netpbm/'`. Note that the path must end in a slash. Precompiled binaries of the netpbm package for various platforms can be downloaded from the Homepage of the Gallery project.
keep_unscaled_image | 0 | Set this to 1 if you want Geeklog to keep the original, unscaled images after upload. The smaller image will then be used as a thumbnail and will link to the original image. Note that this may use a lot of disk space (depending on the size of your images).
allow_user_scaling | 1 | When unscaled images are kept (see above), this option lets the user chose between using the scaled or unscaled image in the story, i.e. enables the `[unscaledX]` image tag (in addition to the `[imageX]` tag).
max_image_width | 160 | Max. width of an image in pixels. If it exceeds this, it is either rejected or resized (depending on the setting of `$_CONF['image_lib']` above).
max_image_height | 120 | Max. height of an image in pixels. If it exceeds this, it is either rejected or resized (depending on the setting of `$_CONF['image_lib']` above).
max_image_size | 1048576 (equals 1 MB) | Max. size of an image in bytes. If it exceeds this, it is is rejected (even if you're using a graphics package to resize images).
max_topicicon_width | 48 | Max. width of a topic icon in pixels. If it exceeds this, it is either rejected or resized (depending on the setting of `$_CONF['image_lib']` above).
max_topicicon_height | 48 | Max. height of a topic icon in pixels. If it exceeds this, it is either rejected or resized (depending on the setting of `$_CONF['image_lib']` above).
max_topicicon_size | 65536 (equals 64 KB) | Max. size of a user photo in bytes. If it exceeds this, it is rejected (even if you're using a graphics package to resize images).
debug_image_upload | (commented out) | When not commented out(!) and set to `true`, this option enables debugging output to be written into Geeklog's `error.log` file during the upload of an image. This is useful to track down problems with the image upload.

#### User photo

Additional options for the user photo.

Variable | Default Value | Description
--- | --- | ---
max_photo_width | 128 | Max. width of a user photo in pixels. If it exceeds this, it is either rejected or resized (depending on the setting of `$_CONF['image_lib']` above).
max_photo_height | 128 | Max. height of a user photo in pixels. If it exceeds this, it is either rejected or resized (depending on the setting of `$_CONF['image_lib']` above).
max_photo_size | 65536 (equals 64 KB) | Max. size of a user photo in bytes. If it exceeds this, it is rejected (even if you're using a graphics package to resize images).
use_gravatar | false | If enabled (set to `true`), a user's avatar image will be requested from gravatar.com if the user didn't upload a user photo (i.e. an uploaded photo always takes priority). Please note that this option may slow down your site on pages that display a lot of userphotos for different users (e.g. forum threads).
gravatar_rating | (commented out) | Avatars submitted to gravatar.com are rated with the rating system used for movies (in the U.S.), i.e. the letters G, PG, R, or X. This option will let you chose the maximum allowed rating for an avatar. For example, a max. rating of R will make sure that no X-rated avatars will be displayed on your site (only G, PG, and R).
force_photo_width | (commented out) | This option, when enabled, will only apply when displaying a user photo. The `<img>` tag for the user photo will be emitted with a max. width, as specified by this option. This means that the actual photo can still be larger, but will only be displayed smaller. This is useful for cases where you don't want oddly shaped user photos to break your page's layout (e.g. in a forum).
default_photo | (commented out) | When enabled, this option should point to an image (full URL required!) that should be displayed for users without a user photo. When this option is not set and a user does not have a user photo (or an avatar) then Geeklog will simply not display anything.

### Syndication Settings

Geeklog can export its headlines to a news feed in various formats (RSS, RDF, and Atom). This will let you share your news with other sites (Hint: Create a Portal block from Geeklog's Block menu to import news feeds from other sites).

Starting with Geeklog 1.3.9, feeds can be created and configured from Geeklog's Admin menu ("Content Syndication"). The following settings will only be used as the default settings for any new feeds that you create from the admin panel.

Variable | Default Value | Description
--- | --- | ---
backend | 1 | Create a feed file for the stories in rdf_file (0=no, 1=yes)
rdf_file | HTML path with "/backend/geeklog.rss" suffix | File system path for the feed file. This file allows you to share your site's headlines with others
rdf_language | en-gb | Value for the feed's language tag. Depending on your site's language and operating system, this may differ from the language setting in the locale (see above). Example: The PHP locale setting for German is 'de_DE' while the correct language setting for a German RSS feed would be 'de-DE' (note the dash instead of the underscore).
rdf_limit | 10 | Limit the number of stories to export to the news feed. If the value for this setting is a number, the feed will hold this many stories. If the number is followed by a lower-case 'h' (e.g. 24h) it denotes the number of hours from which to chose the stories.
rdf_storytext | 0 | If this value is 1, then the entire introtext of the stories will be included in the news feed. Any number greater than 1 limits the introtext to that many characters (e.g. a value of 80 would only include the first 80 characters from the introtext in the feed). If set to 0, the introtext is not included in the feed.
syndication_max_headlines | 0 | Upper limit for the max. number of headlines when importing a feed (into a portal block). The limit can also be set for each individual portal block in the block menu. When set to 0, all headlines are imported.

### Content Control Settings

Variable | Default Value | Description
--- | --- | ---
user_html | <p>, <b>, <i>, <a>, <em>, <br>, <tt>, <hr>, <ol>, <ul>, <li>, <code>, <pre> | HTML tags and attributes that normal users are allowed to use in story submissions and comments.
admin_html | additional HTML tags, e.g. for tables | HTML tags and attributes that admin users are allowed to use (in addition to those from user_html). Redefining a tag with additional attributes will overwrite the definition from user_html.
allowed_protocols | array ('http', 'https', 'ftp'); | Defines which protocols are allowed in links (i.e. HTML `<a>` tags).
skip_html_filter_for_root | 0 | When set to 1, this will allow members of the Root group to use all HTML in their posts. Use at your own risk!
disable_autolinks | 0 | If set to 1, disables the autolinks. I.e. links using the [story:] etc. syntax are not interpreted any more.
censormode | 1 | Censor submissions and comments (0=no, 1=yes)
censorreplace | *censored* | Text to replace a censored word with
censorlist | array(a list of "bad" words goes here ...) | An array of censored words

### URL Rewriting

Geeklog includes a simple but useful URL rewriting feature which can help make your site more crawler friendly (i.e. the URLs of your site are more likely to be picked up by the search engine's indexing bots). This feature is supported for URLs to stories, static pages, the article directory, and links.

URL rewriting means that your URLs will look like this

`http://www.geeklog.net/article.php/20021022234959146`

instead of like this

`http://www.geeklog.net/article.php?story=20021022234959146`

While some search engines will pick up the second form, Google seems to prefer the first format and completely ignores the second format.

Note: This feature may not work with all web servers. It is known to work with Apache (all versions) and known not to work with IIS (at least some versions). Please try it out before you go public with your site.

Variable | Default Value | Description
--- | --- | ---
url_rewrite | false | Enable (true) or disable (false) URL rewriting.

### Unused Settings

This is a list of `config.php` options that are currently unused, e.g. because the feature they were intended for has not been implemented yet.

Variable | Default Value | Description
--- | --- | ---
ostype | `PHP_OS` | Identifies the operating system running on your webserver.
pdf_enabled | 0 | PDF conversion of stories has not been fully implemented yet. Leave this option as is to prevent unfinished options from showing up on your site.

## Localization

Localizing GeekLog is fairly easy. All strings are contained in a language file. The default file that ships with the tarball is english.php. People interested in translating Geeklog to other languages are encouraged to join the geeklog-translations mailing list. All important information concerning translating Geeklog will be posted there.

### Locale and Date Formats

You can set the locale and date format in the config.php file. To set the locale, set the variable to the proper string or if you leave it blank it will pull the default locale from the operating system. The date formats are handled by your locale. Isn't that smart? Locale names are OS dependent. On most UNIX hosts, you can find locale codes in the /usr/share/locale/locale.alias file and on some systems the command locale -a will display all available locales on a system. If a locale doesn't exist you can create it using the localedef command.

More info on locale: http://www.opengroup.org/onlinepubs/7908799/xbd/locale.html
More info on localdef: http://www.opengroup.org/onlinepubs/7908799/xcu/localedef.html

### Date Format Syntax

- `%a - abbreviated weekday name according to the current locale`
- `%A - full weekday name according to the current locale`
- `%b - abbreviated month name according to the current locale`
- `%B - full month name according to the current locale`
- `%c - preferred date and time representation for the current locale`
- `%C - century number (the year divided by 100 and truncated to an integer, range 00 to 99)`
- `%d - day of the month as a decimal number (range 00 to 31)`
- `%D - same as %m/%d/%y`
- `%e - day of the month as a decimal number, a single digit is preceded by a space (range ' 1' to '31')`
- `%h - same as %b`
- `%H - hour as a decimal number using a 24-hour clock (range 00 to 23)`
- `%I - hour as a decimal number using a 12-hour clock (range 01 to 12)`
- `%j - day of the year as a decimal number (range 001 to 366)`
- `%m - month as a decimal number (range 1 to 12)`
- `%M - minute as a decimal number`
- `%n - newline character`
- `%p - either `am' or `pm' according to the given time value, or the corresponding strings for the current locale`
- `%r - time in a.m. and p.m. notation`
- `%R - time in 24 hour notation`
- `%S - second as a decimal number`
- `%t - tab character`
- `%T - current time, equal to %H:%M:%S`
- `%u - weekday as a decimal number [1,7], with 1 representing Monday`
- `%U - week number of the current year as a decimal number, starting with the first Sunday as the first day of the first week`
- `%V - The ISO 8601:1988 week number of the current year as a decimal number, range 01 to 53, where week 1 is the first week that has at least 4 days in the current year, and with Monday as the first day of the week.`
- `%W - week number of the current year as a decimal number, starting with the first Monday as the first day of the first week`
- `%w - day of the week as a decimal, Sunday being 0`
- `%x - preferred date representation for the current locale without the time`
- `%X - preferred time representation for the current locale without the date`
- `%y - year as a decimal number without a century (range 00 to 99)`
- `%Y - year as a decimal number including the century`
- `%Z - time zone or name or abbreviation`
- `%% - a literal `%' character`