Geeklog Documentation

GeekLog Configuration Guide

Overview

GeekLog was originally developed for the Security Geeks web site and was originally authored by Jason Whittenburg. In early 2001, Jason decided it was time to devote his time to other things and the project has since been maintained by Tony Bibbs who uses Geeklog to run Iowa Outdoors. Geeklog is bonafied open-source software and has been released under the GNU GPL for use by others. Configuring GeekLog is meant to be an easy process though it will require you to have access to several components of your system.

This document is still evolving, so there may be unintended omissions or various steps may be over or under explained. It's assumed that you have some working experience with some form of Apache (or IIS), SQL databases (such as MySQL), and PHP.

Installing Geeking Using Installation Script

As of Geeklog 1.3, users can install Geeklog using the installation script. This script, when it works, completely configures Geeklog for your system including creating or upgrading your database structures (NOTE: it is assumed you have already created the MySQL database before runnig the script). To use the installation script you must first unpack the Geeklog tarball into the directory where it will reside. If you are using a webhosting company to install Geeklog and need your webtree to be in someplace other than our default /path/to/geeklog/public_html/ (or :\path\to\geeklog\public_html\ on Windows) relax, you can move the files to your web tree and specify their location during the setup. I'll assume you have already uncompressed the Geeklog .tar.gz file and, optionally, moved your webtree. Now you need to point your browser to http://your_geeklog_base_url/admin/install.php. From there simply follow the instructions. NOTE: The installation script will need sufficient rights to be able to write the configuration options you choose to a set of files on the filesystem. The installer will perform a write test to see if you can use the installer to do the installation or if you will need to configure Geeklog manually. If the installer tells you the write test failed please follow the manual installation instructions below.

Installing Geeklog Manually

Setting up config.php

GeekLog's server settings are configured 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 that are defined below:

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_log /path/to/geeklog/logs/ File system path for the log files
path_language /path/to/geeklog/language/ location of the Geeklog language files
rdf_file HTML path with "/backend/geeklog.rdf" suffix File system path for the RDF file. This file allows you to share your site's headlines with others

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@yourdomain.com E-mail address for all admin mail
site_url http://www.yourdomain.com Base URL for your site (no trailing slash)
theme Yahoo 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/Yahoo/ 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

Locale Settings

Variable Default Value Description
languagefile /english.php Name of your language file.  Additional language files are avaiable for download at http://www.geeklog.org.  If you translate a language file, please send it to us.
locale en-gb Locale for the system
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.

User Account Access Control Settings

Variable Default Value Description
cookie_ip 1 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 604800 Permanent cookie timeout in seconds (604800 = 1 week).
session_cookie_timeout 7200 Session cookie timeout (in seconds).
cookie_session gl_session What the session ID is stored as in the cookie.
cookie_name geeklog The name of the cookie.
cookie_path / Cookie path.

Plugin Settings

Variable Default Value Description
unzipcommand unix command
2 commands for unzcopressing plugins.  The first one is for Unix based OS's, and the second is for Windows.  Comment as appropriate
rmcommand
unix command
2 commands for removing directories during plugin install.  First command is for Unix based OS, the second is for Windows.  Comment as appropriate.
ostype
PHP_OS
Redundant, but require variable for making sure plugins are OS-compatable.

Submission Settings

Variable Default Value Description
loginrequired 0 Login required to submit items (0=no, 1=yes)
postmode html or plaintext Sets the default submission mode
speedlimit 0 Minimum delay between submissions in seconds. This helps prevent Denial of Service (DOS) attacks

Topic, What's New & 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 Section block (0=no, 1=yes)
showsubmissioncount 1 Show the number of story submissions for a topic in the Section block (0=no, 1=yes)
whatsnewbox 1 Show any new articles, comments and links in a "What's New" block (0=no, 1=yes)
whosonline 1 Shows the who's online block
whosonline_threshold 300 How long, in seconds, users can be idle before removing them from the whosonline block
emailstories 1 Let users get stories e-mailed to them (0=no, 1=yes). Please note that this requires cron and the use of PHP as a shell script.
newstoriesinterval 86400 Stories are "new" if they are this many seconds old.
newcommentsinterval 172800 Comments are "new" if they are this many seconds old.
newlinksinterval 1209600 Links are "new" if they are this many seconds old.

Calendar Settings

Variable Default Value Description
personalcalendars
0
Allow account holders to have a personal calendar
showupcomingevents 1 Show up-coming events (0=no, 1=yes)
event_types Anniversary,Appointment,Birthday,Business,Education,Holiday,Meeting,Miscellaneous,Personal,Phone Call,Special Occasion,Travel,Vacation The set of event types that are used both on the public calendar and the user's personal calendars

Story Settings

Variable Default Value Description
pagetitle
null
This is to allow the page title to be change between stories, and should be left empty,
backend 1 Create an RSS/RDF file for the stories in rdfpath (0=no, 1=yes)
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
olderstuff 1 Use the olderstuff block (0=no, 1=yes)
olderstufforder 2 Order code to display the olderstuff block in
contributedbyline 1 Show author username to public, and enable search by username (0=no, 1=yes)
article_image_align right Which side of article the topic image should be shown (right or left)

Comment Settings

Variable Default Value Description
commentspeedlimit 45 Number of seconds between posting comment for the user
commentloginrequired 0 Login required to post comments (0=no, 1=yes)
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)

Poll Settings

Variable Default Value Description
maxanswers 10 Maximum number of possible answers for the poll editor
pollcookietime 86400 Number of seconds to set a poll answer cookie to time out on
polladdresstime 604800 Number of seconds to set a poll answer IP address to time out on
pollorder 1 Order code to display the poll block in

Content Control Settings

Variable Default Value Description
allowablehtml <p>,<b>,<i>,<a>,<em>,<br>,<tt>,<hr>,<li>,<ol>,
<div>,<ul>
Allowed HTML in stories submissions and comments.
censormode 1 Censor submissions and comments (0=no, 1=yes)
censorreplace *censored* Text to replace a censored word with
censorlist array("fuck","cunt","fucker","fucking","pussy","cock",
"c0ck","cum","twat","clit","bitch","fuk","fuking",
"motherfucker")
An array of censored words

Setting up lib-database

( Coming Soon )

Database Settings

Variable Default Value Description
db_name geeklog Database Name
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_user root Database User Account
db_pass null Database User Password
db_prefix null Allows you to change the default table names for geeklog

Localization

Localizing GeekLog is now fairly easy. All strings are contained in a language file, the default file that ships with the tar ball is english.php.  As people translate the file, local versions will be posted on the GeekLog Download Page .  If you translate a language file for GeekLog please forward me a copy at tane@zopegeeks.org .

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 local 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
Support
  • Webpage - The Geeklog website is the best place for the latest news and updates
  • Bug reports - Submit bug reports at SourceForge .
  • Mailing lists - Join the mailing list .
  • Patches - Please submit patches at SourceForge .
  • General Help - A better place for general "I can't do it!" help is the mailing list . Stuff that may be of more general interest is welcome here; but you will probably get better help on the lists.
  • Link submissions - Use the contribute link link to tell us about your new site running GeekLog.
  • Story submissions - Use the contribute news link to tell us your ideas for the GeekLog site and questions. DO NOT use this for bug reports. Use SourceForge for bug reports . Also try not to use it for general "I can't do this!" help; you'll get a much better response for those on the mailing list .
  • Feature requests - Where to send feature requests depends a bit on what the request is. In general, the mailing list is a decent place, and if it is something significant, you may want to send it in as a story submission. You may also want to go over to SourceForge and submit it as a bug report (make sure you select "Feature Request" for the "Group"), so we can have it filed and we can track it easily.
The Geeklog Documentation Project
All trademarks and copyrights on this page are owned by their respective owners. GeekLog is copyleft.