mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-09 03:32:00 +09:00
- 모바일에서 반응형 스킨 사용을 기본값으로 지정한 경우 - 사이트 디자인 설정 화면에서 /USE_RESPONSIVE/가 노출되는 문제 수정 - 신규 생성한 게시판에서 모바일 스킨을 찾지 못하는 문제 수정 - 게시판 모듈에서 스킨 처리하는 루틴을 ModuleObject로 이관하여 모든 모듈에서 혜택을 볼 수 있도록 함 - 반응형 스킨이 기본값으로 지정된 경우, 아무 것도 지정되지 않은 경우, 기본값으로 지정된 스킨이 삭제된 경우 등 다양한 상황에 대처 - TODO: 회원 모듈, 커뮤니케이션 모듈 등에서 자체 스킨을 들여오는 방식 재검토
89 lines
3.3 KiB
PHP
89 lines
3.3 KiB
PHP
<?php
|
|
/* Copyright (C) NAVER <http://www.navercorp.com> */
|
|
|
|
class boardMobile extends boardView
|
|
{
|
|
function init()
|
|
{
|
|
$oSecurity = new Security();
|
|
$oSecurity->encodeHTML('document_srl', 'comment_srl', 'vid', 'mid', 'page', 'category', 'search_target', 'search_keyword', 'sort_index', 'order_type', 'trackback_srl');
|
|
|
|
if($this->module_info->list_count) $this->list_count = $this->module_info->list_count;
|
|
if($this->module_info->mobile_list_count) $this->list_count = $this->module_info->mobile_list_count;
|
|
if($this->module_info->search_list_count) $this->search_list_count = $this->module_info->search_list_count;
|
|
if($this->module_info->mobile_search_list_count) $this->search_list_count = $this->module_info->mobile_search_list_count;
|
|
if($this->module_info->page_count) $this->page_count = $this->module_info->page_count;
|
|
if($this->module_info->mobile_page_count) $this->page_count = $this->module_info->mobile_page_count;
|
|
$this->except_notice = $this->module_info->except_notice == 'N' ? false : true;
|
|
|
|
// $this->_getStatusNameListecret option backward compatibility
|
|
$oDocumentModel = getModel('document');
|
|
|
|
$statusList = $this->_getStatusNameList($oDocumentModel);
|
|
if(isset($statusList['SECRET']))
|
|
{
|
|
$this->module_info->secret = 'Y';
|
|
}
|
|
|
|
// use_category <=1.5.x, hide_category >=1.7.x
|
|
$count_category = count($oDocumentModel->getCategoryList($this->module_info->module_srl));
|
|
if($count_category)
|
|
{
|
|
if($this->module_info->hide_category)
|
|
{
|
|
$this->module_info->use_category = ($this->module_info->hide_category == 'Y') ? 'N' : 'Y';
|
|
}
|
|
else if($this->module_info->use_category)
|
|
{
|
|
$this->module_info->hide_category = ($this->module_info->use_category == 'Y') ? 'N' : 'Y';
|
|
}
|
|
else
|
|
{
|
|
$this->module_info->hide_category = 'N';
|
|
$this->module_info->use_category = 'Y';
|
|
}
|
|
}
|
|
else
|
|
{
|
|
$this->module_info->hide_category = 'Y';
|
|
$this->module_info->use_category = 'N';
|
|
}
|
|
|
|
/**
|
|
* check the consultation function, if the user is admin then swich off consultation function
|
|
* if the user is not logged, then disppear write document/write comment./ view document
|
|
**/
|
|
if($this->module_info->consultation == 'Y' && !$this->grant->manager && !$this->grant->consultation_read)
|
|
{
|
|
$this->consultation = true;
|
|
if(!Context::get('is_logged')) $this->grant->list = $this->grant->write_document = $this->grant->write_comment = $this->grant->view = false;
|
|
} else {
|
|
$this->consultation = false;
|
|
}
|
|
|
|
$extra_keys = $oDocumentModel->getExtraKeys($this->module_info->module_srl);
|
|
Context::set('extra_keys', $extra_keys);
|
|
|
|
Context::addJsFilter($this->module_path.'tpl/filter', 'input_password.xml');
|
|
}
|
|
|
|
function getBoardCommentPage()
|
|
{
|
|
$this->dispBoardCommentPage();
|
|
$oTemplate = TemplateHandler::getInstance();
|
|
$html = $oTemplate->compile($this->getTemplatePath(), 'comment.html');
|
|
$this->add('html', $html);
|
|
}
|
|
|
|
function dispBoardMessage($msg_code)
|
|
{
|
|
$msg = lang($msg_code);
|
|
$oMessageObject = &ModuleHandler::getModuleInstance('message','mobile');
|
|
$oMessageObject->setError(-1);
|
|
$oMessageObject->setMessage($msg);
|
|
$oMessageObject->dispMessage();
|
|
|
|
$this->setTemplatePath($oMessageObject->getTemplatePath());
|
|
$this->setTemplateFile($oMessageObject->getTemplateFile());
|
|
}
|
|
}
|