diff --git a/acp/tpotm_module.php b/acp/tpotm_module.php
index 395e4a6..15ccdca 100644
--- a/acp/tpotm_module.php
+++ b/acp/tpotm_module.php
@@ -10,6 +10,8 @@
namespace threedi\tpotm\acp;
+use \threedi\tpotm\ext;
+
/**
* Top Poster Of The Month ACP module.
*/
@@ -49,6 +51,26 @@ public function main($id, $mode)
trigger_error($user->lang('TPOTM_BADGE_IMG_INVALID') . adm_back_link($this->u_action), E_USER_WARNING);
}
+ /**
+ * Drop down construct inspired by MChat.
+ */
+ $time_modes = [
+ ext::NO_CACHE => 'no_cache',
+ ext::ONE_DAY => 'one_day',
+ ext::ONE_WEEK => 'one_week',
+ ext::TWO_WEEKS => 'two_weeks',
+ ext::ONE_MONTH => 'one_month',
+ ];
+
+ $selected = $time_row_options = '';
+
+ foreach ($time_modes as $val => $time_mode)
+ {
+ $time_row_options .= '';
+ }
+
/* Do this now and forget */
$errors = [];
@@ -80,6 +102,8 @@ public function main($id, $mode)
$config->set('threedi_tpotm_forums', $request->variable('threedi_tpotm_forums', (int) $config['threedi_tpotm_forums']));
$config->set('threedi_tpotm_hall', $request->variable('threedi_tpotm_hall', (int) $config['threedi_tpotm_hall']));
$config->set('threedi_tpotm_users_page', $request->variable('threedi_tpotm_users_page', (int) $config['threedi_tpotm_users_page']));
+ $config->set('threedi_tpotm_ttl_mode', $request->variable('threedi_tpotm_ttl_mode', (int) $config['threedi_tpotm_ttl_mode']));
+ $config->set('threedi_tpotm_ttl_tpe', $request->variable('threedi_tpotm_ttl_tpe', (int) $config['threedi_tpotm_ttl_tpe']));
$config->set('threedi_tpotm_since_epoch', $request->variable('threedi_tpotm_since_epoch', (int) $config['threedi_tpotm_since_epoch']));
$config->set('threedi_tpotm_ttl', $request->variable('threedi_tpotm_ttl', (int) $config['threedi_tpotm_ttl']));
$config->set('threedi_tpotm_miniavatar', $request->variable('threedi_tpotm_miniavatar', (int) $config['threedi_tpotm_miniavatar']));
@@ -98,18 +122,18 @@ public function main($id, $mode)
'S_ERRORS' => ($errors) ? true : false,
'ERRORS_MSG' => ($errors) ? implode('
', $errors) : '',
'U_ACTION' => $this->u_action,
- // Template locations
+
'TPOTM_INDEX' => ($config['threedi_tpotm_index']) ? true : false,
'TPOTM_FORUMS' => ($config['threedi_tpotm_forums']) ? true : false,
- // Hall of fame
'TPOTM_HALL' => ($config['threedi_tpotm_hall']) ? true : false,
'TPOTM_USERS_PAGE' => (int) $config['threedi_tpotm_users_page'],
+ 'TPOTM_TTL_MODE' => $config['threedi_tpotm_ttl_mode'] ? true : false,
+ 'S_TPOTM_TTL_TPE' => $time_row_options,
+ 'TPOTM_TTL_TPE' => (int) $config['threedi_tpotm_ttl_tpe'],
'TPOTM_HALL_EPOCH' => ($config['threedi_tpotm_since_epoch']) ? true : false,
- // General Settings
'TPOTM_TTL' => (int) $config['threedi_tpotm_ttl'],
'TPOTM_MINIAVATAR' => ($config['threedi_tpotm_miniavatar']) ? true : false,
'TPOTM_MINIPROFILE' => ($config['threedi_tpotm_miniprofile']) ? true : false,
- // Founders, admin and mods
'TPOTM_ADM_MODS' => ($config['threedi_tpotm_adm_mods']) ? true : false,
'TPOTM_FOUNDERS' => ($config['threedi_tpotm_founders']) ? true : false,
'TPOTM_BANNEDS' => ($config['threedi_tpotm_banneds']) ? true : false,
diff --git a/adm/style/tpotm_acp.css b/adm/style/tpotm_acp.css
index 8b87f9f..8a0bb1f 100644
--- a/adm/style/tpotm_acp.css
+++ b/adm/style/tpotm_acp.css
@@ -1,5 +1,17 @@
/* CSS Document */
+.tpotm-select select {
+ background: transparent;
+ width: auto;
+ padding: 5px;
+ font-size: inherit;
+ line-height: inherit;
+ border: 0;
+ border-radius: 0;
+ height: 32px;
+ webkit-appearance: none;
+}
+
.tpotm-acp-inner {
}
diff --git a/adm/style/tpotm_body.html b/adm/style/tpotm_body.html
index 95d5286..5377316 100644
--- a/adm/style/tpotm_body.html
+++ b/adm/style/tpotm_body.html
@@ -36,48 +36,46 @@
{{ lang('ACP_TPOTM_TITLE') }}