File tree Expand file tree Collapse file tree 2 files changed +15
-2
lines changed Expand file tree Collapse file tree 2 files changed +15
-2
lines changed Original file line number Diff line number Diff line change 24
24
'flood_filters ' => Array (),
25
25
'wordfilters ' => Array (),
26
26
'custom_capcode ' => Array (),
27
+ 'custom_tripcode ' => Array (),
27
28
'dnsbl ' => Array ()
28
29
);
29
30
// Database stuff
477
478
// 'color:red;font-weight:bold' // Change tripcode style; optional
478
479
//);
479
480
481
+
482
+ // Custom tripcodes. The below example makes a tripcode
483
+ // of "#test123" evaluate to "!HelloWorld"
484
+ // $config['custom_tripcode']['#test123'] = '!HelloWorld';
485
+ // $config['custom_tripcode']['##securetrip'] = '!!somethingelse';
486
+
480
487
// Spam filter
481
488
$ config ['spam ' ]['hidden_inputs_min ' ] = 4 ;
482
489
$ config ['spam ' ]['hidden_inputs_max ' ] = 12 ;
Original file line number Diff line number Diff line change @@ -1423,10 +1423,16 @@ function generate_tripcode($name, $length = 10){
1423
1423
$ salt = strtr ( $ salt , ':;<=>?@[\]^_` ' , 'ABCDEFGabcdef ' );
1424
1424
if ( isset ( $ t [2 ] ) ) {
1425
1425
// secure
1426
- $ trip = '!! ' . substr ( crypt ( $ trip , $ config ['secure_trip_salt ' ] ), ( -1 * $ length ) );
1426
+ if (isset ($ config ['custom_tripcode ' ]["## {$ trip }" ]))
1427
+ $ trip = $ config ['custom_tripcode ' ]["## {$ trip }" ];
1428
+ else
1429
+ $ trip = '!! ' . substr ( crypt ( $ trip , $ config ['secure_trip_salt ' ] ), ( -1 * $ length ) );
1427
1430
} else {
1428
1431
// insecure
1429
- $ trip = '! ' . substr ( crypt ( $ trip , $ salt ), ( -1 * $ length ) );
1432
+ if (isset ($ config ['custom_tripcode ' ]["# {$ trip }" ]))
1433
+ $ trip = $ config ['custom_tripcode ' ]["# {$ trip }" ];
1434
+ else
1435
+ $ trip = '! ' . substr ( crypt ( $ trip , $ salt ), ( -1 * $ length ) );
1430
1436
}
1431
1437
}
1432
1438
if ( isset ( $ trip ) ) {
You can’t perform that action at this time.
0 commit comments