2 Commits

Author SHA1 Message Date
  biotorrents 34a2337a54 Many small pre-update fixes 4 years ago
  biotorrents 48e3ea4aac Add basic bioinformatics support 4 years ago

+ 69
- 50
classes/config.template.php View File

1
-
2
 <?php
1
 <?php
3
 declare(strict_types=1);
2
 declare(strict_types=1);
4
 
3
 
56
 ENV::setPub(
55
 ENV::setPub(
57
     'SITE_NAME',
56
     'SITE_NAME',
58
     (!$ENV->DEV
57
     (!$ENV->DEV
59
-        ? 'BioTorrents.de' # Production
60
-        : '[Dev] BioTorrents.de') # Development
58
+        ? 'torrents.bio' # Production
59
+        : 'dev.torrents.bio') # Development
61
 );
60
 );
62
 
61
 
63
 # Meta description
62
 # Meta description
64
 ENV::setPub('DESCRIPTION', 'A platform to share biological sequence and medical imaging data');
63
 ENV::setPub('DESCRIPTION', 'A platform to share biological sequence and medical imaging data');
65
 
64
 
66
 # Navigation glyphs
65
 # Navigation glyphs
67
-ENV::setPub('SEP', ''); # e.g., News ⸬ BioTorrents.de
66
+ENV::setPub('SEP', '-'); # e.g., News ⸬ BioTorrents.de
68
 ENV::setPub('CRUMB', '›'); # e.g., Forums › Board › Thread
67
 ENV::setPub('CRUMB', '›'); # e.g., Forums › Board › Thread
69
 
68
 
70
 # The FQDN of your site, e.g., dev.biotorrents.de
69
 # The FQDN of your site, e.g., dev.biotorrents.de
81
         : 'dev.biotorrents.de') # Development
80
         : 'dev.biotorrents.de') # Development
82
 );
81
 );
83
 
82
 
83
+# Old domain, to handle the biotorrents.de => torrents.bio migration
84
+# If not needed, simply set to the same values as $ENV->SITE_DOMAIN
85
+ENV::setPub(
86
+    'OLD_SITE_DOMAIN',
87
+    (!$ENV->DEV
88
+        ? 'biotorrents.de' # Production
89
+        : 'dev.biotorrents.de') # Development
90
+);
91
+
84
 # The FQDN of your image host, e.g., pics.biotorrents.de
92
 # The FQDN of your image host, e.g., pics.biotorrents.de
85
 ENV::setPub('IMAGE_DOMAIN', 'pics.biotorrents.de');
93
 ENV::setPub('IMAGE_DOMAIN', 'pics.biotorrents.de');
86
 
94
 
127
  * Tech support
135
  * Tech support
128
  */
136
  */
129
 
137
 
138
+ /*
130
 $TechSupport = [
139
 $TechSupport = [
131
   'Email' => 'help@biotorrents.de',
140
   'Email' => 'help@biotorrents.de',
132
   'Subject' => '[TxID '.strtoupper(bin2hex(random_bytes(2))).'] Specific subject line with TxID intact',
141
   'Subject' => '[TxID '.strtoupper(bin2hex(random_bytes(2))).'] Specific subject line with TxID intact',
136
     'HELP',
145
     'HELP',
137
     $ENV->convert($TechSupport)
146
     $ENV->convert($TechSupport)
138
 );
147
 );
148
+*/
139
 
149
 
140
 
150
 
141
 /**
151
 /**
380
 # (should only be used for initial setup)
390
 # (should only be used for initial setup)
381
 ENV::setPub('FEATURE_SET_ENC_KEY_PUBLIC', false);
391
 ENV::setPub('FEATURE_SET_ENC_KEY_PUBLIC', false);
382
 
392
 
383
-# Attempt to support the Seqhash algorithm
393
+# Attempt to support the BioPHP library
394
+# https://packagist.org/packages/biotorrents/biophp
384
 # https://blog.libredna.org/post/seqhash/
395
 # https://blog.libredna.org/post/seqhash/
385
 ENV::setPub('FEATURE_BIOPHP', true);
396
 ENV::setPub('FEATURE_BIOPHP', true);
386
 
397
 
831
     'version' => ['name' => 'Version', 'desc' => 'Start with 0.1.0', 'note' => 'Please see <a href="https://semver.org" target="_blank">Semantic Versioning</a>'],
842
     'version' => ['name' => 'Version', 'desc' => 'Start with 0.1.0', 'note' => 'Please see <a href="https://semver.org" target="_blank">Semantic Versioning</a>'],
832
     'license' => ['name' => 'License', 'desc' => '', 'note' => 'Please see <a href="http://www.dcc.ac.uk/resources/how-guides/license-research-data" target="_blank">How to License Research Data</a>'],
843
     'license' => ['name' => 'License', 'desc' => '', 'note' => 'Please see <a href="http://www.dcc.ac.uk/resources/how-guides/license-research-data" target="_blank">How to License Research Data</a>'],
833
     'mirrors' => ['name' => 'Mirrors', 'desc' => 'Up to two FTP/HTTP addresses that either point directly to a file, or for multi-file torrents, to the enclosing folder'],
844
     'mirrors' => ['name' => 'Mirrors', 'desc' => 'Up to two FTP/HTTP addresses that either point directly to a file, or for multi-file torrents, to the enclosing folder'],
845
+
846
+    # Original fields
847
+    'seqhash' => ['name' => 'Seqhash', 'desc' => 'Sample genome sequence in FASTA format (GenBank pending)', 'note' => 'Please see <a href="https://blog.libredna.org/post/seqhash/" target="_blank">The Seqhash Algorithm</a>'],
834
 ];
848
 ];
835
 ENV::setPub(
849
 ENV::setPub(
836
     'DB',
850
     'DB',
971
         'Plain' => [
985
         'Plain' => [
972
             'CSV'   => ['csv'], # 3
986
             'CSV'   => ['csv'], # 3
973
             'JSON'  => ['json'], # 3
987
             'JSON'  => ['json'], # 3
974
-            'Text'  => ['txt'], # 3
988
+            'Text'  => ['txt', 'asc'], # 3
975
             'XML'   => ['xml'], # etc.
989
             'XML'   => ['xml'], # etc.
976
         ],
990
         ],
977
 
991
 
992
+        /**
993
+         * 2.
994
+         * Databases
995
+         */
996
+        'Databases' => [
997
+            'MS SQL'   => ['mdf', 'ndf', 'ldf'],
998
+            'MySQL'   => ['sql', 'mysql'],
999
+            'Oracle' => ['dbf', 'ora', 'oraenv'],
1000
+            'IBM Db2' => ['ixf', 'del', 'cursor'],
1001
+            'Postgres' => ['sql']
1002
+        ],
1003
+
1004
+
978
         /**
1005
         /**
979
          * 2.
1006
          * 2.
980
          * Archives
1007
          * Archives
1330
         'Icon' => "$CatIcons/sequences.png",
1357
         'Icon' => "$CatIcons/sequences.png",
1331
         'Description' => "For data that's ACGT, ACGU, amino acid letters on disk.",
1358
         'Description' => "For data that's ACGT, ACGU, amino acid letters on disk.",
1332
         'Platforms' => $ENV->META->Platforms->Sequences,
1359
         'Platforms' => $ENV->META->Platforms->Sequences,
1333
-        'Formats' => array_merge([
1334
-            /*
1335
-            'Sequences' => $ENV->META->Formats->Sequences,
1336
-            'Proteins' => $ENV->META->Formats->Proteins,
1337
-            'Plain' => $ENV->META->Formats->Plain,
1338
-            */
1360
+        'Formats' => [
1339
             $ENV->META->Formats->Sequences,
1361
             $ENV->META->Formats->Sequences,
1340
             $ENV->META->Formats->Proteins,
1362
             $ENV->META->Formats->Proteins,
1341
             $ENV->META->Formats->Plain,
1363
             $ENV->META->Formats->Plain,
1342
-        ]),
1364
+        ],
1343
     ],
1365
     ],
1344
 
1366
 
1345
     2 => [
1367
     2 => [
1349
         'Description' => 'For pathway and regulatory network data, structured taxonomies, etc.',
1371
         'Description' => 'For pathway and regulatory network data, structured taxonomies, etc.',
1350
         'Platforms' => $ENV->META->Platforms->Graphs,
1372
         'Platforms' => $ENV->META->Platforms->Graphs,
1351
         'Formats' => [
1373
         'Formats' => [
1352
-            'GraphXml' => $ENV->META->Formats->GraphXml,
1353
-            'GraphTxt' => $ENV->META->Formats->GraphTxt,
1354
-            'Plain' => $ENV->META->Formats->Plain,
1374
+            $ENV->META->Formats->GraphXml,
1375
+            $ENV->META->Formats->GraphTxt,
1376
+            $ENV->META->Formats->Plain,
1355
         ],
1377
         ],
1356
     ],
1378
     ],
1357
 
1379
 
1362
         'Description' => 'For data that examines one facet broadly, not one subject deeply.',
1384
         'Description' => 'For data that examines one facet broadly, not one subject deeply.',
1363
         'Platforms' => $ENV->META->Platforms->Graphs,
1385
         'Platforms' => $ENV->META->Platforms->Graphs,
1364
         'Formats' => [
1386
         'Formats' => [
1365
-            'GraphXml' => $ENV->META->Formats->GraphXml,
1366
-            'GraphTxt' => $ENV->META->Formats->GraphTxt,
1367
-            'Plain' => $ENV->META->Formats->Plain,
1387
+            $ENV->META->Formats->GraphXml,
1388
+            $ENV->META->Formats->GraphTxt,
1389
+            $ENV->META->Formats->Plain,
1368
         ],
1390
         ],
1369
     ],
1391
     ],
1370
 
1392
 
1375
         'Description' => "For structured data (XML, etc.) that describes the subject's orientation in space.",
1397
         'Description' => "For structured data (XML, etc.) that describes the subject's orientation in space.",
1376
         'Platforms' => $ENV->META->Platforms->Graphs,
1398
         'Platforms' => $ENV->META->Platforms->Graphs,
1377
         'Formats' => [
1399
         'Formats' => [
1378
-            'GraphXml' => $ENV->META->Formats->GraphXml,
1379
-            'GraphTxt' => $ENV->META->Formats->GraphTxt,
1380
-            'Plain' => $ENV->META->Formats->Plain,
1400
+            $ENV->META->Formats->GraphXml,
1401
+            $ENV->META->Formats->GraphTxt,
1402
+            $ENV->META->Formats->Plain,
1381
         ],
1403
         ],
1382
     ],
1404
     ],
1383
 
1405
 
1388
         'Description' => 'For data that describes observations over time and/or space.',
1410
         'Description' => 'For data that describes observations over time and/or space.',
1389
         'Platforms' => $ENV->META->Platforms->Graphs,
1411
         'Platforms' => $ENV->META->Platforms->Graphs,
1390
         'Formats' => [
1412
         'Formats' => [
1391
-            'GraphXml' => $ENV->META->Formats->GraphXml,
1392
-            'GraphTxt' => $ENV->META->Formats->GraphTxt,
1393
-            'Plain' => $ENV->META->Formats->Plain,
1413
+            $ENV->META->Formats->GraphXml,
1414
+            $ENV->META->Formats->GraphTxt,
1415
+            $ENV->META->Formats->Plain,
1394
         ],
1416
         ],
1395
     ],
1417
     ],
1396
 
1418
 
1401
         'Description' => 'For data that describes recurring structures in nature such as common pathways or motifs in the proteome or metabolome.',
1423
         'Description' => 'For data that describes recurring structures in nature such as common pathways or motifs in the proteome or metabolome.',
1402
         'Platforms' => $ENV->META->Platforms->Graphs,
1424
         'Platforms' => $ENV->META->Platforms->Graphs,
1403
         'Formats' => [
1425
         'Formats' => [
1404
-            'GraphXml' => $ENV->META->Formats->GraphXml,
1405
-            'GraphTxt' => $ENV->META->Formats->GraphTxt,
1406
-            'Plain' => $ENV->META->Formats->Plain,
1426
+            $ENV->META->Formats->GraphXml,
1427
+            $ENV->META->Formats->GraphTxt,
1428
+            $ENV->META->Formats->Plain,
1407
         ],
1429
         ],
1408
     ],
1430
     ],
1409
 
1431
 
1414
         'Description' => 'For data that records experimental control behavior, checks readings against known physical constants, tracks the thermodynamic limits of reactions, etc.',
1436
         'Description' => 'For data that records experimental control behavior, checks readings against known physical constants, tracks the thermodynamic limits of reactions, etc.',
1415
         'Platforms' => $ENV->META->Platforms->Graphs,
1437
         'Platforms' => $ENV->META->Platforms->Graphs,
1416
         'Formats' => [
1438
         'Formats' => [
1417
-            'GraphXml' => $ENV->META->Formats->GraphXml,
1418
-            'GraphTxt' => $ENV->META->Formats->GraphTxt,
1419
-            'Plain' => $ENV->META->Formats->Plain,
1439
+            $ENV->META->Formats->GraphXml,
1440
+            $ENV->META->Formats->GraphTxt,
1441
+            $ENV->META->Formats->Plain,
1420
         ],
1442
         ],
1421
     ],
1443
     ],
1422
 
1444
 
1427
         'Description' => 'For data you can look at!',
1449
         'Description' => 'For data you can look at!',
1428
         'Platforms' => $ENV->META->Platforms->Images,
1450
         'Platforms' => $ENV->META->Platforms->Images,
1429
         'Formats' => [
1451
         'Formats' => [
1430
-            'ImgRaster' => $ENV->META->Formats->ImgRaster,
1431
-            'ImgVector' => $ENV->META->Formats->ImgVector,
1432
-            'Plain' => $ENV->META->Formats->Plain,
1452
+            $ENV->META->Formats->ImgRaster,
1453
+            $ENV->META->Formats->ImgVector,
1433
         ],
1454
         ],
1434
     ],
1455
     ],
1435
 
1456
 
1440
         'Description' => "For data that's limited to specific locations or otherwise describes macroscopic space.",
1461
         'Description' => "For data that's limited to specific locations or otherwise describes macroscopic space.",
1441
         'Platforms' => $ENV->META->Platforms->Graphs,
1462
         'Platforms' => $ENV->META->Platforms->Graphs,
1442
         'Formats' => [
1463
         'Formats' => [
1443
-            'MapRaster' => $ENV->META->Formats->MapRaster,
1444
-            'MapVector' => $ENV->META->Formats->MapVector,
1445
-            'ImgRaster' => $ENV->META->Formats->ImgRaster,
1446
-            'ImgVector' => $ENV->META->Formats->ImgVector,
1447
-            'Plain' => $ENV->META->Formats->Plain,
1464
+            $ENV->META->Formats->MapRaster,
1465
+            $ENV->META->Formats->MapVector,
1466
+            $ENV->META->Formats->ImgRaster,
1467
+            $ENV->META->Formats->ImgVector,
1448
         ],
1468
         ],
1449
     ],
1469
     ],
1450
 
1470
 
1455
         'Description' => 'For projections, simulations, and other hypothetical or computer-generated data.',
1475
         'Description' => 'For projections, simulations, and other hypothetical or computer-generated data.',
1456
         'Platforms' => $ENV->META->Platforms->Graphs,
1476
         'Platforms' => $ENV->META->Platforms->Graphs,
1457
         'Formats' => [
1477
         'Formats' => [
1458
-            'MapRaster' => $ENV->META->Formats->MapRaster,
1459
-            'MapVector' => $ENV->META->Formats->MapVector,
1460
-            'ImgRaster' => $ENV->META->Formats->ImgRaster,
1461
-            'ImgVector' => $ENV->META->Formats->ImgVector,
1462
-            'Plain' => $ENV->META->Formats->Plain,
1478
+            $ENV->META->Formats->MapRaster,
1479
+            $ENV->META->Formats->MapVector,
1480
+            $ENV->META->Formats->ImgRaster,
1481
+            $ENV->META->Formats->ImgVector,
1463
         ],
1482
         ],
1464
     ],
1483
     ],
1465
 
1484
 
1470
         'Description' => 'For documentation, software, disk images, and literature datasets.',
1489
         'Description' => 'For documentation, software, disk images, and literature datasets.',
1471
         'Platforms' => $ENV->META->Platforms->Documents,
1490
         'Platforms' => $ENV->META->Platforms->Documents,
1472
         'Formats' => [
1491
         'Formats' => [
1473
-            'BinDoc' => $ENV->META->Formats->BinDoc,
1474
-            'CpuGen' => $ENV->META->Formats->CpuGen,
1475
-            'Plain' => $ENV->META->Formats->Plain,
1492
+            $ENV->META->Formats->BinDoc,
1493
+            $ENV->META->Formats->CpuGen,
1494
+            $ENV->META->Formats->Plain,
1476
         ],
1495
         ],
1477
     ],
1496
     ],
1478
 
1497
 
1483
         'Description' => 'For raw reads and machine data of any category.',
1502
         'Description' => 'For raw reads and machine data of any category.',
1484
         'Platforms' => $ENV->META->Platforms->Raw,
1503
         'Platforms' => $ENV->META->Platforms->Raw,
1485
         'Formats' => [
1504
         'Formats' => [
1486
-            'Plain' => $ENV->META->Formats->Plain,
1505
+            $ENV->META->Formats->Plain,
1487
         ],
1506
         ],
1488
     ],
1507
     ],
1489
 ];
1508
 ];
1501
  */
1520
  */
1502
 
1521
 
1503
 // resource_type://username:password@domain:port/path?query_string#anchor
1522
 // resource_type://username:password@domain:port/path?query_string#anchor
1504
-define('RESOURCE_REGEX', '(https?|ftps?):\/\/');
1523
+define('RESOURCE_REGEX', '(https?|ftps?|dat|ipfs):\/\/');
1505
 ENV::setPub(
1524
 ENV::setPub(
1506
     'RESOURCE_REGEX',
1525
     'RESOURCE_REGEX',
1507
-    '(https?|ftps?):\/\/'
1526
+    '(https?|ftps?|dat|ipfs):\/\/'
1508
 );
1527
 );
1509
 
1528
 
1510
 define('IP_REGEX', '(\d{1,3}\.){3}\d{1,3}');
1529
 define('IP_REGEX', '(\d{1,3}\.){3}\d{1,3}');

+ 2
- 1
classes/security.class.php View File

21
     {
21
     {
22
         foreach ($IDs as $ID) {
22
         foreach ($IDs as $ID) {
23
             if (!ID || !is_int($ID) || $ID < 1) {
23
             if (!ID || !is_int($ID) || $ID < 1) {
24
-                error("Expected an integer > 1, got $ID in Security::checkInt.");
24
+                return "Expected an integer > 1, got $ID in Security::checkInt.";
25
+                #error("Expected an integer > 1, got $ID in Security::checkInt.");
25
             }
26
             }
26
         }
27
         }
27
 
28
 

+ 1
- 1
classes/text.class.php View File

137
     public function fix_links($Parsed) {
137
     public function fix_links($Parsed) {
138
             # Replace links to $ENV->SITE_DOMAIN
138
             # Replace links to $ENV->SITE_DOMAIN
139
             $Parsed = preg_replace(
139
             $Parsed = preg_replace(
140
-                "/<a href=\"$ENV->RESOURCE_REGEX$ENV->SITE_DOMAIN\//",
140
+                "/<a href=\"$ENV->RESOURCE_REGEX($ENV->SITE_DOMAIN|$ENV->OLD_SITE_DOMAIN)\//",
141
                 '<a href="/',
141
                 '<a href="/',
142
                 $Parsed
142
                 $Parsed
143
             );
143
             );

+ 6
- 1
classes/util.php View File

508
         $response = ['status' => $Status, 'response' => []];
508
         $response = ['status' => $Status, 'response' => []];
509
     }
509
     }
510
 
510
 
511
-    print(json_encode(add_json_info($response)));
511
+    print(
512
+        json_encode(
513
+            add_json_info($response),
514
+            JSON_UNESCAPED_SLASHES
515
+        )
516
+    );
512
 }
517
 }
513
 
518
 
514
 /**
519
 /**

+ 28
- 52
classes/validate.class.php View File

46
 
46
 
47
 class Validate
47
 class Validate
48
 {
48
 {
49
+    /**
50
+     * mirrors
51
+     *
52
+     * @param string $String The raw textarea, e.g., from torrent_form.class.php
53
+     * @param string $Regex  The regex to test against, e.g., from $ENV
54
+     * @return array An array of unique values that match the regex
55
+     */
56
+    public function textarea2array(string $String, string $Regex)
57
+    {
58
+        $ENV = ENV::go();
59
+
60
+        $String = array_map(
61
+            'trim',
62
+            explode(
63
+                "\n",
64
+                $String
65
+            )
66
+        );
67
+        
68
+        return array_unique(
69
+            preg_grep(
70
+                "/^$Regex$/i",
71
+                $String
72
+            )
73
+        );
74
+    }
75
+
76
+    
49
     /**
77
     /**
50
      * title
78
      * title
51
      *
79
      *
245
     }
273
     }
246
 
274
 
247
 
275
 
248
-    /**
249
-     * Make input
250
-     * https://www.w3schools.com/html/html_form_input_types.asp
251
-     *
252
-     * Generate a secure HTML input element.
253
-     * Takes $Type, $Name (also used for id), and $Classes.
254
-     * Outputs a hardened input with the requested attributes.
255
-     *
256
-     * todo: See if this could work, one ugly switch for all forms in sections/
257
-     */
258
-
259
-    public function MakeInput($Type = 'text', $Name = '', $Classes = [])
260
-    {
261
-        if (!is_str($Type) || !is_str($Name)) {
262
-            error('$Type and $Name must be strings');
263
-        }
264
-
265
-        # Intentionally double quoted PHP constructing $HTML
266
-        # <input type='text' id='title_jp' name='title_jp' class='one two'
267
-        $HTML  = "";
268
-        $HTML .= "<input type='$Type' id='$Name' name='$Name'";
269
-        $HTML .= (!empty($Classes)) ? " class='" . implode(' ', $Classes) . "'" : "";
270
-
271
-        /*
272
-        'button'
273
-        'checkbox'
274
-        'color'
275
-        'date'
276
-        'datetime-local'
277
-        'email'
278
-        'file'
279
-        'hidden'
280
-        'image'
281
-        'month'
282
-        'number'
283
-        'password'
284
-        'radio'
285
-        'range'
286
-        'reset'
287
-        'search'
288
-        'submit'
289
-        'tel'
290
-        'text'
291
-        'time'
292
-        'url'
293
-        'week'
294
-        */
295
-                
296
-        return;
297
-    }
298
-    
299
-
300
     /**
276
     /**
301
      * Legacy class
277
      * Legacy class
302
      */
278
      */

+ 31
- 29
composer.lock View File

776
         },
776
         },
777
         {
777
         {
778
             "name": "symfony/config",
778
             "name": "symfony/config",
779
-            "version": "v5.3.3",
779
+            "version": "v5.3.4",
780
             "source": {
780
             "source": {
781
                 "type": "git",
781
                 "type": "git",
782
                 "url": "https://github.com/symfony/config.git",
782
                 "url": "https://github.com/symfony/config.git",
783
-                "reference": "a69e0c55528b47df88d3c4067ddedf32d485d662"
783
+                "reference": "4268f3059c904c61636275182707f81645517a37"
784
             },
784
             },
785
             "dist": {
785
             "dist": {
786
                 "type": "zip",
786
                 "type": "zip",
787
-                "url": "https://api.github.com/repos/symfony/config/zipball/a69e0c55528b47df88d3c4067ddedf32d485d662",
788
-                "reference": "a69e0c55528b47df88d3c4067ddedf32d485d662",
787
+                "url": "https://api.github.com/repos/symfony/config/zipball/4268f3059c904c61636275182707f81645517a37",
788
+                "reference": "4268f3059c904c61636275182707f81645517a37",
789
                 "shasum": ""
789
                 "shasum": ""
790
             },
790
             },
791
             "require": {
791
             "require": {
793
                 "symfony/deprecation-contracts": "^2.1",
793
                 "symfony/deprecation-contracts": "^2.1",
794
                 "symfony/filesystem": "^4.4|^5.0",
794
                 "symfony/filesystem": "^4.4|^5.0",
795
                 "symfony/polyfill-ctype": "~1.8",
795
                 "symfony/polyfill-ctype": "~1.8",
796
-                "symfony/polyfill-php80": "^1.15",
796
+                "symfony/polyfill-php80": "^1.16",
797
                 "symfony/polyfill-php81": "^1.22"
797
                 "symfony/polyfill-php81": "^1.22"
798
             },
798
             },
799
             "conflict": {
799
             "conflict": {
835
             "description": "Helps you find, load, combine, autofill and validate configuration values of any kind",
835
             "description": "Helps you find, load, combine, autofill and validate configuration values of any kind",
836
             "homepage": "https://symfony.com",
836
             "homepage": "https://symfony.com",
837
             "support": {
837
             "support": {
838
-                "source": "https://github.com/symfony/config/tree/v5.3.3"
838
+                "source": "https://github.com/symfony/config/tree/v5.3.4"
839
             },
839
             },
840
             "funding": [
840
             "funding": [
841
                 {
841
                 {
851
                     "type": "tidelift"
851
                     "type": "tidelift"
852
                 }
852
                 }
853
             ],
853
             ],
854
-            "time": "2021-06-24T08:13:00+00:00"
854
+            "time": "2021-07-21T12:40:44+00:00"
855
         },
855
         },
856
         {
856
         {
857
             "name": "symfony/console",
857
             "name": "symfony/console",
858
-            "version": "v5.3.2",
858
+            "version": "v5.3.4",
859
             "source": {
859
             "source": {
860
                 "type": "git",
860
                 "type": "git",
861
                 "url": "https://github.com/symfony/console.git",
861
                 "url": "https://github.com/symfony/console.git",
862
-                "reference": "649730483885ff2ca99ca0560ef0e5f6b03f2ac1"
862
+                "reference": "ebd610dacd40d75b6a12bf64b5ccd494fc7d6ab1"
863
             },
863
             },
864
             "dist": {
864
             "dist": {
865
                 "type": "zip",
865
                 "type": "zip",
866
-                "url": "https://api.github.com/repos/symfony/console/zipball/649730483885ff2ca99ca0560ef0e5f6b03f2ac1",
867
-                "reference": "649730483885ff2ca99ca0560ef0e5f6b03f2ac1",
866
+                "url": "https://api.github.com/repos/symfony/console/zipball/ebd610dacd40d75b6a12bf64b5ccd494fc7d6ab1",
867
+                "reference": "ebd610dacd40d75b6a12bf64b5ccd494fc7d6ab1",
868
                 "shasum": ""
868
                 "shasum": ""
869
             },
869
             },
870
             "require": {
870
             "require": {
872
                 "symfony/deprecation-contracts": "^2.1",
872
                 "symfony/deprecation-contracts": "^2.1",
873
                 "symfony/polyfill-mbstring": "~1.0",
873
                 "symfony/polyfill-mbstring": "~1.0",
874
                 "symfony/polyfill-php73": "^1.8",
874
                 "symfony/polyfill-php73": "^1.8",
875
-                "symfony/polyfill-php80": "^1.15",
875
+                "symfony/polyfill-php80": "^1.16",
876
                 "symfony/service-contracts": "^1.1|^2",
876
                 "symfony/service-contracts": "^1.1|^2",
877
                 "symfony/string": "^5.1"
877
                 "symfony/string": "^5.1"
878
             },
878
             },
879
             "conflict": {
879
             "conflict": {
880
+                "psr/log": ">=3",
880
                 "symfony/dependency-injection": "<4.4",
881
                 "symfony/dependency-injection": "<4.4",
881
                 "symfony/dotenv": "<5.1",
882
                 "symfony/dotenv": "<5.1",
882
                 "symfony/event-dispatcher": "<4.4",
883
                 "symfony/event-dispatcher": "<4.4",
884
                 "symfony/process": "<4.4"
885
                 "symfony/process": "<4.4"
885
             },
886
             },
886
             "provide": {
887
             "provide": {
887
-                "psr/log-implementation": "1.0"
888
+                "psr/log-implementation": "1.0|2.0"
888
             },
889
             },
889
             "require-dev": {
890
             "require-dev": {
890
-                "psr/log": "~1.0",
891
+                "psr/log": "^1|^2",
891
                 "symfony/config": "^4.4|^5.0",
892
                 "symfony/config": "^4.4|^5.0",
892
                 "symfony/dependency-injection": "^4.4|^5.0",
893
                 "symfony/dependency-injection": "^4.4|^5.0",
893
                 "symfony/event-dispatcher": "^4.4|^5.0",
894
                 "symfony/event-dispatcher": "^4.4|^5.0",
933
                 "terminal"
934
                 "terminal"
934
             ],
935
             ],
935
             "support": {
936
             "support": {
936
-                "source": "https://github.com/symfony/console/tree/v5.3.2"
937
+                "source": "https://github.com/symfony/console/tree/v5.3.4"
937
             },
938
             },
938
             "funding": [
939
             "funding": [
939
                 {
940
                 {
949
                     "type": "tidelift"
950
                     "type": "tidelift"
950
                 }
951
                 }
951
             ],
952
             ],
952
-            "time": "2021-06-12T09:42:48+00:00"
953
+            "time": "2021-07-26T16:33:26+00:00"
953
         },
954
         },
954
         {
955
         {
955
             "name": "symfony/deprecation-contracts",
956
             "name": "symfony/deprecation-contracts",
1020
         },
1021
         },
1021
         {
1022
         {
1022
             "name": "symfony/filesystem",
1023
             "name": "symfony/filesystem",
1023
-            "version": "v5.3.3",
1024
+            "version": "v5.3.4",
1024
             "source": {
1025
             "source": {
1025
                 "type": "git",
1026
                 "type": "git",
1026
                 "url": "https://github.com/symfony/filesystem.git",
1027
                 "url": "https://github.com/symfony/filesystem.git",
1027
-                "reference": "19b71c8f313b411172dd5f470fd61f24466d79a9"
1028
+                "reference": "343f4fe324383ca46792cae728a3b6e2f708fb32"
1028
             },
1029
             },
1029
             "dist": {
1030
             "dist": {
1030
                 "type": "zip",
1031
                 "type": "zip",
1031
-                "url": "https://api.github.com/repos/symfony/filesystem/zipball/19b71c8f313b411172dd5f470fd61f24466d79a9",
1032
-                "reference": "19b71c8f313b411172dd5f470fd61f24466d79a9",
1032
+                "url": "https://api.github.com/repos/symfony/filesystem/zipball/343f4fe324383ca46792cae728a3b6e2f708fb32",
1033
+                "reference": "343f4fe324383ca46792cae728a3b6e2f708fb32",
1033
                 "shasum": ""
1034
                 "shasum": ""
1034
             },
1035
             },
1035
             "require": {
1036
             "require": {
1036
                 "php": ">=7.2.5",
1037
                 "php": ">=7.2.5",
1037
-                "symfony/polyfill-ctype": "~1.8"
1038
+                "symfony/polyfill-ctype": "~1.8",
1039
+                "symfony/polyfill-php80": "^1.16"
1038
             },
1040
             },
1039
             "type": "library",
1041
             "type": "library",
1040
             "autoload": {
1042
             "autoload": {
1062
             "description": "Provides basic utilities for the filesystem",
1064
             "description": "Provides basic utilities for the filesystem",
1063
             "homepage": "https://symfony.com",
1065
             "homepage": "https://symfony.com",
1064
             "support": {
1066
             "support": {
1065
-                "source": "https://github.com/symfony/filesystem/tree/v5.3.3"
1067
+                "source": "https://github.com/symfony/filesystem/tree/v5.3.4"
1066
             },
1068
             },
1067
             "funding": [
1069
             "funding": [
1068
                 {
1070
                 {
1078
                     "type": "tidelift"
1080
                     "type": "tidelift"
1079
                 }
1081
                 }
1080
             ],
1082
             ],
1081
-            "time": "2021-06-30T07:27:52+00:00"
1083
+            "time": "2021-07-21T12:40:44+00:00"
1082
         },
1084
         },
1083
         {
1085
         {
1084
             "name": "symfony/polyfill-ctype",
1086
             "name": "symfony/polyfill-ctype",
3934
         },
3936
         },
3935
         {
3937
         {
3936
             "name": "theseer/tokenizer",
3938
             "name": "theseer/tokenizer",
3937
-            "version": "1.2.0",
3939
+            "version": "1.2.1",
3938
             "source": {
3940
             "source": {
3939
                 "type": "git",
3941
                 "type": "git",
3940
                 "url": "https://github.com/theseer/tokenizer.git",
3942
                 "url": "https://github.com/theseer/tokenizer.git",
3941
-                "reference": "75a63c33a8577608444246075ea0af0d052e452a"
3943
+                "reference": "34a41e998c2183e22995f158c581e7b5e755ab9e"
3942
             },
3944
             },
3943
             "dist": {
3945
             "dist": {
3944
                 "type": "zip",
3946
                 "type": "zip",
3945
-                "url": "https://api.github.com/repos/theseer/tokenizer/zipball/75a63c33a8577608444246075ea0af0d052e452a",
3946
-                "reference": "75a63c33a8577608444246075ea0af0d052e452a",
3947
+                "url": "https://api.github.com/repos/theseer/tokenizer/zipball/34a41e998c2183e22995f158c581e7b5e755ab9e",
3948
+                "reference": "34a41e998c2183e22995f158c581e7b5e755ab9e",
3947
                 "shasum": ""
3949
                 "shasum": ""
3948
             },
3950
             },
3949
             "require": {
3951
             "require": {
3972
             "description": "A small library for converting tokenized PHP source code into XML and potentially other formats",
3974
             "description": "A small library for converting tokenized PHP source code into XML and potentially other formats",
3973
             "support": {
3975
             "support": {
3974
                 "issues": "https://github.com/theseer/tokenizer/issues",
3976
                 "issues": "https://github.com/theseer/tokenizer/issues",
3975
-                "source": "https://github.com/theseer/tokenizer/tree/master"
3977
+                "source": "https://github.com/theseer/tokenizer/tree/1.2.1"
3976
             },
3978
             },
3977
             "funding": [
3979
             "funding": [
3978
                 {
3980
                 {
3980
                     "type": "github"
3982
                     "type": "github"
3981
                 }
3983
                 }
3982
             ],
3984
             ],
3983
-            "time": "2020-07-12T23:59:07+00:00"
3985
+            "time": "2021-07-28T10:34:58+00:00"
3984
         },
3986
         },
3985
         {
3987
         {
3986
             "name": "webmozart/assert",
3988
             "name": "webmozart/assert",

+ 3
- 1
design/privateheader.php View File

333
             size="17">
333
             size="17">
334
         </form>
334
         </form>
335
 
335
 
336
+        <!--
336
         <form class="search_form" name="artists" action="artist.php" method="get">
337
         <form class="search_form" name="artists" action="artist.php" method="get">
337
-          <input id="artistsearch" <?=Users::has_autocomplete_enabled('search')?>
338
+          <input id="artistsearch" <?=null#Users::has_autocomplete_enabled('search')?>
338
           aria-label="Search authors" accesskey="a" spellcheck="false" autocomplete="off" placeholder="Authors"
339
           aria-label="Search authors" accesskey="a" spellcheck="false" autocomplete="off" placeholder="Authors"
339
           type="text" name="artistname" size="17">
340
           type="text" name="artistname" size="17">
340
         </form>
341
         </form>
342
+          -->
341
 
343
 
342
         <form class="search_form" name="requests" action="requests.php" method="get">
344
         <form class="search_form" name="requests" action="requests.php" method="get">
343
           <input id="requestssearch" aria-label="Search requests" spellcheck="false" autocomplete="off"
345
           <input id="requestssearch" aria-label="Search requests" spellcheck="false" autocomplete="off"

+ 21
- 16
gazelle.sql View File

143
 ) ENGINE=InnoDB CHARSET=utf8mb4;
143
 ) ENGINE=InnoDB CHARSET=utf8mb4;
144
 
144
 
145
 
145
 
146
+-- 2021-07-28
147
+CREATE TABLE `bioinformatics` (
148
+  `id` int NOT NULL AUTO_INCREMENT,
149
+  `torrent_id` int NOT NULL,
150
+  `user_id` int NOT NULL,
151
+  `timestamp` datetime NOT NULL,
152
+  `name` varchar(255) DEFAULT NULL,
153
+  `seqhash` varchar(100) DEFAULT NULL,
154
+  `gc_content` tinyint DEFAULT NULL,
155
+  `monoisotopic_mass` double DEFAULT NULL,
156
+  PRIMARY KEY (`id`,`torrent_id`,`user_id`) 
157
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
158
+
159
+
146
 -- 2020-03-09
160
 -- 2020-03-09
147
 CREATE TABLE `blog` (
161
 CREATE TABLE `blog` (
148
   `ID` int unsigned NOT NULL AUTO_INCREMENT,
162
   `ID` int unsigned NOT NULL AUTO_INCREMENT,
1241
 ) ENGINE=InnoDB CHARSET=utf8mb4;
1255
 ) ENGINE=InnoDB CHARSET=utf8mb4;
1242
 
1256
 
1243
 
1257
 
1244
-CREATE TABLE `torrents_doi` (
1245
-  `ID` int NOT NULL AUTO_INCREMENT,
1246
-  `TorrentID` int NOT NULL,
1247
-  `UserID` int NOT NULL,
1248
-  `Time` datetime,
1249
-  `URI` varchar(255) NOT NULL,
1250
-  PRIMARY KEY (`ID`,`GroupID`,`URI`)
1251
-) ENGINE=InnoDB CHARSET=utf8mb4;
1252
-
1253
-
1258
+-- 2021-07-28
1254
 CREATE TABLE `torrents_mirrors` (
1259
 CREATE TABLE `torrents_mirrors` (
1255
-  `ID` int NOT NULL AUTO_INCREMENT,
1256
-  `GroupID` int NOT NULL,
1257
-  `UserID` int NOT NULL,
1258
-  `Time` datetime,
1259
-  `URI` varchar(255) NOT NULL,
1260
-  PRIMARY KEY (`ID`,`GroupID`,`URI`)
1260
+  `id` int NOT NULL AUTO_INCREMENT,
1261
+  `torrent_id` int NOT NULL,
1262
+  `user_id` int NOT NULL,
1263
+  `timestamp` datetime,
1264
+  `uri` varchar(255) NOT NULL,
1265
+  PRIMARY KEY (`id`,`torrent_id`,`uri`)
1261
 ) ENGINE=InnoDB CHARSET=utf8mb4;
1266
 ) ENGINE=InnoDB CHARSET=utf8mb4;
1262
 
1267
 
1263
 
1268
 

+ 1
- 1
readme.md View File

25
 with the appropriate bold/italic glyphs and monospace.
25
 with the appropriate bold/italic glyphs and monospace.
26
 These options are available to every theme.
26
 These options are available to every theme.
27
 Font Awesome 5 is also universally available.
27
 Font Awesome 5 is also universally available.
28
-[Download the fonts](https://docs.biotorrents.de/dl/fonts.tgz).
28
+[Download the fonts](https://torrents.bio/fonts.tgz).
29
 
29
 
30
 ## Markdown support
30
 ## Markdown support
31
 
31
 

+ 10
- 10
sections/api/torrents/group.php View File

81
     'id'            => (int) $TorrentDetails['id'],
81
     'id'            => (int) $TorrentDetails['id'],
82
     'identifier'    => $TorrentDetails['identifier'],
82
     'identifier'    => $TorrentDetails['identifier'],
83
 
83
 
84
-    'category_id'   => (int) $TorrentDetails['category_id'],
85
-    'category_name' => $CategoryName,
84
+    'categoryId'   => (int) $TorrentDetails['category_id'],
85
+    'categoryName' => $CategoryName,
86
 
86
 
87
     'title'         => $TorrentDetails['title'],
87
     'title'         => $TorrentDetails['title'],
88
     'subject'       => $TorrentDetails['subject'],
88
     'subject'       => $TorrentDetails['subject'],
89
     'object'        => $TorrentDetails['object'],
89
     'object'        => $TorrentDetails['object'],
90
 
90
 
91
     'authors'       => $Artists,
91
     'authors'       => $Artists,
92
-    'published'     => (int) $TorrentDetails['published'],
92
+    'year'          => (int) $TorrentDetails['year'],
93
     'workgroup'     => $TorrentDetails['workgroup'],
93
     'workgroup'     => $TorrentDetails['workgroup'],
94
     'location'      => $TorrentDetails['location'],
94
     'location'      => $TorrentDetails['location'],
95
 
95
 
99
     'description'   => $TorrentDetails['description'],
99
     'description'   => $TorrentDetails['description'],
100
    #'description'   => Text::full_format($TorrentDetails['description']),
100
    #'description'   => Text::full_format($TorrentDetails['description']),
101
     'picture'       => $TorrentDetails['picture'],
101
     'picture'       => $TorrentDetails['picture'],
102
-    'tag_list'      => $TagList,
102
+    'tagList'      => $TagList,
103
 
103
 
104
     'bookmarked'    => Bookmarks::has_bookmarked('torrent', $GroupID),
104
     'bookmarked'    => Bookmarks::has_bookmarked('torrent', $GroupID),
105
     'timestamp'     => $TorrentDetails['timestamp'],
105
     'timestamp'     => $TorrentDetails['timestamp'],
128
     # todo: Update DB schema
128
     # todo: Update DB schema
129
     $JsonTorrentList[] = [
129
     $JsonTorrentList[] = [
130
         'id'           => (int) $Torrent['ID'],
130
         'id'           => (int) $Torrent['ID'],
131
-        'info_hash'    => $Torrent['InfoHash'],
131
+        'infoHash'    => $Torrent['InfoHash'],
132
         'description'  => $Torrent['Description'],
132
         'description'  => $Torrent['Description'],
133
 
133
 
134
         'platform'     => $Torrent['Media'],
134
         'platform'     => $Torrent['Media'],
139
 
139
 
140
         'size'         => (int) $Torrent['Size'],
140
         'size'         => (int) $Torrent['Size'],
141
         'archive'      => $Torrent['Archive'],
141
         'archive'      => $Torrent['Archive'],
142
-        'file_count'   => (int) $Torrent['FileCount'],
143
-        'file_path'    => $Torrent['FilePath'],
144
-        'file_list'    => $FileList,
142
+        'fileCount'   => (int) $Torrent['FileCount'],
143
+        'filePath'    => $Torrent['FilePath'],
144
+        'fileList'    => $FileList,
145
 
145
 
146
         'seeders'      => (int) $Torrent['Seeders'],
146
         'seeders'      => (int) $Torrent['Seeders'],
147
         'leechers'     => (int) $Torrent['Leechers'],
147
         'leechers'     => (int) $Torrent['Leechers'],
148
         'snatched'     => (int) $Torrent['Snatched'],
148
         'snatched'     => (int) $Torrent['Snatched'],
149
-        'free_torrent' => ($Torrent['FreeTorrent'] === 1),
149
+        'freeTorrent' => ($Torrent['FreeTorrent'] === 1),
150
 
150
 
151
         'reported'     => (bool) $Torrent['Reported'],
151
         'reported'     => (bool) $Torrent['Reported'],
152
         'time'         => $Torrent['Time'],
152
         'time'         => $Torrent['Time'],
153
 
153
 
154
-        'user_id'      => (int) ($Torrent['Anonymous'] ? 0 : $Torrent['UserID']),
154
+        'userId'      => (int) ($Torrent['Anonymous'] ? 0 : $Torrent['UserID']),
155
         'username'     => ($Torrent['Anonymous'] ? 'Anonymous' : $Userinfo['Username']),
155
         'username'     => ($Torrent['Anonymous'] ? 'Anonymous' : $Userinfo['Username']),
156
     ];
156
     ];
157
 }
157
 }

+ 5
- 5
sections/api/torrents/torrent.php View File

1
 <?php
1
 <?php
2
-declare(strict_types=1);
2
+#declare(strict_types=1);
3
 
3
 
4
 require_once SERVER_ROOT.'/sections/torrents/functions.php';
4
 require_once SERVER_ROOT.'/sections/torrents/functions.php';
5
 
5
 
54
   'subject'     => $TorrentDetails['subject'],
54
   'subject'     => $TorrentDetails['subject'],
55
   'object'       => $TorrentDetails['object'],
55
   'object'       => $TorrentDetails['object'],
56
   'authors'      => $Artists,
56
   'authors'      => $Artists,
57
-  'published'         => (int) $TorrentDetails['published'],
57
+  'year'         => (int) $TorrentDetails['published'],
58
   'identifier'    => $TorrentDetails['identifier'],
58
   'identifier'    => $TorrentDetails['identifier'],
59
-  'category_id'   => (int) $TorrentDetails['category_id'],
60
-  'icategory_name' => $CategoryName,
59
+  'categoryId'   => (int) $TorrentDetails['category_id'],
60
+  'icategoryName' => $CategoryName,
61
   'timestamp'         => $TorrentDetails['timestamp'],
61
   'timestamp'         => $TorrentDetails['timestamp'],
62
   'bookmarked' => Bookmarks::has_bookmarked('torrent', $GroupID),
62
   'bookmarked' => Bookmarks::has_bookmarked('torrent', $GroupID),
63
-  'tag_list'         => $TagList
63
+  'tagList'         => $TagList
64
 ];
64
 ];
65
 
65
 
66
 $Torrent = $TorrentList[$TorrentID];
66
 $Torrent = $TorrentList[$TorrentID];

+ 1
- 1
sections/forums/search.php View File

229
     </tr>
229
     </tr>
230
     <tr>
230
     <tr>
231
       <td colspan="2" class="center">
231
       <td colspan="2" class="center">
232
-        <input type="submit" value="Search" />
232
+        <input type="submit" class="button-primary" value="Search" />
233
       </td>
233
       </td>
234
     </tr>
234
     </tr>
235
     </table>
235
     </table>

+ 6
- 6
sections/torrents/editgroup.php View File

43
 
43
 
44
 $DB->prepare_query("
44
 $DB->prepare_query("
45
 SELECT
45
 SELECT
46
-  `ID`,
47
-  `UserID`,
48
-  `Time`,
49
-  `URI`
46
+  `id`,
47
+  `user_id`,
48
+  `timestamp`,
49
+  `doi`
50
 FROM
50
 FROM
51
-  `torrents_doi`
51
+  `literature`
52
 WHERE
52
 WHERE
53
-  `TorrentID` = '$group_id'
53
+  `group_id` = '$group_id'
54
 ");
54
 ");
55
 $DB->exec_prepared_query();
55
 $DB->exec_prepared_query();
56
 
56
 

+ 12
- 11
sections/torrents/functions.php View File

58
         # Screenshots (Publications)
58
         # Screenshots (Publications)
59
         $DB->query("
59
         $DB->query("
60
         SELECT
60
         SELECT
61
-          `ID`,
62
-          `UserID`,
63
-          `Time`,
64
-          `URI`
61
+          `id`,
62
+          `user_id`,
63
+          `timestamp`,
64
+          `doi`
65
         FROM
65
         FROM
66
-          `torrents_doi`
66
+          `literature`
67
         WHERE
67
         WHERE
68
-          `TorrentID` = '$GroupID'
68
+          `group_id` = '$GroupID'
69
         ");
69
         ");
70
 
70
 
71
         if ($DB->has_results()) {
71
         if ($DB->has_results()) {
75
         }
75
         }
76
 
76
 
77
         # Mirrors
77
         # Mirrors
78
+        # todo: Fix $GroupID
78
         $DB->query("
79
         $DB->query("
79
         SELECT
80
         SELECT
80
-          `ID`,
81
-          `UserID`,
82
-          `Time`,
83
-          `URI`
81
+          `id`,
82
+          `user_id`,
83
+          `timestamp`,
84
+          `uri`
84
         FROM
85
         FROM
85
           `torrents_mirrors`
86
           `torrents_mirrors`
86
         WHERE
87
         WHERE
87
-          `GroupID` = '$GroupID'
88
+          `torrent_id` = '$GroupID'
88
         ");
89
         ");
89
   
90
   
90
         if ($DB->has_results()) {
91
         if ($DB->has_results()) {

+ 8
- 8
sections/torrents/screenshotedit.php View File

36
 
36
 
37
 $DB->query("
37
 $DB->query("
38
 SELECT
38
 SELECT
39
-  `UserID`,
40
-  `URI`
39
+  `user_id`,
40
+  `doi`
41
 FROM
41
 FROM
42
-  `torrents_doi`
42
+  `literature`
43
 WHERE
43
 WHERE
44
-  `TorrentID` = '$GroupID'
44
+  `group_id` = '$GroupID'
45
 ");
45
 ");
46
 
46
 
47
 // $Old is an array of the form URL => UserID where UserID is the ID of the User who originally uploaded that image.
47
 // $Old is an array of the form URL => UserID where UserID is the ID of the User who originally uploaded that image.
81
         $DB->prepare_query("
81
         $DB->prepare_query("
82
         DELETE
82
         DELETE
83
         FROM
83
         FROM
84
-          `torrents_doi`
84
+          `literature`
85
         WHERE
85
         WHERE
86
-          `URI` = '$ScreenDel'
86
+          `doi` = '$ScreenDel'
87
         ");
87
         ");
88
 
88
 
89
         foreach ($DeleteList as $ScreenDel) {
89
         foreach ($DeleteList as $ScreenDel) {
100
     $Screenshot = '';
100
     $Screenshot = '';
101
     $DB->prepare_query(
101
     $DB->prepare_query(
102
         "
102
         "
103
-    INSERT INTO `torrents_doi`
104
-      (`TorrentID`, `UserID`, `Time`, `URI`)
103
+    INSERT INTO `literature`
104
+      (`group_id`, `user_id`, `timestamp`, `doi`)
105
     VALUES
105
     VALUES
106
       (?, ?, NOW(), ?)",
106
       (?, ?, NOW(), ?)",
107
         $GroupID,
107
         $GroupID,

+ 97
- 60
sections/upload/upload_handle.php View File

79
 $Properties['TorrentDescription'] = $_POST['release_desc'];
79
 $Properties['TorrentDescription'] = $_POST['release_desc'];
80
 $Properties['Screenshots'] = isset($_POST['screenshots']) ? $_POST['screenshots'] : '';
80
 $Properties['Screenshots'] = isset($_POST['screenshots']) ? $_POST['screenshots'] : '';
81
 $Properties['Mirrors'] = isset($_POST['mirrors']) ? $_POST['mirrors'] : '';
81
 $Properties['Mirrors'] = isset($_POST['mirrors']) ? $_POST['mirrors'] : '';
82
+$Properties['Seqhash'] = isset($_POST['seqhash']) ? $_POST['seqhash'] : '';
82
 
83
 
83
 if ($_POST['album_desc']) {
84
 if ($_POST['album_desc']) {
84
     $Properties['GroupDescription'] = trim($_POST['album_desc']);
85
     $Properties['GroupDescription'] = trim($_POST['album_desc']);
209
         '1',
210
         '1',
210
         'inarray',
211
         'inarray',
211
         'Please select a valid platform.',
212
         'Please select a valid platform.',
212
-        array('inarray' => $ENV->flatten($ENV->META->Platforms))
213
+        array('inarray' => $ENV->META->Platforms)
213
     );
214
     );
214
 
215
 
215
     /*
216
     /*
438
     FROM
439
     FROM
439
       `torrents_group`
440
       `torrents_group`
440
     WHERE
441
     WHERE
441
-      `id` = $T[GroupID]
442
-    ");
442
+      `id` = ?
443
+    ", $T['GroupID']);
443
     $DB->exec_prepared_query();
444
     $DB->exec_prepared_query();
444
 
445
 
445
     if ($DB->has_results()) {
446
     if ($DB->has_results()) {
516
 
517
 
517
 if (!isset($GroupID) || !$GroupID) {
518
 if (!isset($GroupID) || !$GroupID) {
518
     // Create torrent group
519
     // Create torrent group
519
-    $DB->prepare_query(
520
+    $DB->query(
520
         "
521
         "
521
       INSERT INTO torrents_group
522
       INSERT INTO torrents_group
522
         (`category_id`, `title`, `subject`, `object`, `year`,
523
         (`category_id`, `title`, `subject`, `object`, `year`,
526
         ( ?, ?, ?, ?, ?,
527
         ( ?, ?, ?, ?, ?,
527
           ?, ?, ?, NOW(),
528
           ?, ?, ?, NOW(),
528
           ?, ? )",
529
           ?, ? )",
529
-        $TypeID,
530
+        $T['CategoryID'],
530
         $T['Title'],
531
         $T['Title'],
531
         $T['Title2'],
532
         $T['Title2'],
532
         $T['TitleJP'],
533
         $T['TitleJP'],
537
         $Body,
538
         $Body,
538
         $T['Image']
539
         $T['Image']
539
     );
540
     );
540
-    $DB->exec_prepared_query();
541
 
541
 
542
     $GroupID = $DB->inserted_id();
542
     $GroupID = $DB->inserted_id();
543
     foreach ($ArtistForm as $Num => $Artist) {
543
     foreach ($ArtistForm as $Num => $Artist) {
550
     }
550
     }
551
     $Cache->increment('stats_group_count');
551
     $Cache->increment('stats_group_count');
552
 
552
 
553
-    // Add screenshots
554
-    // todo: Clear DB_MYSQL::exec_prepared_query() errors
555
-    $Screenshots = explode("\n", $T['Screenshots']);
556
-    $Screenshots = array_map('trim', $Screenshots);
557
-
558
-    $Screenshots = array_filter($Screenshots, function ($s) {
559
-        return preg_match('/^'.$ENV->DOI_REGEX.'$/i', $s);
560
-    });
561
-
562
-    $Screenshots = array_unique($Screenshots);
563
-    $Screenshots = array_slice($Screenshots, 0, 10);
564
-
565
-    # Add optional web seeds similar to screenshots
566
-    # Support an arbitrary and limited number of sources
567
-    $Mirrors = explode("\n", $T['Mirrors']);
568
-    $Mirrors = array_map('trim', $Mirrors);
569
-
570
-    $Mirrors = array_filter($Mirrors, function ($s) {
571
-        return preg_match('/^'.URL_REGEX.'$/i', $s);
572
-    });
573
-
574
-    $Mirrors = array_unique($Mirrors);
575
-    $Mirrors = array_slice($Mirrors, 0, 2);
576
-
577
-    # Downgrade TLS on resource URIs
578
-    # Required for BEP 19 compatibility
579
-    $Mirrors = str_ireplace('tps://', 'tp://', $Mirrors);
580
-
581
-    # Perform the DB inserts here
582
-    # Screenshots (Publications)
583
-    if (!empty($Screenshots)) {
584
-        $Screenshot = '';
585
-        $DB->prepare_query("
586
-          INSERT INTO torrents_doi
587
-            (TorrentID, UserID, Time, URI)
588
-          VALUES (?, ?, NOW(), ?)", $GroupID, $LoggedUser['ID'], $Screenshot);
589
-
590
-        foreach ($Screenshots as $Screenshot) {
591
-            $DB->exec_prepared_query();
592
-        }
593
-    }
594
 
553
 
595
-    # Mirrors
596
-    if (!empty($Mirrors)) {
597
-        $Mirror = '';
598
-        $DB->prepare_query("
599
-          INSERT INTO torrents_mirrors
600
-            (GroupID, UserID, Time, URI)
601
-          VALUES (?, ?, NOW(), ?)", $GroupID, $LoggedUser['ID'], $Mirror);
554
+    /**
555
+     * DOI numbers
556
+     *
557
+     * Add optional citation info.
558
+     * todo: Query Semantic Scholar in the scheduler.
559
+     * THESE ARE ASSOCIATED WITH TORRENT GROUPS.s
560
+     */
561
+    if (!empty($T['Screenshots'])) {
562
+        $Screenshots = $Validate->textarea2array($T['Screenshots'], $ENV->DOI_REGEX);
563
+        $Screenshots = array_slice($Screenshots, 0, 10);
602
 
564
 
603
-        foreach ($Mirrors as $Mirror) {
604
-            $DB->exec_prepared_query();
565
+        foreach ($Screenshots as $Screenshot) {
566
+            $DB->query("
567
+            INSERT INTO `literature`
568
+            (`group_id`, `user_id`, `timestamp`, `doi`)
569
+          VALUES (?, ?, NOW(), ?)", $GroupID, $LoggedUser['ID'], $Screenshot);
605
         }
570
         }
606
     }
571
     }
572
+}
607
 
573
 
608
-    # Main if/else
609
-} else {
574
+# Main if/else
575
+else {
610
     $DB->query("
576
     $DB->query("
611
       UPDATE torrents_group
577
       UPDATE torrents_group
612
-      SET Time = NOW()
613
-        WHERE ID = ?", $GroupID);
578
+      SET `timestamp` = NOW()
579
+        WHERE `id` = ?", $GroupID);
614
 
580
 
615
     $Cache->delete_value("torrent_group_$GroupID");
581
     $Cache->delete_value("torrent_group_$GroupID");
616
     $Cache->delete_value("torrents_details_$GroupID");
582
     $Cache->delete_value("torrents_details_$GroupID");
728
 $Cache->increment('stats_torrent_count');
694
 $Cache->increment('stats_torrent_count');
729
 $Tor->Dec['comment'] = 'https://'.SITE_DOMAIN.'/torrents.php?torrentid='.$TorrentID;
695
 $Tor->Dec['comment'] = 'https://'.SITE_DOMAIN.'/torrents.php?torrentid='.$TorrentID;
730
 
696
 
697
+
698
+/**
699
+ * Mirrors
700
+ *
701
+ * Add optional web seeds and IPFS/Dat mirrors.
702
+ * Support an arbitrary and limited number of sources.
703
+ * THESE ARE ASSOCIATED WITH INDIVIDUAL TORRENTS.
704
+ */
705
+
706
+if (!empty($T['Mirrors'])) {
707
+    $Mirrors = $Validate->textarea2array($T['Mirrors'], $ENV->URL_REGEX);
708
+    $Screenshots = array_slice($Screenshots, 0, 5);
709
+
710
+    foreach ($Mirrors as $Mirror) {
711
+        $DB->query(
712
+            "
713
+        INSERT INTO `torrents_mirrors`
714
+          (`torrent_id`, `user_id`, `timestamp`, `uri`)
715
+        VALUES (?, ?, NOW(), ?)",
716
+            $TorrentID,
717
+            $LoggedUser['ID'],
718
+            $Mirror
719
+        );
720
+    }
721
+}
722
+
723
+
724
+/**
725
+ * Seqhash
726
+ *
727
+ * Elementary Seqhash support
728
+ */
729
+if ($ENV->FEATURE_BIOPHP && !empty($T['Seqhash'])) {
730
+    $BioIO = new \BioPHP\IO();
731
+    $BioSeqhash = new \BioPHP\Seqhash();
732
+
733
+    $Parsed = $BioIO->readFasta($T['Seqhash']);
734
+    foreach ($Parsed as $Parsed) {
735
+        try {
736
+            # todo: Trim sequences in \BioPHP\Transform->normalize()
737
+            $Trimmed = preg_replace('/\s+/', '', $Parsed['sequence']);
738
+            $Seqhash = $BioSeqhash->hash(
739
+                $Trimmed,
740
+                $_POST['seqhash_meta1'],
741
+                $_POST['seqhash_meta2'],
742
+                $_POST['seqhash_meta3']
743
+            );
744
+
745
+            $DB->query(
746
+                "
747
+            INSERT INTO `bioinformatics`
748
+              (`torrent_id`, `user_id`, `timestamp`,
749
+               `name`, `seqhash`)
750
+            VALUES (?, ?, NOW(), ?, ?)",
751
+                $TorrentID,
752
+                $LoggedUser['ID'],
753
+                $Parsed['name'],
754
+                $Seqhash
755
+            );
756
+        } catch (Exception $Err) {
757
+            $UploadForm = $Type;
758
+            require_once SERVER_ROOT.'/sections/upload/upload.php' ;
759
+            error($Err->getMessage(), $NoHTML = true);
760
+        }
761
+    }
762
+}
763
+
764
+
765
+/**
766
+ * Update tracker
767
+ */
731
 Tracker::update_tracker('add_torrent', [
768
 Tracker::update_tracker('add_torrent', [
732
   'id'          => $TorrentID,
769
   'id'          => $TorrentID,
733
   'info_hash'   => rawurlencode($InfoHash),
770
   'info_hash'   => rawurlencode($InfoHash),

+ 2
- 2
sections/user/community_stats.php View File

162
   if ($Override = check_paranoia_here('screenshotcount')) {
162
   if ($Override = check_paranoia_here('screenshotcount')) {
163
       $DB->query("
163
       $DB->query("
164
     SELECT COUNT(*)
164
     SELECT COUNT(*)
165
-    FROM torrents_doi
166
-    WHERE UserID = '$UserID'");
165
+    FROM `literature`
166
+    WHERE user_id = '$UserID'");
167
       list($Screenshots) = $DB->next_record(); ?>
167
       list($Screenshots) = $DB->next_record(); ?>
168
                 <li id="comm_screenshots">Screenshots added: <?=number_format($Screenshots)?>
168
                 <li id="comm_screenshots">Screenshots added: <?=number_format($Screenshots)?>
169
                 </li>
169
                 </li>

+ 2
- 2
sections/user/edit.php View File

156
           </li>
156
           </li>
157
 
157
 
158
           <li>
158
           <li>
159
-            <input type="submit" id="submit" value="Save profile" />
159
+            <input type="submit" id="submit" class="button-primary" value="Save profile" />
160
           </li>
160
           </li>
161
 
161
 
162
         </ul>
162
         </ul>
313
           <td>
313
           <td>
314
             <label>
314
             <label>
315
               <input type="checkbox" name="autoload_comm_stats" <?Format::selected(
315
               <input type="checkbox" name="autoload_comm_stats" <?Format::selected(
316
-              'AutoloadCommStats' ,
316
+              'AutoloadCommStats',
317
               1,
317
               1,
318
               'checked',
318
               'checked',
319
               $SiteOptions
319
               $SiteOptions

+ 69
- 108
static/styles/beluga/scss/beluga.scss View File

3
     padding: 0;
3
     padding: 0;
4
 }
4
 }
5
 
5
 
6
-.cats_sequences,
7
-.cats_graphs,
8
-.cats_systems,
9
-.cats_geometric,
10
-.cats_scalars\/vectors,
11
-.cats_patterns,
12
-.cats_constraints,
13
-.cats_images,
14
-.cats_spatial,
15
-.cats_models,
16
-.cats_documents,
17
-.cats_machinedata {
18
-    width: 38px !important;
19
-    height: 38px !important;
20
-    line-height: 38px;
21
-}
22
-
23
-.cats_sequences:after {
24
-    content: "SEQ";
25
-    color: #3eaca7;
26
-    font-size: 18px;
27
-    letter-spacing: -2px;
28
-}
29
-
30
-.cats_graphs:after {
31
-    content: "GRF";
32
-    color: #1d818e;
33
-    font-size: 18px;
34
-    letter-spacing: -2px;
35
-}
36
-
37
-.cats_systems:after {
38
-    content: "SYS";
39
-    color: #88c796;
40
-    font-size: 18px;
41
-    letter-spacing: -2px;
42
-}
43
-
44
-.cats_geometric:after {
45
-    content: "GEO";
46
-    color: #4dc593;
47
-    font-size: 18px;
48
-    letter-spacing: -2px;
49
-}
50
-
51
-.cats_scalars\/vectors:after {
52
-    content: "MC2";
53
-    color: #77c5d4;
54
-    font-size: 18px;
55
-    letter-spacing: -2px;
56
-}
57
-
58
-.cats_patterns:after {
59
-    content: "PAT";
60
-    color: #0d5968;
61
-    font-size: 18px;
62
-    letter-spacing: -2px;
63
-}
64
-
65
-.cats_constraints:after {
66
-    content: "CNST";
67
-    color: #3eaca7;
68
-    font-size: 18px;
69
-    letter-spacing: -2px;
70
-}
71
-
72
-.cats_images:after {
73
-    content: "IMG";
74
-    color: #1d818e;
75
-    font-size: 18px;
76
-    letter-spacing: -2px;
77
-}
78
-
79
-.cats_spatial:after {
80
-    content: "SPTL";
81
-    color: #88c796;
82
-    font-size: 18px;
83
-    letter-spacing: -2px;
84
-}
85
-
86
-.cats_models:after {
87
-    content: "MOD";
88
-    color: #4dc593;
89
-    font-size: 18px;
90
-    letter-spacing: -2px;
91
-}
92
-
93
-.cats_documents:after {
94
-    content: "DOC";
95
-    color: #77c5d4;
96
-    font-size: 18px;
97
-    letter-spacing: -2px;
98
-}
99
-
100
-.cats_machinedata:after {
101
-    content: "RAW";
102
-    color: #0d5968;
103
-    font-size: 18px;
104
-    letter-spacing: -2px;
105
-}
106
-
107
 body {
6
 body {
108
     width: 100%;
7
     width: 100%;
109
     font-family: "Open Sans", Helvetica, Arial, Tahoma, sans-serif;
8
     font-family: "Open Sans", Helvetica, Arial, Tahoma, sans-serif;
197
     color: #fff;
96
     color: #fff;
198
 }
97
 }
199
 
98
 
99
+/* Buttons */
100
+button:not(.editor-toolbar button),
101
+input[type="button"],
102
+input[type="submit"] {
103
+    background: change-color(whitesmoke, $alpha: 0.75);
104
+    color: black;
105
+    border: 1px solid #bbb;
106
+
107
+    &.button-primary {
108
+        background: #50aca7;
109
+        border: 1px solid #bbb;
110
+        color: black;
111
+    }
112
+
113
+    &:hover {
114
+        background: #317f8e;
115
+        /* Primary hover default blue */
116
+        border: 1px solid #bbb !important;
117
+        color: black !important;
118
+    }
119
+
120
+    &:focus {
121
+        background: #2f707c;
122
+    }
123
+}
124
+
125
+/*
200
 button,
126
 button,
201
 input[type="button"],
127
 input[type="button"],
202
 input[type="submit"] {
128
 input[type="submit"] {
216
 input[type="submit"]:focus {
142
 input[type="submit"]:focus {
217
     background-color: #2f707c;
143
     background-color: #2f707c;
218
 }
144
 }
145
+*/
219
 
146
 
220
 .spoilerButton {
147
 .spoilerButton {
221
     max-width: 604px;
148
     max-width: 604px;
351
     padding-top: 0;
278
     padding-top: 0;
352
 }
279
 }
353
 
280
 
281
+/*
354
 .sidebar {
282
 .sidebar {
355
     float: right;
283
     float: right;
356
     width: 244px;
284
     width: 244px;
357
     height: 100%;
285
     height: 100%;
358
 }
286
 }
287
+*/
359
 
288
 
360
 .sidebar .box .pad form {
289
 .sidebar .box .pad form {
361
     padding-bottom: 20px;
290
     padding-bottom: 20px;
366
     padding: 5px 10px 10px 10px;
295
     padding: 5px 10px 10px 10px;
367
 }
296
 }
368
 
297
 
298
+/*
369
 .main_column {
299
 .main_column {
370
     width: 646px;
300
     width: 646px;
371
     float: left;
301
     float: left;
372
 }
302
 }
303
+*/
373
 
304
 
374
 #logo {
305
 #logo {
375
     width: 900px;
306
     width: 900px;
386
 }
317
 }
387
 
318
 
388
 #logo a::before {
319
 #logo a::before {
389
-    content: "BioTorrents.de";
320
+    content: "torrents.bio";
390
     font-size: 40px;
321
     font-size: 40px;
391
     line-height: 56px;
322
     line-height: 56px;
392
     font-weight: 100;
323
     font-weight: 100;
1433
     padding: 10px;
1364
     padding: 10px;
1434
 }
1365
 }
1435
 
1366
 
1436
-blockquote,
1437
-pre {
1438
-    background-color: #23252a !important;
1439
-}
1440
-
1441
 .signature {
1367
 .signature {
1442
     border-top: 1px dotted #666;
1368
     border-top: 1px dotted #666;
1443
     margin: 2em 0 0;
1369
     margin: 2em 0 0;
1534
 
1460
 
1535
 pre {
1461
 pre {
1536
     color: #fff;
1462
     color: #fff;
1537
-    border: 1px dashed #55585f;
1463
+    background: black;
1464
+    border: 1px dashed #55585f !important;
1538
     margin: 10px;
1465
     margin: 10px;
1539
     padding: 10px;
1466
     padding: 10px;
1540
 }
1467
 }
1541
 
1468
 
1469
+code {
1470
+    background: black;
1471
+    border: none;
1472
+}
1473
+
1542
 #donation {
1474
 #donation {
1543
     position: absolute;
1475
     position: absolute;
1544
     display: inline;
1476
     display: inline;
1901
     z-index: 999;
1833
     z-index: 999;
1902
 }
1834
 }
1903
 
1835
 
1836
+/*
1904
 .button {
1837
 .button {
1905
     border: 0 solid #131313;
1838
     border: 0 solid #131313;
1906
     color: #eee;
1839
     color: #eee;
1911
     text-transform: uppercase;
1844
     text-transform: uppercase;
1912
     padding: 5px 12px;
1845
     padding: 5px 12px;
1913
 }
1846
 }
1847
+*/
1914
 
1848
 
1915
 #store #content {
1849
 #store #content {
1916
     position: relative;
1850
     position: relative;
2312
     background: #8b518e;
2246
     background: #8b518e;
2313
 }
2247
 }
2314
 
2248
 
2249
+/* Buttons */
2250
+body.style_pink button:not(.editor-toolbar button),
2251
+body.style_pink input[type="button"],
2252
+body.style_pink input[type="submit"] {
2253
+    color: black;
2254
+    border: 1px solid #bbb;
2255
+
2256
+    &.button-primary {
2257
+        background: #8b518e;
2258
+        border: 1px solid #bbb;
2259
+        color: black;
2260
+    }
2261
+
2262
+    &:hover {
2263
+        background: #643c72;
2264
+        /* Primary hover default blue */
2265
+        border: 1px solid #bbb !important;
2266
+        color: black !important;
2267
+    }
2268
+
2269
+    &:focus {
2270
+        background: #78467f;
2271
+    }
2272
+}
2273
+
2274
+/*
2315
 body.style_pink button,
2275
 body.style_pink button,
2316
 body.style_pink input[type="button"],
2276
 body.style_pink input[type="button"],
2317
 body.style_pink input[type="submit"] {
2277
 body.style_pink input[type="submit"] {
2329
 body.style_pink input[type="submit"]:focus {
2289
 body.style_pink input[type="submit"]:focus {
2330
     background-color: #78467f;
2290
     background-color: #78467f;
2331
 }
2291
 }
2292
+*/
2332
 
2293
 
2333
 body.style_pink #userinfo_stats {
2294
 body.style_pink #userinfo_stats {
2334
     color: #db7bc7;
2295
     color: #db7bc7;

+ 25
- 61
static/styles/bookish/matcha/matcha.scss View File

45
         width: 100%;
45
         width: 100%;
46
         z-index: 99999;
46
         z-index: 99999;
47
         margin-top: 2.4em;
47
         margin-top: 2.4em;
48
-        /* margin-top: 32px; */
49
         left: 0;
48
         left: 0;
50
     }
49
     }
51
 
50
 
172
         z-index: 100;
171
         z-index: 100;
173
     }
172
     }
174
 
173
 
175
-    /* Alerts, Toolbox, etc. */
176
-    .alertbar {
177
-        background-color: #fff9c7;
178
-        text-align: center;
179
-        color: black;
180
-        font-weight: bold;
181
-        width: 320px;
182
-        margin: 2em auto;
183
-        padding: 1em;
184
-
185
-        a {
186
-            color: black;
187
-            text-decoration: none;
188
-
189
-            &:hover {
190
-                color: black;
191
-                text-decoration: underline;
192
-            }
193
-        }
194
-
195
-        .warning {
196
-            background-color: #ffe68a;
197
-        }
198
-
199
-        .error {
200
-            background-color: #ff8a8a;
201
-        }
202
-    }
203
-
204
     /* Column heads */
174
     /* Column heads */
205
-    .head {
206
-        background: #9fedd7;
207
-        color: black;
208
-        padding: 0.5em 1em;
209
-    }
210
-
211
-    .colhead {
212
-        background: #9fedd7;
213
-        font-weight: bold;
214
-        color: black;
215
-    }
216
-
175
+    .head,
176
+    .colhead,
217
     .colhead_dark {
177
     .colhead_dark {
218
         background: #9fedd7;
178
         background: #9fedd7;
179
+        border-bottom: 2px solid change-color(black, $alpha: 0.25);
219
         color: black;
180
         color: black;
181
+        padding: 0.5em 1em;
220
     }
182
     }
221
 
183
 
222
     /* Box */
184
     /* Box */
223
     .box,
185
     .box,
224
-    section {
186
+    .pad,
187
+    section,
188
+    /* Exceptions, fixes, etc. */
189
+    table.user_options {
225
         background-color: white;
190
         background-color: white;
226
         border: none;
191
         border: none;
227
         margin-bottom: 1em;
192
         margin-bottom: 1em;
193
+        padding: 0.5rem;
228
     }
194
     }
229
 
195
 
230
     /* Shadows */
196
     /* Shadows */
236
     .forum_index,
202
     .forum_index,
237
     #userinfo_minor > li > ul,
203
     #userinfo_minor > li > ul,
238
     .permissions table {
204
     .permissions table {
239
-        box-shadow: 2px 2px 10px -2px slategray;
205
+        box-shadow: 0 5px 4px -4px slategray;
240
     }
206
     }
241
 
207
 
242
     /* Links */
208
     /* Links */
282
     button:not(.editor-toolbar button),
248
     button:not(.editor-toolbar button),
283
     input[type="button"],
249
     input[type="button"],
284
     input[type="submit"] {
250
     input[type="submit"] {
285
-        background: #fbe180;
286
-        border-radius: 0.25rem;
251
+        color: black;
252
+        border: 1px solid #bbb;
287
         box-shadow: 2px 2px 10px -5px slategray;
253
         box-shadow: 2px 2px 10px -5px slategray;
288
-    }
289
 
254
 
290
-    button:hover,
291
-    input[type="button"]:hover,
292
-    input[type="submit"]:hover {
293
-        background: #fff9c7;
294
-    }
255
+        &.button-primary {
256
+            background: #fbe180;
257
+        }
295
 
258
 
296
-    button:focus,
297
-    input[type="button"]:focus,
298
-    input[type="submit"]:focus {
299
-        background: #fff9c7;
259
+        &:hover {
260
+            background: #fff9c7;
261
+            /* Primary hover default blue */
262
+            border: 1px solid #bbb;
263
+            color: black;
264
+        }
265
+
266
+        &:focus {
267
+            background: #fff9c7;
268
+        }
300
     }
269
     }
301
 
270
 
302
     /* Text input */
271
     /* Text input */
363
     .forum_post.sticky_post {
332
     .forum_post.sticky_post {
364
         border: 2px solid #fbe180;
333
         border: 2px solid #fbe180;
365
     }
334
     }
366
-
367
-    /* Inbox */
368
-    tr.unreadpm {
369
-        background-color: #fff9c7;
370
-    }
371
 } /* end body.style_matcha */
335
 } /* end body.style_matcha */

+ 0
- 29
static/styles/bookish/scss/layout.scss View File

12
 #content {
12
 #content {
13
     margin: auto;
13
     margin: auto;
14
     margin-top: 2rem;
14
     margin-top: 2rem;
15
-    /* min-width: 720px; */
16
     overflow: hidden;
15
     overflow: hidden;
17
     width: 90%;
16
     width: 90%;
18
 }
17
 }
44
     }
43
     }
45
 }
44
 }
46
 
45
 
47
-/* Main column and sidebar */
48
-@mixin column-flex($width) {
49
-    display: flex;
50
-    flex-direction: column;
51
-    align-items: stretch;
52
-    max-width: $width;
53
-    min-height: 0;
54
-    padding: 0 0.25rem;
55
-}
56
-
57
-.main_column {
58
-    @include column-flex(64%);
59
-
60
-    table {
61
-        margin-bottom: 1rem;
62
-    }
63
-}
64
-
65
-.sidebar {
66
-    @include column-flex(34%);
67
-    float: right;
68
-}
69
-
70
-/* Box: soon to be <section> */
71
-.box {
72
-    margin-bottom: 1rem;
73
-}
74
-
75
 /* Links */
46
 /* Links */
76
 div.linkbox {
47
 div.linkbox {
77
     text-align: center;
48
     text-align: center;

+ 44
- 0
static/styles/global/scss/layout.scss View File

7
     padding: 0;
7
     padding: 0;
8
 }
8
 }
9
 
9
 
10
+/**
11
+ * Main column and sidebar
12
+ */
13
+
14
+/* Main column and sidebar */
15
+@mixin column-flex($width) {
16
+    display: flex;
17
+    flex-direction: column;
18
+    align-items: stretch;
19
+    max-width: $width;
20
+    min-height: 0;
21
+    padding: 0 0.25rem;
22
+}
23
+
24
+.main_column {
25
+    @include column-flex(64%);
26
+
27
+    table {
28
+        margin-bottom: 1rem;
29
+    }
30
+}
31
+
32
+.sidebar {
33
+    @include column-flex(34%);
34
+    width: 34%;
35
+    float: right;
36
+
37
+    &.fixed {
38
+        width: 34%;
39
+    }
40
+}
41
+
42
+.sidebar {
43
+    float: right;
44
+    width: 30%;
45
+    min-width: 20%;
46
+    margin-right: 1rem;
47
+}
48
+
49
+/* Box: soon to be <section> */
50
+.box {
51
+    margin-bottom: 1rem;
52
+}
53
+
10
 /*
54
 /*
11
  * Flex elements
55
  * Flex elements
12
  */
56
  */

+ 2
- 1
static/styles/global/scss/skeleton-fixes.scss View File

91
 /* forum lists */ table.forum_index,
91
 /* forum lists */ table.forum_index,
92
 /* notif filters */ form[name="notification"],
92
 /* notif filters */ form[name="notification"],
93
 /* service stats */ div.permission_container,
93
 /* service stats */ div.permission_container,
94
+/* user settings */ table.user_options,
94
 /* GENERIC */ table.skeleton-fix {
95
 /* GENERIC */ table.skeleton-fix {
95
     td {
96
     td {
96
         border-bottom: 0 !important;
97
         border-bottom: 0 !important;
130
 }
131
 }
131
 
132
 
132
 /* Unordered lists */
133
 /* Unordered lists */
133
-ul {
134
+ul:not(.nobullet) {
134
     list-style: circle outside !important;
135
     list-style: circle outside !important;
135
 }
136
 }
136
 
137
 

+ 30
- 7
static/styles/oppai/scss/oppai.scss View File

35
     color: #555;
35
     color: #555;
36
 }
36
 }
37
 
37
 
38
+/* Buttons */
39
+button:not(.editor-toolbar button),
40
+input[type="button"],
41
+input[type="submit"] {
42
+    color: black;
43
+    border: 1px solid #bbb;
44
+    box-shadow: 0 1px 1px 0 rgba(0, 0, 0, 0.14), 0 3px 1px -2px rgba(0, 0, 0, 0.2), 0 1px 5px 0 rgba(0, 0, 0, 0.12);
45
+
46
+    &.button-primary {
47
+        background: #eaabed;
48
+        border: 1px solid #bbb;
49
+        color: black;
50
+    }
51
+
52
+    &:hover {
53
+        background: #e197e5 !important;
54
+        /* Primary hover default blue */
55
+        border: 1px solid #bbb !important;
56
+        color: black !important;
57
+    }
58
+
59
+    &:focus {
60
+        background: #d48dd8;
61
+    }
62
+}
63
+
64
+/*
38
 button,
65
 button,
39
 input[type="button"],
66
 input[type="button"],
40
 input[type="submit"] {
67
 input[type="submit"] {
53
 input[type="submit"]:focus {
80
 input[type="submit"]:focus {
54
     background: #d48dd8;
81
     background: #d48dd8;
55
 }
82
 }
83
+*/
56
 
84
 
57
 .spoilerButton {
85
 .spoilerButton {
58
     max-width: 540px;
86
     max-width: 540px;
546
     padding-top: 0px;
574
     padding-top: 0px;
547
 }
575
 }
548
 
576
 
549
-.sidebar {
550
-    float: right;
551
-    width: 245px;
552
-}
553
-
554
 .head {
577
 .head {
555
     padding: 4px;
578
     padding: 4px;
556
     /* border-bottom: 1px solid #666; */
579
     /* border-bottom: 1px solid #666; */
563
     padding: 3px 10px 10px 10px;
586
     padding: 3px 10px 10px 10px;
564
 }
587
 }
565
 
588
 
566
-.main_column {
567
-    width: 592px;
589
+#content {
590
+    max-width: 67%;
568
 }
591
 }
569
 
592
 
570
 .main_column table {
593
 .main_column table {

+ 5
- 2
templates/legal/about.html View File

3
 <section class="tldr">
3
 <section class="tldr">
4
   <p>
4
   <p>
5
     BioTorrents.de is a functional experiment in comfy data distribution.
5
     BioTorrents.de is a functional experiment in comfy data distribution.
6
+    The tagline is "What.cd for genome sequences."
7
+    The scope is multidisciplinary and social science friendly.
6
   </p>
8
   </p>
7
 
9
 
8
   <p>
10
   <p>
12
   </p>
14
   </p>
13
 
15
 
14
   <p>
16
   <p>
15
-    BioTorrents.de provides an open platform for disadvantaged researchers to host their data.
17
+    BioTorrents.de is an open platform for disadvantaged researchers to host their data.
16
     More importantly, it provides the necessary tools for others to find and cite it later.
18
     More importantly, it provides the necessary tools for others to find and cite it later.
17
     It's a place for the Google Drives, FTP folders, and network shares that may not be accepted elsewhere.
19
     It's a place for the Google Drives, FTP folders, and network shares that may not be accepted elsewhere.
20
+    It also plays well with institutional repositories and can efficiently mirror their data.
18
   </p>
21
   </p>
19
 
22
 
20
   <p>
23
   <p>
27
       Email
30
       Email
28
     </strong>
31
     </strong>
29
     <br />
32
     <br />
30
-    help at biotorrents dot de
33
+    hello at torrents dot bio 
31
   </p>
34
   </p>
32
 
35
 
33
   <p>
36
   <p>

+ 3
- 3
templates/legal/dmca.html View File

3
 <section class="tldr">
3
 <section class="tldr">
4
   <p>
4
   <p>
5
     <em>If</em> you're a copyright owner or an agent of one,
5
     <em>If</em> you're a copyright owner or an agent of one,
6
-    <em>and</em> you believe that user-generated content on the domain
7
-    https://biotorrents.de infringes your copyrights:
6
+    <em>and</em> you reasonably believe that user-generated content on the domains
7
+    torrents.bio or biotorrents.de infringes your copyrights:
8
     <em>then</em> you may notify our Digital Millennium Copyright Act (DMCA) agent in writing.
8
     <em>then</em> you may notify our Digital Millennium Copyright Act (DMCA) agent in writing.
9
   </p>
9
   </p>
10
 
10
 
69
       Email
69
       Email
70
     </strong>
70
     </strong>
71
     <br />
71
     <br />
72
-    dmca at biotorrents dot de
72
+    dmca at torrents dot bio 
73
   </p>
73
   </p>
74
 
74
 
75
   <p>
75
   <p>

+ 2
- 2
templates/legal/privacy.html View File

188
   </h3>
188
   </h3>
189
 
189
 
190
   <p>
190
   <p>
191
-    We last updated this policy on 2021-07-14.
191
+    We last updated this policy on 2021-07-28.
192
   </p>
192
   </p>
193
 
193
 
194
 
194
 
220
       Email
220
       Email
221
     </strong>
221
     </strong>
222
     <br />
222
     <br />
223
-    privacy at biotorrents dot de
223
+    privacy at torrents dot bio 
224
   </p>
224
   </p>
225
 
225
 
226
   <p>
226
   <p>

Loading…
Cancel
Save