'unix:///var/run/memcached.sock', 'port' => 0, 'buckets' => 1], ]); // Memcached prefix (if ever you need to run another namespace in the same // memcached instance). defined('CACHE_ID') or define('CACHE_ID', 'ops'); // ------------------------------------------------------------------------ // Executable (binaries) settings // // adjust paths as appropriate defined('BIN_COMPOSER') or define('BIN_COMPOSER', '/usr/local/bin/composer'); defined('BIN_GIT') or define('BIN_GIT', '/usr/bin/git'); defined('BIN_PHINX') or define('BIN_PHINX', realpath(__DIR__ . '/../vendor/bin/phinx')); defined('PHINX_MYSQL') or define('PHINX_MYSQL', realpath(__DIR__ . '/../phinx.php')); // ------------------------------------------------------------------------ // Local image caching settings // Is local image caching enabled? defined('IMAGE_CACHE_ENABLED') or define('IMAGE_CACHE_ENABLED', false); // When local image caching is enabled, this is used to define the cache names of assets defined('IMAGE_CACHE_SECRET') or define('IMAGE_CACHE_SECRET', 'changeme'); // When local image caching is enabled, this hostname is used. defined('IMAGE_CACHE_HOST') or define('IMAGE_CACHE_HOST', SITE_URL); // ------------------------------------------------------------------------ // Email settings // The DNS name (MX record) of your email hostname. defined('MAIL_HOST') or define('MAIL_HOST', 'mail.' . SITE_HOST); // Set to true in a development environment. Instead of delivery, messages // will be written to files in TMPDIR. defined('DEBUG_EMAIL') or define('DEBUG_EMAIL', false); // When you need to verify what arguments are in the request // Comes in handy for dynamic urls and DDoS attacks defined('DEBUG_URI') or define('DEBUG_URI', '/thisifine/'); defined('DEBUG_TRACE') or define('DEBUG_TRACE', ''); // ------------------------------------------------------------------------ // IRC settings defined('DISABLE_IRC') or define('DISABLE_IRC', false); defined('IRC_HOSTNAME') or define('IRC_HOSTNAME', 'irc.' . SITE_HOST); defined('IRC_PORT') or define('IRC_PORT', 7000); defined('IRC_BOT') or define('IRC_BOT', 'Rippy'); defined('IRC_HTTP_SOCKET_ADDRESS') or define('IRC_HTTP_SOCKET_ADDRESS', 'http://localhost:51011/'); // Main channel for registered users defined('IRC_CHAN') or define('IRC_CHAN', '#mygazelle'); // Channel announcing new uploads defined('IRC_CHAN_ANNOUNCE') or define('IRC_CHAN_ANNOUNCE', '#announce'); // Channel announcing new requests defined('IRC_CHAN_REQUEST') or define('IRC_CHAN_REQUEST', '#requests'); // Public channel for inactive users, login problems and similar defined('IRC_CHAN_BLOCKED') or define('IRC_CHAN_BLOCKED', '#blocked'); // Channel for general messages to staff defined('IRC_CHAN_STAFF') or define('IRC_CHAN_STAFF', '#staff'); // Channel for general messages to moderators (urgent reports) defined('IRC_CHAN_MOD') or define('IRC_CHAN_MOD', '#staff'); // Channel for messages that require attention on the backend (low-traffic) defined('IRC_CHAN_DEV') or define('IRC_CHAN_DEV', '#gazelle-lab'); // Channel for messages of unusual user activity (potentially high-traffic) defined('IRC_CHAN_STATUS ') or define('IRC_CHAN_STATUS', '#gazelle-status'); // ------------------------------------------------------------------------ // Push server settings // The ntfy server used to send push notifications defined('PUSH_SERVER_HOST') or define('PUSH_SERVER_HOST', ''); // The access token used to authenticate to the ntfy server defined('PUSH_SERVER_SECRET') or define('PUSH_SERVER_SECRET', 'changeme'); // The wiki page id for the push notifcation user guide defined('PUSH_SETTINGS_WIKI_PAGE_ID') or define('PUSH_SETTINGS_WIKI_PAGE_ID', 0); // ------------------------------------------------------------------------ // GeoIP server settings // The HTTP endpoint of the geoip service defined('GEOIP_SERVER') or define('GEOIP_SERVER', false); // Countries with less than this number of users is rounded up this value // for privacy, to avoid having countries with one user. defined('COUNTRY_MINIMUM') or define('COUNTRY_MINIMUM', 20); // Country membership numbers are rounded up to this amount defined('COUNTRY_STEP') or define('COUNTRY_STEP', 10); // ------------------------------------------------------------------------ // Site settings // Leaving these as is will work, but you will probably want to change them // either in development or production, or both. Any defines that are likely // to require a change will be listed in the example override files. // When in doubt, read the source. // Lowest visible userclass (there banished users below this of which we // shall not speak). These userclass levels must match the values in the // permissions table. defined('CLASSLEVEL_USER') or define('CLASSLEVEL_USER', 100); // The userclass level of the Member class (one up from User). defined('CLASSLEVEL_MEMBER') or define('CLASSLEVEL_MEMBER', 150); // The lowest userclass level of all staff classes. defined('CLASSLEVEL_STAFF') or define('CLASSLEVEL_STAFF', 800); // Display the site logo on the public pages. defined('SHOW_LOGO') or define('SHOW_LOGO', true); // How many enabled users are allowed? (Set to 0 for unlimited). defined('USER_LIMIT') or define('USER_LIMIT', 5000); // Logo to display on the MFA qrcode image defined('QRCODE_LOGO') or define('QRCODE_LOGO', __DIR__ . '/../public/android-chrome-192x192.png'); // How many days of inactivity (not logging in) before an account is deactivated? // NB: If you do not want to deactivate stale accounts, disable the inactive user tasks defined('INACTIVE_USER_DEACTIVATE_DAYS') or define('INACTIVE_USER_DEACTIVATE_DAYS', 120); // How many days before sending an email to warn of pending deactivation? defined('INACTIVE_USER_WARN_DAYS') or define('INACTIVE_USER_WARN_DAYS', INACTIVE_USER_DEACTIVATE_DAYS - 7); // Set to false if you want to display the login form directly. defined('SHOW_PUBLIC_INDEX') or define('SHOW_PUBLIC_INDEX', true); // Can J. Random User create their own account? defined('OPEN_REGISTRATION') or define('OPEN_REGISTRATION', false); // Can inactive users enable themselves automatically? defined('FEATURE_EMAIL_REENABLE') or define('FEATURE_EMAIL_REENABLE', false); // Refuse connections from Tor exit nodes? defined('BLOCK_TOR') or define('BLOCK_TOR', true); // Connect to remote resources with curl via a proxy defined('HTTP_PROXY') or define('HTTP_PROXY', false); // Block Opera Mini proxy? defined('BLOCK_OPERA_MINI') or define('BLOCK_OPERA_MINI', true); // Is the debug() function available in Twig? defined('DEBUG_TWIG') or define('DEBUG_TWIG', false); // Do upload notifications need to be traced? (Results written to TMPDIR) defined('DEBUG_UPLOAD_NOTIFICATION') or define('DEBUG_UPLOAD_NOTIFICATION', false); // Do contest payouts need to be tested? // Results are always written to TMPDIR/payout-contest-.txt // If true, no PMs sent to users, no db updates performed. defined('DEBUG_CONTEST_PAYOUT') or define('DEBUG_CONTEST_PAYOUT', false); // The cryptographic algorithm used to sign secrets. Switch to sha384 // or sha512 when machines become more powerful. defined('DIGEST_ALGO') or define('DIGEST_ALGO', 'sha256'); // The cryptographic algorithm used to hash passwords. Switch to sha384 // or sha512 when machines become more powerful. Changing after site // launch will break all user passwords. You must plan for a password // migration strategy. defined('PASSWORD_ALGO') or define('PASSWORD_ALGO', 'sha256'); // if false, no attempt will be made to contact the last.fm website. defined('LASTFM_API_KEY') or define('LASTFM_API_KEY', false); // Fake useragent (to override default cURL useragent string). defined('FAKE_USERAGENT') or define('FAKE_USERAGENT', 'Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.1 Safari/537.11'); // How long does an activated token last before it is purged? defined('FREELEECH_TOKEN_EXPIRY_DAYS') or define('FREELEECH_TOKEN_EXPIRY_DAYS', 30); // When setting torrent groups or collages freeleech, "large" torrents // can be set to neutral leech, to avoid tanking the economy. // Scale of the neutral leech threshold (k, m, g for KiB, MiB and TiB, respectively) defined('NEUTRAL_LEECH_UNIT') or define('NEUTRAL_LEECH_UNIT', 'm'); // Size of the the neutral leech threshold (in terms of the units specified above. defined('NEUTRAL_LEECH_THRESHOLD') or define('NEUTRAL_LEECH_THRESHOLD', 1024); // How much much extra download on ratio watch before leeching privileges // are suspended? defined('RATIO_GAMBLE') or define('RATIO_GAMBLE', 10 * 1024 ** 3); // 10 GiB // How much buffer does a request vote represent? defined('REQUEST_MIN') or define('REQUEST_MIN', 100); // in MiB // How much request buffer is removed as tax? (0 = none, 0.1 = 10%, 0.25 = 25% and so on). defined('REQUEST_TAX') or define('REQUEST_TAX', 0.0); // Retain this many days of hourly snapshots. defined('DELETE_USER_STATS_DAILY_DAY') or define('DELETE_USER_STATS_DAILY_DAY', 15); // Retain this many months of daily snapshots. defined('DELETE_USER_STATS_MONTHLY_DAY') or define('DELETE_USER_STATS_MONTHLY_DAY', 120); // Is the secure attribute set on cookies? defined('SECURE_COOKIE') or define('SECURE_COOKIE', true); // Can freeleech (FL) tokens be stacked? defined('STACKABLE_FREELEECH_TOKENS') or define('STACKABLE_FREELEECH_TOKENS', true); // How much upload buffer to members start out with? (3 GiB) defined('STARTING_UPLOAD') or define('STARTING_UPLOAD', 3 * 1024 * 1024 * 1024); // How many invites do new users receive? defined('STARTING_INVITES') or define('STARTING_INVITES', 0); // How many invites does a Donor receive? defined('DONOR_INVITES') or define('DONOR_INVITES', 2); // How much fiat currency is required to acquire a donor point defined('DONOR_RANK_PRICE') or define('DONOR_RANK_PRICE', 10); // Minimum permission.Level allowed to purchase invites. defined('MIN_INVITE_CLASS') or define('MIN_INVITE_CLASS', CLASSLEVEL_MEMBER); // Lowest permissions.Level of staff user classes defined('STAFF_LEVEL') or define('STAFF_LEVEL', 820); // Threshold for detecting duplicate IP addresses. defined('IP_OVERLAPS') or define('IP_OVERLAPS', 5); // Interval in seconds that determines when a new historical ip // address extends the current range, or a new range is appended // to the multirange. One week by default. defined('IP_HISTORY_NEW_INTERVAL') or define('IP_HISTORY_NEW_INTERVAL', 3600 * 24 * 7); // Maximum length of a pathname in torrent files and zip archives. defined('MAX_PATH_LEN') or define('MAX_PATH_LEN', 200); // How far can users crawl the site logs? defined('MAX_LOG_DEPTH') or define('MAX_LOG_DEPTH', 10_000); // When do snatchers switch to possibly showing duplicate recent snatches on their profile? // See: User\Snatch\recentSnatchList() defined('FAST_LATEST_SNATCH_THRESHOLD') or define('FAST_LATEST_SNATCH_THRESHOLD', 10_000); // How many collages to list on a group page when it appears in many collages. defined('COLLAGE_SAMPLE_THRESHOLD') or define('COLLAGE_SAMPLE_THRESHOLD', 4); // How many personal collages to list on a group page when it appears in many collages. defined('PERSONAL_COLLAGE_SAMPLE_THRESHOLD') or define('PERSONAL_COLLAGE_SAMPLE_THRESHOLD', 4); // Number of groups an artist must have to be selected at random. defined('RANDOM_ARTIST_MIN_ENTRIES') or define('RANDOM_ARTIST_MIN_ENTRIES', 3); // Number of entries a collage must have to be selected at random. defined('RANDOM_COLLAGE_MIN_ENTRIES') or define('RANDOM_COLLAGE_MIN_ENTRIES', 5); // Number of seeds a torrent must have to be selected at random. defined('RANDOM_TORRENT_MIN_SEEDS') or define('RANDOM_TORRENT_MIN_SEEDS', 3); // How many torrents can a user delete before they must take a break? defined('USER_TORRENT_DELETE_MAX') or define('USER_TORRENT_DELETE_MAX', 3); // How long a break must a user take if they delete too many torrents? defined('USER_TORRENT_DELETE_HOURS') or define('USER_TORRENT_DELETE_HOURS', 24); // How many seconds should elapse before alerting that the scheduler is not running? // Hint: check the crond service defined('SCHEDULER_DELAY') or define('SCHEDULER_DELAY', 450); // How long before a stale announce is drained and a user is not longer considered // to be seeding a torrent defined('UNSEEDED_DRAIN_INTERVAL') or define('UNSEEDED_DRAIN_INTERVAL', 3600 * 6); // Which image hosts are acceptable and which aren't? defined('IMAGE_HOST_BANNED') or define('IMAGE_HOST_BANNED', []); defined('IMAGE_HOST_RECOMMENDED') or define('IMAGE_HOST_RECOMMENDED', []); // What are the relative weights of user percentiles, in order to calculate // the overall percentile rank. defined('RANKING_WEIGHT') or define('RANKING_WEIGHT', [ 'uploaded' => [10, 'DataUpload'], 'downloaded' => [25, 'DataDownload'], 'uploads' => [25, 'Uploads'], 'requests' => [15, 'RequestsFilled'], 'posts' => [ 6, 'ForumPosts'], 'bounty' => [ 4, 'BountySpent'], 'artists' => [ 2, 'ArtistsAdded'], 'collage-add' => [ 5, 'CollageContributed'], 'collage-create' => [ 8, 'CollageCreated'], 'votes' => [ 7, 'ReleaseVotes'], 'bonus' => [ 4, 'BonusPoints'], 'comment-t' => [16, 'CommentTorrent'], ]); // Successive login failures generate increasing delays. defined('LOGIN_ATTEMPT_BACKOFF') or define('LOGIN_ATTEMPT_BACKOFF', [ 0, 30, 90, 60 * 5, // 5 minutes 60 * 15, 3600 * 3, // 3 hours 3600 * 6, 86400, 86400 * 3, 86400 * 7, ]); // Login sleep time to prevent timing attacks defined('LOGIN_SLEEP_USEC') or define('LOGIN_SLEEP_USEC', 600000); // Releases and collages with these tags are hidden by default defined('HIDDEN_TAGS') or define('HIDDEN_TAGS', [0]); // Do not report these pages for excessive memory consumption defined('IGNORE_PAGE_MAX_MEMORY') or define('IGNORE_PAGE_MAX_MEMORY', ['artist', 'bookmark']); // Do not report these pages for being slow defined('IGNORE_PAGE_MAX_TIME') or define('IGNORE_PAGE_MAX_TIME', ['top10']); // How many days to wait until a never active torrent can be requested for reseed defined('RESEED_NEVER_ACTIVE_TORRENT') or define('RESEED_NEVER_ACTIVE_TORRENT', 3); // How many days to wait until a previously active torrent can be requested for reseed defined('RESEED_TORRENT') or define('RESEED_TORRENT', 14); // Where are the Twig templates found (relative to the root directory) defined('TEMPLATE_PATH') or define('TEMPLATE_PATH', 'templates/'); // ------------------------------------------------------------------------ // Inactivity reaper settings // // There are two types of reaping: uploads that are never announced by // the initial uploader (never seeded), and uploads that were seeded for // for a while and since then the size of the swarm has dropped to zero // (unseeded). To eliminate reaping completely, the corresponding // scheduled tasks should be disabled. // It is easier to specify the first and second unseeded notifications // in terms of the interval remaining until reaping. defined('MAX_NEVER_SEEDED_PER_RUN') or define('MAX_NEVER_SEEDED_PER_RUN', 4000); defined('REMOVE_NEVER_SEEDED_HOUR') or define('REMOVE_NEVER_SEEDED_HOUR', 72); defined('NOTIFY_NEVER_SEEDED_INITIAL_HOUR') or define('NOTIFY_NEVER_SEEDED_INITIAL_HOUR', 8); // 8 hours after upload defined('NOTIFY_NEVER_SEEDED_FINAL_HOUR') or define('NOTIFY_NEVER_SEEDED_FINAL_HOUR', REMOVE_NEVER_SEEDED_HOUR - 24); defined('MAX_UNSEEDED_PER_RUN') or define('MAX_UNSEEDED_PER_RUN', 4000); defined('REMOVE_UNSEEDED_HOUR') or define('REMOVE_UNSEEDED_HOUR', 24 * 30); // 30 days defined('NOTIFY_UNSEEDED_INITIAL_HOUR') or define('NOTIFY_UNSEEDED_INITIAL_HOUR', REMOVE_UNSEEDED_HOUR - (24 * 10)); // 10 days before defined('NOTIFY_UNSEEDED_FINAL_HOUR') or define('NOTIFY_UNSEEDED_FINAL_HOUR', REMOVE_UNSEEDED_HOUR - (24 * 3)); // 3 days before // There is a single task that handles the various phases of reaping. // In normal operations you want to perform all of the phases, but in certain // circumstances you might wish to suspend one phase or another. // If you think you need to suspend all the phases, disable the task in the // scheduler instead. // Award winners who have begun to seed unseeded uploads defined('REAPER_TASK_CLAIM') or define('REAPER_TASK_CLAIM', true); // Look for new never seeded or unseeded uploads to process defined('REAPER_TASK_NOTIFY') or define('REAPER_TASK_NOTIFY', true); // Reap any expired unseeded torrents defined('REAPER_TASK_REMOVE_UNSEEDED') or define('REAPER_TASK_REMOVE_UNSEEDED', true); // Reap any expired never seeded torrents defined('REAPER_TASK_REMOVE_NEVER_SEEDED') or define('REAPER_TASK_REMOVE_NEVER_SEEDED', true); // How many notifications can a user receive in a single message defined('NOTIFY_REAPER_MAX_PER_USER') or define('NOTIFY_REAPER_MAX_PER_USER', 200); // How many users will be notified in a single run? defined('NOTIFY_REAPER_MAX_NOTIFICATION') or define('NOTIFY_REAPER_MAX_NOTIFICATION', 2500); // How much is the BP reward scaled up for a reseed? defined('REAPER_RESEED_REWARD_FACTOR') or define('REAPER_RESEED_REWARD_FACTOR', 1.25); // ------------------------------------------------------------------------ // Source flag settings // Source flag for torrent files. Should be unique across the wider tracker // space to enable easy cross-seeding. defined('SOURCE_FLAG') or define('SOURCE_FLAG', 'OPS'); // Acceptable source flag from a prior site. defined('SOURCE_PREV_FLAG') or define('SOURCE_PREV_FLAG', ''); // Epoch time of cut-off for accepting grandfathered source flags. defined('SOURCE_FLAG_PREV_EPOCH') or define('SOURCE_FLAG_PREV_EPOCH', 0); // Epoch time of cut-off for accepting torrents with no source flags (useful if you // introduce source flags after launch). defined('SOURCE_FLAG_NONE_EPOCH') or define('SOURCE_FLAG_NONE_EPOCH', 0); // ------------------------------------------------------------------------ // Bonus point settings // Tax when donating to bonus pools. defined('BONUS_POOL_TAX_STD') or define('BONUS_POOL_TAX_STD', 0.9); defined('BONUS_POOL_TAX_ELITE') or define('BONUS_POOL_TAX_ELITE', 0.8); defined('BONUS_POOL_TAX_TM') or define('BONUS_POOL_TAX_TM', 0.7); defined('BONUS_POOL_TAX_STAFF') or define('BONUS_POOL_TAX_STAFF', 0.5); // ------------------------------------------------------------------------ // Pagination defined('BOOKMARKS_PER_PAGE') or define('BOOKMARKS_PER_PAGE', 20); defined('COLLAGES_PER_PAGE') or define('COLLAGES_PER_PAGE', 25); defined('CONTEST_ENTRIES_PER_PAGE') or define('CONTEST_ENTRIES_PER_PAGE', 50); defined('FRIENDS_PER_PAGE') or define('FRIENDS_PER_PAGE', 20); defined('INVITES_PER_PAGE') or define('INVITES_PER_PAGE', 50); defined('ITEMS_PER_PAGE') or define('ITEMS_PER_PAGE', 50); defined('IPS_PER_PAGE') or define('IPS_PER_PAGE', 50); defined('LOG_ENTRIES_PER_PAGE') or define('LOG_ENTRIES_PER_PAGE', 50); defined('MESSAGES_PER_PAGE') or define('MESSAGES_PER_PAGE', 25); defined('PEERS_PER_PAGE') or define('PEERS_PER_PAGE', 100); defined('POSTS_PER_PAGE') or define('POSTS_PER_PAGE', 25); defined('REPORTS_PER_PAGE') or define('REPORTS_PER_PAGE', 10); defined('REQUESTS_PER_PAGE') or define('REQUESTS_PER_PAGE', 25); defined('TOPICS_PER_PAGE') or define('TOPICS_PER_PAGE', 50); defined('TORRENTS_PER_PAGE') or define('TORRENTS_PER_PAGE', 50); defined('TORRENT_COMMENTS_PER_PAGE') or define('TORRENT_COMMENTS_PER_PAGE', 10); defined('USERS_PER_PAGE') or define('USERS_PER_PAGE', 50); defined('WIKI_ARTICLES_PER_PAGE') or define('WIKI_ARTICLES_PER_PAGE', 25); defined('AJAX_USERS_PER_PAGE') or define('AJAX_USERS_PER_PAGE', 30); // ------------------------------------------------------------------------ // User Referral settings // Can people from approved trackers create their own account? defined('OPEN_EXTERNAL_REFERRALS') or define('OPEN_EXTERNAL_REFERRALS', false); // Where to forward cURL queries for referrals (URL with trailiing slash). defined('REFERRAL_BOUNCER') or define('REFERRAL_BOUNCER', ''); // Symmetric encryption key for bouncer communication. defined('REFERRAL_KEY') or define('REFERRAL_KEY', hash('sha512', 'sekret')); // Should referrals send invitation emails. defined('REFERRAL_SEND_EMAIL') or define('REFERRAL_SEND_EMAIL', false); // Code names of referral sites (must match the db). defined('REFERRAL_SITES') or define('REFERRAL_SITES', ['ABC', 'DEF']); // ------------------------------------------------------------------------ // Recovery settings // Is recovery open? defined('RECOVERY') or define('RECOVERY', false); // Is buffer from the previous site restituted to recovered users? defined('RECOVERY_BUFFER') or define('RECOVERY_BUFFER', false); // Random salt for generating temporary filenames defined('RECOVERY_SALT') or define('RECOVERY_SALT', 'changeme'); // Where are uploads for recovery proof stored? defined('RECOVERY_PATH') or define('RECOVERY_PATH', ''); // In which database schema are the users of the previous site stored? defined('RECOVERY_DB') or define('RECOVERY_DB', ''); // Which table stores the old/new user mappings? defined('RECOVERY_MAPPING_TABLE') or define('RECOVERY_MAPPING_TABLE', 'users_' . RECOVERY_DB . '_mapping'); // Which table stores proof about prior IRC users? defined('RECOVERY_IRC_TABLE') or define('RECOVERY_IRC_TABLE', 'users_' . RECOVERY_DB . '_irc'); // Are recovery requests that validate correctly automatically accepted? defined('RECOVERY_AUTOVALIDATE') or define('RECOVERY_AUTOVALIDATE', true); // How many validations are performed per scheduled run? defined('RECOVERY_AUTOVALIDATE_LIMIT') or define('RECOVERY_AUTOVALIDATE_LIMIT', 20); // Which user issues recovery invites? defined('RECOVERY_ADMIN_ID') or define('RECOVERY_ADMIN_ID', SYSTEM_USER_ID); // What name is given to the recovery inviter? defined('RECOVERY_ADMIN_NAME') or define('RECOVERY_ADMIN_NAME', 'RecoveryBot'); // How many pending people can be reassigned buffer in a single run? defined('RECOVERY_BUFFER_REASSIGN_LIMIT') or define('RECOVERY_BUFFER_REASSIGN_LIMIT', 100); // Security check to prevent
stuffing defined('RECOVERY_PAIR_SALT') or define('RECOVERY_PAIR_SALT', 'changeme'); // ------------------------------------------------------------------------ // Permission.ID labels // Permission ID of primary class. defined('USER') or define('USER', 2); defined('MEMBER') or define('MEMBER', 3); defined('POWER') or define('POWER', 4); defined('ELITE') or define('ELITE', 5); defined('TORRENT_MASTER') or define('TORRENT_MASTER', 25); defined('POWER_TM') or define('POWER_TM', 29); defined('ELITE_TM') or define('ELITE_TM', 28); defined('ULTIMATE_TM') or define('ULTIMATE_TM', 48); defined('FORUM_MOD') or define('FORUM_MOD', 21); defined('MOD') or define('MOD', 11); defined('SYSOP') or define('SYSOP', 15); // When adding a new privilege userclasses, care must be taken to // ensure all classes beyond the initial class receive it. The // Privileges Audit page is configured entirely by this definition. defined('USERCLASS_AUDIT') or define('USERCLASS_AUDIT', [ [ 'heading' => 'User classes', 'compare' => [USER, MEMBER, POWER, ELITE, TORRENT_MASTER, POWER_TM, ELITE_TM], ], [ 'heading' => 'Staff classes', 'compare' => [FORUM_MOD, MOD, SYSOP], ], ] ); // Permission ID of secondary class. defined('DONOR') or define('DONOR', 42); defined('FLS_TEAM') or define('FLS_TEAM', 23); defined('INTERVIEWER') or define('INTERVIEWER', 30); defined('RECRUITER') or define('RECRUITER', 41); defined('VIP') or define('VIP', 26); // ------------------------------------------------------------------------ // Well-known forum settings // The secret Donor forum. defined('DONOR_FORUM') or define('DONOR_FORUM', 70); // Where Announcements are sent. defined('ANNOUNCEMENT_FORUM_ID') or define('ANNOUNCEMENT_FORUM_ID', 12); // Where Edit Requests are sent. defined('EDITING_FORUM_ID') or define('EDITING_FORUM_ID', 34); // Staff forum (for polls that display the names of voters). defined('STAFF_FORUM_ID') or define('STAFF_FORUM_ID', 5); // Forums where voter names are revealed. defined('FORUM_REVEAL_VOTE') or define('FORUM_REVEAL_VOTE', []); // Where trashed threads go. defined('TRASH_FORUM_ID') or define('TRASH_FORUM_ID', 4); // The Album of the Month (AotM) forum. This is the Announcement forum // by default, but you might want to have a dedicated forum for this. defined('AOTM_FORUM_ID') or define('AOTM_FORUM_ID', 12); // The Showcase (Vanity House) forum. defined('SHOWCASE_FORUM_ID') or define('SHOWCASE_FORUM_ID', 18); // The client whitelist suggestion forum. defined('CLIENT_WHITELIST_FORUM_ID') or define('CLIENT_WHITELIST_FORUM_ID', 680); // The invitations forum. defined('INVITATION_FORUM_ID') or define('INVITATION_FORUM_ID', 39); // Number of thread posts per cache key. defined('THREAD_CATALOGUE') or define('THREAD_CATALOGUE', 500); // ------------------------------------------------------------------------ // Well-known Wiki pages // The index page (to prevent it from ever being deleted). defined('INDEX_WIKI_PAGE_ID') or define('INDEX_WIKI_PAGE_ID', 1); // The rules page. defined('RULES_WIKI_PAGE_ID') or define('RULES_WIKI_PAGE_ID', 127); // Information about Source Flags. defined('SOURCE_FLAG_WIKI_PAGE_ID') or define('SOURCE_FLAG_WIKI_PAGE_ID', 113); // ------------------------------------------------------------------------ // None of the settings below here should need to be changed. They are here // simply to not have them in the code, either because they are magic // numbers or they are used in more than place. Any changes here will most // likely require a corresonding change in the code or stylesheets. // ------------------------------------------------------------------------ // Maximum length of a custom user title. defined('USER_TITLE_LENGTH') or define('USER_TITLE_LENGTH', 1024); // Default image for user avatars. defined('USER_DEFAULT_AVATAR') or define('USER_DEFAULT_AVATAR', STATIC_SERVER . '/common/avatars/default.png'); // Magic constant of locked accounts. defined('STAFF_LOCKED') or define('STAFF_LOCKED', 1); // Width of avatars (as displayed in forums and profile page). defined('AVATAR_WIDTH') or define('AVATAR_WIDTH', 150); // Width of similar artists map. defined('SIMILAR_WIDTH') or define('SIMILAR_WIDTH', 720); // Height of similar artists map. defined('SIMILAR_HEIGHT') or define('SIMILAR_HEIGHT', 500); // Number of columns in the official tags toolbox defined('TAG_OFFICIAL_COLUMNS') or define('TAG_OFFICIAL_COLUMNS', 4); // The files of a torrent are squished into a single field in the database, // delimited by this character defined('FILELIST_DELIM') or define('FILELIST_DELIM', "\xC3\xB7"); // If there is an endpoint that should never be called any more // they may be listed here. The session will be logged out. defined('OBSOLETE_ENDPOINTS') or define('OBSOLETE_ENDPOINTS', []); // ------------------------------------------------------------------------ // Upload configuration // The name of the primary media this tracker focuses on (audio, movie, comics, ...) defined('PRIMARY_MEDIA') or define('PRIMARY_MEDIA', 'audio'); // Define the primary media extensions the site in interested in. // This is used to indicate torrents containing large amounts of "uninteresting" content. defined('PRIMARY_EXT_REGEXP') or define('PRIMARY_EXT_REGEXP', '(?:a(?:ac|c3)|d(?:[fs]f|ts)|flac|m(?:4a|p3))'); // Upload categories. defined('CATEGORY') or define('CATEGORY', [ 'Music', 'Applications', 'E-Books', 'Audiobooks', 'E-Learning Videos', 'Comedy', 'Comics' ]); defined('CATEGORY_GROUPED') or define('CATEGORY_GROUPED', array_intersect(['Music'], CATEGORY)); defined('CATEGORY_EBOOK') or define('CATEGORY_EBOOK', 3); defined('CATEGORY_MUSIC') or define('CATEGORY_MUSIC', 1); // Icons of upload categories. defined('CATEGORY_ICON') or define('CATEGORY_ICON', [ 'music.png', 'apps.png', 'ebook.png', 'audiobook.png', 'elearning.png', 'comedy.png', 'comics.png' ]); // Allowed upload encodings. defined('ENCODING') or define('ENCODING', [ 'Lossless', '24bit Lossless', 'V0 (VBR)', 'V1 (VBR)', 'V2 (VBR)', '320', '256', '192', '160', '128', '96', '64', 'APS (VBR)', 'APX (VBR)', 'q8.x (VBR)', 'Other' ]); // Allowed upload formats. defined('FORMAT') or define('FORMAT', [ 'MP3', 'FLAC', 'Ogg Vorbis', 'AAC', 'AC3', 'DTS' ]); // Allowed upload media. defined('MEDIA') or define('MEDIA', [ 'CD', 'WEB', 'Vinyl', 'DVD', 'BD', 'Soundboard', 'SACD', 'DAT', 'Cassette', ]); // For audio uploads, files with these names will not be decoded defined('IGNORE_AUDIO_LOGFILE') or define('IGNORE_AUDIO_LOGFILE', ['audiochecker.log', 'sox.log']); // ------------------------------------------------------------------------ // Paranoia // Magic constants for paranoia. defined('PARANOIA_HIDE') or define('PARANOIA_HIDE', 0); defined('PARANOIA_ALLOWED') or define('PARANOIA_ALLOWED', 1); defined('PARANOIA_OVERRIDDEN') or define('PARANOIA_OVERRIDDEN', 2); // What permissions allow a viewer to override a user's paranoia? defined('PARANOIA_OVERRIDE') or define('PARANOIA_OVERRIDE', [ 'downloaded' => 'users_mod', 'uploaded' => 'users_mod', 'lastseen' => 'view_last_seen', 'ratio' => 'users_mod', 'requiredratio' => 'users_mod', 'hide_donor_heart' => 'users_mod', 'bonuspoints' => 'admin_bp_history', 'torrentcomments' => 'site_moderate_forums', 'invitedcount' => 'users_view_invites', 'snatched' => 'users_view_torrents_snatchlist', 'snatched+' => 'users_view_torrents_snatchlist', 'leeching' => 'users_view_seedleech', 'leeching+' => 'users_view_seedleech', 'seeding' => 'users_view_seedleech', 'seeding+' => 'users_view_seedleech', 'uploads' => 'users_view_seedleech', 'uploads+' => 'users_view_seedleech', ]); // ------------------------------------------------------------------------ // Artist configuration defined('ARTIST_MAIN') or define('ARTIST_MAIN', 1); defined('ARTIST_GUEST') or define('ARTIST_GUEST', 2); defined('ARTIST_REMIXER') or define('ARTIST_REMIXER', 3); defined('ARTIST_COMPOSER') or define('ARTIST_COMPOSER', 4); defined('ARTIST_CONDUCTOR') or define('ARTIST_CONDUCTOR', 5); defined('ARTIST_DJ') or define('ARTIST_DJ', 6); defined('ARTIST_PRODUCER') or define('ARTIST_PRODUCER', 7); defined('ARTIST_ARRANGER') or define('ARTIST_ARRANGER', 8); defined('ARTIST_TYPE') or define('ARTIST_TYPE', [ ARTIST_MAIN => 'Main', ARTIST_GUEST => 'Guest', ARTIST_REMIXER => 'Remixer', ARTIST_COMPOSER => 'Composer', ARTIST_CONDUCTOR => 'Conductor', ARTIST_DJ => 'DJ/Compiler', ARTIST_PRODUCER => 'Producer', ARTIST_ARRANGER => 'Arranger', ]); defined('ARTIST_SECTION_ARRANGER') or define('ARTIST_SECTION_ARRANGER', 1020); defined('ARTIST_SECTION_PRODUCER') or define('ARTIST_SECTION_PRODUCER', 1021); defined('ARTIST_SECTION_COMPOSER') or define('ARTIST_SECTION_COMPOSER', 1022); defined('ARTIST_SECTION_REMIXER') or define('ARTIST_SECTION_REMIXER', 1023); defined('ARTIST_SECTION_GUEST') or define('ARTIST_SECTION_GUEST', 1024); // ------------------------------------------------------------------------ // Collage configuration defined('COLLAGE') or define('COLLAGE', [ 0 => 'Personal', 1 => 'Theme', 2 => 'Genre Introduction', 3 => 'Discography', 4 => 'Label', 5 => 'Staff picks', 6 => 'Charts', 7 => 'Artists', 8 => 'Awards', 9 => 'Series', ]); defined('COLLAGE_PERSONAL_ID') or define('COLLAGE_PERSONAL_ID', 0); defined('COLLAGE_ARTISTS_ID') or define('COLLAGE_ARTISTS_ID', 7); // ------------------------------------------------------------------------ // Donor configuration. Any changes here will need to be reflected in the // wiki documentation. defined('RANK_ONE_COST') or define('RANK_ONE_COST', 5); defined('RANK_TWO_COST') or define('RANK_TWO_COST', 10); defined('RANK_THREE_COST') or define('RANK_THREE_COST', 15); defined('RANK_FOUR_COST') or define('RANK_FOUR_COST', 20); defined('RANK_FIVE_COST') or define('RANK_FIVE_COST', 30); defined('MAX_RANK') or define('MAX_RANK', 6); defined('MAX_EXTRA_RANK') or define('MAX_EXTRA_RANK', 8); defined('DONOR_FORUM_RANK') or define('DONOR_FORUM_RANK', 6); defined('MAX_SPECIAL_RANK') or define('MAX_SPECIAL_RANK', 3); // ------------------------------------------------------------------------ // Cache settings // Grant cache access to specific keys based on site permission defined('CACHE_PERMISSION') or define('CACHE_PERMISSION', [ 'api_apps' => 'site_debug', 'catalogue' => 'site_debug', ]); defined('CACHE_BULK_FLUSH') or define('CACHE_BULK_FLUSH', 500); defined('CACHE_RESPONSE') or define('CACHE_RESPONSE', [ 0 => 'success', 1 => 'failure/delete ok', 16 => 'not found', ]); defined('CACHE_DB') or define('CACHE_DB', [ 'artist' => ['table' => 'artists_group', 'pk' => 'ArtistID'], 'collage' => ['table' => 'collages', 'pk' => 'ID'], 'torrent' => ['table' => 'torrents', 'pk' => 'ID'], 'torrent-group' => ['table' => 'torrents_group', 'pk' => 'ID'], 'user' => ['table' => 'users_main', 'pk' => 'ID'], ]); defined('CACHE_NAMESPACE') or define('CACHE_NAMESPACE', [ 'artist' => [ 'a1' => 'artist_%d', 'a2' => 'artist_comments_%d', 'a3' => 'artist_comments_%d_catalogue_0', 'a5' => 'artists_collages_%d', 'a6' => 'artists_requests_%d', 'a7' => 'similar_positions_%d', ], 'collage' => [ 'c1' => 'collage_%d', 'c2' => 'collage_display_%d', 'c3' => 'collage_subs_user_%d', 'c4' => 'collage_subs_user_new_%d', ], 'torrent-group' => [ 'g1' => 'torrents_collages_%d', 'g2' => 'torrent_collages_personal_%d', 'g3' => 'torrents_cover_art_%d', 'g5' => 'torrent_group_%d', 'g6' => 'torrent_group_light_%d', 'g7' => 'groups_artists_%d', 'g8' => 'tg2_%d', 'g9' => 'tlist_%d', ], 'torrent' => [ 't1' => 't3_%d', ], 'user' => [ 'u1' => 'bookmarks_group_ids_%d', 'u2' => 'donor_info_%d', 'u3' => 'inbox_new_%d', 'u4' => 'u_%d', 'u5' => 'user_info_%d', 'u6' => 'user_info_heavy_%d', 'u7' => 'user_stats_%d', 'u8' => 'user_statgraphs_%d', 'u9' => 'user_tokens_%d', ], ]); // ------------------------------------------------------------------------ // Common regexp patterns defined('IP_REGEXP_STEM') or define('IP_REGEXP_STEM', '(?:\b25[0-5]|\b2[0-4][0-9]|\b[01]?[0-9][0-9]?)(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}'); defined('IP_REGEXP') or define('IP_REGEXP', '/' . IP_REGEXP_STEM . '/'); defined('URL_REGEXP_STEM') or define('URL_REGEXP_STEM', '(https?:\/\/(?:' . IP_REGEXP_STEM . '|localhost|(?:[\w-]+(?:\.[\w-]+)+))(?::\d{1,5})?(?:\/\S*))'); defined('URL_REGEXP') or define('URL_REGEXP', '/^' . URL_REGEXP_STEM . '$/i'); defined('CSS_REGEXP') or define('CSS_REGEXP', '/^' . URL_REGEXP_STEM . '\.css(?:\?\S*)?$/i'); defined('IMAGE_REGEXP') or define('IMAGE_REGEXP', '/\b(' . URL_REGEXP_STEM . '\.(?:gif|png|webm|jpe?g|tiff?)(\?\S*)?)\b/i'); defined('SITELINK_REGEXP') or define('SITELINK_REGEXP', '(?:' . preg_quote(SITE_URL, '/') . '|' . preg_quote(ALT_SITE_URL, '/') . ')'); defined('ARTIST_REGEXP') or define('ARTIST_REGEXP', '/^' . SITELINK_REGEXP . '\/artist\.php\?.*?\bid=(?P\d+)$/'); defined('COLLAGE_REGEXP') or define('COLLAGE_REGEXP', '/^' . SITELINK_REGEXP . '\/collages\.php\?.*?\bid=(?P\d+)\b/'); defined('TGROUP_REGEXP') or define('TGROUP_REGEXP', '/^' . SITELINK_REGEXP . '\/torrents\.php\?.*?\bid=(?P\d+)\b/'); defined('TORRENT_REGEXP') or define('TORRENT_REGEXP', '/^' . SITELINK_REGEXP . '\/torrents\.php\?.*?\btorrentid=(?P\d+)\b/'); defined('EMAIL_REGEXP') or define('EMAIL_REGEXP', '/^[\w-]+(?:\.[\w-]+)*(?:\+[.\w-]+)?@[\w-]+(?:\.[\w-]+)+$/'); defined('USERNAME_REGEXP') or define('USERNAME_REGEXP', '/\b(?:[01]$(*PRUNE)(*FAIL)|(?P[\w.]{1,20}))\b/'); // ------------------------------------------------------------------------ // Various scripts redownload .torrent files periodically. // To prevent this retardation from blowing bandwidth etc., let's block it // if the .torrent file has been downloaded too often already. defined('BT_BROKEN_USERAGENT_REGEXP') or define('BT_BROKEN_USERAGENT_REGEXP', '/^(BTWebClient|Python-urllib|python-requests)/'); defined('BT_BROKEN_USERAGENT_DOWNLOAD') or define('BT_BROKEN_USERAGENT_DOWNLOAD', 3); // ------------------------------------------------------------------------ // Donor forum descriptions defined('DONOR_FORUM_DESCRIPTION') or define('DONOR_FORUM_DESCRIPTION', [ "I want only two houses, rather than seven... I feel like letting go of things", "A billion here, a billion there, sooner or later it adds up to real money.", "I've cut back, because I'm buying a house in the West Village.", "Some girls are just born with glitter in their veins.", "I get half a million just to show up at parties. My life is, like, really, really fun.", "Some people change when they think they're a star or something", "I'd rather not talk about money. It’s kind of gross.", "I have not been to my house in Bermuda for two or three years, and the same goes for my house in Portofino. How long do I have to keep leading this life of sacrifice?", "When I see someone who is making anywhere from $300,000 to $750,000 a year, that's middle class.", "Money doesn't make you happy. I now have $50 million but I was just as happy when I had $48 million.", "I'd rather smoke crack than eat cheese from a tin.", "I am who I am. I can’t pretend to be somebody who makes $25,000 a year.", "A girl never knows when she might need a couple of diamonds at ten o'clock in the morning.", "I wouldn't run for president. I wouldn't want to move to a smaller house.", "I have the stardom glow.", "What's Walmart? Do they like, sell wall stuff?", "Whenever I watch TV and see those poor starving kids all over the world, I can't help but cry. I mean I'd love to be skinny like that, but not with all those flies and death and stuff.", "Too much money ain't enough money.", "What's a soup kitchen?", "I work very hard and I’m worth every cent!", "To all my Barbies out there who date Benjamin Franklin, George Washington, Abraham Lincoln, you'll be better off in life. Get that money.", ]); // ------------------------------------------------------------------------ // Collector settings defined('ZIP_GROUP') or define('ZIP_GROUP', [ 0 => 'MP3 (VBR) - High Quality', 1 => 'MP3 (VBR) - Low Quality', 2 => 'MP3 (CBR)', 3 => 'FLAC - Lossless', 4 => 'Others', ]); defined('ZIP_OPTION') or define('ZIP_OPTION', [ '00' => [0, 0, 'V0'], '01' => [0, 1, 'APX'], '02' => [0, 2, '256'], '03' => [0, 3, 'V1'], '10' => [1, 0, '224'], '11' => [1, 1, 'V2'], '12' => [1, 2, 'APS'], '13' => [1, 3, '192'], '20' => [2, 0, '320'], '21' => [2, 1, '256'], '22' => [2, 2, '224'], '23' => [2, 3, '192'], '24' => [2, 4, '160'], '25' => [2, 5, '128'], '26' => [2, 6, '96'], '27' => [2, 7, '64'], '30' => [3, 0, 'FLAC / 24bit / Vinyl'], '31' => [3, 1, 'FLAC / 24bit / DVD'], '32' => [3, 2, 'FLAC / 24bit / SACD'], '33' => [3, 3, 'FLAC / 24bit / WEB'], '34' => [3, 4, 'FLAC / Log (100) / Cue'], '35' => [3, 5, 'FLAC / Log (100)'], '36' => [3, 6, 'FLAC / Log'], '37' => [3, 7, 'FLAC / WEB'], '38' => [3, 8, 'FLAC'], '40' => [4, 0, 'DTS'], '42' => [4, 2, 'AAC - 320'], '43' => [4, 3, 'AAC - 256'], '44' => [4, 4, 'AAC - q5.5'], '45' => [4, 5, 'AAC - q5'], '46' => [4, 6, 'AAC - 192'], ]); // ------------------------------------------------------------------------ // Opera Turbo (may include Opera-owned IP addresses that aren't used for Turbo, but shouldn't run much risk of exploitation) // Useful: http://www.robtex.com/cnet/ defined('ALLOWED_PROXY') or define('ALLOWED_PROXY', [ '64.255.180.*', //Norway '64.255.164.*', //Norway '80.239.242.*', //Poland '80.239.243.*', //Poland '91.203.96.*', //Norway '94.246.126.*', //Norway '94.246.127.*', //Norway '195.189.142.*', //Norway '195.189.143.*', //Norway ]);