mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-29 15:22:15 +09:00
Remove admin title and logo customization
This commit is contained in:
parent
4a8133417c
commit
5273fcf6d3
5 changed files with 6 additions and 91 deletions
|
|
@ -382,57 +382,15 @@ class adminAdminController extends admin
|
|||
*/
|
||||
function procAdminUpdateConfig()
|
||||
{
|
||||
$adminTitle = Context::get('adminTitle');
|
||||
$file = $_FILES['adminLogo'];
|
||||
|
||||
$oModuleModel = getModel('module');
|
||||
$oAdminConfig = $oModuleModel->getModuleConfig('admin');
|
||||
|
||||
if(!is_object($oAdminConfig))
|
||||
{
|
||||
$oAdminConfig = new stdClass();
|
||||
}
|
||||
|
||||
if($file['tmp_name'])
|
||||
{
|
||||
$target_path = 'files/attach/images/admin/';
|
||||
FileHandler::makeDir($target_path);
|
||||
|
||||
// Get file information
|
||||
list($width, $height, $type, $attrs) = @getimagesize($file['tmp_name']);
|
||||
if($type == 3)
|
||||
{
|
||||
$ext = 'png';
|
||||
}
|
||||
elseif($type == 2)
|
||||
{
|
||||
$ext = 'jpg';
|
||||
}
|
||||
else
|
||||
{
|
||||
$ext = 'gif';
|
||||
}
|
||||
|
||||
$target_filename = sprintf('%s%s.%s.%s', $target_path, 'adminLogo', date('YmdHis'), $ext);
|
||||
@move_uploaded_file($file['tmp_name'], $target_filename);
|
||||
|
||||
$oAdminConfig->adminLogo = $target_filename;
|
||||
}
|
||||
if($adminTitle)
|
||||
{
|
||||
$oAdminConfig->adminTitle = strip_tags($adminTitle);
|
||||
}
|
||||
else
|
||||
{
|
||||
unset($oAdminConfig->adminTitle);
|
||||
}
|
||||
|
||||
if($oAdminConfig)
|
||||
{
|
||||
$oModuleController = getController('module');
|
||||
$oModuleController->insertModuleConfig('admin', $oAdminConfig);
|
||||
}
|
||||
|
||||
$oModuleController = getController('module');
|
||||
$oModuleController->insertModuleConfig('admin', $oAdminConfig);
|
||||
$this->setMessage('success_updated', 'info');
|
||||
|
||||
$returnUrl = Context::get('success_return_url') ? Context::get('success_return_url') : getNotEncodedUrl('', 'module', 'admin', 'act', 'dispAdminSetup');
|
||||
|
|
|
|||
|
|
@ -197,14 +197,6 @@ class adminAdminView extends admin
|
|||
}
|
||||
}
|
||||
|
||||
// Admin logo, title setup
|
||||
$objConfig = $oModuleModel->getModuleConfig('admin');
|
||||
$gnbTitleInfo = new stdClass();
|
||||
$gnbTitleInfo->adminTitle = $objConfig->adminTitle ? $objConfig->adminTitle : 'Admin';
|
||||
$gnbTitleInfo->adminLogo = $objConfig->adminLogo ? $objConfig->adminLogo : '';
|
||||
|
||||
$browserTitle = $gnbTitleInfo->adminTitle . ' - ' . ($subMenuTitle ? $subMenuTitle : 'Dashboard');
|
||||
|
||||
// Get list of favorite
|
||||
$oAdminAdminModel = getAdminModel('admin');
|
||||
$output = $oAdminAdminModel->getFavoriteList(0, true);
|
||||
|
|
@ -255,7 +247,7 @@ class adminAdminView extends admin
|
|||
Context::set('gnbUrlList', $menu->list);
|
||||
Context::set('parentSrl', $parentSrl);
|
||||
Context::set('gnb_title_info', $gnbTitleInfo);
|
||||
Context::addBrowserTitle($browserTitle);
|
||||
Context::addBrowserTitle($subMenuTitle ? $subMenuTitle : 'Dashboard');
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -709,7 +701,6 @@ class adminAdminView extends admin
|
|||
function dispAdminSetup()
|
||||
{
|
||||
$oModuleModel = getModel('module');
|
||||
$configObject = $oModuleModel->getModuleConfig('admin');
|
||||
|
||||
$oAdmin = getClass('admin');
|
||||
$oMenuAdminModel = getAdminModel('menu');
|
||||
|
|
@ -717,7 +708,6 @@ class adminAdminView extends admin
|
|||
|
||||
Context::set('menu_srl', $output->menu_srl);
|
||||
Context::set('menu_title', $output->title);
|
||||
Context::set('config_object', $configObject);
|
||||
$this->setTemplateFile('admin_setup');
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -339,7 +339,7 @@ $lang->msg_php_warning_notice = '이 서버는 안전하지 않은 PHP 버전을
|
|||
$lang->msg_php_warning_notice_explain = '<li>매우 심각한 PHP 보안 문제 및 공격에 노출될 수 있습니다.</li><li>Rhymix 최신 버전을 사용할 수 없습니다.</li><li>Rhymix 최신 버전 이상에서 지원하는 확장 기능을 사용할 수 없습니다.</li><li>일부 확장 기능이 동작하지 않거나, 이로 인해 장애가 발생할 수 있습니다.</li>';
|
||||
$lang->msg_php_warning_now_version = '이 서버의 PHP 버전';
|
||||
$lang->msg_php_warning_latest_version_check = 'PHP 최신 안정버전 확인하기';
|
||||
$lang->admin_setup = '관리자 설정';
|
||||
$lang->admin_setup = '관리자 화면 설정';
|
||||
$lang->open_all = '모두 펼치기';
|
||||
$lang->close_all = '모두 접기';
|
||||
$lang->desktop_settings = 'PC 설정';
|
||||
|
|
|
|||
|
|
@ -22,8 +22,7 @@
|
|||
</p>
|
||||
<!--@else-->
|
||||
<h1>
|
||||
<a class="custom_header" href="{getUrl('','module','admin')}" cond="$gnb_title_info->adminLogo"><img src="{getUrl('')}{$gnb_title_info->adminLogo}" alt="{$gnb_title_info->adminTitle}" /> {$gnb_title_info->adminTitle}</a>
|
||||
<a class="default_header" href="{getUrl('','module','admin')}" cond="!$gnb_title_info->adminLogo"><i class="xi xi-cog"></i></a>
|
||||
<a class="default_header" href="{getUrl('','module','admin')}"><i class="xi xi-cog"></i></a>
|
||||
<a class="mobile_menu_open" href="#gnbNav"><i class="xi xi-bars"></i></a>
|
||||
</h1>
|
||||
<p class="site"><a href="{$xe_default_url}">{$xe_default_url}</a></p>
|
||||
|
|
|
|||
|
|
@ -1,42 +1,10 @@
|
|||
<load target="./js/menu_setup.js" usecdn="true" />
|
||||
<div class="x_page-header">
|
||||
<h1>{$lang->admin_setup} <a class="x_icon-question-sign" href="./common/manual/admin/index.html#UMAN_config_admin" target="_blank">{$lang->help}</a></h1>
|
||||
<h1>{$lang->admin_setup}</h1>
|
||||
</div>
|
||||
<div cond="$XE_VALIDATOR_MESSAGE && $XE_VALIDATOR_ID == 'modules/admin/tpl/admin_setup/1'" class="message {$XE_VALIDATOR_MESSAGE_TYPE}">
|
||||
<p>{$XE_VALIDATOR_MESSAGE}</p>
|
||||
</div>
|
||||
<section class="section">
|
||||
<h1>{$lang->admin_title}</h1>
|
||||
<form action="./" method="post" enctype="multipart/form-data" class="x_form-horizontal">
|
||||
<input type="hidden" name="module" value="admin" />
|
||||
<input type="hidden" name="act" value="procAdminUpdateConfig" />
|
||||
<input type="hidden" name="xe_validator_id" value="modules/admin/tpl/admin_setup/1" />
|
||||
<div class="x_control-group">
|
||||
<label class="x_control-label">{$lang->admin_logo}</label>
|
||||
<div class="x_controls">
|
||||
<!--@if($config_object->adminLogo)-->
|
||||
<img src="{getUrl('').$config_object->adminLogo}" />
|
||||
<button type="submit" value="procAdminDeleteLogo" name="act" class="x_btn">{$lang->cmd_delete}</button>
|
||||
<!--@else-->
|
||||
<img src="{getUrl('')}{$gnb_title_info->adminLogo}" />
|
||||
<!--@end-->
|
||||
<input type="file" name="adminLogo" id="adminLogo" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="x_control-group">
|
||||
<label class="x_control-label" for="adminTitle">{$lang->admin_title}</label>
|
||||
<div class="x_controls">
|
||||
<input type="text" name="adminTitle" id="adminTitle" value="{$config_object->adminTitle}" placeholder="Rhymix Admin" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="x_clearfix btnArea">
|
||||
<div class="x_pull-right">
|
||||
<button type="submit" class="x_btn x_btn-primary">{$lang->cmd_save}</button>
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
</form>
|
||||
</section>
|
||||
<section class="section">
|
||||
<h1>{$lang->admin_menu_setup}</h1>
|
||||
<form id="listForm" action="./" method="post" class="adminMap">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue