Settings in fbconfig.pl

Authors

Jesse Proulx <jproulx@livejournal.com>

$Revision: 1.3 $

Published: $Date: 2002/10/14 02:45:42 $
Revision History
  1. Revision: 1.1 (2002-09-23)
    Revised by: jproulx
    Initial version

Table of Contents

1. $FB Variables
1.1. User-configurable
1.2. Auto-configured
2. Configuring %FB::DBINFO

1. $FB Variables

Each $FB variable is explained below. There are two types: user-configurable ones and those that are automatically set and interesting only to people extending the FotoBilder code.

1.1. User-configurable

New installations will want to set these variables. Some are automatically set by fbdefaults.pl based on your other settings, but it wouldn't hurt to specify them all explicitly.

Domain Related

$FB::SITENAME

The title of the site.

"Some FotoBilder Installation"

FB::DOMAIN

The minimal domain of the site, excluding the "www." prefix if applicable.

"pp.com"

$FB::DOMAIN_WEB

An optional variable that, if defined and different from $FB::DOMAIN, any GET requests to $FB::DOMAIN will be redirected to $FB::DOMAIN_WEB.

"www.$DOMAIN"

$FB::SITEROOT

The URL prefix to construct canonical URLs. This can include the port number, if 80 is not in use.

"http://$DOMAIN_WEB:81"

$FB::IMGPREFIX

The URL prefix of the image directory.

"$SITEROOT/img"

$FB::COOKIE_DOMAIN

Cookie domains should simply be set to .$domain.com, based on the Netscape Cookie Spec, but some older browsers don't adhere to the specs too well. $FB::COOKIE_DOMAIN can be a single string value, or it can be a perl array ref like:

["", ".$DOMAIN"];

$FB::COOKIE_PATH

Unless you specify this value, cookies will by default be available to any pages in the same directory as the page that created it or in pages lower down in sub-directories.

"/"

$FB::CLOSED_SERVER

If set true, new accounts can't be created automatically.

@FB::PROTECTED_USERNAMES

Regular expressions matching accounts that normal users can't create. Useful for naming system accounts uniformly. Ex:

("^ex_", "^fb_", "^pp_")

%FB::HELPURL

A hash of URLs that link to certain help files. If you define these, little help bubbles appear next to common widgets to the URL you define. Ex:

( "galsecurity" => "/help/#galsecurity",)

Email Address

$FB::ADMIN_EMAIL

Used in database and configuration error messages. This should be an address that can reach someone who can actually fix the error.

"webmaster\@$DOMAIN"

$FB::SUPPORT_EMAIL

Used in user error messages. This should be an address that can reach someone who handles customer service.

"support\@$DOMAIN"

$FB::BOGUS_EMAIL

Notification emails should come from a generic address. Notification emails will contain instructions on how to contact someone if something should go wrong.

"pp_notify\@$DOMAIN"

Database Related

%FB::DBINFO

%FB::DBINFO is a hash that contains the necessary information to connect to your MySQL install.

User Capability Classes

$FB::NEWUSER_CAPS

Default capability class mask for new users: (16 bit unsigned int … each bit is capability class flag)

%FB::CAP_DEF

Default capability limits, used only when no other class-specific limit below matches.

%FB::CAP

This hash defines capability class limits. The keys are bit numbers, from 0 .. 15. The values are hashrefs with limit names and values.

Note

You don't even need to have different capability classes! All users can be the same if you want, just delete all this. The important part then becomes %FB::CAP_DEF.

System Tools

$FB::SENDMAIL

The system path to the sendmail program, along with any necessary parameters.

"/usr/sbin/sendmail -t"

$FB::SPELLER

Optional. The system path to a spell checking binary, along with any necessary parameters.

"/usr/local/bin/aspell pipe --sug-mode=fast --ignore-case"

Ease of Use

$FB::LESS_CACHING

If set true, it is not required to stop and start Apache to flush the cache.

Server Down

$FB::SERVER_DOWN

Set true while you do any maintenance to your installation.

$FB::SERVER_DOWN_SUBJECT

The subject of the maintenance message shown to users while $FB::SERVER_DOWN is set true.

"Maintenance"

$FB::SERVER_DOWN_MESSAGE

The body of the maintenance message shown to users while $FB::SERVER_DOWN is set true.

"$SITENAME is down temporarily for an upgrade."

1.2. Auto-configured

These $FB settings are automatically set in ljdefaults.pl. They're only documented here for people interested in extending FotoBilder. Or, you can define them in fbconfig.pl ahead of time so you can use them in definitions of future variables.

Directories

$FB::HOME

Root directory of the FotoBilder install.

$ENV{'FBHOME'}

$FB::PIC_ROOT

The directory to store pictures in.

"$HOME/var/picroot"

$FB::TEMP_DIR

Directory to store temporary files.

"$HOME/tmp"