Skip to content

Commit

Permalink
RSI v1.0.0
Browse files Browse the repository at this point in the history
Signed-off-by: Dark❶ <[email protected]>
  • Loading branch information
Dark❶ committed Mar 20, 2020
1 parent 470a211 commit 207da25
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 13 deletions.
15 changes: 6 additions & 9 deletions adm/style/dark1_rsi_acp_forum.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,8 @@ <h2>{{ RSI_EXT_MODE }}</h2>
<table class="table1 responsive">
<thead>
<tr>
<th>{{ lang('ACP_RSI_TABLE_FORUM') }}</th>
<th>{{ lang('ACP_RSI_TABLE_LOCK') }}</th>
<th>{{ lang('ACP_RSI_TABLE_TOPIC') }}</th>
<th>{{ lang('ACP_RSI_TABLE_POST') }}</th>
<th>{{ lang('ACP_RSI_TABLE_DISABLE') }}</th>
<th>{{ lang('ACP_RSI_TABLE_FORUM_NAME') }}</th>
<th colspan="4">{{ lang('ACP_RSI_TABLE_FORUM_OPTION') }}</th>
</tr>
</thead>
<tbody>
Expand All @@ -43,16 +40,16 @@ <h2>{{ RSI_EXT_MODE }}</h2>
{{ forumrow.FORUM_NAME }}
</td>
<td class="col1">
<input type="radio" class="radio" name="forum_{{ forumrow.FORUM_ID }}_enable" value="3" {% if forumrow.ENABLE == 3 %}checked="checked"{% endif %}/>
<label><input type="radio" class="radio" name="forum_{{ forumrow.FORUM_ID }}_enable" value="3" {% if forumrow.ENABLE == 3 %}checked="checked"{% endif %}/> {{ lang('ACP_RSI_TABLE_LOCK') }}</label>
</td>
<td class="col1">
<input type="radio" class="radio" name="forum_{{ forumrow.FORUM_ID }}_enable" value="2" {% if forumrow.ENABLE == 2 %}checked="checked"{% endif %}/>
<label><input type="radio" class="radio" name="forum_{{ forumrow.FORUM_ID }}_enable" value="2" {% if forumrow.ENABLE == 2 %}checked="checked"{% endif %}/> {{ lang('ACP_RSI_TABLE_TOPIC') }}</label>
</td>
<td class="col1">
<input type="radio" class="radio" name="forum_{{ forumrow.FORUM_ID }}_enable" value="1" {% if forumrow.ENABLE == 1 %}checked="checked"{% endif %}/>
<label><input type="radio" class="radio" name="forum_{{ forumrow.FORUM_ID }}_enable" value="1" {% if forumrow.ENABLE == 1 %}checked="checked"{% endif %}/> {{ lang('ACP_RSI_TABLE_POST') }}</label>
</td>
<td class="col1">
<input type="radio" class="radio" name="forum_{{ forumrow.FORUM_ID }}_enable" value="0" {% if forumrow.ENABLE == 0 %}checked="checked"{% endif %}/>
<label><input type="radio" class="radio" name="forum_{{ forumrow.FORUM_ID }}_enable" value="0" {% if forumrow.ENABLE == 0 %}checked="checked"{% endif %}/> {{ lang('ACP_RSI_TABLE_DISABLE') }}</label>
</td>
</tr>
{% endif %}
Expand Down
5 changes: 5 additions & 0 deletions controller/acp_base.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ public function __construct(language $language, log $log, request $request, temp
* @param string $u_action Custom form action
*
* @return void
* @access public
*/
public function set_data($id, $mode, $u_action)
{
Expand All @@ -86,6 +87,7 @@ public function set_data($id, $mode, $u_action)
* Get Data form.
*
* @return array Having keys 'tpl_name' & 'page_title'
* @access public
*/
public function get_data()
{
Expand All @@ -99,6 +101,7 @@ public function get_data()
* Set Display form.
*
* @return void
* @access public
*/
public function setup()
{
Expand All @@ -125,6 +128,7 @@ public function setup()
* Check Form On Submit .
*
* @return void
* @access protected
*/
protected function check_form_on_submit()
{
Expand All @@ -140,6 +144,7 @@ protected function check_form_on_submit()
* Used to Log & Trigger Success Err0r.
*
* @return void
* @access protected
*/
protected function success_form_on_submit()
{
Expand Down
1 change: 1 addition & 0 deletions controller/acp_cron.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ public function __construct(language $language, log $log, request $request, temp
* Display the options a user can configure for Cron Mode.
*
* @return void
* @access public
*/
public function handle()
{
Expand Down
3 changes: 3 additions & 0 deletions controller/acp_forum.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ public function __construct(language $language, log $log, request $request, temp
* Display the options a user can configure for Forum Mode.
*
* @return void
* @access public
*/
public function handle()
{
Expand All @@ -69,6 +70,7 @@ public function handle()
* Display the Forum options.
*
* @return void
* @access private
*/
private function print_forums()
{
Expand Down Expand Up @@ -132,6 +134,7 @@ private function print_forums()
* Submit the Forum options.
*
* @return void
* @access private
*/
private function submit_forums()
{
Expand Down
1 change: 1 addition & 0 deletions controller/acp_main.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ public function __construct(language $language, log $log, request $request, temp
* Display the options a user can configure for Main Mode.
*
* @return void
* @access public
*/
public function handle()
{
Expand Down
7 changes: 4 additions & 3 deletions ext.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@
class ext extends base
{
/** string Require phpBB v3.2.9 due to various reasons. */
const PHPBB_32x_MIN_VERSION = '3.2.9';
const PHPBB_MIN_3_2_X = '3.2.9';

/** string Require phpBB v3.3.0 due to various reasons. */
const PHPBB_33x_MIN_VERSION = '3.3.0';
const PHPBB_MIN_3_3_X = '3.3.0';

/**
* {@inheritdoc}
Expand All @@ -38,14 +38,15 @@ public function is_enableable()
* phpBB Version Check.
*
* @return bool
* @access private
*/
private function pbpbb_ver_chk()
{
$config = $this->container->get('config');

$phpbb_version = phpbb_version_compare(PHPBB_VERSION, $config['version'], '>=') ? PHPBB_VERSION : $config['version'] ;
list($v1, $v2) = explode('.', $phpbb_version);
$phpbb_min_version = 'self::PHPBB_' . $v1 . $v2 . 'x_MIN_VERSION';
$phpbb_min_version = 'self::PHPBB_MIN_' . $v1 . '_' . $v2 . '_X';

return defined($phpbb_min_version) ? phpbb_version_compare($phpbb_version, constant($phpbb_min_version), '>=') : false ;
}
Expand Down
3 changes: 2 additions & 1 deletion language/en/info_acp_rsi.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,8 @@

// Forum
'ACP_RSI_FORUM_EXPLAIN' => 'Select the Option to Enable Reduce Search Index for each Forum.<br>Need to select at-least one Forum.<br>Following are Options',
'ACP_RSI_TABLE_FORUM' => 'Forum Name',
'ACP_RSI_TABLE_FORUM_NAME' => 'Forum Name',
'ACP_RSI_TABLE_FORUM_OPTION' => 'Forum Options',
'ACP_RSI_TABLE_LOCK' => 'Topic + Lock',
'ACP_RSI_TABLE_LOCK_EXPLAIN' => 'Search Index from the Forum for the Topic is Deleted and Locked as per the “Reduce Time”.',
'ACP_RSI_TABLE_TOPIC' => 'Topic Only',
Expand Down

0 comments on commit 207da25

Please sign in to comment.