mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-05-02 16:52:16 +09:00
english comments added
git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0_english@8278 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
693e215bc1
commit
4d272994dd
219 changed files with 6407 additions and 8705 deletions
|
|
@ -2,35 +2,33 @@
|
|||
/**
|
||||
* @class addonAdminController
|
||||
* @author NHN (developers@xpressengine.com)
|
||||
* @brief addon 모듈의 admin controller class
|
||||
* @brief admin controller class of addon modules
|
||||
**/
|
||||
include_once('addon.controller.php');
|
||||
|
||||
class addonAdminController extends addonController {
|
||||
|
||||
/**
|
||||
* @brief 초기화
|
||||
* @brief Initialization
|
||||
**/
|
||||
function init() {
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 애드온의 활성/비활성 체인지
|
||||
* @brief Add active/inactive change
|
||||
**/
|
||||
function procAddonAdminToggleActivate() {
|
||||
$oAddonModel = &getAdminModel('addon');
|
||||
|
||||
$site_module_info = Context::get('site_module_info');
|
||||
|
||||
// addon값을 받아옴
|
||||
// batahom addon values
|
||||
$addon = Context::get('addon');
|
||||
$type = Context::get('type');
|
||||
if(!$type) $type = "pc";
|
||||
if($addon) {
|
||||
// 활성화 되어 있으면 비활성화 시킴
|
||||
// If enabled Disables
|
||||
if($oAddonModel->isActivatedAddon($addon, $site_module_info->site_srl, $type)) $this->doDeactivate($addon, $site_module_info->site_srl, $type);
|
||||
|
||||
// 비활성화 되어 있으면 활성화 시킴
|
||||
// If it is disabled Activate
|
||||
else $this->doActivate($addon, $site_module_info->site_srl, $type);
|
||||
}
|
||||
|
||||
|
|
@ -38,7 +36,7 @@
|
|||
}
|
||||
|
||||
/**
|
||||
* @brief 애드온 설정 정보 입력
|
||||
* @brief Add the configuration information input
|
||||
**/
|
||||
function procAddonAdminSetupAddon() {
|
||||
$args = Context::getRequestVars();
|
||||
|
|
@ -59,8 +57,8 @@
|
|||
|
||||
|
||||
/**
|
||||
* @brief 애드온 추가
|
||||
* DB에 애드온을 추가함
|
||||
* @brief Add-on
|
||||
* Adds Add to DB
|
||||
**/
|
||||
function doInsert($addon, $site_srl = 0) {
|
||||
$args->addon = $addon;
|
||||
|
|
@ -71,8 +69,8 @@
|
|||
}
|
||||
|
||||
/**
|
||||
* @brief 애드온 활성화
|
||||
* addons라는 테이블에 애드온의 활성화 상태를 on 시켜줌
|
||||
* @brief Add-activated
|
||||
* addons add-ons to the table on the activation state sikyeojum
|
||||
**/
|
||||
function doActivate($addon, $site_srl = 0, $type = "pc") {
|
||||
$args->addon = $addon;
|
||||
|
|
@ -84,9 +82,9 @@
|
|||
}
|
||||
|
||||
/**
|
||||
* @brief 애드온 비활성화
|
||||
* @brief Disable Add-ons
|
||||
*
|
||||
* addons라는 테이블에 애드온의 이름을 제거하는 것으로 비활성화를 시키게 된다
|
||||
* addons add a table to remove the name of the deactivation is sikige
|
||||
**/
|
||||
function doDeactivate($addon, $site_srl = 0, $type = "pc") {
|
||||
$args->addon = $addon;
|
||||
|
|
|
|||
|
|
@ -2,19 +2,19 @@
|
|||
/**
|
||||
* @class addonAdminModel
|
||||
* @author NHN (developers@xpressengine.com)
|
||||
* @brief addon 모듈의 admin model class
|
||||
* @brief admin model class of addon modules
|
||||
**/
|
||||
|
||||
class addonAdminModel extends addon {
|
||||
|
||||
/**
|
||||
* @brief 초기화
|
||||
* @brief Initialization
|
||||
**/
|
||||
function init() {
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 애드온의 경로를 구함
|
||||
* @brief Wanted to add the path to
|
||||
**/
|
||||
function getAddonPath($addon_name) {
|
||||
$class_path = sprintf('./addons/%s/', $addon_name);
|
||||
|
|
@ -23,27 +23,24 @@
|
|||
}
|
||||
|
||||
/**
|
||||
* @brief 애드온의 종류와 정보를 구함
|
||||
* @brief Wanted to add the kind of information and
|
||||
**/
|
||||
function getAddonList($site_srl = 0) {
|
||||
// activated된 애드온 목록을 구함
|
||||
// Wanted to add a list of activated
|
||||
$inserted_addons = $this->getInsertedAddons($site_srl);
|
||||
|
||||
// 다운받은 애드온과 설치된 애드온의 목록을 구함
|
||||
// Downloaded and installed add-on to the list of Wanted
|
||||
$searched_list = FileHandler::readDir('./addons');
|
||||
$searched_count = count($searched_list);
|
||||
if(!$searched_count) return;
|
||||
sort($searched_list);
|
||||
|
||||
for($i=0;$i<$searched_count;$i++) {
|
||||
// 애드온의 이름
|
||||
// Add the name of
|
||||
$addon_name = $searched_list[$i];
|
||||
if($addon_name == "smartphone") continue;
|
||||
|
||||
// 애드온의 경로 (files/addons가 우선)
|
||||
// Add the path (files/addons precedence)
|
||||
$path = $this->getAddonPath($addon_name);
|
||||
|
||||
// 해당 애드온의 정보를 구함
|
||||
// Wanted information on the add-on
|
||||
unset($info);
|
||||
$info = $this->getAddonInfoXml($addon_name, $site_srl);
|
||||
|
||||
|
|
@ -51,14 +48,12 @@
|
|||
$info->path = $path;
|
||||
$info->activated = false;
|
||||
$info->mactivated = false;
|
||||
|
||||
// DB에 입력되어 있는지 확인
|
||||
// Check if a permossion is granted entered in DB
|
||||
if(!in_array($addon_name, array_keys($inserted_addons))) {
|
||||
// DB에 입력되어 있지 않으면 입력 (model에서 이런짓 하는거 싫지만 귀찮아서.. ㅡ.ㅜ)
|
||||
// If not, type in the DB type (model, perhaps because of the hate doing this haneungeo .. ㅡ. ㅜ)
|
||||
$oAddonAdminController = &getAdminController('addon');
|
||||
$oAddonAdminController->doInsert($addon_name, $site_srl);
|
||||
|
||||
// 활성화 되어 있는지 확인
|
||||
// Is activated
|
||||
} else {
|
||||
if($inserted_addons[$addon_name]->is_used=='Y') $info->activated = true;
|
||||
if($inserted_addons[$addon_name]->is_used_m=='Y') $info->mactivated = true;
|
||||
|
|
@ -70,14 +65,13 @@
|
|||
}
|
||||
|
||||
/**
|
||||
* @brief 모듈의 conf/info.xml 을 읽어서 정보를 구함
|
||||
* @brief Modules conf/info.xml wanted to read the information
|
||||
**/
|
||||
function getAddonInfoXml($addon, $site_srl = 0) {
|
||||
// 요청된 모듈의 경로를 구한다. 없으면 return
|
||||
// Get a path of the requested module. Return if not exists.
|
||||
$addon_path = $this->getAddonPath($addon);
|
||||
if(!$addon_path) return;
|
||||
|
||||
// 현재 선택된 모듈의 스킨의 정보 xml 파일을 읽음
|
||||
// Read the xml file for module skin information
|
||||
$xml_file = sprintf("%sconf/info.xml", $addon_path);
|
||||
if(!file_exists($xml_file)) return;
|
||||
|
||||
|
|
@ -88,7 +82,7 @@
|
|||
if(!$xml_obj) return;
|
||||
|
||||
|
||||
// DB에 설정된 내역을 가져온다
|
||||
// DB is set to bring history
|
||||
$db_args->addon = $addon;
|
||||
if(!$site_srl) $output = executeQuery('addon.getAddonInfo',$db_args);
|
||||
else {
|
||||
|
|
@ -104,7 +98,7 @@
|
|||
}
|
||||
|
||||
|
||||
// 애드온 정보
|
||||
// Add information
|
||||
if($xml_obj->version && $xml_obj->attrs->version == '0.2') {
|
||||
// addon format v0.2
|
||||
sscanf($xml_obj->date->body, '%d-%d-%d', $date_obj->y, $date_obj->m, $date_obj->d);
|
||||
|
|
@ -129,7 +123,7 @@
|
|||
$addon_info->author[] = $author_obj;
|
||||
}
|
||||
|
||||
// 확장변수를 정리
|
||||
// Expand the variable order
|
||||
if($xml_obj->extra_vars) {
|
||||
$extra_var_groups = $xml_obj->extra_vars->group;
|
||||
if(!$extra_var_groups) $extra_var_groups = $xml_obj->extra_vars;
|
||||
|
|
@ -152,7 +146,7 @@
|
|||
if(strpos($obj->value, '|@|') != false) { $obj->value = explode('|@|', $obj->value); }
|
||||
if($obj->type == 'mid_list' && !is_array($obj->value)) { $obj->value = array($obj->value); }
|
||||
|
||||
// 'select'type에서 option목록을 구한다.
|
||||
// 'Select'type obtained from the option list.
|
||||
if(is_array($val->options)) {
|
||||
$option_count = count($val->options);
|
||||
|
||||
|
|
@ -227,7 +221,7 @@
|
|||
$addon_info->author[] = $author_obj;
|
||||
|
||||
if($xml_obj->extra_vars) {
|
||||
// 확장변수를 정리
|
||||
// Expand the variable order
|
||||
$extra_var_groups = $xml_obj->extra_vars->group;
|
||||
if(!$extra_var_groups) $extra_var_groups = $xml_obj->extra_vars;
|
||||
if(!is_array($extra_var_groups)) $extra_var_groups = array($extra_var_groups);
|
||||
|
|
@ -247,8 +241,7 @@
|
|||
$obj->value = $extra_vals->{$obj->name};
|
||||
if(strpos($obj->value, '|@|') != false) { $obj->value = explode('|@|', $obj->value); }
|
||||
if($obj->type == 'mid_list' && !is_array($obj->value)) { $obj->value = array($obj->value); }
|
||||
|
||||
// 'select'type에서 option목록을 구한다.
|
||||
// 'Select'type obtained from the option list.
|
||||
if(is_array($val->options)) {
|
||||
$option_count = count($val->options);
|
||||
|
||||
|
|
@ -271,7 +264,7 @@
|
|||
}
|
||||
|
||||
/**
|
||||
* @brief 활성화된 애드온 목록을 구해옴
|
||||
* @brief Add to the list of active guhaeom
|
||||
**/
|
||||
function getInsertedAddons($site_srl = 0) {
|
||||
$args->list_order = 'addon';
|
||||
|
|
@ -292,7 +285,7 @@
|
|||
}
|
||||
|
||||
/**
|
||||
* @brief 애드온이 활성화 되어 있는지 체크
|
||||
* @brief Add-on is enabled, check whether
|
||||
**/
|
||||
function isActivatedAddon($addon, $site_srl = 0, $type = "pc") {
|
||||
$args->addon = $addon;
|
||||
|
|
|
|||
|
|
@ -2,57 +2,51 @@
|
|||
/**
|
||||
* @class addonAdminView
|
||||
* @author NHN (developers@xpressengine.com)
|
||||
* @brief addon 모듈의 admin view class
|
||||
* @brief admin view class of addon modules
|
||||
**/
|
||||
|
||||
class addonAdminView extends addon {
|
||||
|
||||
/**
|
||||
* @brief 초기화
|
||||
* @brief Initialization
|
||||
**/
|
||||
function init() {
|
||||
$this->setTemplatePath($this->module_path.'tpl');
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 애드온 관리 메인 페이지 (목록 보여줌)
|
||||
* @brief Add Management main page (showing the list)
|
||||
**/
|
||||
function dispAddonAdminIndex() {
|
||||
$site_module_info = Context::get('site_module_info');
|
||||
|
||||
// 애드온 목록을 세팅
|
||||
// Add to the list settings
|
||||
$oAddonModel = &getAdminModel('addon');
|
||||
$addon_list = $oAddonModel->getAddonList($site_module_info->site_srl);
|
||||
Context::set('addon_list', $addon_list);
|
||||
|
||||
// 템플릿 패스 및 파일을 지정
|
||||
// Template specifies the path and file
|
||||
$this->setTemplateFile('addon_list');
|
||||
}
|
||||
|
||||
/**
|
||||
* @biref 애드온 세부 설정 팝업 출력
|
||||
* @biref Setting out the details pop-up add-on
|
||||
**/
|
||||
function dispAddonAdminSetup() {
|
||||
$site_module_info = Context::get('site_module_info');
|
||||
|
||||
// 요청된 애드온을 구함
|
||||
// Wanted to add the requested
|
||||
$selected_addon = Context::get('selected_addon');
|
||||
|
||||
// 요청된 애드온의 정보를 구함
|
||||
// Wanted to add the requested information
|
||||
$oAddonModel = &getAdminModel('addon');
|
||||
$addon_info = $oAddonModel->getAddonInfoXml($selected_addon, $site_module_info->site_srl);
|
||||
Context::set('addon_info', $addon_info);
|
||||
|
||||
// mid 목록을 가져옴
|
||||
// Get a mid list
|
||||
$oModuleModel = &getModel('module');
|
||||
$oModuleAdminModel = &getAdminModel('module');
|
||||
|
||||
if($site_module_info->site_srl) $args->site_srl = $site_module_info->site_srl;
|
||||
$mid_list = $oModuleModel->getMidList($args);
|
||||
|
||||
// module_category와 module의 조합
|
||||
// module_category and module combination
|
||||
if(!$site_module_info->site_srl) {
|
||||
// 모듈 카테고리 목록을 구함
|
||||
// Get a list of module categories
|
||||
$module_categories = $oModuleModel->getModuleCategories();
|
||||
|
||||
if($mid_list) {
|
||||
|
|
@ -65,32 +59,26 @@
|
|||
}
|
||||
|
||||
Context::set('mid_list',$module_categories);
|
||||
|
||||
// 레이아웃을 팝업으로 지정
|
||||
// Set the layout to be pop-up
|
||||
$this->setLayoutFile('popup_layout');
|
||||
|
||||
// 템플릿 패스 및 파일을 지정
|
||||
// Template specifies the path and file
|
||||
$this->setTemplateFile('setup_addon');
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 애드온의 상세 정보(conf/info.xml)를 팝업 출력
|
||||
* @brief Add details (conf/info.xml) a pop-out
|
||||
**/
|
||||
function dispAddonAdminInfo() {
|
||||
$site_module_info = Context::get('site_module_info');
|
||||
|
||||
// 요청된 애드온을 구함
|
||||
// Wanted to add the requested
|
||||
$selected_addon = Context::get('selected_addon');
|
||||
|
||||
// 요청된 애드온의 정보를 구함
|
||||
// Wanted to add the requested information
|
||||
$oAddonModel = &getAdminModel('addon');
|
||||
$addon_info = $oAddonModel->getAddonInfoXml($selected_addon, $site_module_info->site_srl);
|
||||
Context::set('addon_info', $addon_info);
|
||||
|
||||
// 레이아웃을 팝업으로 지정
|
||||
// Set the layout to be pop-up
|
||||
$this->setLayoutFile('popup_layout');
|
||||
|
||||
// 템플릿 패스 및 파일을 지정
|
||||
// Template specifies the path and file
|
||||
$this->setTemplateFile('addon_info');
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -2,16 +2,16 @@
|
|||
/**
|
||||
* @class addon
|
||||
* @author NHN (developers@xpressengine.com)
|
||||
* @brief addon 모듈의 high class
|
||||
* @brief high class of addon modules
|
||||
**/
|
||||
|
||||
class addon extends ModuleObject {
|
||||
|
||||
/**
|
||||
* @brief 설치시 추가 작업이 필요할시 구현
|
||||
* @brief Implement if additional tasks are necessary when installing
|
||||
**/
|
||||
function moduleInstall() {
|
||||
// 몇가지 애드온을 등록
|
||||
// Register to add a few
|
||||
$oAddonController = &getAdminController('addon');
|
||||
$oAddonController->doInsert('autolink');
|
||||
$oAddonController->doInsert('blogapi');
|
||||
|
|
@ -23,8 +23,7 @@
|
|||
$oAddonController->doInsert('resize_image');
|
||||
$oAddonController->doInsert('openid_delegation_id');
|
||||
$oAddonController->doInsert('point_level_icon');
|
||||
|
||||
// 몇가지 애드온을 기본 활성화 상태로 변경
|
||||
// To add a few changes to the default activation state
|
||||
$oAddonController->doActivate('autolink');
|
||||
$oAddonController->doActivate('counter');
|
||||
$oAddonController->doActivate('member_communication');
|
||||
|
|
@ -37,7 +36,7 @@
|
|||
}
|
||||
|
||||
/**
|
||||
* @brief 설치가 이상이 없는지 체크하는 method
|
||||
* @brief a method to check if successfully installed
|
||||
**/
|
||||
function checkUpdate() {
|
||||
$oDB = &DB::getInstance();
|
||||
|
|
@ -47,7 +46,7 @@
|
|||
}
|
||||
|
||||
/**
|
||||
* @brief 업데이트 실행
|
||||
* @brief Execute update
|
||||
**/
|
||||
function moduleUpdate() {
|
||||
$oDB = &DB::getInstance();
|
||||
|
|
@ -61,7 +60,7 @@
|
|||
}
|
||||
|
||||
/**
|
||||
* @brief 캐시 파일 재생성
|
||||
* @brief Re-generate the cache file
|
||||
**/
|
||||
function recompileCache() {
|
||||
FileHandler::removeFilesInDir('./files/cache/addons');
|
||||
|
|
|
|||
|
|
@ -2,20 +2,20 @@
|
|||
/**
|
||||
* @class addonController
|
||||
* @author NHN (developers@xpressengine.com)
|
||||
* @brief addon 모듈의 controller class
|
||||
* @brief addon module's controller class
|
||||
**/
|
||||
|
||||
|
||||
class addonController extends addon {
|
||||
|
||||
/**
|
||||
* @brief 초기화
|
||||
* @brief Initialization
|
||||
**/
|
||||
function init() {
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 메인/ 가상 사이트별 애드온 캐시 파일의 위치를 구함
|
||||
* @brief Main/Virtual-specific add-on file, the location of the cache Wanted
|
||||
**/
|
||||
function getCacheFilePath($type = "pc") {
|
||||
$site_module_info = Context::get('site_module_info');
|
||||
|
|
@ -36,7 +36,7 @@
|
|||
|
||||
|
||||
/**
|
||||
* @brief 애드온 mid 추가 설정
|
||||
* @brief Add-on mid settings
|
||||
**/
|
||||
function _getMidList($selected_addon, $site_srl = 0) {
|
||||
|
||||
|
|
@ -48,11 +48,10 @@
|
|||
|
||||
|
||||
/**
|
||||
* @brief 애드온 mid 추가 설정
|
||||
* @brief Add-on mid settings
|
||||
**/
|
||||
function _setAddMid($selected_addon,$mid, $site_srl=0) {
|
||||
|
||||
// 요청된 애드온의 정보를 구함
|
||||
// Wanted to add the requested information
|
||||
$mid_list = $this->_getMidList($selected_addon, $site_srl);
|
||||
|
||||
$mid_list[] = $mid;
|
||||
|
|
@ -62,11 +61,10 @@
|
|||
|
||||
|
||||
/**
|
||||
* @brief 애드온 mid 추가 설정
|
||||
* @brief Add-on mid settings
|
||||
**/
|
||||
function _setDelMid($selected_addon,$mid,$site_srl=0) {
|
||||
|
||||
// 요청된 애드온의 정보를 구함
|
||||
// Wanted to add the requested information
|
||||
$mid_list = $this->_getMidList($selected_addon,$site_srl);
|
||||
|
||||
$new_mid_list = array();
|
||||
|
|
@ -83,7 +81,7 @@
|
|||
}
|
||||
|
||||
/**
|
||||
* @brief 애드온 mid 추가 설정
|
||||
* @brief Add-on mid settings
|
||||
**/
|
||||
function _setMid($selected_addon,$mid_list,$site_srl=0) {
|
||||
$args->mid_list = join('|@|',$mid_list);
|
||||
|
|
@ -93,7 +91,7 @@
|
|||
|
||||
|
||||
/**
|
||||
* @brief 애드온 mid 추가
|
||||
* @brief Add mid-on
|
||||
**/
|
||||
function procAddonSetupAddonAddMid() {
|
||||
$site_module_info = Context::get('site_module_info');
|
||||
|
|
@ -105,7 +103,7 @@
|
|||
}
|
||||
|
||||
/**
|
||||
* @brief 애드온 mid 삭제
|
||||
* @brief Add mid Delete
|
||||
**/
|
||||
function procAddonSetupAddonDelMid() {
|
||||
$site_module_info = Context::get('site_module_info');
|
||||
|
|
@ -118,10 +116,10 @@
|
|||
}
|
||||
|
||||
/**
|
||||
* @brief 캐시 파일 생성
|
||||
* @brief Re-generate the cache file
|
||||
**/
|
||||
function makeCacheFile($site_srl = 0, $type = "pc") {
|
||||
// 모듈에서 애드온을 사용하기 위한 캐시 파일 생성
|
||||
// Add-on module for use in creating the cache file
|
||||
$buff = "";
|
||||
$oAddonModel = &getAdminModel('addon');
|
||||
$addon_list = $oAddonModel->getInsertedAddons($site_srl, $type);
|
||||
|
|
@ -155,7 +153,7 @@
|
|||
}
|
||||
|
||||
/**
|
||||
* @brief 애드온 설정
|
||||
* @brief Add-On Set
|
||||
**/
|
||||
function doSetup($addon, $extra_vars,$site_srl=0) {
|
||||
if($extra_vars->mid_list) $extra_vars->mid_list = explode('|@|', $extra_vars->mid_list);
|
||||
|
|
@ -167,7 +165,7 @@
|
|||
}
|
||||
|
||||
/**
|
||||
* @brief 가상 사이트에서의 애드온 정보 제거
|
||||
* @brief Remove add-on information in the virtual site
|
||||
**/
|
||||
function removeAddonConfig($site_srl) {
|
||||
$addon_path = _XE_PATH_.'files/cache/addons/';
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue