aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMeik Sievertsen <acydburn@phpbb.com>2008-09-02 06:34:27 +0000
committerMeik Sievertsen <acydburn@phpbb.com>2008-09-02 06:34:27 +0000
commit7f813a9ef65fbf3dd24565e3e199ab67b38df70c (patch)
treedf11c3a07ac8c3e22adb6e0cd9610744915d13d6
parentfcd0eae9ddee220fa6e5d82278024d062ede88dd (diff)
downloadforums-7f813a9ef65fbf3dd24565e3e199ab67b38df70c.tar
forums-7f813a9ef65fbf3dd24565e3e199ab67b38df70c.tar.gz
forums-7f813a9ef65fbf3dd24565e3e199ab67b38df70c.tar.bz2
forums-7f813a9ef65fbf3dd24565e3e199ab67b38df70c.tar.xz
forums-7f813a9ef65fbf3dd24565e3e199ab67b38df70c.zip
settings and data for the new queued posts feature ;)
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@8804 89ea8834-ac86-4346-8a33-228a782c2dd0
-rw-r--r--phpBB/docs/CHANGELOG.html4
-rw-r--r--phpBB/includes/acp/acp_board.php12
-rw-r--r--phpBB/install/database_update.php24
-rw-r--r--phpBB/install/schemas/schema_data.sql2
-rw-r--r--phpBB/language/en/acp/board.php5
5 files changed, 41 insertions, 6 deletions
diff --git a/phpBB/docs/CHANGELOG.html b/phpBB/docs/CHANGELOG.html
index 1c663a84cb..b63512889d 100644
--- a/phpBB/docs/CHANGELOG.html
+++ b/phpBB/docs/CHANGELOG.html
@@ -103,6 +103,10 @@
<li>[Change] Set headers for IE 8 in file.php</li>
<li>[Fix] Allow export of PM pages greater one. (#33155)</li>
<li>[Feature] Allow setting custom language path through $user-&gt;set_custom_lang_path(). $user-&gt;lang_path now also do not include the user language, but only the path.</li>
+ <li>[Change] Do not count queued posts to user_posts</li>
+ <li>[Feature] Ability to define nullar/singular/plural language entries</li>
+ <li>[Feature] Ability to mimic sprintf() calls with $user-&gt;lang() with the ability to correctly assign nullar/singular/plural language entries</li>
+ <li>[Feature] Added the possibility to force user posts put in queue if post count is lower than an admin defined value. Guest posting is not affected by this setting.</li>
</ul>
diff --git a/phpBB/includes/acp/acp_board.php b/phpBB/includes/acp/acp_board.php
index a7abae286a..51c8944966 100644
--- a/phpBB/includes/acp/acp_board.php
+++ b/phpBB/includes/acp/acp_board.php
@@ -163,6 +163,8 @@ class acp_board
'enable_post_confirm' => array('lang' => 'VISUAL_CONFIRM_POST', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
'legend2' => 'POSTING',
+ 'enable_queue_trigger' => array('lang' => 'ENABLE_QUEUE_TRIGGER', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
+ 'queue_trigger_posts' => array('lang' => 'QUEUE_TRIGGER_POSTS', 'validate' => 'int:0:250', 'type' => 'text:4:4', 'explain' => true),
'bump_type' => false,
'edit_time' => array('lang' => 'EDIT_TIME', 'validate' => 'int:0', 'type' => 'text:5:5', 'explain' => true, 'append' => ' ' . $user->lang['MINUTES']),
'display_last_edited' => array('lang' => 'DISPLAY_LAST_EDITED', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
@@ -557,14 +559,14 @@ class acp_board
{
$l_explain = (isset($user->lang[$vars['lang'] . '_EXPLAIN'])) ? $user->lang[$vars['lang'] . '_EXPLAIN'] : '';
}
-
+
$content = build_cfg_template($type, $config_key, $this->new_config, $config_key, $vars);
-
+
if (empty($content))
{
continue;
}
-
+
$template->assign_block_vars('options', array(
'KEY' => $config_key,
'TITLE' => (isset($user->lang[$vars['lang']])) ? $user->lang[$vars['lang']] : $vars['lang'],
@@ -677,7 +679,7 @@ class acp_board
return h_radio('config[ip_check]', $radio_ary, $value, $key);
}
-
+
/**
* Select referer validation
*/
@@ -687,7 +689,7 @@ class acp_board
return h_radio('config[referer_validation]', $radio_ary, $value, $key);
}
-
+
/**
* Select account activation method
*/
diff --git a/phpBB/install/database_update.php b/phpBB/install/database_update.php
index af631d09fc..88ad142013 100644
--- a/phpBB/install/database_update.php
+++ b/phpBB/install/database_update.php
@@ -532,7 +532,7 @@ $database_update_info = array(
// No changes from 3.0.2-RC2 to 3.0.2
'3.0.2-RC2' => array(),
- // Changes from 3.0.2 to the next version
+ // Changes from 3.0.2 to 3.0.3-RC1
'3.0.2' => array(
// Add the following columns
'add_columns' => array(
@@ -1831,6 +1831,28 @@ function change_database_data(&$no_updates, $version)
// No changes from 3.0.2-RC2 to 3.0.2
case '3.0.2-RC2':
break;
+
+ // Changes from 3.0.2 to 3.0.3-RC1
+ case '3.0.3':
+ set_config('enable_queue_trigger', '0');
+ set_config('queue_trigger_posts', '3');
+
+ // Resync post counts
+ $sql = 'SELECT COUNT(p.post_id) AS num_posts, u.user_id
+ FROM ' . USERS_TABLE . ' u
+ LEFT JOIN ' . POSTS_TABLE . ' p ON (u.user_id = p.poster_id AND p.post_postcount = 1 AND p.post_approved = 1)
+ GROUP BY u.user_id';
+ $result = _sql($sql, $errored, $error_ary);
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $sql = 'UPDATE ' . USERS_TABLE . " SET user_posts = {$row['num_posts']} WHERE user_id = {$row['user_id']}";
+ _sql($sql, $errored, $error_ary);
+ }
+ $db->sql_freeresult($result);
+
+ $no_updates = false;
+ break;
}
}
diff --git a/phpBB/install/schemas/schema_data.sql b/phpBB/install/schemas/schema_data.sql
index 900695c791..422a5b0bda 100644
--- a/phpBB/install/schemas/schema_data.sql
+++ b/phpBB/install/schemas/schema_data.sql
@@ -87,6 +87,7 @@ INSERT INTO phpbb_config (config_name, config_value) VALUES ('email_package_size
INSERT INTO phpbb_config (config_name, config_value) VALUES ('enable_confirm', '1');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('enable_pm_icons', '1');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('enable_post_confirm', '1');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('enable_queue_trigger', '0');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('flood_interval', '15');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('force_server_vars', '0');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('form_token_lifetime', '7200');
@@ -182,6 +183,7 @@ INSERT INTO phpbb_config (config_name, config_value) VALUES ('pm_max_msgs', '50'
INSERT INTO phpbb_config (config_name, config_value) VALUES ('posts_per_page', '10');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('print_pm', '1');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('queue_interval', '600');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('queue_trigger_posts', '3');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('ranks_path', 'images/ranks');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('require_activation', '0');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('referer_validation', '1');
diff --git a/phpBB/language/en/acp/board.php b/phpBB/language/en/acp/board.php
index ae122c54ee..b0cbc7e184 100644
--- a/phpBB/language/en/acp/board.php
+++ b/phpBB/language/en/acp/board.php
@@ -137,6 +137,11 @@ $lang = array_merge($lang, array(
'ALLOW_POST_FLASH' => 'Allow use of <code>[FLASH]</code> BBCode tag in posts',
'ALLOW_POST_FLASH_EXPLAIN' => 'If disallowed the <code>[FLASH]</code> BBCode tag is disabled in posts. Otherwise the permission system controls which users can use the <code>[FLASH]</code> BBCode tag.',
+ 'ENABLE_QUEUE_TRIGGER' => 'Enable queued posts',
+ 'ENABLE_QUEUE_TRIGGER_EXPLAIN' => 'Ability to put registered users posts to post approval if their post count is lower than the specified value below. This setting has no effect on the permission setting for post/topic approval.',
+ 'QUEUE_TRIGGER_POSTS' => 'Maximum post count for queued posts',
+ 'QUEUE_TRIGGER_POSTS_EXPLAIN' => 'If queued posts is enabled, this is the post count the user need to reach in order to post without post approval. If the users post count is below this number, the post is stored in the queue automatically.',
+
'BUMP_INTERVAL' => 'Bump interval',
'BUMP_INTERVAL_EXPLAIN' => 'Number of minutes, hours or days between the last post to a topic and the ability to bump this topic.',
'CHAR_LIMIT' => 'Maximum characters per post',