Browse Source

Added multiple dice roll. Automatic feature archive if op uses configured trip. Increaced post char limit

main
PupperWoff 7 years ago
committed by discomrade
parent
commit
c76a1bd3ef
  1. 7
      inc/archive.php
  2. 7
      inc/config.php
  3. 9
      inc/functions.php
  4. 2
      js/charcount.js

7
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();

7
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

9
inc/functions.php

@ -3101,7 +3101,13 @@ 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')));
// $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 = '';
@ -3151,6 +3157,7 @@ function diceRoller($post) {
}
}
}
}
function slugify($post) {
global $config;

2
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);

Loading…
Cancel
Save