$LJ:: Variables
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.
These $LJ:: settings are automatically set in ljdefaults.pl. You do not need to use all of them. Some are only documented here for people interested in extending LiveJournal, or for other special cases.You can define them in ljconfig.pl ahead of time so you can use them in definitions of future variables.
Configuration Directories
$LJ::BIN
Points to the bin directory under $LJ::HOME.
Default:
$HOME/bin
$LJ::CVSDIR
Points to the cvs directory under $LJ::HOME. This is used by multicvs.conf, which specifies how the files from the multiple SVN repositories map onto the live file space ($LJ::LIVEDIR / $LJ::HOME).
Default:
$HOME/cvs
$LJ::HOME
Set to the same value as $.LJHOME
Default:
$ENV{'LJHOME'}$LJ::HTDOCS
Points to the htdocs directory under $LJ::HOME.
Default:
$HOME/htdocs
$LJ::LIVEDIR
Points to $LJ::HOME. This is used by multicvs.conf, which specifies how the files from the multiple SVN repositories map onto the live file space from $LJ::CVSDIR.
Default:
$ENV{'LJHOME'}$LJ::SSLDOCS
Points to the ssldocs directory under $LJ::HOME.
Default:
$HOME/ssldocs
$LJ::TEMP
Points to the temp directory under $LJ::HOME.
Default:
$HOME/temp
$LJ::VAR
Points to the var directory under $LJ::HOME.
Default:
$HOME/var
Database Setup
$LJ::DB_TIMEOUT
Integer number of seconds to wait for database handles before timing out. By default, zero, which means no timeout.
Default:
0;
$LJ::MAX_REPL_LAG
The max number of bytes that a MySQL database slave can be behind in replication and still be considered usable. Note that slave databases are never used for any 'important' read operations (and especially never writes, because writes only go to the master), so in general MySQL's async replication won't bite you. This mostly controls how fresh of data a visitor would see, not a content owner. But in reality, the default of 100k is pretty much real-time, so you can safely ignore this setting.
E-mail Related
$LJ::ADMIN_EMAIL
Given as the administrative address for functions like changing passwords or information.
Default:
webmaster@$DOMAIN
$LJ::BOGUS_EMAIL
Used for automated notices like comment replies and general support request messages. It should be encouraged not to reply to this address.
Default:
ys_dontreply@$DOMAIN
$LJ::COMMUNITY_EMAIL
Sets the from address for community invitation e-mails. When this option is not set, it defaults to the $LJ::ADMIN_EMAIL address. This makes them appear to be official communications from the site because the same address is used for password reminders and validation e-mails. The invitations are actually communications from individual users through a site feature - they are more comparable to comment e-mails.
Example:
community_invitation@$DOMAIN
Default:
webmaster@$DOMAIN
Internationalization
@LJ::DEFAULT_LANG
Default ISO (639/639_3166) language code to show site in, for users that have not set their language. Defaults to the first item in @LANGS, which is usually "en", for English. Optional.
Default:
en
$LJ::UNICODE
Boolean setting that allows UTF-8 support (for posts in multiple languages). The default has been 'on' for ages, and turning it off is nowadays not recommended or even known to be working/reliable. Keep it enabled.
Miscellaneous Auto-Configured
$LJ::AUTOSAVE_DRAFT_INTERVAL
Sets how often the editor at update.bml will automatically save a draft of the entry. The default saves at intervals of three minutes.
Default:
3;
$LJ::DEFAULT_EDITOR
Editor for new entries if the user hasn't overridden it. Should be 'rich' or 'plain'.
Default:
rich
%LJ::GZIP_OKAY
If $LJ::DO_GZIP is enabled, the list of content types considered valid for gzip compression is defined in this hash.
Default:
'text/html' => 1, # regular web pages; XHTML 1.0 'may' be this
'text/xml' => 1, # regular XML files
'application/xml' => 1, # XHTML 1.1 'may' be this
'application/xhtml+xml' => 1, # XHTML 1.1 'should' be this
'application/rdf+xml' => 1, # FOAF should be this$LJ::MAX_ATOM_UPLOAD
Max number of bytes that users are allowed to upload via Atom API. Note that this upload path is not ideal, so the entire upload must fit in memory. Default is 25MB until path is optimized. It is set like this because the HTTP content-length header is in bytes (a 25600 value would be 25KB).
Default:
26214400
$LJ::MAX_FOAF_FRIENDS
The maximum number of friends that users' FOAF files will show (so the server does not get overloaded). If they have more than the configured amount, some friends will be omitted.
Default:
1000
$LJ::MAX_FRIENDOF_LOAD
The maximum number of friend-ofs ('fans'/'followers') to load for a given user. Defaults to 5000. Beyond that, a user is just too popular and saying 5,000 is usually sufficient because people aren't actually reading the list.
Default:
5000
$LJ::MAX_USERPIC_KEYWORDS
Boolean hash to set usercap for the maximum amount of keywords a userpic can have. The keywords themselves have a 40 character limit; userpic comments can be up to 255 bytes or 120 chars.
Default:
10;
$LJ::PROFILE_BML_FILE
The file (relative to htdocs) to use for the profile URL. Defaults to userinfo.bml
$LJ::STATS_BLOCK_SIZE
Block size used in stats generation code that gets n rows from the database at a time.
Default:
10_000;
Others
@LJ::COOKIE_DOMAIN_RESET
Array of cookie domain values to send when deleting cookies from users. Only useful when changing domains, and even then kind've useless. Notes: ancient hack for one old specific use.
Default:
("", "$DOMAIN", ".$DOMAIN")$LJ::COOKIE_PATH
According to the RFCs concerning cookies, the cookie path must be explicitly set as well. If LiveJournal is installed underneath a directory other than the top-level domain directory, this needs to be set accordingly. Note: Setting or changing this variable has no practical use, since LiveJournal must be rooted at /.
Default:
/
$LJ::DYS_LEFT_TOP
HTML to show at the top left corner of the Dystopia skin. This was never actually used. Second, the Dystopia 'skin' (scheme) is ljcom, not GPL-licensed livejournal code.
$LJ::FIX_USERCOUNTER_ENABLED
Old historic baggage: Do not use. This boolean enables the fix_usercounter.bml tool at $SITEROOT/admin. The tool reset user counters to resolve “duplicate key error” issues with journals. A better way to address the problem was found, making this tool redundant.
$LJ::NEW_ENTRY_CLEANUP_HACK
Old historic baggage: Do not use. There used to be a bug where only parts of entries got deleted, then there was another bug with per-user number allocation. Together, they forced this option to be made for awhile, where new entries (when this is on) would blow away any old data if part of it was still there but wasn't supposed to be. This includes deleting comments tied to those old entries. Off by default.
Site Maintenance
$LJ::MSG_NO_COMMENT
Message to show users when they're not allowed to comment due to either their 'get_comments' or 'leave_comments' capability being disabled, probably by the admin to lower activity after a hardware rotation.
Example:
Due to hardware maintenance, you cannot leave comments at this time. Watch the news page for updates.
$LJ::MSG_NO_POST
Message to show users when they are not allowed to post due to their 'can_post' capability being disabled, probably by the admin to lower activity after a hardware rotation.
Example:
Due to hardware maintenance, you cannot post at this time. Watch the news page for updates.
$LJ::MSG_READONLY_USER
Message to show users when their journal (or a journal they are visiting) is in read-only mode due to maintenance.
Example:
This journal is in read-only mode right now while database maintenance is being performed. Try again in a few minutes.
Default:
Database temporarily in read-only mode during maintenance.
System Related
@LJ::MAIL_TRANSPORTS
Mail transports setup. Array values are: protocol, mailserver hostname, and preferential weight. qmtp (requires the Net::QMTP perl module to work properly), SMTP, dmtp, and sendmail are the currently supported protocols.
Default:
( [ 'sendmail', $SENDMAIL, 1 ] )
$LJ::SENDMAIL
The system path to the sendmail program, along with any necessary parameters. This option is ignored if you have defined the higher-precedence option: @LJ::MAIL_TRANSPORTS. See also $LJ::SMTP_SERVER
Example:
"/usr/sbin/sendmail -t -oi"
Visuals
$LJ::CSSPROXY
If set, external CSS should be proxied through this URL (URL is given a ?u= argument with the escaped URL of CSS to clean. If unset, remote CSS is blocked. See also $LJ::CSS_FETCH_TIMEOUT.
$LJ::S1_SHORTCOMINGS
Use the S2 style named 's1shortcomings' to handle page types that S1 can't handle. Otherwise, BML is used. This is off by default, but will eventually become on by default, and no longer an option.
$LJ::S2_COMPILED_MIGRATION_DONE
Do not try to load compiled S2 layers from the global cluster. Any new installation can enable this safely as a minor optimization. If you have an existing site, make sure to only turn this flag on if you have actually migrated everything. The option only really makes sense for large, old sites
Default:
0;
@LJ::SCHEMES
An array of hashes with keys ('scheme') being a BML scheme name and the values ('title') being the scheme description. When set, users can change their default site scheme to the scheme of their choice. Schemes will be displayed according to their order in the array, but the first array item is the site default scheme.
Example:
(
{ scheme => 'bluewhite', title => 'Blue White' },
{ scheme => 'lynx', title => 'Lynx',
thumb => [ 'schemethumb/lynx.png', 200, 166 ] },
{ scheme => 'opalcat', title => 'Opalcat' },
);Default:
(
{ scheme => 'lynx', title => 'Lynx', },
{ scheme => 'bluewhite', title => 'Blue White' },
);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.
Abuse Prevention
$LJ::BLOCKED_BOT_INFO
Include unique cookie information and IP address with the $LJ::BLOCKED_BOT_MESSAGE notice.
$LJ::BLOCKED_BOT_MESSAGE
Message (HTML) shown to people suspected to be bots, informing them they've been banned, and where/what the rules are.
Default:
You don't have permission to view this page.
$LJ::BLOCKED_BOT_SUBJECT
Subject/title (text-only) shown to people suspected to be bots.
Default:
403 Denied
$LJ::BLOCKED_BOT_URI
Path (e.g. /bots) at which an informational page about your acceptable bot policies is documented. This URI is excluded from anti-bot measures, so make sure it's as permissive as possible to allow humans in who may be lazy in their typing. For example, leave off the trailing slash (/bots instead of /bots/) if your URI is a directory.
$LJ::BLOCKED_PASSWORD_EMAIL
If enabled, when a user attempts to change e-mail addresses the new address is checked for validity; changing to $LJ::USER_EMAIL addresses is also disallowed.
%LJ::DENY_REQUEST_FROM_EMAIL
Setup support e-mail address to not accept new e-mails. Basically if an address is specified below, any user who e-mails it out of the blue will be sent back a copy of the specified file along with their e-mail. Users will still be allowed to respond to e-mails from the support system, but they are not able to open a request by e-mailing the address. The value part of the hash is the name of an include file. It will be loaded out of . See $/htdocs/incLJHOME$LJ::FILEEDIT_VIA_DB for how to make it read from memcached/DB.
Example:
(
'abuse@$DOMAIN' => 'bounce-abuse',
);$LJ::EMAIL_CHANGE_REQUIRES_PASSWORD
If enabled, users will not be able to edit their e-mail address at manage/profile. Instead, a link
to changeemail.bml will be displayed, and (non-OpenID™) users will be prompted for their password at that page.
$LJ::LOG_CHANGEEMAIL_IP
If enabled, when a user attempts to change their e-mail address at changeemail.bml,
their IP address is included with the record noting the change in the statushistory table.
$LJ::RATE_COMMENT_ANON
Arrayref of rate rules to apply incoming comments from anonymous “users”. It is switched off by default. Each rate rule is an arrayref of two items: number of comments, and period of time. If user tries to make more comments in the specified time period, the comment is denied, at least without a CAPTCHA. In the example, anonymous comments will always require a CAPTCHA. For efficient anti-spammer rate-limiting we recommend you also run memcached, and set the appropriate ljconfig.pl variables (@LJ::MEMCACHE_COMPRESS_THRESHOLD and @LJ::MEMCACHE_SERVERS).
Example:
[[0, 65535]];
Default:
[ [ 300, 3600 ], [ 200, 1800 ], [ 150, 900 ], [ 15, 60 ] ];
$LJ::RATE_COMMENT_AUTH
Arrayref of rate rules to apply incoming comments from authenticated users . It is switched off by default. Each rate rule is an arrayref of two items: number of comments, and period of time. If user makes more comments in period of time, comment is denied, at least without a CAPTCHA.
Default:
[ [ 200, 3600 ], [ 20, 60 ] ];
@LJ::RBL_LIST
Real-time Block List support for comments. In the array specify providers you wish to use, like dsbl.org's or openproxies.com's data, to help combat comment spam.
$LJ::REQUIRE_TALKHASH
Require submitted comments to include a signed hidden value provided by the server. Slows down comment-spammers, at least, in that they have to fetch pages first, instead of just blasting away POSTs. Defaults to off.
$LJ::REQUIRE_TALKHASH_NOTOLD
If $LJ::REQUIRE_TALKHASH is on, also make sure that the talkhash provided was issued in the past two hours. Defaults to off.
$LJ::SECURE_PASSWORD_RESET
If enabled, do not e-mail passwords in the clear from lostinfo.bml. Instead, e-mail a link that allows the user to reset their password. The link authorizes the user to use changepassword.bml, without an old password.
$LJ::TALK_ABORT_REGEXP
Regular expression which, when matched on incoming comment bodies, kills the comment.
$LJ::TALK_MAX_URLS
If set, up to this many URLs will be extracted from comments and stored (in the commenturls table) for analysis.
Example:
500;
@LJ::TALKSPAM
Filter comments for spam using this list of regular expressions.
Example:
(
'morphese',
);$LJ::UNIQ_COOKIES
Set this boolean value to true, to give users a unique session cookie, unrelated to their login session cookie, to help fight abuse.
Capabilities/User Options
$LJ::ALLOW_PICS_OVER_QUOTA
By default, when a user has more userpics than their account type allows, perhaps due to expiration of paid time, their least often used userpics (based on their journal posts) will be marked inactive. This happens whenever their account type is changed or they visit editpics.bml. They will no longer be available for use, and only the account owner may see them on editpics.bml. Turning this boolean setting true will circumvent this behavior. In other words, enabling this option lets users just keep whatever userpics they had when their account type changed.
%LJ::CAP
A hash that defines the capability class limits. The keys are bit numbers, from 0 – 15, and the values are hashrefs with limit names and values. Consult Section 4, “Setting Capabilities” for more information.
%LJ::CAP_DEF
The default capability limits, used only when no other class-specific limit below matches.
$LJ::EMAIL_POST_DOMAIN
If set, and your MTA is configured, users can post to their account via username@$EMAIL_POST_DOMAIN.
Example:
post.$DOMAIN
$LJ::EVERYONE_VALID
If set to true, users don't need to validate their e-mail addresses.
$LJ::NEWUSER_CAPS
The default capability class mask for new users. Bitmask of capability classes that new users begin their accounts with. By default users are not in any capability classes and get only the default site-wide capabilities. See also %LJ::CAP.
$LJ::SCHOOLSMAX
Hashref of journaltype (P, C, I, …) to maximum number of allowed attended schools for that journal type.
Default:
{
'P' => 25,
'I' => 25,
'S' => 25,
'C' => 50,
};$LJ::USE_PGP
Let users set their PGP/GPG public key, and accept PGP/GPG-signed e-mail for e-mail posting. Requires GnuPG::Interface and Mail::GnuPG modules to be installed. Note: users need to use GPG version 1.2.4, or higher.
$LJ::USER_EMAIL
Do certain users get a forwarding e-mail address, such as user@$DOMAIN?. This requires additional mail system configuration. Users will also need the “useremail” cap.
%LJ::USERPROP_DEF
This option defines the user-properties 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,
);Contact e-mail addresses
%LJ::ALIAS_TO_SUPPORTCAT
This provides a way to declare more than one e-mail address which is routed to a support category. The primary incoming e-mail address for a support category is in the supportcat table. If you need more than one, this hash maps from the e-mail address you want to accept mail, to the primary e-mail address of that support category. For instance: %ALIAS_TO_SUPPORTCAT = ('dmca@example.com' => 'webmaster@example.com') would mean that dmca@ would go to the same support category that webmaster@ would otherwise go to.
$LJ::SUPPORT_EMAIL
Used as a contact method for people to report problems with the LiveJournal installation.
Default:
support@$DOMAIN
Database Related
%LJ::CLUSTER_PAIR_ACTIVE
A hash that defines master-master DB cluster pairs.
@LJ::CLUSTERS
This is an array listing the names of the clusters that your configuration uses. Each one needs a 'cluster$i' role in %LJ::DBINFO. Consult Section 2, “Setting up multiple database servers” for more details.
Example:
( 1, 2, 3 )
Default:
( 1 )
$LJ::DB_LOG_HOST
An optional host:port to send UDP packets to with blocking reports. The reports log the total amount of time used in a slow operation to a remote host via UDP.
Example:
foo.example.com:8030
%LJ::DBINFO
This is a hash that contains the necessary information to connect to your database, as well as the configuration for multiple database clusters, if your installation supports them. Consult Section 4, “Configuring %LJ::DBINFO” for more details.
$LJ::DEFAULT_CLUSTER
The default cluster to choose when creating new accounts. If you have an arrayref of multiple cluster names, for scalability, one of the listed clusters is chosen at random. You can weight new users by repeating cluster numbers, e.g. [ 1, 1, 1, 2 ] puts 75% of people on cluster 1, 25% of people on cluster 2. Clusters are checked for validity before being used.
Default:
[ 1 ]
$LJ::DIRECTORY_SEPARATE
If true, only use the 'directory' DB role for the directory, and don't also try the 'slave' and 'master' roles. Consult Section 4, “Configuring %LJ::DBINFO” for details on setting roles.
$LJ::DISABLE_MASTER
If set to true, access to the 'master' DB role is prevented, by breaking the LJ::get_dbh function. Useful during master database migrations.
$LJ::DISCONNECT_DBS
If set to true, all database connection handles (except those for logging) are disconnected at the end of each request. Recommended for high-performance sites with lots of database clusters.
$LJ::DISCONNECT_MEMCACHE
If set to true, memcached connection handles are disconnected at the end of each request. Not recommended if your memcached instances are Linux 2.6.
$LJ::FILEEDIT_VIA_DB
Boolean value that controls /admin/fileedit setup. If you are using and frequently editing the files
in htdocs/inc, you may wish to put all of these files into the database. It uses the BML hook
called “include_getter”. If it is defined, then it is called and checked every
time BML includes something. It behaves like other BML hooks. The hook uses the LJ::load_include API. Using
these ljconfig.pl options, you can configure it to make none/some/all include files be loaded
from memcached / DB. You can instruct BML to treat all <?_include?> statements as being pulled
from memcached (failover to the database) by uncommenting this.
Alternatively, you can specify that only particular files should be kept in memcached and the database, using a hash: (%LJ::FILEEDIT_VIA_DB).
An example value for the hash, is: ( 'support_links' => 1, );
@LJ::GEARMAN_SERVERS
Gearman information, if you have gearmand servers running, so you can run workers. Uses form: hostname:port.
Example:
('foo.example.com:7003')@LJ::MEMCACHE_COMPRESS_THRESHOLD
This is used to set the minimum size of an object before trying to compress it. A value of '0' turns off compress; a value of x sets that size as required. You specify the array value in bytes.
Example:
1_000;
%LJ::MEMCACHE_PREF_IP
If you have multiple internal networks and would like the memcached libraries to pick one network over the other, you can set the preferred IP list. In the example below, the variable is set to say “if we try to connect to 10.0.0.1, instead try 10.10.0.1 first and then fall back to 10.0.0.1”.
Example:
(
10.0.0.1 => 10.10.0.1,
);@LJ::MEMCACHE_SERVERS
Memcache information, if you have memcached servers running. Uses form: hostname:port.
Example:
('foo.example.com:11211')$LJ::STATS_FORCE_SLOW
Make the stats system use the “slow” database role, never using “slave” or “master”, and dying loudly if it is unable to do so.
@LJ::SUPPORT_SLOW_ROLES
Array of database roles to be used for slow support queries, in order of precedence.
Default:
('slow')@LJ::THESCHWARTZ_DBS
TheSchwartz information, so it can connect to your database, if you have TheSchwartz server and workers running.
Example:
my $mast = $LJ::DBINFO{master};
my $dbname = $mast->{dbname} || 'livejournal';
@LJ::THESCHWARTZ_DBS =({
dsn => 'dbi:mysql:$dbname;host=$mast->{host}',
user => $mast->{user},
pass => $mast->{pass},
prefix => 'sch_',
});$LJ::USE_INNODB
Create new tables as InnoDB by default.
Development/Debugging Options
$LJ::ALLOW_CLUSTER_SELECT
When set true, the journal creation page will display a drop-down list of clusters (from @LJ::CLUSTERS) along with the old 'cluster 0' which used the old DB schema and the user creating an account can choose where they go. In reality, there's no use for this, it is only useful when working on the code. Deprecated. Instead, use: $LJ::DEBUG{allow_cluster_select} = 1;.
%LJ::ALT_PROFILE_BML_FILE
Mapping of key (word chars) to file (like $LJ::PROFILE_BML_FILE) to use to override the default $LJ::PROFILE_BML_FILE. Used if the ver=[key] URL parameter is used on a /profile URL.
$LJ::ANTI_SQUATTER
Set true if your installation is a publicly available development server and if you would like beta testers to ensure that they understand as such. If left alone your installation might become susceptible to hordes of squatter accounts. Deprecated. Instead, use: $LJ::DEBUG{anti_squatter} = 1;
$LJ::DEV_HAS_REAL_SSL
Enable this if you are running a development installation and have set up SSL.
$LJ::IS_DEV_SERVER
Enable this option to signify that the server running the LiveJournal software is being used as a development server and not used for production. A lot of debug info and intentional security holes for convenience are introduced when this is enabled. When enabled, the tool will check your ljconfig.pl variables (using the LJ::ConfCheck::* module). Additionally, changed library files are automatically reloaded without stopping/starting Apache.
@LJ::LANGS_IN_PROGRESS
Array of additional (ISO 639/639_3166) language codes to allow users to select e.g. using an argument on a URL, if they know about them. These ones are actively being translated, but are not yet ready to be publicly available.
%LJ::POST_WITHOUT_AUTH
Support explicit IP + community + user posting without passwords, for
internal purposes. You might want to use this if you want to make commits to your local SVN repository but without parsing your local SVN configuration,
for example. An alternative to this hash is the generic post_noauth hook, which allows dynamically generating posters based on how you program the hook to be used.
Example:
(
'127.0.0.1' => {
'changelog' => [qw(stan eric wendy kyle etc)],
'another_community' => [qw(bob mary jane sue)],
},
);@LJ::TESTACCTS
A list of usernames used for testing purposes. The password to these accounts cannot be changed through the user interface.
Example:
qw(test test2);
Domain Related
$LJ::ADSERVER
Subdomain URL to use for ad-serving.
$LJ::COOKIE_DOMAIN
The “domain” value set on cookies sent to users. Note the leading period, which is a wildcard for everything at or under $DOMAIN.
Cookie domains should simply be set to .$domain.tld, based on the Netscape Cookie Spec., but some older browsers do not adhere to the specs very well. $LJ::COOKIE_DOMAIN can be a single string value, or it can be a perl array ref.
Example:
["", ".$DOMAIN"]
Default:
.$DOMAIN;
$LJ::DOMAIN
The minimal domain name of the site, excluding the 'www.' prefix if applicable.
Default:
example.com
$LJ::DOMAIN_WEB
The preferred domain name for your installation's web root. For instance, if your $DOMAIN is 'foo.com', your $DOMAIN_WEB might be 'www.foo.com', so any user who goes to foo.com will be redirected to www.foo.com. If defined and different from $LJ::DOMAIN, any GET requests to $LJ::DOMAIN will be redirected to $LJ::DOMAIN_WEB.
Default:
www.$DOMAIN;
$LJ::EMBED_MODULE_DOMAIN
Prefix for embedded media content. Media is embedded into an entry or comment using an iframe. We recommend using a separate domain, for security.
Example:
embed.$DOMAIN
$LJ::FRONTPAGE_JOURNAL
If set, the main page of the site loads the specified journal, not the default index page. Use this if you're running a news site where there's only one journal, or one journal is dominant.
$LJ::IMGPREFIX
The URL prefix of the (static) image directory or subdomain. Does not take a trailing slash. By default it is $SITEROOT/img, but your load balancing may dictate another hostname or port for efficiency. See also $LJ::JSPREFIX.
Default:
$SITEROOT/img
$LJ::JSPREFIX
Prefix on (static) JavaScript directory or subdomain, for URLs. Does not take a trailing slash. By default it is $SITEROOT/js, but your load balancing may dictate another hostname or port for efficiency. See also $LJ::IMGPREFIX.
Default:
$SITEROOT/js
$LJ::ONLY_USER_VHOSTS
If you only want $LJ::USER_VHOSTS to work, and want to disable the typical /users/USERNAME, /~USERNAME, and /community/USERNAME URLs, set this boolean option.
$LJ::OTHER_VHOSTS
Let users CNAME their vanity domains to this LiveJournal installation, to transparently load their
journal. Users will also need the “domainmap” cap.
$LJ::PALIMGROOT
The URL prefix to the palimgs directory or subdomain. Does not take a trailing slash. Prefix on GIF/PNGs with dynamically generated palettes. By default, it's '$SITEROOT/palimg', and there is little reason to change it. Useful if you want to move images, used for styling, to another host. You can use it in a similar way to $LJ::SITEROOT (e.g. $LJ::PALIMGROOT/myimage.png). Somewhat related: note that Perlbal has a plugin to handle these before it gets to mod_perl, if you would like to relieve some load on your backend mod_perls. But you do not necessarily need this option for using Perlbal to do it. It depends on your configuration.
Default:
$SITEROOT/palimg
$LJ::SERVER_NAME
System's hostname. 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. In a massive LiveJournal webfarm, each node would have its own value of this.
The default is to query the local machine's hostname at runtime, so you don't need to set this. It is not used for anything too important anyway To share the same ljconfig.pl on each host (say, over NFS), you can put something like the example in
your ljconfig.pl: It is kind've ugly, but it works.
Example:
chomp($SERVER_NAME = `hostname`);
Default:
Sys::Hostname::hostname();
$LJ::SITENAME
The name of the site. This is set to the default, unless you override it in ljconfig.pl, or you define $LJ::SITENAMESHORT which is stripped of its trailing .tld suffix (.net, .com, etc.) and used for $SITENAME.
Default:
YourSite.com;
$LJ::SITENAMEABBREV
The abbreviated (shortened) possible slang name of your site.
Default:
YS
$LJ::SITENAMESHORT
The shortened name of the site, for brevity purposes.
Default:
YourSite
$LJ::SITEROOT
The URL prefix, including 'http://', to construct canonical pages. Does not take a trailing slash. This can include the port number, if 80 is not in use. This is what gets prepended to all URLs. This can't be auto-detected because of reverse-proxies, etc. See also $LJ::SSLROOT.
Example:
http://www.$DOMAIN:8011
Default:
http://$DOMAIN_WEB
$LJ::SSLIMGPREFIX
Parallels $LJ::IMGPREFIX. The URL prefix of the (static) image directory or subdomain, for the SSL-portion of the site. Does not take a trailing slash.
Default:
$SSLROOT/img
$LJ::SSLJSPREFIX
Parallels $LJ::JSPREFIX. Prefix on (static) JavaScript directory or subdomain, for the SSL-portion of the site. Does not take a trailing slash.
Default:
$SSLROOT/js
$LJ::SSLROOT
The URL prefix, including 'https://', for the base of the SSL-portion of the site. Does not take a trailing slash. This can't be auto-detected because of reverse-proxies, etc. See also $LJ::SITEROOT.
Default:
https://www.$DOMAIN:8011/
$LJ::SSLSTATPREFIX
Parallels $LJ::STATPREFIX. The URL prefix to the static content directory or subdomain, for the SSL-portion of the site. Does not take a trailing slash.
Default:
$SSLROOT/stc
$LJ::SSLWSTATPREFIX
Parallels $LJ::JSPREFIX. Prefix on (static) JavaScript directory or subdomain, for the SSL-portion of the site. Does not take a trailing slash.
Default:
$SSLROOT/stc
$LJ::STATPREFIX
The URL prefix to the static content directory or subdomain. Does not take a trailing slash.
Default:
$SITEROOT/stc
$LJ::SUBDOMAIN_FUNCTION
This lets site administrators mark a subdomain as the normal path (foo.$DOMAIN), ignoring the user component of the subdomain. It is
useful if you want to serve palimg files elsewhere (like an image caching service, as part of a content delivery network). Some load balancer configuration
is also required (see $LJ::PALIMGROOT). The value part of the hash is the subdomain type, such as 'userpics',
or 'files' (for serving hook-supplied files).
$LJ::USER_DOMAIN
If $LJ::USER_VHOSTS is enabled, this is the part of the URL that follows 'username'.
Example:
$DOMAIN
$LJ::USER_VHOSTS
If enabled, the LiveJournal installation will support username URLs of the form http://username.yoursite.com/. Users will also need the “userdomain” cap.
$LJ::USERPIC_ROOT
The URL prefix to the userpic directory or subdomain. Defaults to $SITEROOT/userpic. Does not take a trailing slash.
See $LJ::SUBDOMAIN_FUNCTION to use something else.
Default:
$LJ::SITEROOT/userpic
$LJ::WSTATPREFIX
Your static prefix on the same domain as $LJ::DOMAIN_WEB. Does not take a trailing slash. This is needed for JavaScript security, since a script on
stat.example.com can't access content on www.example.com.
Default:
$SITEROOT/stc
External and Pluggable Authorization Support
$LJ::LDAP_BASE
The DN unique identifiers go here. This is a required setting for LDAP (Lightweight Directory Access Protocol) support.
Example:
ou=People,dc=exampleorg,dc=com;
$LJ::LDAP_HOST
The host URI goes here. It accepts anything that the Net::LDAP constructor takes. This is a required setting for LDAP support.
Example:
ldap.example.com;
$LJ::LDAP_UID
An optional field containing the username. It defaults to 'uid'.
Example:
uid;
$LJ::OPENID_COMPAT
Support pre-1.0 OpenID™ specs as well as final spec.
$LJ::OPENID_CONSUMER
Enable OpenID™ consumer support, to accept OpenID™ identities for logging in and commenting. Off by default.
$LJ::OPENID_SERVER
Enable OpenID™ server support.
$LJ::OPENID_STATELESS
Speak stateless OpenID™. Slower, but no local state needs to be kept.
Filesystem Related
%LJ::BLOBINFO
Hash that contains the details for a number of blob servers. The format of the parameter is 'cluster' => 'directory'. You also need to add a %LJ::USERPROP_DEF key: 'blob_clusterid' => 1,. The webserver user also needs to be able to access the given directory. If you wish to use CAPTCHAs image / audio generation for human checks, then this is a necessary parameter. This is old. MogileFS is the future. You might want to use this option, though, for development, as blobserver in local-filesystem-mode is easy to set up.
Example:
%BLOBINFO = (
"clusters" => {
"1" => "\$HOME/var/blobs/",
},
);$LJ::DISABLE_MEDIA_UPLOADS
Boolean to disable all media uploads/modifications that would go to MogileFS. This puts code that interacts with MogileFS into read-only mode: editpics.bml - users can't delete/upload userpics while in this mode, and CAPTCHAs - can't generate new ones or delete old ones while flag on. You might set this if you needed to turn off your MogileFS install, for example.
%LJ::MOGILEFS_CONFIG
If you are using MogileFS on your site for userpics (the userpic factory requires MogileFS in order to work) or other purposes, you will need to define this hash and complete the information in it. Please see also $LJ::USERPIC_MOGILEFS. The your_class element allows you to define any special MogileFS classes you need. If you want CAPTCHAs to come from a MogileFS backend, enable $LJ::CAPTCHA_MOGILEFS; you also need a class called 'captcha' in your domain, as in the example.
Example:
(
domain => 'example.com::lj', # arbitrary namespace, not DNS domain
hosts => [ '10.0.0.1:6001' ],
root => '/var/mogdata',
# timeout => 3, # optional timeout on MogileFS clients.
classes => {
userpics => 3,
captcha => 2,
# your_class => 3,
},
);%LJ::MOGILEFS_PREF_IP
If you have multiple internal networks and would like the MogileFS libraries to pick one network over the other, you can set the preferred IP list. In the example below, the variable is set to say “if we try to connect to 10.0.0.1, instead try 10.10.0.1 first and then fall back to 10.0.0.1”.
Example:
(
10.0.0.1 => 10.10.0.1,
);$LJ::USERPIC_BLOBSERVER
If set to true, userpics are store as a file on the server rather than in the database. This depends on a “Blob Server” being set up in the %LJ::BLOBINFO section. This is old. MogileFS is the future. You might want to use this option, though, for development, as blobserver in local-filesystem-mode is easy to set up. See also %LJ::PERLBAL_ROOT.
$LJ::USERPIC_MOGILEFS
Uncomment this to put new userpics in MogileFS.
Human Checks
$LJ::ANTI_TALKSPAM
You should also turn this on to enable anonymous comment CAPTCHAs.
$LJ::CAPTCHA_AUDIO_MAKE
The max number of audio CAPTCHAs to make per-process. Should be less than $LJ::CAPTCHA_AUDIO_PREGEN. Useful for farming out generation of $LJ::CAPTCHA_AUDIO_PREGEN to lots of machines. (This value is not ideal, since after each generation, processes should just double-check the number available so this configuration variable can be removed, from the codebase).
Default:
100;
$LJ::CAPTCHA_AUDIO_PREGEN
The max number of audio CAPTCHAs to pre-generate ahead of time.
Default:
100;
$LJ::CAPTCHA_IMAGE_PREGEN
The max number of image CAPTCHAs to pre-generate ahead of time.
Default:
500;
$LJ::CAPTCHA_IMAGE_RAW
What image files to use to generate image CAPTCHAs.
Default:
$LJ::HOME/htdocs/img/captcha
$LJ::CAPTCHA_MOGILEFS
In addition to filling out the %LJ::MOGILEFS_CONFIG hash, you need to enable some options if you want to use MogileFS. Turn this on to put CAPTCHAs in MogileFS.
%LJ::HUMAN_CHECK
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.).
Example:
(
create => 1,
anonpost => 1,
);Maintenance Messages
$LJ::MSG_DB_UNAVAILABLE
Customizable DB unavailable message.
Example:
Sorry, database temporarily unavailable. Please see <a href='http://status.example.com/'>…</a> for status updates.
$LJ::MSG_ERROR
Customizable generic unavailable message.
Default:
Sorry, there was a problem.
$LJ::NODB_MSG
Message to send to users when the database is unavailable
Default:
Database temporarily unavailable. Try again shortly.
$LJ::SERVER_DOWN
Set true when performing maintenance that requires user activity to be minimum, such as database defragmentation and cluster movements. The site is globally marked as 'down' and users get an error message, as defined by $SERVER_DOWN_MESSAGE and $SERVER_DOWN_SUBJECT. See also $LJ::SERVER_TOTALLY_DOWN.
$LJ::SERVER_DOWN_MESSAGE
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.
$LJ::SERVER_DOWN_SUBJECT
While $LJ::SERVER_DOWN is set true, this subject/title is displayed on the error message for anyone trying to access the LiveJournal installation.
Example:
Maintenance
$LJ::SERVER_TOTALLY_DOWN
The site is globally marked as 'down' and users get an error message, as defined by $SERVER_DOWN_MESSAGE and $SERVER_DOWN_SUBJECT. But compared to $SERVER_DOWN, this error message is done incredibly early before any dispatch to different modules. See also $LJ::SERVER_DOWN.
Messaging Related
$LJ::SMS_DOMAIN
Base domain for SMS service. Defaults to value of $LJ::DOMAIN. You might use this in message footers you send to users.
$LJ::SMS_SHORTCODE
Number of your SMS service for users to send to and receive from.
Example:
55512
$LJ::SMS_TITLE
The name of your SMS service. Used on SMS communications and site pages.
Example:
TXT$SITENAMEABBREV
Default:
$SITENAMESHORT SMS
Miscellaneous settings
$LJ::BML_DENY_CONFIG
Comma-separated list of directories under htdocs which should be served without parsing their _config.bml files. For example, directories that might be under a lesser-trusted person's control.
$LJ::DONT_LOG_IMAGES
If Apache access logging to a database is enabled, in the %LJ::DBINFO hash, this boolean lets you choose whether to log images or just page requests.
$LJ::EXAMPLE_USER_ACCOUNT
The username of the example user account, for use in Support and user-documentation. Must be an actual account on the site.
%LJ::HELPURLS
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" => "\$SITEROOT/support/faqbrowse.bml?faqid=1",
"linklist_support" => "\$SITEROOT/manage/links.bml",
);@LJ::INITIAL_FRIENDS
This is a list of usernames that will be added automatically to the Friends list of all newly created accounts on this installation.
Example:
qw(news)
@LJ::INITIAL_OPTIONAL_FRIENDS
Initial optional friends, listed on create.bml.
Example:
qw(news);
@LJ::INITIAL_OPTOUT_FRIENDS
Makes initial friends (checkboxes) on create.bml be selected by default.
Example:
qw(news);
@LJ::LANGS
Array of ISO (639/639_3166) language codes to make available for users to select from. You can edit the array in ljconfig.pl, as in the example, for any extra languages you plan to configure, translate and make available on your site. Also, if the user has not selected a language, it is auto-detected from their browser. See also @LJ::DEFAULT_LANG.
Example:
qw(en_YS en_GB de da es it ru ja pt eo nl hu fi sv pl zh lv tr ms);
Default:
en
$LJ::MAX_BANS
If you want to change the limit on how many bans a user can make, use this variable. The default is 5000, but it is site-configurable.
$LJ::MOGILE_PATH_CACHE_TIMEOUT
If using MogileFS for userpics, and are not using $LJ::REPROXY_DISABLE{userpics}, the server headers will advise they be cached for this value. Value is in seconds. Defaults to 3600 (one hour).
Default:
3600
%LJ::PERLBAL_ROOT
If you are reproxying userpics (on by default, but add this for it to work), and store userpics on a blobserver, set its location here so reproxy headers can be generated to the blobserver. Please see also $LJ::USERPIC_BLOBSERVER and %LJ::REPROXY_DISABLE.
Example:
(
'userpics' => '/mnt/xy_blob',
);@LJ::PROTECTED_USERNAMES
This is a list of regular expressions matching usernames that users on this LiveJournal installation can't create on their own.
Example:
("^ex_", "^lj_")@LJ::QBUFFERD_ISOLATE
On a larger installation, it is useful to have multiple qbufferd.pl processes, one for each command type. This is not necessary on a small installation.
Example:
('weblogscom', 'eg_comnewpost')$LJ::QBUFFERD_PIDFILE
Sets the file to which the qbufferd.pl parent process records the process id of the daemon. The presence of the file ensures qbufferd.pl knows if it already has a process started. The value must be a valid path, as the parent has to kill the child process if the parent couldn't create or write to its pid.
Default:
$LJ::HOME/var/qbufferd.pid
$LJ::RANDOM_USER_PERIOD
If you want to change the amount of time a user stays in the random_user_set table, change this. The random user search feature uses this. The value is in days (default is one week).
Default:
7
%LJ::REPROXY_DISABLE
If you are using Perlbal to balance your web site, it can use reproxying to distribute the files itself. You can use this option to disable that reproxying on an item-by-item basis. This can be useful for extremely busy sites without persistent connections between Perlbal and mogstored, etc. The hash is a set of file classes that should not be internally redirected to mogstored nodes / a blobserver. Values are true, keys are one of 'userpics', 'captchas', or site-local file types like 'phoneposts' for ljcom. The default is to allow all reproxying.
Example:
(
userpics => 1,
captchas => 1,
);%LJ::SUPPORT_DIAGNOSTICS
Support diagnostics can be helpful if you are trying to track down a bug that has been occurring. The user-agent information will be appended to requests that users open through the web interface.
Example:
( 'track_useragent' => 1, );
$LJ::TRACK_URL_ACTIVE
Record in memcached what URL a given host/pid is working on.
$LJ::TRUST_X_HEADERS
If you know that your installation is behind a proxy or other fence that inserts X-Forwarded-For headers that you can trust, enable this. Otherwise, don't! Default is off (for direct connection to the 'net). If behind your own reverse proxies, you should enable this.
$LJ::USE_QBUFFERD_DELAY
Used in conjunction with @LJ::QBUFFERD_ISOLATE, to specify a time to sleep between runs of qbuffered tasks. The default is 15 seconds.
Example:
10
$LJ::USE_SSL
Links to SSL portions of the site should be visible. This makes pages default to their SSL versions. If somebody can't do SSL due to proxies/etc, they can use insecure versions by appending ?ssl=no to the URL.
$LJ::USERSEARCH_METAFILE_PATH
File name and path the search-updater worker should use for the usersearch data file.
Default:
$LJ::HOME/var/usersearch.data
Optimization
$LJ::COMPRESS_TEXT
Boolean setting that compresses entry (stored in logtext2) and comment text (stored in talktext2) in the database, to save disk space.
$LJ::CONCAT_RES
Instruct Perlbal to concatenate static files on non-SSL pages.
$LJ::CONCAT_RES_SSL
Instruct Perlbal to concatenate static files on SSL pages.
$LJ::CSS_FETCH_TIMEOUT
Sets length of time in minutes to try fetching external CSS before timing out.
Default:
2;
%LJ::DISABLED
Boolean hash, signifying that separate parts of this LiveJournal installation are working and are available to use. A value of 1 on individual items within
the hash indicates 'on' i.e. “please switch on disabling of this feature”.Consult Section 3, “%LJ::DISABLED” for more information.
$LJ::DO_GZIP
Boolean setting that when enabled, signals to the installation to use gzip encoding, to compress text content
sent to browsers, wherever possible. In most cases this is known to cut bandwidth usage in half.
Requires the Compress::Zlib perl module. mod_gzip is somewhat buggy in Apache 1.3x;
just use Compress::Zlib. See also %LJ::GZIP_OKAY
%LJ::FORCE_EMPTY_FRIENDS
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 superfluous and taxing on your installation. In the example, 234 and 232252 are userids of popular system communities.
Example:
(
234 => 1,
232252 => 1,
);$LJ::LOADFRIENDS_USING_GEARMAN
Enable this to use Gearman when a set of “Friends” need loading. You will also need to run the corresponding worker.
$LJ::LOADSYSBAN_USING_GEARMAN
Enable this to use Gearman to load sysbanned users, instead of Apache. You will also need to run the corresponding worker.
$LJ::LOADTAGS_USING_GEARMAN
Enable this to use Gearman for loading user tags. This needs to be enabled so the corresponding worker operates, otherwise it falls back to loading in-process among the web processes.
$LJ::MAX_S2COMPILED_CACHE_SIZE
Threshold (in bytes) under which compiled S2 layers are cached in memcached. If you have a lot of free memcached memory and a loaded database server with lots of queries to the s2compiled table, turn this up.
Default:
7500;
@LJ::QBUFFERD_CLUSTERS
If defined, list of clusters that qbufferd should use when retrieving and processing outstanding jobs. Defaults to value of @LJ::CLUSTERS. You might set this if you removed a cluster you wanted to retire from @LJ::CLUSTERS so it receives no new qbufferd jobs, but still needed to get qbufferd to process remaining jobs.
$LJ::RECENT_TAG_LIMIT
The logtagsrecent table holds mapping on a set quantity of the most recent tags applied to an entry. This variable sets that quantity.
Example:
100
Default:
500
$LJ::SUICIDE
Large processes should voluntarily kill themselves at the end of requests.
%LJ::SUICIDE_OVER
This is used by $LJ::SUICIDE, with Apache::DebateSuicide, the underlying cleanup handler, to decide whether a large process should voluntarily kill itself at the end of the request. It lets the site administrator set a global and/or per-server maximum memory cap on the sum of all of mod_perl children. If a processes memory is over the configured size (in KB), then the process will exit.
Default:
1_000_000;
%LJ::SUICIDE_UNDER
See also %LJ::SUICIDE_OVER. If a processes memory is under the configured size (in KB), then the process will exit.
Default:
150_000;
$LJ::SYND_CLUSTER
Syndicated accounts tend to have more database traffic than normal accounts, so it is a good idea to set up a separate cluster for them. If set to a cluster (defined by @LJ::CLUSTERS), all newly created accounts will reside on that cluster. If undefined, syndicated accounts are assigned
to user clusters (partitions) in the normal way.
$LJ::SYNSUCK_MAX_SIZE
Maximum external feed size a syndicated account may pull in (in KB). Defaults to 300. Can be overridden for individual syndicated accounts by giving them the siteadmin:largefeedsize priv.
Default:
300;
$LJ::TOOLS_RECENT_COMMENTS_MAX
Maximum number of comments to display on Recent Comments page /tools/recent_comments.bml.
Default:
50;
Policy Options
$LJ::COPPA_CHECK
Collect birthdays to mark users as underage (under 13). To make this work, you first need to create a new capability class for
underage users. Then, set $LJ::UNDERAGE_BIT to be the bit number for the cap class to put underage users in. Off by default.
$LJ::NO_PASSWORD_CHECK
Set this option true if you are running an installation using ljcom code and if you haven't installed the Crypt::Cracklib perl module. When enabled, the installation will not do strong password checks. Users can use any old dumb password they like.
%LJ::REQUIRED_TOS
Require users to agree to the TOS. The array items, respectively, allow you to: Set required version to enable tos version requirement mechanism, and change the messages displayed to users. The configurable title/html/text group values displayed are defaults, and are used if no 'domain'-specific values are defined in the rest of the array. The remaining items refer to: text/HTML to use when message displayed for a login action, an update action, posting a comment (this will just use the defaults above), protocol actions, and last, support requests. The revision must be found in the first line of your include file. $/htdocs/inc/legal-tosLJHOME
<!-- $Revision$ -->
Example:
(
rev => '1.0',
title => 'Configurable Title for TOS agreement requirement notice',
html => 'Configurable HTML for TOS requirement',
text => 'Configurable text error message for TOS requirement',
login => {
html => 'Before logging in, you must update your TOS agreement',
},
update => {
html => 'HTML to use in update.bml',
},
comment => {
},
protocol => {
text => 'Please visit $LJ::SITEROOT/legal/tos.bml to update your TOS agreement',
},
support => {
html => 'Text to use when viewing a support request',
},
);$LJ::TOS_CHECK
If set, the account creation dialog shows a checkbox, asking users if they agree to the site Terms of Service, and will not allow them to create an account if they refuse. This depends on a few files being located in the proper directories, namely tos.bml and tos-mini.bml under . The account creation dialog can also check for new instances of the Terms of Service if the Terms of Service text is located in an SVN managed include file ($/htdocs/legalLJHOME), and if the include file includes the following line at the top: $/htdocs/inc/legal-tosLJHOME
<!-- $Revision$ -->
$LJ::UNDERAGE_BIT
Used in conjunction with $LJ::COPPA_CHECK.
$LJ::UNDERAGE_ERROR
Error message to show underage users.
Default:
Sorry, your account needs to be <a href='$SITEROOT/agecheck/'>age verified</> before you can leave any comments.;
$LJ::USE_ACCT_CODES
A boolean setting that makes joining the site require an “invite code” before being able to create a new account. Not all features are implemented in the livejournal-only tree. LiveJournal.com used this for a period until late 2003. Note that this code might've bitrotted, so perhaps it should be kept off.
Portal Configuration
@LJ::PORTAL_BOXES
The default portal boxes ('portlets') a user will see.
Default:
(
'Birthdays',
'UpdateJournal',
'TextMessage',
'PopWithFriends',
'Friends',
'Manage',
'RecentComments',
'NewUser',
'FriendsPage',
'FAQ',
'Debug',
'Note',
'RandomUser',
'Tags',
'Reader',
);@LJ::PORTAL_BOXES_HIDDEN
A list of boxes that do not appear to users, by default.
Default:
('Debug',
);%LJ::PORTAL_DEFAULTBOXSTATES
The default sizes and positions of the boxes.
Default:
(
'Birthdays' => {
'added' => 1,
'sort' => 4,
'col' => 'R',
},
'FriendsPage' => {
'added' => 1,
'sort' => 6,
'col' => 'L',
},
'FAQ' => {
'added' => 1,
'sort' => 8,
'col' => 'R',
},
'Friends' => {
'added' => 1,
'sort' => 10,
'col' => 'R',
},
'Manage' => {
'added' => 1,
'sort' => 12,
'col' => 'L',
},
'PopWithFriends' => {
'added' => 0,
'col' => 'R',
},
'RecentComments' => {
'added' => 1,
'sort' => 10,
'col' => 'L',
},
'UpdateJournal' => {
'added' => 1,
'sort' => 4,
'col' => 'L',
},
'NewUser' => {
'added' => 1,
'sort' => 2,
'col' => 'L',
},
'TextMessage' => {
'added' => 1,
'sort' => 12,
'col' => 'R',
},
'Note' => {
'notunique' => 1,
},
'Reader' => {
'notunique' => 1,
},
);Styling Related
$LJ::DEFAULT_STYLE
A hash that defines the default S2 layers to use for accounts. Keys are layer types, values are the S2 redist_uniqs.
Example:
{
'core' => 'core1',
'i18nc' => 'i18nc/en1',
'layout' => 'generator/layout',
'theme' => 'generator/nautical',
'i18n' => 'generator/en',
};Default:
{
'core' => 'core1',
'layout' => 'generator/layout',
'i18n' => 'generator/en',
};$LJ::DONT_TOUCH_STYLES
During the upgrade populator, do not touch styles. That is, consider the local styles the definitive ones, and any differences between the database and the distribution files should mean that the distribution is old, not the database.
$LJ::MAX_FRIENDS_VIEW_AGE
Sets how far back somebody can go on a user's Friends page, including their own. The default value is two weeks. That is, entries posted more than two weeks ago will not appear on anybody's Friends page, even if they are the most recent entries in that user's journal. See also $LJ::MAX_SCROLLBACK_FRIENDS.
Default:
3600*24*14;
$LJ::MAX_SCROLLBACK_FRIENDS
Sets how far back somebody can go on a user's Friends page. That is, how far you can skip back with the ?skip= URL argument. A higher value can significantly affect the speed of the installation.
Default:
1000
$LJ::MAX_SCROLLBACK_LASTN
The recent items (lastn view)'s max scrollback depth. That is, how far you can skip back with the ?skip= URL argument. Defaults to 100. After that, the 'previous' links go to day views, which are stable URLs. ?skip= URLs aren't stable, and there are inefficiencies making this value too large, so you're advised to not go too far above the default of 100.
Default:
100
$LJ::MINIMAL_BML_SCHEME
Used with %LJ::MINIMAL_USERAGENT.
Example:
'lynx';
%LJ::MINIMAL_STYLE
In the example, the default S2 bare style (usually it is 'core', but it is site-configurable) is used. You can add more layers and styles, which must be public styles. Used with %LJ::MINIMAL_USERAGENT.
Example:
(
'core' => 'core1',
);%LJ::MINIMAL_USERAGENT
Some people on portable devices may have troubles viewing the nice site scheme you've setup, so you can specify that some user-agent prefixes should instead use fallback presentation information. In the example below, the fallback enables if the user-agent field starts with “Foo”. Note you can only put text here; no numbers, spaces, or symbols. The “w” in the defaults refers to w3m.
Example:
(
'Foo' => 1,
);Default:
(
'Links' => 1,
'Lynx' => 1,
'w' => 1,
'BlackBerry' => 1,
'WebTV' => 1,
);%LJ::S2_TRUSTED
Allows a specific user's S2 layers to run JavaScript. This is normally considered a potential security risk and disabled for all accounts. The hash structure is a series of userid => username pairs. The system account is trusted by default, so it is not necessary to add it to this hash.
Example:
( '2' => 'exampleusername', '3' => 'test', );
$LJ::SYN_LASTN_S1
When set to an appropriate LASTN style, all syndicated accounts on this installation will use this style.
$LJ::USE_CONTROL_STRIP
Enable the navigation strip onsite. This gives users quick access to common site features from a toolbar at the top of journal Recent Entries and Friends pages, when the journal style supports it.
System Tools
$LJ::BIN_FESTIVAL
Path to festival (available in the Debian package “festival”). Needed for audio CAPTCHAs.
$LJ::BIN_SOX
Path to sox (available in the Debian package “sox”). Needed for audio CAPTCHAs.
@LJ::DMTP_SERVER
Host/IP with port number to outgoing DMTP server. Takes precedence over $LJ::SMTP_SERVER. Note: the DMTP (Danga Mail Transfer Protocol)
protocol and server is a dumb hack. If you have a good outgoing SMTP server, use that instead.
Example:
127.0.0.1:8030
$LJ::LJMAINT_VERBOSE
Use verbose output during maintenance tasks, like parsing for syndicated feed accounts. Values are one of 0=quiet, 1=normal, 2=verbose. If you only run maintenance tasks using cron, modify your crontabs accordingly if you enable this. For example,
if you re-direct standard output to /dev/null (using >/dev/null), change that part of the cron job line to direct the verbose output to a file, or remove the redirect so cron falls back to the default, where cron jobs generate an e-mail to the user executing the command.
Default:
1
$LJ::LOCKDIR
A directory to use for lock files if you're not using ddlockd for locking. Using ddlockd, the default lockdir is .$/locksLJHOME
Example:
/var/lock/livejournal
$LJ::LOG_GTOP
Turn on statistics generation that shows memory/cpu usage deltas of the Apache child for each request, for database logs. It requires that the GTop module be installed.
$LJ::SMTP_SERVER
Host/IP to outgoing SMTP server. Takes precedence over $LJ::SENDMAIL. This the recommended system to use for sending e-mail.
Example:
127.0.0.1
$LJ::SPELLER
The system path to a spell checking binary, along with any necessary parameters.
Example:
"/usr/bin/aspell pipe --sug-mode=fast --ignore-case"