Each $LJ:: variable is explained below. There are two types: user-configurable ones and those that are automatically set and interesting only to people extending the LiveJournal code.
New installations will probably want to set these variables. Some are automatically set by ljdefaults.pl based on your other settings, but it wouldn't hurt to specify them all explicitly.
Blob Server
Hash that contains the details for a number of blob servers. The format of the paramater is 'cluster' => 'director'. The webserver user also needs to be able to the directory given as the directory. If you wish to use Captcha Image and Audio Generation for Human Checks, then this is a necessary paramater
Example:
%BLOBINFO = ( "clusters" => { "1" => "/path/to/some/directory/", }, );
Capabilities/User Options
A hash that defines the default S2 layers to use for accounts.
Default:
{ 'core' => 'core1', 'layout' => 'generator/layout', 'i18n' => 'generator/en', };
If set, and your MTA is configured, users can post to their account via username@$EMAIL_POST_DOMAIN.
Example:
post.$DOMAIN
If $LJ::USER_VHOSTS is enabled, this will is the part of the URL that follows 'username'.
Example:
$DOMAIN
This option defines the userproperties that users should have by default.
Example:
%USERPROP_DEF = ( "s1_lastn_style" => 29, "s1_friends_style" => 20, "s1_calendar_style" => 2, "s1_day_style" => 11, );
Human Checks
This option enables human checks at various places throughout the site. Enabling this requires a "Blob Server" setup (for details of setting one up, refer to the %LJ::BLOBINFO section of the document.) Currently, the only option is "create"
Example:
('create' => 1);
Database Related
This is an array that contains the names of the clusters that your configuration uses.
Example:
qw(fast slow)
Default:
(1)
The default cluster to choose when creating new accounts.
Default:
1
The database role to use when connecting to the directory database.
Example:
master
Development/Debugging Options
Message to send to users when the database is unavailable
Default:
Database temporarily unavailable. Try again shortly.
While $LJ::SERVER_DOWN is set true, this message will be displayed for anyone trying to access the LiveJournal installation.
Example:
$SITENAME is down right now while we upgrade. It should be up in a few minutes.
While $LJ::SERVER_DOWN is set true, a message with this subject is displayed for anyone trying to access the LiveJournal installation.
Example:
Maintenance
Domain Related
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. $LJ::COOKIE_DOMAIN can be a single string value, or it can be a perl array ref.
Example:
["", ".$DOMAIN"]
Default:
.$DOMAIN
The URL prefix of the image directory or subdomain.
Default:
$SITEROOT/img
Optional. If using db-based web logging, this field is stored in the database in the server column, so you can see later how well each server performed. To share the same ljconfig.pl on each host (say, over NFS), you can put something like this in your ljconfig.pl: It's kinda ugly, but it works.
Example:
chomp($SERVER_NAME = `hostname`);
The abbreviated version of the name of the site.
Default:
LJ
The shortened name of the site, for brevity purposes.
Default:
LiveJournal
The URL prefix to construct canonical pages. This can include the port number, if 80 is not in use.
Default:
http://www.$DOMAIN:8011/
The URL prefix to the static content directory or subdomain.
Default:
$SITEROOT/stc
The URL prefix to the userpic directory or subdomain.
Default:
$SITEROOT/userpic
Contact email addresses
Miscellaneous settings
A hash of userids whose friends views should be disabled for performance reasons. This is useful if new accounts are auto-added to another account upon creation (described in @LJ::INITIAL_FRIENDS), as in most situations building a friends view for those accounts would be superflous and taxing on your installation.
Example:
( 234 => 1, 232252 => 1, );
A hash of URLs. If defined, little help bubbles appear next to common widgets to the URL you define. Consult Section 2: %LJ::HELPURLS for more information.
Example:
%HELPURLS = ( "accounttype" => "http://www.example.com/doc/faq/", "security" => "http://www.example.com/doc/security", );
This is a list of usernames that will be added to the friends list of all newly created accounts on this installation.
Example:
qw(news)
This is a list of regular expressions matching usernames that users on this LiveJournal installation can't create on their own.
Example:
("^ex_", "^lj_")
Allows a specific user's S2 layers to run javascript, something that is considered a potential security risk and is disabled for all accounts. The hash structure is a series of userid => username pairs. Note that the system account is trusted by default, so it is not necessary to add to this hash.
Example:
( '2' => 'whitaker', '3' => 'test', );
An array of hashes with keys being a BML scheme name and the values being the scheme description. When set, users can change their default BML scheme to the scheme of their choice.
Example:
( { scheme => 'bluewhite', title => 'Blue White' }, { scheme => 'lynx', title => 'Lynx' }, { scheme => 'opalcat', title => 'Opalcat' }, );
A list of usernames used for testing purposes. The password to these accounts cannot be changed through the user interface.
Example:
qw(test test2);
Optimization
Sets how many entries a user can have on their LASTN page. A higher value can majorly affect the speed of the installation.
Default:
100
Sets how far back someone can go on a user's FRIENDS page. A higher value can majorly affect the speed of the installation.
Default:
1000
Message to send to users if their account becomes readonly during maintenance.
Example:
This journal is in read-only mode right now while database maintenance is being performed. Try again in a few minutes.
Portal Configuration
This is a list that specifies which columns can be used for the portal pages.
Default:
qw(main right moz)
The default positions for portal boxes that a user will see when they are logged in.
Default:
{'main' => [ [ 'update', 'mode=full'], ], 'right' => [ [ 'stats', '', ], [ 'bdays', '', ], [ 'popfaq', '', ], ] };
The default positions for portal boxes that a user will see when they are logged out.
Default:
{'main' => [ [ 'update', 'mode='], ], 'right' => [ [ 'login', '', ], [ 'stats', '', ], [ 'randuser', '', ], [ 'popfaq', '', ], ], 'moz' => [ [ 'login', '', ], ], };
The URI to the portal. Only two options are supported at this time, '/portal/' and '/'.
Default:
/portal/
Syndicated Account Options
System Tools
The system path to the sendmail program, along with any necessary parameters.
Example:
"/usr/bin/sendmail -t"
This the recommended system to use for sending email. This requires the perl Net::SMTP module to work properly.
Example:
10.2.0.1
The system path to a spell checking binary, along with any necessary parameters.
Example:
"/usr/local/bin/aspell pipe --sug-mode=fast --ignore-case"
These $LJ:: settings are automatically set in ljdefaults.pl. They're only documented here for people interested in extending LiveJournal. Or, you can define them in ljconfig.pl ahead of time so you can use them in definitions of future variables.
Configuration Directories
Points to the under bin directory under \$LJHOME
Default:
$HOME/bin
Set to the same value as \$LJHOME
Default:
$ENV{'LJHOME'}
Points to the htdocs directory under \$LJHOME
Default:
$HOME/htdocs
Points to the temp directory under \$LJHOME
Default:
$HOME/temp
Points to the var directory under \$LJHOME
Default:
$HOME/var
Internationalization