mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-05-22 05:15:29 +09:00
issue 2514 apply layout configuration at communication module
git-svn-id: http://xe-core.googlecode.com/svn/branches/luminous@11498 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
e8f11ff2b8
commit
94a37407c4
4 changed files with 29 additions and 2 deletions
|
|
@ -19,12 +19,13 @@
|
||||||
**/
|
**/
|
||||||
function procCommunicationAdminInsertConfig() {
|
function procCommunicationAdminInsertConfig() {
|
||||||
// get the default information
|
// get the default information
|
||||||
$args = Context::gets('skin','colorset','editor_skin','editor_colorset', 'mskin');
|
$args = Context::gets('skin','colorset','editor_skin','editor_colorset', 'mskin','layout_srl');
|
||||||
|
|
||||||
if(!$args->skin) $args->skin = 'default';
|
if(!$args->skin) $args->skin = 'default';
|
||||||
if(!$args->colorset) $args->colorset = 'white';
|
if(!$args->colorset) $args->colorset = 'white';
|
||||||
if(!$args->editor_skin) $args->editor_skin = 'default';
|
if(!$args->editor_skin) $args->editor_skin = 'default';
|
||||||
if(!$args->mskin) $args->mskin = 'default';
|
if(!$args->mskin) $args->mskin = 'default';
|
||||||
|
if(!$args->layout_srl) $args->layout_srl = null;
|
||||||
|
|
||||||
// create the module module Controller object
|
// create the module module Controller object
|
||||||
$oModuleController = &getController('module');
|
$oModuleController = &getController('module');
|
||||||
|
|
|
||||||
|
|
@ -17,13 +17,17 @@
|
||||||
* configuration to manage messages and friends
|
* configuration to manage messages and friends
|
||||||
* @return void
|
* @return void
|
||||||
**/
|
**/
|
||||||
function dispCommunicationAdminConfig() {
|
function dispCommunicationAdminConfig()
|
||||||
|
{
|
||||||
// Creating an object
|
// Creating an object
|
||||||
$oEditorModel = &getModel('editor');
|
$oEditorModel = &getModel('editor');
|
||||||
$oModuleModel = &getModel('module');
|
$oModuleModel = &getModel('module');
|
||||||
|
$oLayoutModel = &getModel('layout');
|
||||||
$oCommunicationModel = &getModel('communication');
|
$oCommunicationModel = &getModel('communication');
|
||||||
// get the configurations of communication module
|
// get the configurations of communication module
|
||||||
Context::set('communication_config', $oCommunicationModel->getConfig() );
|
Context::set('communication_config', $oCommunicationModel->getConfig() );
|
||||||
|
// get a list of layout
|
||||||
|
Context::set('layout_list', $oLayoutModel->getLayoutList() );
|
||||||
// get a list of editor skins
|
// get a list of editor skins
|
||||||
Context::set('editor_skin_list', $oEditorModel->getEditorSkinList() );
|
Context::set('editor_skin_list', $oEditorModel->getEditorSkinList() );
|
||||||
// get a list of communication skins
|
// get a list of communication skins
|
||||||
|
|
@ -33,6 +37,7 @@
|
||||||
|
|
||||||
$security = new Security();
|
$security = new Security();
|
||||||
$security->encodeHTML('communication_config..');
|
$security->encodeHTML('communication_config..');
|
||||||
|
$security->encodeHTML('layout_list..');
|
||||||
$security->encodeHTML('editor_skin_list..');
|
$security->encodeHTML('editor_skin_list..');
|
||||||
$security->encodeHTML('communication_skin_list..title');
|
$security->encodeHTML('communication_skin_list..title');
|
||||||
$security->encodeHTML('communication_mobile_skin_list..title');
|
$security->encodeHTML('communication_mobile_skin_list..title');
|
||||||
|
|
|
||||||
|
|
@ -26,6 +26,14 @@
|
||||||
$tpl_path = sprintf('%sskins/%s', $this->module_path, $skin);
|
$tpl_path = sprintf('%sskins/%s', $this->module_path, $skin);
|
||||||
}
|
}
|
||||||
$this->setTemplatePath($tpl_path);
|
$this->setTemplatePath($tpl_path);
|
||||||
|
|
||||||
|
$oLayoutModel = &getModel('layout');
|
||||||
|
$layout_info = $oLayoutModel->getLayout($this->communication_config->layout_srl);
|
||||||
|
if($layout_info)
|
||||||
|
{
|
||||||
|
$this->module_info->layout_srl = $this->communication_config->layout_srl;
|
||||||
|
$this->setLayoutPath($layout_info->path);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -81,6 +89,7 @@
|
||||||
* @return void|Object (void : success, Object : fail)
|
* @return void|Object (void : success, Object : fail)
|
||||||
**/
|
**/
|
||||||
function dispCommunicationNewMessage() {
|
function dispCommunicationNewMessage() {
|
||||||
|
$this->setLayoutPath('./common/tpl/');
|
||||||
$this->setLayoutFile('popup_layout');
|
$this->setLayoutFile('popup_layout');
|
||||||
// Error appears if not logged-in
|
// Error appears if not logged-in
|
||||||
if(!Context::get('is_logged')) return $this->stop('msg_not_logged');
|
if(!Context::get('is_logged')) return $this->stop('msg_not_logged');
|
||||||
|
|
@ -108,6 +117,7 @@
|
||||||
* @return void|Object (void : success, Object : fail)
|
* @return void|Object (void : success, Object : fail)
|
||||||
**/
|
**/
|
||||||
function dispCommunicationSendMessage() {
|
function dispCommunicationSendMessage() {
|
||||||
|
$this->setLayoutPath('./common/tpl/');
|
||||||
$this->setLayoutFile("popup_layout");
|
$this->setLayoutFile("popup_layout");
|
||||||
$oCommunicationModel = &getModel('communication');
|
$oCommunicationModel = &getModel('communication');
|
||||||
$oMemberModel = &getModel('member');
|
$oMemberModel = &getModel('member');
|
||||||
|
|
@ -201,6 +211,7 @@
|
||||||
* @return void|Object (void : success, Object : fail)
|
* @return void|Object (void : success, Object : fail)
|
||||||
**/
|
**/
|
||||||
function dispCommunicationAddFriend() {
|
function dispCommunicationAddFriend() {
|
||||||
|
$this->setLayoutPath('./common/tpl/');
|
||||||
$this->setLayoutFile("popup_layout");
|
$this->setLayoutFile("popup_layout");
|
||||||
// error appears if not logged-in
|
// error appears if not logged-in
|
||||||
if(!Context::get('is_logged')) return $this->stop('msg_not_logged');
|
if(!Context::get('is_logged')) return $this->stop('msg_not_logged');
|
||||||
|
|
@ -226,6 +237,7 @@
|
||||||
* @return void|Object (void : success, Object : fail)
|
* @return void|Object (void : success, Object : fail)
|
||||||
**/
|
**/
|
||||||
function dispCommunicationAddFriendGroup() {
|
function dispCommunicationAddFriendGroup() {
|
||||||
|
$this->setLayoutPath('./common/tpl/');
|
||||||
$this->setLayoutFile("popup_layout");
|
$this->setLayoutFile("popup_layout");
|
||||||
// error apprears if not logged-in
|
// error apprears if not logged-in
|
||||||
if(!Context::get('is_logged')) return $this->stop('msg_not_logged');
|
if(!Context::get('is_logged')) return $this->stop('msg_not_logged');
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,15 @@
|
||||||
<input type="hidden" name="act" value="procCommunicationAdminInsertConfig">
|
<input type="hidden" name="act" value="procCommunicationAdminInsertConfig">
|
||||||
<div class="table">
|
<div class="table">
|
||||||
<table width="100%" border="1" cellspacing="0">
|
<table width="100%" border="1" cellspacing="0">
|
||||||
|
<tr>
|
||||||
|
<th scope="row">{$lang->layout}</th>
|
||||||
|
<td>
|
||||||
|
<select id="layout" name="layout_srl">
|
||||||
|
<option value="0">{$lang->notuse}</option>
|
||||||
|
<option loop="$layout_list => $key,$val" value="{$val->layout_srl}" selected="selected"|cond="$val->layout_srl == $communication_config->layout_srl">{$val->title} ({$val->layout})</option>
|
||||||
|
</select>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row">{$lang->editor_skin}</th>
|
<th scope="row">{$lang->editor_skin}</th>
|
||||||
<td>
|
<td>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue