BioTorrents.de’s version of Gazelle
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

config.template 13KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405
  1. <?php
  2. if (version_compare(PHP_VERSION, '7.0.0', '<')) {
  3. die('Gazelle requires PHP 7.0.0 or later to function properly');
  4. }
  5. // Main settings
  6. define('SITE_NAME', 'BioTorrents.de'); // The name of your site
  7. define('SITE_DOMAIN', 'biotorrents.de'); // The FQDN of your site
  8. define('IMAGE_DOMAIN', 'pics.biotorrents.de'); // The FQDN of your image host
  9. define('SERVER_ROOT', '/var/www/html/biotorrents.de'); // The root of the server, used for includes
  10. define('TORRENT_STORE', '/var/www/torrents/'); // Where torrent files are stored
  11. // Tracker urls to be added to torrent files à la http://bittorrent.org/beps/bep_0012.html
  12. define('ANNOUNCE_URLS', [
  13. [ # Tier 1
  14. 'https://track.biotorrents.de:443',
  15. ],
  16. [ # Tier 2
  17. 'udp://tracker.coppersurfer.tk:6969/announce',
  18. 'udp://tracker.cyberia.is:6969/announce',
  19. 'udp://tracker.leechers-paradise.org:6969/announce',
  20. ]
  21. ]);
  22. // Name for bonus points currency
  23. define('BONUS_POINTS', 'Bonus Points');
  24. // Don't hard code API keys for services
  25. define('API_KEYS', ['Entrez' => '000000000000000000000000000000000000']);
  26. define('SCI_HUB', 'se'); # https://lovescihub.wordpress.com
  27. #define('SCI_HUB', ['ren', 'tw', 'se']); # https://lovescihub.wordpress.com
  28. // Allows you to run static content off another server. Default is usually what you want.
  29. define('STATIC_SERVER', '/static/');
  30. // The hashing algorithm used for SRI
  31. define('INTEGRITY_ALGO', 'sha256');
  32. // Keys
  33. define('ENCKEY', '000000000000000000000000000000000000000000000000000000000000'); // Random key. The key for encryption
  34. define('IMAGE_PSK', '000000000000000000000000000000000000000000000000000000000000'); // Pre-shared key for generating hmacs for the image proxy
  35. define('SCHEDULE_KEY', '000000000000000000000000000000000000000000000000000000000000'); // Random key. This key must be the argument to schedule.php for the schedule to work.
  36. define('RSS_HASH', '000000000000000000000000000000000000000000000000000000000000'); // Random key. Used for generating unique RSS auth key.
  37. // MySQL details
  38. define('SQLHOST', 'localhost'); // The MySQL host ip/fqdn
  39. define('SQLLOGIN', 'biotorrents'); // The MySQL login
  40. define('SQLPASS', '000000000000000000000000000000000000000000000000000000000000'); // The MySQL password
  41. define('SQLDB', 'gazelle_production'); // The MySQL database to use
  42. define('SQLPORT', 3306); // The MySQL port to connect on
  43. define('SQLSOCK', '/var/run/mysqld/mysqld.sock');
  44. // Memcached details
  45. define(
  46. 'MEMCACHED_SERVERS',
  47. [['host' => 'unix:///var/run/memcached/memcached.sock', 'port' => 0, 'buckets' => 1]]
  48. );
  49. // Sphinx details
  50. define('SPHINX_HOST', 'localhost');
  51. define('SPHINX_PORT', 9312);
  52. define('SPHINXQL_HOST', '127.0.0.1');
  53. define('SPHINXQL_PORT', 9306);
  54. define('SPHINXQL_SOCK', false);
  55. define('SPHINX_MAX_MATCHES', 1000); // Must be <= the server's max_matches variable (default 1000)
  56. define('SPHINX_INDEX', 'torrents');
  57. // Ocelot details
  58. define('TRACKER_HOST', '0.0.0.0');
  59. define('TRACKER_PORT', 34000);
  60. define('TRACKER_SECRET', '00000000000000000000000000000000'); // Must be 32 characters and match site_password in Ocelot's config.cpp
  61. define('TRACKER_REPORTKEY', '00000000000000000000000000000000'); // Must be 32 characters and match report_password in Ocelot's config.cpp
  62. // Site settings
  63. define('DEBUG_MODE', false); // Set to false if you dont want everyone to see debug information, can be overriden with 'site_debug'
  64. define('DEBUG_WARNINGS', true); // Set to true if you want to see PHP warnings in the footer
  65. define('OPEN_REGISTRATION', false); // Set to false to disable open regirstration, true to allow anyone to register
  66. define('USER_LIMIT', 30); // The maximum number of users the site can have, 0 for no limit
  67. define('STARTING_INVITES', 2); // # of invites to give to newly registered users
  68. define('STARTING_TOKENS', 2); // # of freeleech tokens to give to newly registered users
  69. define('STARTING_UPLOAD', 5368709120); // Amount of upload to give to newly registered users
  70. define('BLOCK_TOR', false); // Set to true to block Tor users
  71. define('BLOCK_OPERA_MINI', false); // Set to true to block Opera Mini proxy
  72. define('DONOR_INVITES', 2);
  73. // Features
  74. define('FEATURE_DONATE', true); // Enable donation page
  75. define('FEATURE_EMAIL_REENABLE', true); // Send re-enable requests to user's email
  76. define('FEATURE_ENFORCE_LOCATIONS', false); // Require users to verify login from unknown locations
  77. define('FEATURE_IRC', false); // Attempt to send messages to IRC
  78. define('FEATURE_SEND_EMAIL', true); // Attempt to send email from the site
  79. 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)
  80. // User class IDs needed for automatic promotions. Found in the 'permissions' table
  81. // Name of class Class ID (NOT level)
  82. define('ADMIN', '1');
  83. define('USER', '2');
  84. define('MEMBER', '3');
  85. define('POWER', '4');
  86. define('ELITE', '5');
  87. define('LEGEND', '8');
  88. define('MOD', '11');
  89. define('SYSOP', '15');
  90. define('ARTIST', '19');
  91. define('DONOR', '20');
  92. define('VIP', '21');
  93. define('TORRENT_MASTER', '23');
  94. define('POWER_TM', '24');
  95. define('FLS_TEAM', '33');
  96. define('FORUM_MOD', '9001');
  97. // Forums
  98. define('STAFF_FORUM', 3);
  99. define('DONOR_FORUM', 7);
  100. define('TRASH_FORUM_ID', 8);
  101. define('ANNOUNCEMENT_FORUM_ID', 1);
  102. define('SUGGESTIONS_FORUM_ID', 2);
  103. // Pagination
  104. define('TORRENT_COMMENTS_PER_PAGE', 10);
  105. define('POSTS_PER_PAGE', 25);
  106. define('TOPICS_PER_PAGE', 50);
  107. define('TORRENTS_PER_PAGE', 50);
  108. define('REQUESTS_PER_PAGE', 25);
  109. define('MESSAGES_PER_PAGE', 25);
  110. define('LOG_ENTRIES_PER_PAGE', 50);
  111. // Cache catalogues
  112. define('THREAD_CATALOGUE', 500); // Limit to THREAD_CATALOGUE posts per cache key.
  113. // IRC settings
  114. define('SLACK_INVITE', '00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000');
  115. define('BOT_NICK', 'bot');
  116. define('BOT_SERVER', 'irc.'.SITE_DOMAIN); // IRC server address. Used for onsite chat tool.
  117. define('BOT_PORT', 6667);
  118. define('BOT_CHAN', '#bot');
  119. define('BOT_ANNOUNCE_CHAN', '#announce');
  120. define('BOT_REQUEST_CHAN', '#requests');
  121. define('BOT_STAFF_CHAN', '#staff');
  122. define('BOT_DISABLED_CHAN', '#disabled'); // Channel to refer disabled users to.
  123. define('BOT_HELP_CHAN', '#help');
  124. define('BOT_DEBUG_CHAN', '#debug');
  125. define('BOT_REPORT_CHAN', '#report');
  126. define('BOT_NICKSERV_PASS', '');
  127. define('BOT_INVITE_CHAN', '#invites'); // Channel for non-members seeking an interview
  128. define('BOT_INTERVIEW_CHAN', '#interview'); // Channel for the interviews
  129. define('BOT_INTERVIEW_NUM', 5);
  130. define('BOT_INTERVIEW_STAFF', '#interview-staff'); // Channel for the interviewers
  131. define('SOCKET_LISTEN_PORT', 51010);
  132. define('SOCKET_LISTEN_ADDRESS', '0.0.0.0');
  133. define('ADMIN_CHAN', '#admin');
  134. define('LAB_CHAN', '#lab');
  135. define('STATUS_CHAN', '#status');
  136. // Miscellaneous values
  137. define('RANK_ONE_COST', 5);
  138. define('RANK_TWO_COST', 10);
  139. define('RANK_THREE_COST', 15);
  140. define('RANK_FOUR_COST', 20);
  141. define('RANK_FIVE_COST', 30);
  142. define('MAX_RANK', 6);
  143. define('MAX_EXTRA_RANK', 8);
  144. define('DONOR_FORUM_RANK', 6);
  145. define('MAX_SPECIAL_RANK', 3);
  146. define('FORUMS_TO_REVEAL_VOTERS', []);
  147. define('FORUMS_TO_ALLOW_DOUBLE_POST', []);
  148. $Categories = [
  149. 'DNA',
  150. 'RNA',
  151. 'Protein',
  152. 'Imaging',
  153. 'Extras',
  154. ];
  155. $GroupedCategories = $Categories;
  156. #$CategoryIcons = ['music.png', 'apps.png', 'ebook.png', 'audiobook.png', 'elearning.png', 'comedy.png', 'comics.png'];
  157. $Media = [
  158. # DNA
  159. 'Complete Genomics',
  160. 'cPAS-BGI/MGI',
  161. 'Helicos',
  162. 'Illumina HiSeq',
  163. 'Illumina MiSeq',
  164. 'Ion Torrent',
  165. 'Microfluidics',
  166. 'Nanopore',
  167. 'PacBio',
  168. 'Roche 454',
  169. 'Sanger',
  170. 'SOLiD',
  171. # RNA, Protein, etc.
  172. 'De Novo',
  173. 'HPLC',
  174. 'Mass Spec',
  175. 'RNA-Seq',
  176. 'Other',
  177. ];
  178. # Imaging Platforms
  179. $MediaManga = [
  180. 'CT/CAT',
  181. 'ECG',
  182. 'Elastography',
  183. 'FNIR/NIRS',
  184. 'MPI',
  185. 'MRI/NMR',
  186. 'Microscopy',
  187. 'Photoacoustic',
  188. 'Photography',
  189. 'Scint/SPECT/PET',
  190. 'Ultrasound',
  191. 'X-Rays',
  192. 'Other',
  193. ];
  194. #$Platform = ['Windows', 'OS X', 'Linux', 'BSD', 'Flash', 'Java', 'Android', 'iOS', '3DS'];
  195. # Sequencing Formats
  196. # https://www.ncbi.nlm.nih.gov/sra/docs/submitformats/
  197. $Containers = [
  198. 'Autofill' => ['Autofill'],
  199. 'BAM' => ['bam'],
  200. 'CRAM' => ['cram'],
  201. 'EMBL' => ['embl'],
  202. 'FASTA' => ['fa', 'fasta', 'fsa'],
  203. 'FASTA+QUAL' => ['qual'],
  204. 'CSFASTA' => ['csfa', 'csfasta', 'csfsa'],
  205. 'FASTQ' => ['fastq', 'fq', 'sanfastq'],
  206. 'GFF' => ['gff', 'gff2', 'gff3'],
  207. 'GTF' => ['gtf'],
  208. 'GenBank' => ['gb', 'gbk', 'genbank'],
  209. 'HDF5' => ['bash5', 'baxh5', 'fast5', 'hdf5'],
  210. 'PIR' => ['pir'],
  211. 'QSeq' => ['qseq'],
  212. 'SAM' => ['sam'],
  213. 'SFF' => ['sff'],
  214. 'SRF' => ['srf'],
  215. 'SnapGene' => ['dna', 'seq'],
  216. 'SwissProt' => ['dat'],
  217. 'VCF' => ['vcf'],
  218. 'Plain' => ['csv', 'txt'],
  219. ];
  220. # Imaging Formats
  221. # https://www.ncbi.nlm.nih.gov/pmc/articles/PMC3948928/
  222. $ContainersGames = [
  223. 'Autofill' => ['Autofill'],
  224. 'Analyze' => ['hdr', 'img'],
  225. 'Interfile' => ['h33'],
  226. 'DICOM' => ['dcm', 'dicom'],
  227. 'NIfTI' => ['nii', 'nifti'],
  228. 'MINC' => ['minc', 'mnc'],
  229. 'JPEG' => ['jfif', 'jpeg', 'jpg'],
  230. 'JPEG 2000' => ['j2k', 'jp2', 'jpf', 'jpm', 'jpx', 'mj2'],
  231. 'PNG' => ['png'],
  232. 'TIFF' => ['tif', 'tiff'],
  233. 'WebP' => ['webp'],
  234. 'Other' => [''],
  235. ];
  236. # Protein Formats
  237. # https://www.ncbi.nlm.nih.gov/pmc/articles/PMC3518119/
  238. # DO NOT PARSE RAW FILES. TOO MANY COMPETING VENDORS
  239. $ContainersProt = [
  240. 'Autofill' => ['Autofill'],
  241. 'ABI/Sciex' => ['t2d', 'wiff'],
  242. 'APML' => ['apml'],
  243. 'ASF' => ['asf'],
  244. 'Agilent/Bruker' => ['baf', 'd', 'fid', 'tdf', 'yep'],
  245. 'BlibBuild' => ['blib'],
  246. 'Bruker/Varian' => ['sms', 'xms'],
  247. 'Finnigan' => ['dat', 'ms'],
  248. 'ION-TOF' => ['ita', 'itm'],
  249. 'JCAMP-DX' => ['jdx'],
  250. 'MGF' => ['mgf'],
  251. 'MS2' => ['ms2'],
  252. 'MSF' => ['msf'],
  253. 'mzData' => ['mzdata'],
  254. 'mzML' => ['mzml'],
  255. 'mzXML' => ['mzxml'],
  256. 'OMSSA' => ['omssa', 'omx'],
  257. 'PEFF' => ['peff'],
  258. 'pepXML' => ['pepxml'],
  259. 'protXML' => ['protxml'],
  260. 'Shimadzu' => ['lcd', 'qgd', 'spc'],
  261. 'Skyline' => ['sky', 'skyd'],
  262. 'TPP/SPC' => ['dta'],
  263. 'Tandem' => ['tandem'],
  264. 'TraML' => ['traml'],
  265. 'ULVAC-PHI' => ['tdc'],
  266. 'Plain' => ['csv', 'txt'],
  267. ];
  268. $Archives = [
  269. 'Autofill' => ['Autofill'],
  270. '7z' => ['7z'],
  271. 'bzip2' => ['bz2', 'bzip2'],
  272. 'gzip' => ['gz', 'gzip', 'tgz', 'tpz'],
  273. 'Pickle' => ['pickle', 'pkl'],
  274. 'RAR' => ['rar', 'rev'],
  275. 'ZIP' => ['zip', 'zipx'],
  276. 'None' => [''],
  277. ];
  278. #$ArchivesManga = ['cbz', 'cbr', 'cb7'];
  279. # Licenses
  280. $Codecs = [
  281. 'CC BY',
  282. 'CC BY-SA',
  283. 'CC BY-ND',
  284. 'CC BY-NC',
  285. 'CC BY-NC-SA',
  286. 'CC BY-NC-ND',
  287. 'GNU GPL',
  288. 'GNU LGPL',
  289. 'GNU AGPL',
  290. 'GNU FDL',
  291. 'MIT',
  292. 'ODC-By',
  293. 'ODC-ODbL',
  294. 'OpenMTA',
  295. 'Public Domain',
  296. 'Unspecified',
  297. ];
  298. # Assembly Levels
  299. $Resolutions = [
  300. 'Contig',
  301. 'Scaffold',
  302. 'Chromosome',
  303. 'Whole Genome',
  304. 'Other',
  305. ];
  306. #$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'];
  307. #$Subbing = ['Softsubs', 'Hardsubs', 'RAW'];
  308. #$Languages = ['English', 'Japanese', 'Dual Language', 'None'];
  309. #$Formats = ['MP3', 'FLAC', 'Ogg Vorbis', 'AAC', 'AC3', 'DTS'];
  310. #$Bitrates = ['192', 'APS (VBR)', 'V2 (VBR)', 'V1 (VBR)', '256', 'APX (VBR)', 'V0 (VBR)', 'q8.x (VBR)', '320', 'Lossless', '24bit Lossless', 'Other'];
  311. $CollageCats = [
  312. 0 => 'Personal',
  313. 1 => 'Theme',
  314. 2 => 'Staff Picks',
  315. #3 => 'Artists',
  316. ];
  317. #$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'];
  318. // Ratio requirements, in descending order
  319. // Columns: Download amount, Req Ratio (0% seeded), Req Ratio (100% seeded)
  320. define('RATIO_REQUIREMENTS', [
  321. [200 * 1024**3, 0.60, 0.60],
  322. [160 * 1024**3, 0.60, 0.50],
  323. [120 * 1024**3, 0.50, 0.40],
  324. [100 * 1024**3, 0.40, 0.30],
  325. [80 * 1024**3, 0.30, 0.20],
  326. [60 * 1024**3, 0.20, 0.10],
  327. [40 * 1024**3, 0.15, 0.00],
  328. [20 * 1024**3, 0.10, 0.00],
  329. [10 * 1024**3, 0.05, 0.00],
  330. ]);
  331. define('TAG_NAMESPACES', ['male', 'female', 'parody', 'character']);
  332. // God I wish I didn't have to do this but I just don't care anymore.
  333. define('AUTOMATED_BADGE_IDS', [
  334. 'DL' => [
  335. '8' => 10,
  336. '16' => 11,
  337. '32' => 12,
  338. '64' => 13,
  339. '128' => 14,
  340. '256' => 15,
  341. '512' => 16,
  342. '1024' => 17,
  343. '2048' => 18
  344. ],
  345. 'UL' => [
  346. '16' => 30,
  347. '32' => 31,
  348. '64' => 32,
  349. '128' => 33,
  350. '256' => 34,
  351. '512' => 35,
  352. '1024' => 36,
  353. '2048' => 37,
  354. '4096' => 38
  355. ],
  356. 'Posts' => [
  357. '25' => 60,
  358. '50' => 61,
  359. '100' => 62,
  360. '250' => 63,
  361. '500' => 64,
  362. '1000' => 65,
  363. '2500' => 66,
  364. '5000' => 67,
  365. '10000' => 68
  366. ]
  367. ]);