You are viewing Revision 10 of Configuring

You will have to rename config.pl.dist to config.pl (if you do not already have a config file in place). To do this through the shell, type: mv config.pl.dist config.pl

Now open up config.pl in your favorite editor (mine is vi) and modify the variables to your liking. The config file is very well documented, however feel free to ask any questions you may have on the discussion page.

Variables

Here are all the variables that can be set within config.pl. These are also documented with comments within the default config.pl.dist file, but are available here for reference.

$DataDir - This setting tells Aneuch where to store its data. It defaults to '/tmp/aneuch', which is probably not where you want it. Change this to point to a directory that your webserver has write access to (or if running SUExec, a directory that YOU can write to). All other directories that Aneuch uses will be created within this directory (i.e. pages, archive, etc). Note that you should not include the trailing slash. But if you do by mistake, Aneuch is sensible enough to remove it for you.

$SiteName - This is the name of your site, and defaults to 'Aneuch'. The site name will appear in the HTML title element, as well as in the footer of your site.

$SiteMode - This is quite possibly one of the most important settings you NEED to change. This variable controls if your site is wide open (anyone can post) or closed (only you can post). The default value is 0, which is wide open. Here is a list of potential values and what they mean:

  • 0 = Wide open, anyone can edit.
  • 1 = Anyone can add to Discussion pages, but cannot edit anything
  • 2 = Nobody can post anything, unless authenticated.

@Passwords - This goes hand in hand with the $SiteMode variable above. If $SiteMode > 0, then you must set a password in this array to be able to allow someone to edit pages. As I mentioned, this is an array, so you can set it in one of the following manners:

  • @Passwords = qw(entry1 entry2 entry3);
-or-
  • @Passwords = ('entry1', 'entry2', 'entry3');
Note that Aneuch needs this to be an array. It defaults to empty.

$DefaultPage - This variable sets what is to be displayed by default if no page is requsted (for example, if a visitor merely types your website address, and does not include 'SomePage'). The default value is 'HomePage', and is a fairly sane default.

$DiscussPrefix - This variable determines the prefix that your discussion pages will use. The default is 'Discuss_', which means the discussion page for 'HomePage' would be 'Discuss_HomePage'. This is a sane default.

$CookieName - This variable tells your browser what to save the authentication cookie as, and defaults to 'Aneuch'. This is NOT a sane default, and should be changed. You should avoid using anything but alphanumeric values in this variable. An example: 'MySiteC0oki3'

$TimeZone - This variable controls how Aneuch will display time elements, but it might not quite work how you expect it to. This variable is numeric, allowing either a 0 or 1. The default value of 0 means that times on your wiki are UTC or GMT. This is probably not a bad idea if your wiki will entertain contributors from around the world. If you set this to 1, it will default to the local time zone of your server.

$LockExpire - When a user is editing an existing page, it is locked for editing by other users. If the user who has locked the page carelessly navigates away from the page, or simply walks away from his desk, the file remains locked forever. This variable exists to prevent such an event from happening. It sets the maximum amount of time a lock is valid, in seconds. Once this time has lapsed, the lock is released, and others are allowed to edit once again. The default value is 60*5, which is 300 seconds, or 5 minutes. This is a fairly sane default. You may want to adjust it based on your particular site's usage patterns.

$MaxVisitorLog - This variable controls the maximum amount of entries in your visitor log file before it starts getting trimmed. The default value is 1,000 entries, and is considered a sane default. Feel free to adjust this to your particular site's need.

$NewPage - This variable controls what is shown to users who visit a link within your wiki that leads to a page that has not been created yet. The default value is '<p>It appears that there is nothing here.</p>'

$NewComment - This variable controls what is shown in the comment textarea on your site. The default is 'Add your comment here.'

$NavBar - This variable sets anything additional you want to display in the links across the top of your page, in addition to what is set by $DefaultPage as well as "RecentChanges". The default is nothing, however you could set this to something like:

  • $NavBar = '<a href="' . $ShortUrl . 'About>About</a>';
to link to an 'About' page. I don't think you'll break anything, so play around a bit. The default is blank. NOTE: This is essentially replaced by @NavBarPages

@NavBarPages - This array holds a list of pages that you want to appear in the nav bar, and is a replacement for the $NavBar variable above. It significantly simplifies the way the navbar is built. The default value is empty. If you want to include an "About" and a "Contact" page to your navbar, use this as an example:

  • @NavBarPages = qw(About Contact);
-or-
  • @NavBarPages = ('About', 'Contact');

$Debug - This variable controls whether or not error messages should be shown at the bottom of the page, and is really only useful to developers. The default is 0, which will not show errors. Set to 1 to see errors.

$RemoveOldTemp - This variable controls how long temp files are allowed to hang out in the temp folder. It contains a number of seconds. The default value is 7 days, or 60*60*24*7 (604,800) seconds, and is considered a sane default.

$PurgeRC - This variable controls how long an item may stay on the Recent Changes list. It contains a number of seconds. The default value is 7 days, or 60*60*24*7 (604,800) seconds, and is considered a sane default.

$PostFooter - This variable controls "extra" for the tail end of the footer. The default value is blank, and is considered a sane default.

$Header and $Footer - (See also: Themes) These variables are used in "theming" your site. If either one is blank, the default theme will be used. You can either fill the variables with content, or import the contents of a file into each. I leave that as an exercise for the reader. Caution: There be dragons ahead!

$ConfFile - Note that this variable is optional. Aneuch will use the current directory that it resides in to find the configuration file. However, it will not look anywhere else if it does not find one there. Now obviously it makes absolutely no sense whatsoever to set this variable within the configuration file itself. The only place it would be sensible is if you called aneuch.pl from within a wrapper.


This is part of the Documentation for Aneuch.