diff --git a/inc/archive.php b/inc/archive.php
index 124dc26c..80be0e74 100644
--- a/inc/archive.php
+++ b/inc/archive.php
@@ -16,7 +16,7 @@ class Archive {
return;
// Check if it is a thread
- $thread_query = prepare(sprintf("SELECT `thread`, `subject`, `body_nomarkup` FROM ``posts_%s`` WHERE `id` = :id", $board['uri']));
+ $thread_query = prepare(sprintf("SELECT `thread`, `subject`, `body_nomarkup`, `trip` FROM ``posts_%s`` WHERE `id` = :id", $board['uri']));
$thread_query->bindValue(':id', $thread_id, PDO::PARAM_INT);
$thread_query->execute() or error(db_error($thread_query));
$thread_data = $thread_query->fetch(PDO::FETCH_ASSOC);
@@ -93,6 +93,11 @@ class Archive {
$query->execute() or error(db_error($query));
+ // Check if Thread should be Auto Featured based on OP Trip
+ if(in_array($thread_data['trip'], $config['archive']['auto_feature_trips']))
+ self::featureThread($thread_id);
+
+
// Purge Threads that have timed out
if(!$config['archive']['cron_job']['purge'])
self::purgeArchive();
diff --git a/inc/config.php b/inc/config.php
index dc563695..c4e7d859 100644
--- a/inc/config.php
+++ b/inc/config.php
@@ -496,7 +496,7 @@
$config['strip_combining_chars'] = true;
// Maximum post body length.
- $config['max_body'] = 1800;
+ $config['max_body'] = 6000;
// Minimum post body length.
$config['min_body'] = 0;
// Minimum post body length for OPs.
@@ -1398,6 +1398,11 @@
$config['archive']['cron_job']['purge'] = false;
+ // Automatically send threads with thiese trips to Featured Archive
+ // $config['archive']['auto_feature'] = array("!!securetrip", "!trip");
+ $config['archive']['auto_feature'] = array();
+
+
/*
* ====================
* Advanced build
diff --git a/inc/functions.php b/inc/functions.php
index c9fc2185..f4ed72e2 100755
--- a/inc/functions.php
+++ b/inc/functions.php
@@ -3101,53 +3101,60 @@ function shell_exec_error($command, $suppress_stdout = false) {
function diceRoller($post) {
global $config;
if(strpos(strtolower($post->email), 'dice%20') === 0) {
- $dicestr = str_split(substr($post->email, strlen('dice%20')));
-
- // Get params
- $diceX = '';
- $diceY = '';
- $diceZ = '';
-
- $curd = 'diceX';
- for($i = 0; $i < count($dicestr); $i ++) {
- if(is_numeric($dicestr[$i])) {
- $$curd .= $dicestr[$i];
- } else if($dicestr[$i] == 'd') {
- $curd = 'diceY';
- } else if($dicestr[$i] == '-' || $dicestr[$i] == '+') {
- $curd = 'diceZ';
- $$curd = $dicestr[$i];
+ // $dicestr_all = str_split(substr($post->email, strlen('dice%20')));
+ $dicestr_all = substr($post->email, strlen('dice%20'));
+
+
+ $dicestr_all = explode("%20", $dicestr_all);
+ foreach($dicestr_all as $dicestr) {
+ $dicestr = str_split($dicestr);
+
+ // Get params
+ $diceX = '';
+ $diceY = '';
+ $diceZ = '';
+
+ $curd = 'diceX';
+ for($i = 0; $i < count($dicestr); $i ++) {
+ if(is_numeric($dicestr[$i])) {
+ $$curd .= $dicestr[$i];
+ } else if($dicestr[$i] == 'd') {
+ $curd = 'diceY';
+ } else if($dicestr[$i] == '-' || $dicestr[$i] == '+') {
+ $curd = 'diceZ';
+ $$curd = $dicestr[$i];
+ }
}
- }
- // Default values for X and Z
- if($diceX == '') {
- $diceX = '1';
- }
+ // Default values for X and Z
+ if($diceX == '') {
+ $diceX = '1';
+ }
- if($diceZ == '') {
- $diceZ = '+0';
- }
+ if($diceZ == '') {
+ $diceZ = '+0';
+ }
- // Intify them
- $diceX = intval($diceX);
- $diceY = intval($diceY);
- $diceZ = intval($diceZ);
+ // Intify them
+ $diceX = intval($diceX);
+ $diceY = intval($diceY);
+ $diceZ = intval($diceZ);
+
+ // Continue only if we have valid values
+ if($diceX > 0 && $diceY > 0) {
+ $dicerolls = array();
+ $dicesum = $diceZ;
+ for($i = 0; $i < $diceX; $i++) {
+ $roll = rand(1, $diceY);
+ $dicerolls[] = $roll;
+ $dicesum += $roll;
+ }
- // Continue only if we have valid values
- if($diceX > 0 && $diceY > 0) {
- $dicerolls = array();
- $dicesum = $diceZ;
- for($i = 0; $i < $diceX; $i++) {
- $roll = rand(1, $diceY);
- $dicerolls[] = $roll;
- $dicesum += $roll;
+ // Prepend the result to the post body
+ $modifier = ($diceZ != 0) ? ((($diceZ < 0) ? ' - ' : ' + ') . abs($diceZ)) : '';
+ $dicesum = ($diceX > 1) ? ' = ' . $dicesum : '';
+ $post->body = '
| Rolled ' . implode(', ', $dicerolls) . $modifier . $dicesum . ' |
' . $post->body;
}
-
- // Prepend the result to the post body
- $modifier = ($diceZ != 0) ? ((($diceZ < 0) ? ' - ' : ' + ') . abs($diceZ)) : '';
- $dicesum = ($diceX > 1) ? ' = ' . $dicesum : '';
- $post->body = ' | Rolled ' . implode(', ', $dicerolls) . $modifier . $dicesum . ' |
' . $post->body;
}
}
}
diff --git a/js/charcount.js b/js/charcount.js
index 67fed2ab..5c33b70b 100644
--- a/js/charcount.js
+++ b/js/charcount.js
@@ -14,7 +14,7 @@ $(document).ready(function(){
// every time an event is fired.
var $inputArea = $('#body');
var $coundownField = $('#countchar');
- var $maxChars = 3601;
+ var $maxChars = 6001;
// Preset countdown field to max initial content length
$coundownField.text($maxChars - $inputArea.length);