123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405 |
- <?php
-
- if (version_compare(PHP_VERSION, '7.0.0', '<')) {
- die('Gazelle requires PHP 7.0.0 or later to function properly');
- }
-
- // Main settings
- define('SITE_NAME', 'BioTorrents.de'); // The name of your site
- define('SITE_DOMAIN', 'biotorrents.de'); // The FQDN of your site
- define('IMAGE_DOMAIN', 'pics.biotorrents.de'); // The FQDN of your image host
- define('SERVER_ROOT', '/var/www/html/biotorrents.de'); // The root of the server, used for includes
- define('TORRENT_STORE', '/var/www/torrents/'); // Where torrent files are stored
-
- // Tracker urls to be added to torrent files à la http://bittorrent.org/beps/bep_0012.html
- define('ANNOUNCE_URLS', [
- [ # Tier 1
- 'https://track.biotorrents.de:443',
- ],
- [ # Tier 2
- 'udp://tracker.coppersurfer.tk:6969/announce',
- 'udp://tracker.cyberia.is:6969/announce',
- 'udp://tracker.leechers-paradise.org:6969/announce',
- ]
- ]);
-
- // Name for bonus points currency
- define('BONUS_POINTS', 'Bonus Points');
-
- // Don't hard code API keys for services
- define('API_KEYS', ['Entrez' => '000000000000000000000000000000000000']);
- define('SCI_HUB', 'se'); # https://lovescihub.wordpress.com
- #define('SCI_HUB', ['ren', 'tw', 'se']); # https://lovescihub.wordpress.com
-
- // Allows you to run static content off another server. Default is usually what you want.
- define('STATIC_SERVER', '/static/');
-
- // The hashing algorithm used for SRI
- define('INTEGRITY_ALGO', 'sha256');
-
- // Keys
- define('ENCKEY', '000000000000000000000000000000000000000000000000000000000000'); // Random key. The key for encryption
- define('IMAGE_PSK', '000000000000000000000000000000000000000000000000000000000000'); // Pre-shared key for generating hmacs for the image proxy
- define('SCHEDULE_KEY', '000000000000000000000000000000000000000000000000000000000000'); // Random key. This key must be the argument to schedule.php for the schedule to work.
- define('RSS_HASH', '000000000000000000000000000000000000000000000000000000000000'); // Random key. Used for generating unique RSS auth key.
-
- // MySQL details
- define('SQLHOST', 'localhost'); // The MySQL host ip/fqdn
- define('SQLLOGIN', 'biotorrents'); // The MySQL login
- define('SQLPASS', '000000000000000000000000000000000000000000000000000000000000'); // The MySQL password
- define('SQLDB', 'gazelle_production'); // The MySQL database to use
- define('SQLPORT', 3306); // The MySQL port to connect on
- define('SQLSOCK', '/var/run/mysqld/mysqld.sock');
-
- // Memcached details
- define(
- 'MEMCACHED_SERVERS',
- [['host' => 'unix:///var/run/memcached/memcached.sock', 'port' => 0, 'buckets' => 1]]
- );
-
- // Sphinx details
- define('SPHINX_HOST', 'localhost');
- define('SPHINX_PORT', 9312);
- define('SPHINXQL_HOST', '127.0.0.1');
- define('SPHINXQL_PORT', 9306);
- define('SPHINXQL_SOCK', false);
- define('SPHINX_MAX_MATCHES', 1000); // Must be <= the server's max_matches variable (default 1000)
- define('SPHINX_INDEX', 'torrents');
-
- // Ocelot details
- define('TRACKER_HOST', '0.0.0.0');
- define('TRACKER_PORT', 34000);
- define('TRACKER_SECRET', '00000000000000000000000000000000'); // Must be 32 characters and match site_password in Ocelot's config.cpp
- define('TRACKER_REPORTKEY', '00000000000000000000000000000000'); // Must be 32 characters and match report_password in Ocelot's config.cpp
-
- // Site settings
- define('DEBUG_MODE', false); // Set to false if you dont want everyone to see debug information, can be overriden with 'site_debug'
- define('DEBUG_WARNINGS', true); // Set to true if you want to see PHP warnings in the footer
- define('OPEN_REGISTRATION', false); // Set to false to disable open regirstration, true to allow anyone to register
- define('USER_LIMIT', 30); // The maximum number of users the site can have, 0 for no limit
- define('STARTING_INVITES', 2); // # of invites to give to newly registered users
- define('STARTING_TOKENS', 2); // # of freeleech tokens to give to newly registered users
- define('STARTING_UPLOAD', 5368709120); // Amount of upload to give to newly registered users
- define('BLOCK_TOR', false); // Set to true to block Tor users
- define('BLOCK_OPERA_MINI', false); // Set to true to block Opera Mini proxy
- define('DONOR_INVITES', 2);
-
- // Features
- define('FEATURE_DONATE', true); // Enable donation page
- define('FEATURE_EMAIL_REENABLE', true); // Send re-enable requests to user's email
- define('FEATURE_ENFORCE_LOCATIONS', false); // Require users to verify login from unknown locations
- define('FEATURE_IRC', false); // Attempt to send messages to IRC
- define('FEATURE_SEND_EMAIL', true); // Attempt to send email from the site
- define('FEATURE_SET_ENC_KEY_PUBLIC', false); // Allow the site encryption key to be set without an account (Should only be used for initial setup)
-
- // User class IDs needed for automatic promotions. Found in the 'permissions' table
- // Name of class Class ID (NOT level)
- define('ADMIN', '1');
- define('USER', '2');
- define('MEMBER', '3');
- define('POWER', '4');
- define('ELITE', '5');
- define('LEGEND', '8');
- define('MOD', '11');
- define('SYSOP', '15');
- define('ARTIST', '19');
- define('DONOR', '20');
- define('VIP', '21');
- define('TORRENT_MASTER', '23');
- define('POWER_TM', '24');
- define('FLS_TEAM', '33');
- define('FORUM_MOD', '9001');
-
- // Forums
- define('STAFF_FORUM', 3);
- define('DONOR_FORUM', 7);
- define('TRASH_FORUM_ID', 8);
- define('ANNOUNCEMENT_FORUM_ID', 1);
- define('SUGGESTIONS_FORUM_ID', 2);
-
- // Pagination
- define('TORRENT_COMMENTS_PER_PAGE', 10);
- define('POSTS_PER_PAGE', 25);
- define('TOPICS_PER_PAGE', 50);
- define('TORRENTS_PER_PAGE', 50);
- define('REQUESTS_PER_PAGE', 25);
- define('MESSAGES_PER_PAGE', 25);
- define('LOG_ENTRIES_PER_PAGE', 50);
-
- // Cache catalogues
- define('THREAD_CATALOGUE', 500); // Limit to THREAD_CATALOGUE posts per cache key.
-
- // IRC settings
- define('SLACK_INVITE', '00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000');
- define('BOT_NICK', 'bot');
- define('BOT_SERVER', 'irc.'.SITE_DOMAIN); // IRC server address. Used for onsite chat tool.
- define('BOT_PORT', 6667);
- define('BOT_CHAN', '#bot');
- define('BOT_ANNOUNCE_CHAN', '#announce');
- define('BOT_REQUEST_CHAN', '#requests');
- define('BOT_STAFF_CHAN', '#staff');
- define('BOT_DISABLED_CHAN', '#disabled'); // Channel to refer disabled users to.
- define('BOT_HELP_CHAN', '#help');
- define('BOT_DEBUG_CHAN', '#debug');
- define('BOT_REPORT_CHAN', '#report');
- define('BOT_NICKSERV_PASS', '');
- define('BOT_INVITE_CHAN', '#invites'); // Channel for non-members seeking an interview
- define('BOT_INTERVIEW_CHAN', '#interview'); // Channel for the interviews
- define('BOT_INTERVIEW_NUM', 5);
- define('BOT_INTERVIEW_STAFF', '#interview-staff'); // Channel for the interviewers
- define('SOCKET_LISTEN_PORT', 51010);
- define('SOCKET_LISTEN_ADDRESS', '0.0.0.0');
- define('ADMIN_CHAN', '#admin');
- define('LAB_CHAN', '#lab');
- define('STATUS_CHAN', '#status');
-
- // Miscellaneous values
- define('RANK_ONE_COST', 5);
- define('RANK_TWO_COST', 10);
- define('RANK_THREE_COST', 15);
- define('RANK_FOUR_COST', 20);
- define('RANK_FIVE_COST', 30);
- define('MAX_RANK', 6);
- define('MAX_EXTRA_RANK', 8);
- define('DONOR_FORUM_RANK', 6);
- define('MAX_SPECIAL_RANK', 3);
-
- define('FORUMS_TO_REVEAL_VOTERS', []);
- define('FORUMS_TO_ALLOW_DOUBLE_POST', []);
-
- $Categories = [
- 'DNA',
- 'RNA',
- 'Protein',
- 'Imaging',
- 'Extras',
- ];
- $GroupedCategories = $Categories;
- #$CategoryIcons = ['music.png', 'apps.png', 'ebook.png', 'audiobook.png', 'elearning.png', 'comedy.png', 'comics.png'];
-
- $Media = [
- # DNA
- 'Complete Genomics',
- 'cPAS-BGI/MGI',
- 'Helicos',
- 'Illumina HiSeq',
- 'Illumina MiSeq',
- 'Ion Torrent',
- 'Microfluidics',
- 'Nanopore',
- 'PacBio',
- 'Roche 454',
- 'Sanger',
- 'SOLiD',
-
- # RNA, Protein, etc.
- 'De Novo',
- 'HPLC',
- 'Mass Spec',
- 'RNA-Seq',
- 'Other',
- ];
-
- # Imaging Platforms
- $MediaManga = [
- 'CT/CAT',
- 'ECG',
- 'Elastography',
- 'FNIR/NIRS',
- 'MPI',
- 'MRI/NMR',
- 'Microscopy',
- 'Photoacoustic',
- 'Photography',
- 'Scint/SPECT/PET',
- 'Ultrasound',
- 'X-Rays',
- 'Other',
- ];
-
- #$Platform = ['Windows', 'OS X', 'Linux', 'BSD', 'Flash', 'Java', 'Android', 'iOS', '3DS'];
-
- # Sequencing Formats
- # https://www.ncbi.nlm.nih.gov/sra/docs/submitformats/
- $Containers = [
- 'Autofill' => ['Autofill'],
- 'BAM' => ['bam'],
- 'CRAM' => ['cram'],
- 'EMBL' => ['embl'],
- 'FASTA' => ['fa', 'fasta', 'fsa'],
- 'FASTA+QUAL' => ['qual'],
- 'CSFASTA' => ['csfa', 'csfasta', 'csfsa'],
- 'FASTQ' => ['fastq', 'fq', 'sanfastq'],
- 'GFF' => ['gff', 'gff2', 'gff3'],
- 'GTF' => ['gtf'],
- 'GenBank' => ['gb', 'gbk', 'genbank'],
- 'HDF5' => ['bash5', 'baxh5', 'fast5', 'hdf5'],
- 'PIR' => ['pir'],
- 'QSeq' => ['qseq'],
- 'SAM' => ['sam'],
- 'SFF' => ['sff'],
- 'SRF' => ['srf'],
- 'SnapGene' => ['dna', 'seq'],
- 'SwissProt' => ['dat'],
- 'VCF' => ['vcf'],
- 'Plain' => ['csv', 'txt'],
- ];
-
- # Imaging Formats
- # https://www.ncbi.nlm.nih.gov/pmc/articles/PMC3948928/
- $ContainersGames = [
- 'Autofill' => ['Autofill'],
- 'Analyze' => ['hdr', 'img'],
- 'Interfile' => ['h33'],
- 'DICOM' => ['dcm', 'dicom'],
- 'NIfTI' => ['nii', 'nifti'],
- 'MINC' => ['minc', 'mnc'],
- 'JPEG' => ['jfif', 'jpeg', 'jpg'],
- 'JPEG 2000' => ['j2k', 'jp2', 'jpf', 'jpm', 'jpx', 'mj2'],
- 'PNG' => ['png'],
- 'TIFF' => ['tif', 'tiff'],
- 'WebP' => ['webp'],
- 'Other' => [''],
- ];
-
- # Protein Formats
- # https://www.ncbi.nlm.nih.gov/pmc/articles/PMC3518119/
- # DO NOT PARSE RAW FILES. TOO MANY COMPETING VENDORS
- $ContainersProt = [
- 'Autofill' => ['Autofill'],
- 'ABI/Sciex' => ['t2d', 'wiff'],
- 'APML' => ['apml'],
- 'ASF' => ['asf'],
- 'Agilent/Bruker' => ['baf', 'd', 'fid', 'tdf', 'yep'],
- 'BlibBuild' => ['blib'],
- 'Bruker/Varian' => ['sms', 'xms'],
- 'Finnigan' => ['dat', 'ms'],
- 'ION-TOF' => ['ita', 'itm'],
- 'JCAMP-DX' => ['jdx'],
- 'MGF' => ['mgf'],
- 'MS2' => ['ms2'],
- 'MSF' => ['msf'],
- 'mzData' => ['mzdata'],
- 'mzML' => ['mzml'],
- 'mzXML' => ['mzxml'],
- 'OMSSA' => ['omssa', 'omx'],
- 'PEFF' => ['peff'],
- 'pepXML' => ['pepxml'],
- 'protXML' => ['protxml'],
- 'Shimadzu' => ['lcd', 'qgd', 'spc'],
- 'Skyline' => ['sky', 'skyd'],
- 'TPP/SPC' => ['dta'],
- 'Tandem' => ['tandem'],
- 'TraML' => ['traml'],
- 'ULVAC-PHI' => ['tdc'],
- 'Plain' => ['csv', 'txt'],
- ];
-
- $Archives = [
- 'Autofill' => ['Autofill'],
- '7z' => ['7z'],
- 'bzip2' => ['bz2', 'bzip2'],
- 'gzip' => ['gz', 'gzip', 'tgz', 'tpz'],
- 'Pickle' => ['pickle', 'pkl'],
- 'RAR' => ['rar', 'rev'],
- 'ZIP' => ['zip', 'zipx'],
- 'None' => [''],
- ];
- #$ArchivesManga = ['cbz', 'cbr', 'cb7'];
-
- # Licenses
- $Codecs = [
- 'CC BY',
- 'CC BY-SA',
- 'CC BY-ND',
- 'CC BY-NC',
- 'CC BY-NC-SA',
- 'CC BY-NC-ND',
- 'GNU GPL',
- 'GNU LGPL',
- 'GNU AGPL',
- 'GNU FDL',
- 'MIT',
- 'ODC-By',
- 'ODC-ODbL',
- 'OpenMTA',
- 'Public Domain',
- 'Unspecified',
- ];
-
- # Assembly Levels
- $Resolutions = [
- 'Contig',
- 'Scaffold',
- 'Chromosome',
- 'Whole Genome',
- 'Other',
- ];
-
- #$AudioFormats = ['MP3', 'OGG', 'OGG 5.1', 'AAC', 'AAC 5.1', 'AC3', 'AC3 5.1', 'DTS 2.0', 'DTS 5.1', 'DTS-ES 6.1', 'FLAC 2.0', 'FLAC 5.1', 'FLAC 6.1', 'PCM 2.0', 'PCM 5.1', 'PCM 6.1', 'WMA', 'Real Audio', 'DTS-HD', 'DTS-HD MA'];
- #$Subbing = ['Softsubs', 'Hardsubs', 'RAW'];
- #$Languages = ['English', 'Japanese', 'Dual Language', 'None'];
- #$Formats = ['MP3', 'FLAC', 'Ogg Vorbis', 'AAC', 'AC3', 'DTS'];
- #$Bitrates = ['192', 'APS (VBR)', 'V2 (VBR)', 'V1 (VBR)', '256', 'APX (VBR)', 'V0 (VBR)', 'q8.x (VBR)', '320', 'Lossless', '24bit Lossless', 'Other'];
-
- $CollageCats = [
- 0 => 'Personal',
- 1 => 'Theme',
- 2 => 'Staff Picks',
- #3 => 'Artists',
- ];
-
- #$ReleaseTypes = [1=>'Album', 3=>'Soundtrack', 5=>'EP', 6=>'Anthology', 7=>'Compilation', 9=>'Single', 11=>'Live album', 13=>'Remix', 14=>'Bootleg', 15=>'Interview', 16=>'Mixtape', 21=>'Unknown'];
-
- // Ratio requirements, in descending order
- // Columns: Download amount, Req Ratio (0% seeded), Req Ratio (100% seeded)
- define('RATIO_REQUIREMENTS', [
- [200 * 1024**3, 0.60, 0.60],
- [160 * 1024**3, 0.60, 0.50],
- [120 * 1024**3, 0.50, 0.40],
- [100 * 1024**3, 0.40, 0.30],
- [80 * 1024**3, 0.30, 0.20],
- [60 * 1024**3, 0.20, 0.10],
- [40 * 1024**3, 0.15, 0.00],
- [20 * 1024**3, 0.10, 0.00],
- [10 * 1024**3, 0.05, 0.00],
- ]);
-
- define('TAG_NAMESPACES', ['male', 'female', 'parody', 'character']);
-
- // God I wish I didn't have to do this but I just don't care anymore.
- define('AUTOMATED_BADGE_IDS', [
- 'DL' => [
- '8' => 10,
- '16' => 11,
- '32' => 12,
- '64' => 13,
- '128' => 14,
- '256' => 15,
- '512' => 16,
- '1024' => 17,
- '2048' => 18
- ],
- 'UL' => [
- '16' => 30,
- '32' => 31,
- '64' => 32,
- '128' => 33,
- '256' => 34,
- '512' => 35,
- '1024' => 36,
- '2048' => 37,
- '4096' => 38
- ],
- 'Posts' => [
- '25' => 60,
- '50' => 61,
- '100' => 62,
- '250' => 63,
- '500' => 64,
- '1000' => 65,
- '2500' => 66,
- '5000' => 67,
- '10000' => 68
- ]
- ]);
|