mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-05-04 17:44:38 +09:00
issue 2462, added a mobile skin option for message module
git-svn-id: http://xe-core.googlecode.com/svn/branches/luminous@11268 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
8dbb0b2a37
commit
b04c7044f1
4 changed files with 22 additions and 5 deletions
|
|
@ -18,7 +18,7 @@
|
||||||
**/
|
**/
|
||||||
function procMessageAdminInsertConfig() {
|
function procMessageAdminInsertConfig() {
|
||||||
// Get information
|
// Get information
|
||||||
$args->skin = Context::get('skin');
|
$args = Context::gets('skin', 'mskin');
|
||||||
// Create a module Controller object
|
// Create a module Controller object
|
||||||
$oModuleController = &getController('module');
|
$oModuleController = &getController('module');
|
||||||
$output = $oModuleController->insertModuleConfig('message',$args);
|
$output = $oModuleController->insertModuleConfig('message',$args);
|
||||||
|
|
|
||||||
|
|
@ -19,17 +19,24 @@
|
||||||
function dispMessageAdminConfig() {
|
function dispMessageAdminConfig() {
|
||||||
// Get a list of skins(themes)
|
// Get a list of skins(themes)
|
||||||
$oModuleModel = &getModel('module');
|
$oModuleModel = &getModel('module');
|
||||||
|
|
||||||
$skin_list = $oModuleModel->getskins($this->module_path);
|
$skin_list = $oModuleModel->getskins($this->module_path);
|
||||||
Context::set('skin_list', $skin_list);
|
Context::set('skin_list', $skin_list);
|
||||||
|
|
||||||
|
$mskin_list = $oModuleModel->getSkins($this->module_path, "m.skins");
|
||||||
|
Context::set('mskin_list', $mskin_list);
|
||||||
|
|
||||||
// Get configurations (using module model object)
|
// Get configurations (using module model object)
|
||||||
$config = $oModuleModel->getModuleConfig('message');
|
$config = $oModuleModel->getModuleConfig('message');
|
||||||
Context::set('config',$config);
|
Context::set('config',$config);
|
||||||
|
|
||||||
// Set a template file
|
// Set a template file
|
||||||
$this->setTemplatePath($this->module_path.'tpl');
|
$this->setTemplatePath($this->module_path.'tpl');
|
||||||
|
|
||||||
|
|
||||||
//Security
|
//Security
|
||||||
$security = new Security();
|
$security = new Security();
|
||||||
$security->encodeHTML('skin_list..title');
|
$security->encodeHTML('skin_list..title', 'mskin_list..title');
|
||||||
|
|
||||||
$this->setTemplateFile('config');
|
$this->setTemplateFile('config');
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -16,9 +16,9 @@
|
||||||
// Get configurations (using module model object)
|
// Get configurations (using module model object)
|
||||||
$oModuleModel = &getModel('module');
|
$oModuleModel = &getModel('module');
|
||||||
$config = $oModuleModel->getModuleConfig('message');
|
$config = $oModuleModel->getModuleConfig('message');
|
||||||
if(!$config->skin) $config->skin = 'default';
|
if(!$config->mskin) $config->mskin = 'default';
|
||||||
// Set the template path
|
// Set the template path
|
||||||
$template_path = sprintf('%sm.skins/%s', $this->module_path, $config->skin);
|
$template_path = sprintf('%sm.skins/%s', $this->module_path, $config->mskin);
|
||||||
// Get the member configuration
|
// Get the member configuration
|
||||||
$oModuleModel = &getModel('module');
|
$oModuleModel = &getModel('module');
|
||||||
$member_config = $oModuleModel->getModuleConfig('member');
|
$member_config = $oModuleModel->getModuleConfig('member');
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
<div cond="$XE_VALIDATOR_MESSAGE" class="message {$XE_VALIDATOR_MESSAGE_TYPE}">
|
<div cond="$XE_VALIDATOR_MESSAGE" class="message {$XE_VALIDATOR_MESSAGE_TYPE}">
|
||||||
<p>{$XE_VALIDATOR_MESSAGE}</p>
|
<p>{$XE_VALIDATOR_MESSAGE}</p>
|
||||||
</div>
|
</div>
|
||||||
<form action="./" method="post">
|
<form action="./" method="post" class="form">
|
||||||
<input type="hidden" name="module" value="message" />
|
<input type="hidden" name="module" value="message" />
|
||||||
<input type="hidden" name="act" value="procMessageAdminInsertConfig" />
|
<input type="hidden" name="act" value="procMessageAdminInsertConfig" />
|
||||||
<p>{$lang->about_skin}</p>
|
<p>{$lang->about_skin}</p>
|
||||||
|
|
@ -18,6 +18,16 @@
|
||||||
</select>
|
</select>
|
||||||
</p>
|
</p>
|
||||||
</li>
|
</li>
|
||||||
|
<li>
|
||||||
|
<p class="q"><label for="mskin">{$lang->mobile_skin}</label></p>
|
||||||
|
<p class="a">
|
||||||
|
<select name="mskin" id="mskin">
|
||||||
|
<!--@foreach($mskin_list as $key => $val)-->
|
||||||
|
<option value="{$key}" <!--@if($key==$config->mskin)-->selected="selected"<!--@end-->>{$val->title}</option>
|
||||||
|
<!--@end-->
|
||||||
|
</select>
|
||||||
|
</p>
|
||||||
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<div class="btnArea">
|
<div class="btnArea">
|
||||||
<span class="btn"><input type="submit" value="{$lang->cmd_registration}" /></span>
|
<span class="btn"><input type="submit" value="{$lang->cmd_registration}" /></span>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue