Browse Source

Bring config.template up to speed

pjc 5 years ago
parent
commit
1bfd1d632d
1 changed files with 171 additions and 51 deletions
  1. 171
    51
      classes/config.template

+ 171
- 51
classes/config.template View File

1
 <?php
1
 <?php
2
+
2
 if (version_compare(PHP_VERSION, '7.0.0', '<')) {
3
 if (version_compare(PHP_VERSION, '7.0.0', '<')) {
3
-    die("Gazelle requires PHP 7.0.0 or later to function properly");
4
+    die('Gazelle requires PHP 7.0.0 or later to function properly');
4
 }
5
 }
5
-//date_default_timezone_set('EST');
6
 
6
 
7
 // Main settings
7
 // Main settings
8
 define('SITE_NAME',     'BioTorrents.de'); // The name of your site
8
 define('SITE_NAME',     'BioTorrents.de'); // The name of your site
11
 define('SERVER_ROOT',   '/var/www/html/biotorrents.de'); // The root of the server, used for includes
11
 define('SERVER_ROOT',   '/var/www/html/biotorrents.de'); // The root of the server, used for includes
12
 define('TORRENT_STORE', '/var/www/torrents/'); // Where torrent files are stored
12
 define('TORRENT_STORE', '/var/www/torrents/'); // Where torrent files are stored
13
 
13
 
14
-// Tracker urls to be added to torrent files ala bittorrent.org/beps/bep_0012.html
15
-define('ANNOUNCE_URLS', [[
16
-  'https://track.biotorrents.de',
17
-  #'https://tracker2.'.SITE_DOMAIN.':34001',
18
-]]);
14
+// Tracker urls to be added to torrent files à la http://bittorrent.org/beps/bep_0012.html
15
+define('ANNOUNCE_URLS', [
16
+  [ # Tier 1
17
+    'https://track.biotorrents.de:443',
18
+  ],
19
+  [ # Tier 2
20
+    'udp://tracker.coppersurfer.tk:6969/announce',
21
+    'udp://tracker.cyberia.is:6969/announce',
22
+    'udp://tracker.leechers-paradise.org:6969/announce',
23
+  ]
24
+]);
19
 
25
 
20
 // Name for bonus points currency
26
 // Name for bonus points currency
21
 define('BONUS_POINTS', 'Bonus Points');
27
 define('BONUS_POINTS', 'Bonus Points');
22
 
28
 
23
 // Don't hard code API keys for services
29
 // Don't hard code API keys for services
24
 define('API_KEYS', ['Entrez' => '000000000000000000000000000000000000']);
30
 define('API_KEYS', ['Entrez' => '000000000000000000000000000000000000']);
31
+define('SCI_HUB', 'se'); # https://lovescihub.wordpress.com
32
+#define('SCI_HUB', ['ren', 'tw', 'se']); # https://lovescihub.wordpress.com
25
 
33
 
26
 // Allows you to run static content off another server. Default is usually what you want.
34
 // Allows you to run static content off another server. Default is usually what you want.
27
 define('STATIC_SERVER', '/static/');
35
 define('STATIC_SERVER', '/static/');
68
 define('DEBUG_MODE',        false); // Set to false if you dont want everyone to see debug information, can be overriden with 'site_debug'
76
 define('DEBUG_MODE',        false); // Set to false if you dont want everyone to see debug information, can be overriden with 'site_debug'
69
 define('DEBUG_WARNINGS',    true); // Set to true if you want to see PHP warnings in the footer
77
 define('DEBUG_WARNINGS',    true); // Set to true if you want to see PHP warnings in the footer
70
 define('OPEN_REGISTRATION', false); // Set to false to disable open regirstration, true to allow anyone to register
78
 define('OPEN_REGISTRATION', false); // Set to false to disable open regirstration, true to allow anyone to register
71
-define('USER_LIMIT',        100); // The maximum number of users the site can have, 0 for no limit
79
+define('USER_LIMIT',        30); // The maximum number of users the site can have, 0 for no limit
72
 define('STARTING_INVITES',  2); // # of invites to give to newly registered users
80
 define('STARTING_INVITES',  2); // # of invites to give to newly registered users
73
-define('STARTING_UPLOAD',   2147483648); // Amount of upload to give to newly registered users
81
+define('STARTING_TOKENS',   2); // # of freeleech tokens to give to newly registered users
82
+define('STARTING_UPLOAD',   5368709120); // Amount of upload to give to newly registered users
74
 define('BLOCK_TOR',         false); // Set to true to block Tor users
83
 define('BLOCK_TOR',         false); // Set to true to block Tor users
75
 define('BLOCK_OPERA_MINI',  false); // Set to true to block Opera Mini proxy
84
 define('BLOCK_OPERA_MINI',  false); // Set to true to block Opera Mini proxy
76
 define('DONOR_INVITES',     2);
85
 define('DONOR_INVITES',     2);
86
 // User class IDs needed for automatic promotions. Found in the 'permissions' table
95
 // User class IDs needed for automatic promotions. Found in the 'permissions' table
87
 // Name of class  Class ID (NOT level)
96
 // Name of class  Class ID (NOT level)
88
 define('ADMIN',          '1');
97
 define('ADMIN',          '1');
89
-define('USER',           '2'); # Called "Member" in the permissions manager; Hon'ble Membah
90
-define('MEMBER',         '0'); # Unused because the permissions are now flat
91
-define('POWER',          '0');
92
-define('ELITE',          '0');
93
-define('LEGEND',         '0');
98
+define('USER',           '2');
99
+define('MEMBER',         '3');
100
+define('POWER',          '4');
101
+define('ELITE',          '5');
102
+define('LEGEND',         '8');
94
 define('MOD',            '11');
103
 define('MOD',            '11');
95
 define('SYSOP',          '15');
104
 define('SYSOP',          '15');
96
-define('ARTIST',         '0');
97
-define('DONOR',          '20'); # Still in use for people who donate
98
-define('VIP',            '0');
99
-define('TORRENT_MASTER', '0');
100
-define('POWER_TM',       '0');
105
+define('ARTIST',         '19');
106
+define('DONOR',          '20');
107
+define('VIP',            '21');
108
+define('TORRENT_MASTER', '23');
109
+define('POWER_TM',       '24');
101
 define('FLS_TEAM',       '33');
110
 define('FLS_TEAM',       '33');
102
 define('FORUM_MOD',      '9001');
111
 define('FORUM_MOD',      '9001');
103
 
112
 
104
 // Forums
113
 // Forums
105
-define('STAFF_FORUM',           0); # todo
106
-define('DONOR_FORUM',           0); # todo
114
+define('STAFF_FORUM',           3);
115
+define('DONOR_FORUM',           7);
107
 define('TRASH_FORUM_ID',        8);
116
 define('TRASH_FORUM_ID',        8);
108
 define('ANNOUNCEMENT_FORUM_ID', 1);
117
 define('ANNOUNCEMENT_FORUM_ID', 1);
118
+define('SUGGESTIONS_FORUM_ID',  2);
109
 
119
 
110
 // Pagination
120
 // Pagination
111
 define('TORRENT_COMMENTS_PER_PAGE', 10);
121
 define('TORRENT_COMMENTS_PER_PAGE', 10);
120
 define('THREAD_CATALOGUE', 500); // Limit to THREAD_CATALOGUE posts per cache key.
130
 define('THREAD_CATALOGUE', 500); // Limit to THREAD_CATALOGUE posts per cache key.
121
 
131
 
122
 // IRC settings
132
 // IRC settings
133
+define('SLACK_INVITE',          '00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000');
123
 define('BOT_NICK',              'bot');
134
 define('BOT_NICK',              'bot');
124
 define('BOT_SERVER',            'irc.'.SITE_DOMAIN); // IRC server address. Used for onsite chat tool.
135
 define('BOT_SERVER',            'irc.'.SITE_DOMAIN); // IRC server address. Used for onsite chat tool.
125
 define('BOT_PORT',              6667);
136
 define('BOT_PORT',              6667);
158
 
169
 
159
 $Categories = [
170
 $Categories = [
160
   'DNA',
171
   'DNA',
161
-  'mRNA',
162
-  'rRNA',
163
-  'tRNA',
172
+  'RNA',
164
   'Protein',
173
   'Protein',
165
-  'Other',
174
+  'Imaging',
175
+  'Extras',
166
 ];
176
 ];
167
 $GroupedCategories = $Categories;
177
 $GroupedCategories = $Categories;
168
 #$CategoryIcons = ['music.png', 'apps.png', 'ebook.png', 'audiobook.png', 'elearning.png', 'comedy.png', 'comics.png'];
178
 #$CategoryIcons = ['music.png', 'apps.png', 'ebook.png', 'audiobook.png', 'elearning.png', 'comedy.png', 'comics.png'];
169
 
179
 
170
 $Media = [
180
 $Media = [
171
-  'Sanger',
172
-  'Shotgun',
173
-  'Illumina',
174
-  'PacBio',
181
+  # DNA
182
+  'Complete Genomics',
183
+  'cPAS-BGI/MGI',
184
+  'Helicos',
185
+  'Illumina HiSeq',
186
+  'Illumina MiSeq',
187
+  'Ion Torrent',
188
+  'Microfluidics',
175
   'Nanopore',
189
   'Nanopore',
190
+  'PacBio',
191
+  'Roche 454',
192
+  'Sanger',
193
+  'SOLiD',
194
+
195
+  # RNA, Protein, etc.
196
+  'De Novo',
197
+  'HPLC',
198
+  'Mass Spec',
199
+  'RNA-Seq',
200
+  'Other',
201
+];
202
+
203
+# Imaging Platforms
204
+$MediaManga = [
205
+  'CT/CAT',
206
+  'ECG',
207
+  'Elastography',
208
+  'FNIR/NIRS',
209
+  'MPI',
210
+  'MRI/NMR',
211
+  'Microscopy',
212
+  'Photoacoustic',
213
+  'Photography',
214
+  'Scint/SPECT/PET',
215
+  'Ultrasound',
216
+  'X-Rays',
176
   'Other',
217
   'Other',
177
 ];
218
 ];
178
-#$MediaManga = ['Scan', 'Web'];
219
+
179
 #$Platform = ['Windows', 'OS X', 'Linux', 'BSD', 'Flash', 'Java', 'Android', 'iOS', '3DS'];
220
 #$Platform = ['Windows', 'OS X', 'Linux', 'BSD', 'Flash', 'Java', 'Android', 'iOS', '3DS'];
221
+
222
+# Sequencing Formats
223
+# https://www.ncbi.nlm.nih.gov/sra/docs/submitformats/
180
 $Containers = [
224
 $Containers = [
181
-  'EMBL',
182
-  'FASTA',
183
-  'GenBank',
184
-  'PIR',
185
-  'SwissProt',
186
-  'Plain',
225
+  'Autofill'   => ['Autofill'],
226
+  'BAM'        => ['bam'],
227
+  'CRAM'       => ['cram'],
228
+  'EMBL'       => ['embl'],
229
+  'FASTA'      => ['fa', 'fasta', 'fsa'],
230
+  'FASTA+QUAL' => ['qual'],
231
+  'CSFASTA'    => ['csfa', 'csfasta', 'csfsa'],
232
+  'FASTQ'      => ['fastq', 'fq', 'sanfastq'],
233
+  'GFF'        => ['gff', 'gff2', 'gff3'],
234
+  'GTF'        => ['gtf'],
235
+  'GenBank'    => ['gb', 'gbk', 'genbank'],
236
+  'HDF5'       => ['bash5', 'baxh5', 'fast5', 'hdf5'],
237
+  'PIR'        => ['pir'],
238
+  'QSeq'       => ['qseq'],
239
+  'SAM'        => ['sam'],
240
+  'SFF'        => ['sff'],
241
+  'SRF'        => ['srf'],
242
+  'SnapGene'   => ['dna', 'seq'],
243
+  'SwissProt'  => ['dat'],
244
+  'VCF'        => ['vcf'],
245
+  'Plain'      => ['csv', 'txt'],
187
 ];
246
 ];
188
-#$ContainersGames = ['ISO', 'BIN-CUE', 'Installer', 'Loose'];
247
+
248
+# Imaging Formats
249
+# https://www.ncbi.nlm.nih.gov/pmc/articles/PMC3948928/
250
+$ContainersGames = [
251
+  'Autofill'  => ['Autofill'],
252
+  'Analyze'   => ['hdr', 'img'],
253
+  'Interfile' => ['h33'],
254
+  'DICOM'     => ['dcm', 'dicom'],
255
+  'NIfTI'     => ['nii', 'nifti'],
256
+  'MINC'      => ['minc', 'mnc'],
257
+  'JPEG'      => ['jfif', 'jpeg', 'jpg'],
258
+  'JPEG 2000' => ['j2k', 'jp2', 'jpf', 'jpm', 'jpx', 'mj2'],
259
+  'PNG'       => ['png'],
260
+  'TIFF'      => ['tif', 'tiff'],
261
+  'WebP'      => ['webp'],
262
+  'Other'     => [''],
263
+];
264
+
265
+# Protein Formats
266
+# https://www.ncbi.nlm.nih.gov/pmc/articles/PMC3518119/
267
+# DO NOT PARSE RAW FILES. TOO MANY COMPETING VENDORS
268
+$ContainersProt = [
269
+  'Autofill'       => ['Autofill'],
270
+  'ABI/Sciex'      => ['t2d', 'wiff'],
271
+  'APML'           => ['apml'],
272
+  'ASF'            => ['asf'],
273
+  'Agilent/Bruker' => ['baf', 'd', 'fid', 'tdf', 'yep'],
274
+  'BlibBuild'      => ['blib'],
275
+  'Bruker/Varian'  => ['sms', 'xms'],
276
+  'Finnigan'       => ['dat', 'ms'],
277
+  'ION-TOF'        => ['ita', 'itm'],
278
+  'JCAMP-DX'       => ['jdx'],
279
+  'MGF'            => ['mgf'],
280
+  'MS2'            => ['ms2'],
281
+  'MSF'            => ['msf'],
282
+  'mzData'         => ['mzdata'],
283
+  'mzML'           => ['mzml'],
284
+  'mzXML'          => ['mzxml'],
285
+  'OMSSA'          => ['omssa', 'omx'],
286
+  'PEFF'           => ['peff'],
287
+  'pepXML'         => ['pepxml'],
288
+  'protXML'        => ['protxml'],
289
+  'Shimadzu'       => ['lcd', 'qgd', 'spc'],
290
+  'Skyline'        => ['sky', 'skyd'],
291
+  'TPP/SPC'        => ['dta'],
292
+  'Tandem'         => ['tandem'],
293
+  'TraML'          => ['traml'],
294
+  'ULVAC-PHI'      => ['tdc'],
295
+  'Plain'          => ['csv', 'txt'],
296
+];
297
+
298
+$Archives = [
299
+  'Autofill' => ['Autofill'],
300
+  '7z'       => ['7z'],
301
+  'bzip2'    => ['bz2', 'bzip2'],
302
+  'gzip'     => ['gz', 'gzip', 'tgz', 'tpz'],
303
+  'Pickle'   => ['pickle', 'pkl'],
304
+  'RAR'      => ['rar', 'rev'],
305
+  'ZIP'      => ['zip', 'zipx'],
306
+  'None'     => [''],
307
+];
308
+#$ArchivesManga = ['cbz', 'cbr', 'cb7'];
309
+
310
+# Licenses
189
 $Codecs = [
311
 $Codecs = [
190
   'CC BY',
312
   'CC BY',
191
   'CC BY-SA',
313
   'CC BY-SA',
197
   'GNU LGPL',
319
   'GNU LGPL',
198
   'GNU AGPL',
320
   'GNU AGPL',
199
   'GNU FDL',
321
   'GNU FDL',
322
+  'MIT',
323
+  'ODC-By',
324
+  'ODC-ODbL',
200
   'OpenMTA',
325
   'OpenMTA',
201
   'Public Domain',
326
   'Public Domain',
327
+  'Unspecified',
202
 ];
328
 ];
329
+
330
+# Assembly Levels
203
 $Resolutions = [
331
 $Resolutions = [
204
   'Contig',
332
   'Contig',
205
   'Scaffold',
333
   'Scaffold',
206
   'Chromosome',
334
   'Chromosome',
207
   'Whole Genome',
335
   'Whole Genome',
336
+  'Other',
208
 ];
337
 ];
338
+
209
 #$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'];
339
 #$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'];
210
 #$Subbing = ['Softsubs', 'Hardsubs', 'RAW'];
340
 #$Subbing = ['Softsubs', 'Hardsubs', 'RAW'];
211
 #$Languages = ['English', 'Japanese', 'Dual Language', 'None'];
341
 #$Languages = ['English', 'Japanese', 'Dual Language', 'None'];
212
-$Archives = [
213
-  '7z',
214
-  'bzip2',
215
-  'gzip',
216
-  'RAR',
217
-  'ZIP',
218
-  'None',
219
-];
220
-#$ArchivesManga = ['cbz', 'cbr', 'cb7'];
221
-
222
 #$Formats = ['MP3', 'FLAC', 'Ogg Vorbis', 'AAC', 'AC3', 'DTS'];
342
 #$Formats = ['MP3', 'FLAC', 'Ogg Vorbis', 'AAC', 'AC3', 'DTS'];
223
 #$Bitrates = ['192', 'APS (VBR)', 'V2 (VBR)', 'V1 (VBR)', '256', 'APX (VBR)', 'V0 (VBR)', 'q8.x (VBR)', '320', 'Lossless', '24bit Lossless', 'Other'];
343
 #$Bitrates = ['192', 'APS (VBR)', 'V2 (VBR)', 'V1 (VBR)', '256', 'APX (VBR)', 'V0 (VBR)', 'q8.x (VBR)', '320', 'Lossless', '24bit Lossless', 'Other'];
224
 
344
 
226
   0 => 'Personal',
346
   0 => 'Personal',
227
   1 => 'Theme',
347
   1 => 'Theme',
228
   2 => 'Staff Picks',
348
   2 => 'Staff Picks',
229
-  3 => 'Artists',
349
+  #3 => 'Artists',
230
 ];
350
 ];
231
 
351
 
232
 #$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'];
352
 #$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'];
249
 
369
 
250
 // God I wish I didn't have to do this but I just don't care anymore.
370
 // God I wish I didn't have to do this but I just don't care anymore.
251
 define('AUTOMATED_BADGE_IDS', [
371
 define('AUTOMATED_BADGE_IDS', [
252
-  'DL'      => [
372
+  'DL' => [
253
     '8'     => 10,
373
     '8'     => 10,
254
     '16'    => 11,
374
     '16'    => 11,
255
     '32'    => 12,
375
     '32'    => 12,
260
     '1024'  => 17,
380
     '1024'  => 17,
261
     '2048'  => 18
381
     '2048'  => 18
262
   ],
382
   ],
263
-  'UL'      => [
383
+  'UL' => [
264
     '16'    => 30,
384
     '16'    => 30,
265
     '32'    => 31,
385
     '32'    => 31,
266
     '64'    => 32,
386
     '64'    => 32,
271
     '2048'  => 37,
391
     '2048'  => 37,
272
     '4096'  => 38
392
     '4096'  => 38
273
   ],
393
   ],
274
-  'Posts'   => [
394
+  'Posts' => [
275
     '25'    => 60,
395
     '25'    => 60,
276
     '50'    => 61,
396
     '50'    => 61,
277
     '100'   => 62,
397
     '100'   => 62,

Loading…
Cancel
Save