368 lines
16 KiB
Perl
368 lines
16 KiB
Perl
|
|
{
|
||
|
|
|
||
|
|
package LJ;
|
||
|
|
|
||
|
|
# keep this enabled only if this site is a development server
|
||
|
|
$IS_DEV_SERVER = 1;
|
||
|
|
|
||
|
|
## TEST DATABASE ##
|
||
|
|
%DBINFO = (
|
||
|
|
'master' => {
|
||
|
|
'host' => "localhost",
|
||
|
|
'port' => 3306,
|
||
|
|
'user' => $DW::PRIVATE::DBINFO{master}->{user},
|
||
|
|
'pass' => $DW::PRIVATE::DBINFO{master}->{pass},
|
||
|
|
'dbname' => $DW::PRIVATE::DBINFO{master}->{dbname},
|
||
|
|
'role' => {
|
||
|
|
slow => 1,
|
||
|
|
},
|
||
|
|
},
|
||
|
|
'c01' => {
|
||
|
|
'host' => "localhost",
|
||
|
|
'port' => 3306,
|
||
|
|
'user' => $DW::PRIVATE::DBINFO{c01}->{user},
|
||
|
|
'pass' => $DW::PRIVATE::DBINFO{c01}->{pass},
|
||
|
|
'dbname' => $DW::PRIVATE::DBINFO{c01}->{dbname},
|
||
|
|
'role' => {
|
||
|
|
'cluster1' => 1,
|
||
|
|
},
|
||
|
|
},
|
||
|
|
|
||
|
|
'c02' => {
|
||
|
|
'host' => "localhost",
|
||
|
|
'port' => 3306,
|
||
|
|
'user' => $DW::PRIVATE::DBINFO{c02}->{user},
|
||
|
|
'pass' => $DW::PRIVATE::DBINFO{c02}->{pass},
|
||
|
|
'dbname' => $DW::PRIVATE::DBINFO{c02}->{dbname},
|
||
|
|
'role' => {
|
||
|
|
'cluster2' => 1,
|
||
|
|
},
|
||
|
|
},
|
||
|
|
);
|
||
|
|
|
||
|
|
@LANGS = qw( en );
|
||
|
|
@CLUSTERS = ( 1, 2 ); # eg: (1, 2, 3) (for scalability)
|
||
|
|
$DEFAULT_CLUSTER = [ 1, 2 ];
|
||
|
|
@THESCHWARTZ_DBS = (
|
||
|
|
{
|
||
|
|
dsn => "dbi:mysql:$DW::PRIVATE::DBINFO{theschwartz}->{dbname};host=localhost",
|
||
|
|
user => $DW::PRIVATE::DBINFO{theschwartz}->{user},
|
||
|
|
pass => $DW::PRIVATE::DBINFO{theschwartz}->{pass},
|
||
|
|
}
|
||
|
|
);
|
||
|
|
|
||
|
|
## CAPABILITIES ##
|
||
|
|
# capability class limits.
|
||
|
|
# keys are bit numbers, from 0 .. 15. values are hashrefs
|
||
|
|
# with limit names and values (see doc/capabilities.txt)
|
||
|
|
# 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 is %CAP_DEF, above.
|
||
|
|
%CAP = (
|
||
|
|
'0' => { # 0x01
|
||
|
|
'_name' => 'UNUSED',
|
||
|
|
'_key' => 'UNUSED',
|
||
|
|
},
|
||
|
|
'1' => { # 0x02
|
||
|
|
'_name' => 'Free',
|
||
|
|
'_visible_name' => 'Free Account',
|
||
|
|
'_key' => 'free_user',
|
||
|
|
'_account_type' => 'free',
|
||
|
|
'_account_default' => 1, # default account for payment system
|
||
|
|
'activeentries' => 0,
|
||
|
|
'bookmark_max' => 25,
|
||
|
|
'checkfriends' => 0,
|
||
|
|
'checkfriends_interval' => 0,
|
||
|
|
'directory' => 1,
|
||
|
|
'edit_comments' => 0,
|
||
|
|
'emailpost' => 0,
|
||
|
|
'findsim' => 0,
|
||
|
|
'friendsfriendsview' => 0,
|
||
|
|
'friendspage_per_day' => 0,
|
||
|
|
'friendsviewupdate' => 0,
|
||
|
|
'full_rss' => 1,
|
||
|
|
'getselfemail' => 0,
|
||
|
|
google_analytics => 0,
|
||
|
|
'inbox_max' => 2000,
|
||
|
|
'interests' => 150,
|
||
|
|
'makepoll' => 0,
|
||
|
|
'mass_privacy' => 0,
|
||
|
|
'maxfriends' => 1000,
|
||
|
|
'mod_queue' => 50,
|
||
|
|
'mod_queue_per_poster' => 3,
|
||
|
|
'moodthemecreate' => 0,
|
||
|
|
popsubscriptions => 0,
|
||
|
|
's2layersmax' => 0,
|
||
|
|
's2props' => 0,
|
||
|
|
's2styles' => 0,
|
||
|
|
's2stylesmax' => 0,
|
||
|
|
'security_filter' => 0,
|
||
|
|
'subscriptions' => 25,
|
||
|
|
'synd_create' => 1,
|
||
|
|
'tags_max' => 1000,
|
||
|
|
thread_expand_all => 0,
|
||
|
|
thread_expander => 0,
|
||
|
|
'tools_recent_comments_display' => 10,
|
||
|
|
'track_all_comments' => 0,
|
||
|
|
'track_defriended' => 0,
|
||
|
|
'track_pollvotes' => 0,
|
||
|
|
'track_thread' => 0,
|
||
|
|
'track_user_newuserpic' => 0,
|
||
|
|
'useremail' => 0,
|
||
|
|
'userlinks' => 10,
|
||
|
|
'usermessage_length' => 5000,
|
||
|
|
'userpics' => 6,
|
||
|
|
'userpicselect' => 0,
|
||
|
|
'viewmailqueue' => 0,
|
||
|
|
'xpost_accounts' => 1,
|
||
|
|
},
|
||
|
|
'2' => { # 0x04
|
||
|
|
'_name' => 'UNUSED2',
|
||
|
|
'_key' => 'UNUSED2',
|
||
|
|
},
|
||
|
|
'3' => { # 0x08
|
||
|
|
'_name' => 'Paid',
|
||
|
|
'_key' => 'paid_user', # Some things expect that key name
|
||
|
|
'_visible_name' => 'Paid Account',
|
||
|
|
'_account_type' => 'paid',
|
||
|
|
'activeentries' => 1,
|
||
|
|
'bookmark_max' => 500,
|
||
|
|
'checkfriends' => 1,
|
||
|
|
'checkfriends_interval' => 600,
|
||
|
|
'directory' => 1,
|
||
|
|
'edit_comments' => 1,
|
||
|
|
'emailpost' => 1,
|
||
|
|
'findsim' => 1,
|
||
|
|
'friendsfriendsview' => 1,
|
||
|
|
'friendspage_per_day' => 1,
|
||
|
|
'friendsviewupdate' => 1,
|
||
|
|
'full_rss' => 1,
|
||
|
|
'getselfemail' => 1,
|
||
|
|
google_analytics => 1,
|
||
|
|
'inbox_max' => 4000,
|
||
|
|
'interests' => 200,
|
||
|
|
'makepoll' => 1,
|
||
|
|
'mass_privacy' => 1,
|
||
|
|
'maxfriends' => 1500,
|
||
|
|
'mod_queue' => 100,
|
||
|
|
'mod_queue_per_poster' => 5,
|
||
|
|
'moodthemecreate' => 1,
|
||
|
|
popsubscriptions => 1,
|
||
|
|
's2layersmax' => 150,
|
||
|
|
's2props' => 1,
|
||
|
|
's2styles' => 1,
|
||
|
|
's2stylesmax' => 50,
|
||
|
|
'security_filter' => 1,
|
||
|
|
'subscriptions' => 500,
|
||
|
|
'synd_create' => 1,
|
||
|
|
'tags_max' => 1500,
|
||
|
|
thread_expand_all => 1,
|
||
|
|
thread_expander => 1,
|
||
|
|
'tools_recent_comments_display' => 100,
|
||
|
|
'track_all_comments' => 0,
|
||
|
|
'track_defriended' => 1,
|
||
|
|
'track_pollvotes' => 1,
|
||
|
|
'track_thread' => 1,
|
||
|
|
'track_user_newuserpic' => 1,
|
||
|
|
'useremail' => 1,
|
||
|
|
'userlinks' => 50,
|
||
|
|
'usermessage_length' => 10000,
|
||
|
|
'userpics' => 75,
|
||
|
|
'userpicselect' => 1,
|
||
|
|
'viewmailqueue' => 1,
|
||
|
|
'xpost_accounts' => 3,
|
||
|
|
'paid' => 1,
|
||
|
|
'fastserver' => 1,
|
||
|
|
},
|
||
|
|
'4' => { # 0x10
|
||
|
|
'_name' => 'Premium Paid',
|
||
|
|
'_key' => 'premium_user',
|
||
|
|
'_visible_name' => 'Premium Paid Account',
|
||
|
|
'_account_type' => 'premium',
|
||
|
|
'activeentries' => 1,
|
||
|
|
'bookmark_max' => 1000,
|
||
|
|
'checkfriends' => 1,
|
||
|
|
'checkfriends_interval' => 600,
|
||
|
|
'directory' => 1,
|
||
|
|
'edit_comments' => 1,
|
||
|
|
'emailpost' => 1,
|
||
|
|
'findsim' => 1,
|
||
|
|
'friendsfriendsview' => 1,
|
||
|
|
'friendspage_per_day' => 1,
|
||
|
|
'friendsviewupdate' => 1,
|
||
|
|
'full_rss' => 1,
|
||
|
|
'getselfemail' => 1,
|
||
|
|
google_analytics => 1,
|
||
|
|
'inbox_max' => 6000,
|
||
|
|
'interests' => 250,
|
||
|
|
'makepoll' => 1,
|
||
|
|
'mass_privacy' => 1,
|
||
|
|
'maxfriends' => 2000,
|
||
|
|
'mod_queue' => 100,
|
||
|
|
'mod_queue_per_poster' => 5,
|
||
|
|
'moodthemecreate' => 1,
|
||
|
|
popsubscriptions => 1,
|
||
|
|
's2layersmax' => 300,
|
||
|
|
's2props' => 1,
|
||
|
|
's2styles' => 1,
|
||
|
|
's2stylesmax' => 100,
|
||
|
|
'security_filter' => 1,
|
||
|
|
'subscriptions' => 1000,
|
||
|
|
'synd_create' => 1,
|
||
|
|
'tags_max' => 2000,
|
||
|
|
thread_expand_all => 1,
|
||
|
|
thread_expander => 1,
|
||
|
|
'tools_recent_comments_display' => 150,
|
||
|
|
'track_all_comments' => 1,
|
||
|
|
'track_defriended' => 1,
|
||
|
|
'track_pollvotes' => 1,
|
||
|
|
'track_thread' => 1,
|
||
|
|
'track_user_newuserpic' => 1,
|
||
|
|
'useremail' => 1,
|
||
|
|
'userlinks' => 50,
|
||
|
|
'usermessage_length' => 10000,
|
||
|
|
'userpics' => 150,
|
||
|
|
'userpicselect' => 1,
|
||
|
|
'viewmailqueue' => 1,
|
||
|
|
'xpost_accounts' => 5,
|
||
|
|
'paid' => 1,
|
||
|
|
'fastserver' => 1,
|
||
|
|
},
|
||
|
|
|
||
|
|
# a capability class with a name of "_moveinprogress" is required
|
||
|
|
# if you want to be able to move users between clusters with the
|
||
|
|
# provided tool. further, this class must define 'readonly' => 1
|
||
|
|
'5' => { # 0x20
|
||
|
|
'_name' => '_moveinprogress',
|
||
|
|
'readonly' => 1,
|
||
|
|
},
|
||
|
|
'6' => { # 0x40
|
||
|
|
'_name' => 'Permanent',
|
||
|
|
'_key' => 'permanent_user',
|
||
|
|
'_visible_name' => 'Seed Account',
|
||
|
|
'_account_type' => 'seed',
|
||
|
|
'activeentries' => 1,
|
||
|
|
'bookmark_max' => 1000,
|
||
|
|
'checkfriends' => 1,
|
||
|
|
'checkfriends_interval' => 600,
|
||
|
|
'directory' => 1,
|
||
|
|
'edit_comments' => 1,
|
||
|
|
'emailpost' => 1,
|
||
|
|
'findsim' => 1,
|
||
|
|
'friendsfriendsview' => 1,
|
||
|
|
'friendspage_per_day' => 1,
|
||
|
|
'friendsviewupdate' => 1,
|
||
|
|
'full_rss' => 1,
|
||
|
|
'getselfemail' => 1,
|
||
|
|
google_analytics => 1,
|
||
|
|
'inbox_max' => 6000,
|
||
|
|
'interests' => 250,
|
||
|
|
'makepoll' => 1,
|
||
|
|
'mass_privacy' => 1,
|
||
|
|
'maxfriends' => 2000,
|
||
|
|
'mod_queue' => 100,
|
||
|
|
'mod_queue_per_poster' => 5,
|
||
|
|
'moodthemecreate' => 1,
|
||
|
|
popsubscriptions => 1,
|
||
|
|
's2layersmax' => 300,
|
||
|
|
's2props' => 1,
|
||
|
|
's2styles' => 1,
|
||
|
|
's2stylesmax' => 100,
|
||
|
|
'security_filter' => 1,
|
||
|
|
'subscriptions' => 1000,
|
||
|
|
'synd_create' => 1,
|
||
|
|
'tags_max' => 2000,
|
||
|
|
thread_expand_all => 1,
|
||
|
|
thread_expander => 1,
|
||
|
|
'tools_recent_comments_display' => 150,
|
||
|
|
'track_all_comments' => 1,
|
||
|
|
'track_defriended' => 1,
|
||
|
|
'track_pollvotes' => 1,
|
||
|
|
'track_thread' => 1,
|
||
|
|
'track_user_newuserpic' => 1,
|
||
|
|
'useremail' => 1,
|
||
|
|
'userlinks' => 50,
|
||
|
|
'usermessage_length' => 10000,
|
||
|
|
'userpics' => 150,
|
||
|
|
'userpicselect' => 1,
|
||
|
|
'viewmailqueue' => 1,
|
||
|
|
'xpost_accounts' => 5,
|
||
|
|
'paid' => 1,
|
||
|
|
'fastserver' => 1,
|
||
|
|
},
|
||
|
|
'7' => { # 0x80
|
||
|
|
'_name' => 'Staff',
|
||
|
|
'_key' => 'staff',
|
||
|
|
'_visible_name' => 'Staff Account',
|
||
|
|
'activeentries' => 1,
|
||
|
|
'bookmark_max' => 1000,
|
||
|
|
'checkfriends' => 1,
|
||
|
|
'checkfriends_interval' => 600,
|
||
|
|
'directory' => 1,
|
||
|
|
'edit_comments' => 1,
|
||
|
|
'emailpost' => 1,
|
||
|
|
'findsim' => 1,
|
||
|
|
'friendsfriendsview' => 1,
|
||
|
|
'friendspage_per_day' => 1,
|
||
|
|
'friendsviewupdate' => 1,
|
||
|
|
'full_rss' => 1,
|
||
|
|
'getselfemail' => 1,
|
||
|
|
google_analytics => 1,
|
||
|
|
'inbox_max' => 6000,
|
||
|
|
'interests' => 250,
|
||
|
|
'makepoll' => 1,
|
||
|
|
'mass_privacy' => 1,
|
||
|
|
'maxfriends' => 2000,
|
||
|
|
'mod_queue' => 100,
|
||
|
|
'mod_queue_per_poster' => 5,
|
||
|
|
'moodthemecreate' => 1,
|
||
|
|
popsubscriptions => 1,
|
||
|
|
's2layersmax' => 300,
|
||
|
|
's2props' => 1,
|
||
|
|
's2styles' => 1,
|
||
|
|
's2stylesmax' => 100,
|
||
|
|
'security_filter' => 1,
|
||
|
|
'subscriptions' => 1000,
|
||
|
|
'synd_create' => 1,
|
||
|
|
'tags_max' => 2000,
|
||
|
|
thread_expand_all => 1,
|
||
|
|
thread_expander => 1,
|
||
|
|
'tools_recent_comments_display' => 150,
|
||
|
|
'track_all_comments' => 1,
|
||
|
|
'track_defriended' => 1,
|
||
|
|
'track_pollvotes' => 1,
|
||
|
|
'track_thread' => 1,
|
||
|
|
'track_user_newuserpic' => 1,
|
||
|
|
'useremail' => 1,
|
||
|
|
'userlinks' => 50,
|
||
|
|
'usermessage_length' => 10000,
|
||
|
|
'userpics' => 150,
|
||
|
|
'userpicselect' => 1,
|
||
|
|
'viewmailqueue' => 1,
|
||
|
|
'xpost_accounts' => 9,
|
||
|
|
'paid' => 1,
|
||
|
|
'fastserver' => 1,
|
||
|
|
'staff_headicon' => 1,
|
||
|
|
},
|
||
|
|
8 => { _name => 'beta', _key => 'betafeatures' }, # 0x100
|
||
|
|
);
|
||
|
|
|
||
|
|
# default capability class mask for new users:
|
||
|
|
# (16 bit unsigned int ... each bit is capability class flag)
|
||
|
|
$NEWUSER_CAPS = 2;
|
||
|
|
|
||
|
|
## MISC SETTINGS ##
|
||
|
|
$DOMAIN = "test.dw";
|
||
|
|
$USER_DOMAIN = $DOMAIN;
|
||
|
|
$EMAIL_POST_DOMAIN = "post.$DOMAIN";
|
||
|
|
$EMBED_MODULE_DOMAIN = "embed.dw";
|
||
|
|
|
||
|
|
$SITENAME = "DW Test Installation";
|
||
|
|
$SITENAME_SHORT = "DW Test";
|
||
|
|
$SITENAMEABBREV = "TST";
|
||
|
|
|
||
|
|
$BOGUS_EMAIL = "bogus\@$DOMAIN";
|
||
|
|
}
|
||
|
|
|
||
|
|
1;
|