mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-26 06:39:56 +09:00
css 및 js 호출순서 조정기능 추가
git-svn-id: http://xe-core.googlecode.com/svn/sandbox@5785 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
4f380d9c48
commit
61851f1dfe
2149 changed files with 109090 additions and 18689 deletions
|
|
@ -18,79 +18,28 @@
|
|||
* @brief 플래닛 기본 설정 return
|
||||
**/
|
||||
function getPlanetConfig() {
|
||||
static $config = null;
|
||||
if(is_null($config)) {
|
||||
// module config의 값을 구함
|
||||
static $module_info = null;
|
||||
if(is_null($module_info)) {
|
||||
// module module_info의 값을 구함
|
||||
$oModuleModel = &getModel('module');
|
||||
$config = $oModuleModel->getModuleConfig('planet');
|
||||
$module_info = $oModuleModel->getModuleConfig('planet');
|
||||
|
||||
$skin_info->module_srl = $module_info->module_srl;
|
||||
$oModuleModel->syncSkinInfoToModuleInfo($skin_info);
|
||||
|
||||
// planet dummy module의 is_default 값을 구함
|
||||
$dummy = $oModuleModel->getModuleInfoByMid($config->mid);
|
||||
$config->is_default = $dummy->is_default;
|
||||
$config->module_srl = $dummy->module_srl;
|
||||
$config->browser_title = $dummy->browser_title;
|
||||
$config->layout_srl = $dummy->layout_srl;
|
||||
if($config->logo_image) $config->logo_image = context::getFixUrl($config->logo_image);
|
||||
$dummy = $oModuleModel->getModuleInfoByMid($module_info->mid);
|
||||
$module_info->is_default = $dummy->is_default;
|
||||
$module_info->module_srl = $dummy->module_srl;
|
||||
$module_info->browser_title = $dummy->browser_title;
|
||||
$module_info->layout_srl = $dummy->layout_srl;
|
||||
if($module_info->logo_image) $module_info->logo_image = context::getFixUrl($module_info->logo_image);
|
||||
|
||||
if(count($skin_info)) foreach($skin_info as $key => $val) $module_info->{$key} = $val;
|
||||
|
||||
unset($module_info->grants);
|
||||
}
|
||||
return $config;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 회원 - 플래닛 접속 권한 return
|
||||
* 플래닛 서비스 컨텐츠에 대한 접속 권한을 확인
|
||||
**/
|
||||
function isAccessGranted() {
|
||||
$config = $this->getPlanetConfig();
|
||||
$grant = $config->grants['access'];
|
||||
if(!$grant || !count($grant)) return true;
|
||||
|
||||
$logged_info = Context::get('logged_info');
|
||||
if($logged_info->is_admin == 'Y') return true;
|
||||
$group_list = $logged_info->group_list;
|
||||
if(count($group_list)) $group_srls = array_keys($group_list);
|
||||
else return false;
|
||||
|
||||
foreach($grant as $srl) if(in_array($srl, $group_srls)) return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 회원 - 플래닛 생성 권한 return
|
||||
**/
|
||||
function isCreateGranted() {
|
||||
if(!Context::get('is_logged')) return false;
|
||||
|
||||
$config = $this->getPlanetConfig();
|
||||
$grant = $config->grants['create'];
|
||||
if(!$grant || !count($grant)) return true;
|
||||
|
||||
$logged_info = Context::get('logged_info');
|
||||
if($logged_info->is_admin == 'Y') return true;
|
||||
$group_list = $logged_info->group_list;
|
||||
$group_srls = array_keys($group_list);
|
||||
|
||||
foreach($grant as $srl) if(in_array($srl, $group_srls)) return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 관리자 - 플래닛 모듈 전체 관리 권한 return
|
||||
**/
|
||||
function isManageGranted() {
|
||||
if(!Context::get('is_logged')) return false;
|
||||
|
||||
$logged_info = Context::get('logged_info');
|
||||
if($logged_info->is_admin == 'Y') return true;
|
||||
|
||||
$config = $this->getPlanetConfig();
|
||||
$grant = $config->grants['manage'];
|
||||
if(!$grant || !count($grant)) return false;
|
||||
|
||||
$group_list = $logged_info->group_list;
|
||||
$group_srls = array_keys($group_list);
|
||||
|
||||
foreach($grant as $srl) if(in_array($srl, $group_srls)) return true;
|
||||
return false;
|
||||
return $module_info;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -459,8 +408,8 @@
|
|||
Context::set('planet', $planet);
|
||||
|
||||
// 스킨 경로를 구함
|
||||
$config = $this->getPlanetConfig();
|
||||
if(!$this->module_info->skin) $this->module_info->skin = $config->planet_default_skin;
|
||||
$module_info = $this->getPlanetConfig();
|
||||
if(!$this->module_info->skin) $this->module_info->skin = $module_info->planet_default_skin;
|
||||
$template_path = sprintf("%sskins/%s/",$this->module_path, $this->module_info->skin);
|
||||
|
||||
// template 파일을 직접 컴파일한후 tpl변수에 담아서 return한다.
|
||||
|
|
@ -481,8 +430,8 @@
|
|||
Context::set('planet', $planet);
|
||||
|
||||
// 스킨 경로를 구함
|
||||
$config = $this->getPlanetConfig();
|
||||
if(!$this->module_info->skin) $this->module_info->skin = $config->planet_default_skin;
|
||||
$module_info = $this->getPlanetConfig();
|
||||
if(!$this->module_info->skin) $this->module_info->skin = $module_info->planet_default_skin;
|
||||
$template_path = sprintf("%sskins/%s/",$this->module_path, $this->module_info->skin);
|
||||
|
||||
// template 파일을 직접 컴파일한후 tpl변수에 담아서 return한다.
|
||||
|
|
@ -510,8 +459,8 @@
|
|||
|
||||
if($width!=96&&$height!=96) {
|
||||
$filename = sprintf('%s%d.%d.%d.jpg', $path, $module_srl, $width, $height);
|
||||
if(!file_exists($filename) && FileHandler::createImageFile($source_filename, $filename, $width, $height)) {
|
||||
$source_filename = $filename;
|
||||
if(!file_exists($filename) || filemtime($source_filename)>filemtime($filename)) {
|
||||
if(FileHandler::createImageFile($source_filename, $filename, $width, $height)) $source_filename = $filename;
|
||||
}
|
||||
} else {
|
||||
$filename = $source_filename;
|
||||
|
|
@ -546,6 +495,9 @@
|
|||
// 문서가 존재하지 않으면 return~
|
||||
if(!$oDocument->isExists()) return;
|
||||
|
||||
$logged_info = Context::get('logged_info');
|
||||
$is_fished = false;
|
||||
|
||||
// 정해진 수에 따라 목록을 구해옴
|
||||
$args->document_srl = $document_srl;
|
||||
$output = executeQueryArray('planet.getPlanetComments', $args);
|
||||
|
|
@ -555,16 +507,25 @@
|
|||
$output->data[$key]->content = str_replace('...', '…', $output->data[$key]->content);
|
||||
$output->data[$key]->content = str_replace('--', '—', $output->data[$key]->content);
|
||||
|
||||
if($logged_info->member_srl && $logged_info->member_srl == $val->member_srl) $is_fished = true;
|
||||
}
|
||||
}
|
||||
|
||||
$logged_info = Context::get('logged_info');
|
||||
if($oDocument->get('member_srl')==$logged_info->member_srl) {
|
||||
$args->module_srl = $oDocument->get('module_srl');
|
||||
$args->document_srl = $oDocument->get('document_srl');
|
||||
executeQuery('planet.deleteCatch', $args);
|
||||
}
|
||||
|
||||
if($is_fished) {
|
||||
$myplanet = $this->getMemberPlanet();
|
||||
if($myplanet) {
|
||||
$args->module_srl = $myplanet->module_srl;
|
||||
$args->document_srl = $oDocument->get('document_srl');
|
||||
}
|
||||
executeQuery('planet.deleteFishing', $args);
|
||||
}
|
||||
|
||||
// 쿼리 결과에서 오류가 생기면 그냥 return
|
||||
if(!$output->toBool()) return;
|
||||
|
||||
|
|
@ -595,8 +556,8 @@
|
|||
Context::set('reply_list', $output->data);
|
||||
|
||||
// 스킨 경로를 구함
|
||||
$config = $this->getPlanetConfig();
|
||||
if(!$this->module_info->skin) $this->module_info->skin = $config->planet_default_skin;
|
||||
$module_info = $this->getPlanetConfig();
|
||||
if(!$this->module_info->skin) $this->module_info->skin = $module_info->planet_default_skin;
|
||||
$template_path = sprintf("%sskins/%s/",$this->module_path, $this->module_info->skin);
|
||||
|
||||
// template 파일을 직접 컴파일한후 tpl변수에 담아서 return한다.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue