custom tripcodes
This commit is contained in:
parent
c9c0e675f3
commit
e97bdaac21
|
@ -24,6 +24,7 @@
|
||||||
'flood_filters' => Array(),
|
'flood_filters' => Array(),
|
||||||
'wordfilters' => Array(),
|
'wordfilters' => Array(),
|
||||||
'custom_capcode' => Array(),
|
'custom_capcode' => Array(),
|
||||||
|
'custom_tripcode' => Array(),
|
||||||
'dnsbl' => Array()
|
'dnsbl' => Array()
|
||||||
);
|
);
|
||||||
// Database stuff
|
// Database stuff
|
||||||
|
@ -477,6 +478,12 @@
|
||||||
// 'color:red;font-weight:bold' // Change tripcode style; optional
|
// 'color:red;font-weight:bold' // Change tripcode style; optional
|
||||||
//);
|
//);
|
||||||
|
|
||||||
|
|
||||||
|
// Custom tripcodes. The below example makes a tripcode
|
||||||
|
// of "#test123" evaluate to "!HelloWorld"
|
||||||
|
// $config['custom_tripcode']['#test123'] = '!HelloWorld';
|
||||||
|
// $config['custom_tripcode']['##securetrip'] = '!!somethingelse';
|
||||||
|
|
||||||
// Spam filter
|
// Spam filter
|
||||||
$config['spam']['hidden_inputs_min'] = 4;
|
$config['spam']['hidden_inputs_min'] = 4;
|
||||||
$config['spam']['hidden_inputs_max'] = 12;
|
$config['spam']['hidden_inputs_max'] = 12;
|
||||||
|
|
|
@ -1423,10 +1423,16 @@
|
||||||
$salt = strtr ( $salt, ':;<=>?@[\]^_`', 'ABCDEFGabcdef' );
|
$salt = strtr ( $salt, ':;<=>?@[\]^_`', 'ABCDEFGabcdef' );
|
||||||
if ( isset ( $t[2] ) ) {
|
if ( isset ( $t[2] ) ) {
|
||||||
// secure
|
// secure
|
||||||
$trip = '!!' . substr ( crypt ( $trip, $config['secure_trip_salt'] ), ( -1 * $length ) );
|
if(isset($config['custom_tripcode']["##{$trip}"]))
|
||||||
|
$trip = $config['custom_tripcode']["##{$trip}"];
|
||||||
|
else
|
||||||
|
$trip = '!!' . substr ( crypt ( $trip, $config['secure_trip_salt'] ), ( -1 * $length ) );
|
||||||
} else {
|
} else {
|
||||||
// insecure
|
// insecure
|
||||||
$trip = '!' . substr ( crypt ( $trip, $salt ), ( -1 * $length ) );
|
if(isset($config['custom_tripcode']["#{$trip}"]))
|
||||||
|
$trip = $config['custom_tripcode']["#{$trip}"];
|
||||||
|
else
|
||||||
|
$trip = '!' . substr ( crypt ( $trip, $salt ), ( -1 * $length ) );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ( isset ( $trip ) ) {
|
if ( isset ( $trip ) ) {
|
||||||
|
|
Loading…
Reference in New Issue