1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-05-04 14:47:52 +02:00

[ticket/12150] Add options to acp

PHPBB3-12150
This commit is contained in:
Marc Alexander 2014-01-30 22:21:06 +01:00
parent 308e8b0c96
commit 3c7ff1c417
4 changed files with 62 additions and 0 deletions

View File

@ -278,6 +278,19 @@
<dd><label><input type="radio" class="radio" name="prune_sticky" value="1"<!-- IF S_PRUNE_STICKY --> id="prune_sticky" checked="checked"<!-- ENDIF --> /> {L_YES}</label>
<label><input type="radio" class="radio" name="prune_sticky" value="0"<!-- IF not S_PRUNE_STICKY --> id="prune_sticky" checked="checked"<!-- ENDIF --> /> {L_NO}</label></dd>
</dl>
<dl>
<dt><label for="enable_shadow_topic_prune">{L_FORUM_PRUNE_SHADOW_TOPICS}{L_COLON}</label><br /><span>{L_FORUM_PRUNE_SHADOW_TOPICS_EXPLAIN}</span></dt>
<dd><label><input type="radio" class="radio" name="enable_shadow_topic_prune" value="1"<!-- IF S_PRUNE_ENABLE --> id="enable_shadow_topic_prune" checked="checked"<!-- ENDIF --> /> {L_YES}</label>
<label><input type="radio" class="radio" name="enable_shadow_topic_prune" value="0"<!-- IF not S_PRUNE_ENABLE --> id="enable_shadow_topic_prune" checked="checked"<!-- ENDIF --> /> {L_NO}</label></dd>
</dl>
<dl>
<dt><label for="prune_shadow_topic_freq">{L_AUTO_PRUNE_FREQ}{L_COLON}</label><br /><span>{L_AUTO_PRUNE_FREQ_EXPLAIN}</span></dt>
<dd><input type="number" id="prune_shadow_topic_freq" name="prune_shadow_topic_freq" value="{PRUNE_FREQ}" maxlength="4" size="4" min="0" max="9999" /> {L_DAYS}</dd>
</dl>
<dl>
<dt><label for="prune_shadow_topic_days">{L_AUTO_PRUNE_DAYS}{L_COLON}</label><br /><span>{L_AUTO_PRUNE_DAYS_EXPLAIN}</span></dt>
<dd><input type="number" id="prune_shadow_topic_days" name="prune_shadow_topic_days" value="{PRUNE_DAYS}" maxlength="4" size="4" min="0" max="9999" /> {L_DAYS}</dd>
</dl>
</fieldset>
</div>

View File

@ -457,6 +457,9 @@ class acp_forums
'prune_days' => 7,
'prune_viewed' => 7,
'prune_freq' => 1,
'enable_shadow_topic_prune' => false,
'prune_shadow_topic_days' => 7,
'prune_shadow_topic_freq' => 1,
'forum_flags' => FORUM_FLAG_POST_REVIEW + FORUM_FLAG_ACTIVE_TOPICS,
'forum_options' => 0,
'forum_password' => '',

View File

@ -101,6 +101,8 @@ $lang = array_merge($lang, array(
'FORUM_PASSWORD_OLD' => 'The forum password is using an old hashing method and should be changed.',
'FORUM_PASSWORD_MISMATCH' => 'The passwords you entered did not match.',
'FORUM_PRUNE_SETTINGS' => 'Forum prune settings',
'FORUM_PRUNE_SHADOW_TOPICS' => 'Enable auto-pruning of shadow topics',
'FORUM_PRUNE_SHADOW_TOPICS_EXPLAIN' => 'Prunes the forum of shadow topics, set the frequency/age parameters below.',
'FORUM_RESYNCED' => 'Forum “%s” successfully resynced',
'FORUM_RULES_EXPLAIN' => 'Forum rules are displayed at any page within the given forum.',
'FORUM_RULES_LINK' => 'Link to forum rules',

View File

@ -0,0 +1,44 @@
<?php
/**
*
* @package migration
* @copyright (c) 2014 phpBB Group
* @license http://opensource.org/licenses/gpl-license.php GNU Public License v2
*
*/
namespace phpbb\db\migration\data\v310;
class prune_shadow_topics extends \phpbb\db\migration\migration
{
static public function depends_on()
{
return array('\phpbb\db\migration\data\v310\dev');
}
public function update_schema()
{
return array(
'add_columns' => array(
$this->table_prefix . 'forums' => array(
'enable_shadow_topic_prune' => array('BOOL', 0, 'after' => 'prune_freq'),
'prune_shadow_topic_days' => array('UINT', 7, 'after' => 'enable_shadow_topic_prune'),
'prune_shadow_topic_freq' => array('UINT', 1, 'after' => 'prune_shadow_topic_freq'),
),
),
);
}
public function revert_schema()
{
return array(
'drop_columns' => array(
$this->table_prefix . 'forums' => array(
'enable_shadow_topic_prune',
'prune_shadow_topic_days',
'prune_shadow_topic_freq',
),
),
);
}
}