mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-09 03:32:00 +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
|
|
@ -4,7 +4,7 @@
|
|||
/**
|
||||
* @file autolink.addon.php
|
||||
* @author NHN (developers@xpressengine.com)
|
||||
* @brief 자동 링크 애드온
|
||||
* @brief Automatic link add-on
|
||||
**/
|
||||
if($called_position == 'after_module_proc' && Context::getResponseMethod()!="XMLRPC") {
|
||||
Context::addJsFile('./addons/autolink/autolink.js', false ,'', null, 'body');
|
||||
|
|
|
|||
|
|
@ -4,57 +4,47 @@
|
|||
/**
|
||||
* @file blogapicounter.addon.php
|
||||
* @author NHN (developers@xpressengine.com)
|
||||
* @brief blogAPI 애드온
|
||||
* @brief Add blogAPI
|
||||
*
|
||||
* ms live writer, 파이어폭스의 performancing, zoundry 등의 외부 툴을 이용하여 글을 입력할 수 있게 합니다.
|
||||
* 모듈 실행 이전(before_module_proc)에 호출이 되어야 하며 정상동작후에는 강제 종료를 한다.
|
||||
* It enables to write a post by using an external tool such as ms live writer, firefox performancing, zoundry and so on.
|
||||
* It should be called before executing the module(before_module_proc). If not, it is forced to shut down.
|
||||
**/
|
||||
|
||||
// called_position가 after_module_proc일때 rsd 태그 삽입
|
||||
// Insert a rsd tag when called_position is after_module_proc
|
||||
if($called_position == 'after_module_proc') {
|
||||
// 현재 모듈의 rsd주소를 만듬
|
||||
// Create rsd address of the current module
|
||||
$site_module_info = Context::get('site_module_info');
|
||||
$rsd_url = getFullSiteUrl($site_module_info->domain, '', 'mid',$site_module_info->mid, 'act','api');
|
||||
|
||||
// 헤더에 rsd태그 삽입
|
||||
// Insert rsd tag into the header
|
||||
Context::addHtmlHeader(" ".'<link rel="EditURI" type="application/rsd+xml" title="RSD" href="'.$rsd_url.'" />');
|
||||
}
|
||||
|
||||
// act가 api가 아니면 그냥 리턴~
|
||||
// If act isnot api, just return
|
||||
if($_REQUEST['act']!='api') return;
|
||||
|
||||
// 관련 func 파일 읽음
|
||||
// Read func file
|
||||
require_once('./addons/blogapi/blogapi.func.php');
|
||||
|
||||
// xmlprc 파싱
|
||||
// 요청된 xmlrpc를 파싱
|
||||
// xmlprc parsing
|
||||
// Parse the requested xmlrpc
|
||||
$oXmlParser = new XmlParser();
|
||||
$xmlDoc = $oXmlParser->parse();
|
||||
|
||||
$method_name = $xmlDoc->methodcall->methodname->body;
|
||||
$params = $xmlDoc->methodcall->params->param;
|
||||
if($params && !is_array($params)) $params = array($params);
|
||||
|
||||
// 일부 methodname에 대한 호환
|
||||
// Compatible with some of methodname
|
||||
if(in_array($method_name, array('metaWeblog.deletePost', 'metaWeblog.getUsersBlogs', 'metaWeblog.getUserInfo'))) {
|
||||
$method_name = str_replace('metaWeblog.', 'blogger.', $method_name);
|
||||
}
|
||||
|
||||
// blogger.deletePost일 경우 첫번째 인자 값 삭제
|
||||
// Delete the first argument if it is blogger.deletePost
|
||||
if($method_name == 'blogger.deletePost') array_shift($params);
|
||||
|
||||
// user_id, password를 구해서 로그인 시도
|
||||
// Get user_id, password and attempt log-in
|
||||
$user_id = trim($params[1]->value->string->body);
|
||||
$password = trim($params[2]->value->string->body);
|
||||
|
||||
// 모듈 실행전이라면 인증을 처리한다.
|
||||
// Before executing the module, authentication is processed.
|
||||
if($called_position == 'before_module_init') {
|
||||
|
||||
// member controller을 이용해서 로그인 시도
|
||||
// Attempt log-in by using member controller
|
||||
if($user_id && $password) {
|
||||
$oMemberController = &getController('member');
|
||||
$output = $oMemberController->doLogin($user_id, $password);
|
||||
// 로그인 실패시 에러 메시지 출력
|
||||
// If login fails, an error message appears
|
||||
if(!$output->toBool()) {
|
||||
$content = getXmlRpcFailure(1, $output->getMessage());
|
||||
printContent($content);
|
||||
|
|
@ -64,25 +54,21 @@
|
|||
printContent($content);
|
||||
}
|
||||
}
|
||||
|
||||
// 모듈에서 무언가 작업을 하기 전에 blogapi tool의 요청에 대한 처리를 하고 강제 종료한다.
|
||||
// Before module processing, handle requests from blogapi tool and then terminate.
|
||||
if($called_position == 'before_module_proc') {
|
||||
|
||||
// 글쓰기 권한 체크 (권한명의 경우 약속이 필요할듯..)
|
||||
// Check writing permission
|
||||
if(!$this->grant->write_document) {
|
||||
printContent( getXmlRpcFailure(1, 'no permission') );
|
||||
}
|
||||
|
||||
// 카테고리의 정보를 구해옴
|
||||
// Get information of the categories
|
||||
$oDocumentModel = &getModel('document');
|
||||
$category_list = $oDocumentModel->getCategoryList($this->module_srl);
|
||||
|
||||
// 임시 파일 저장 장소 지정
|
||||
// Specifies a temporary file storage
|
||||
$tmp_uploaded_path = sprintf('./files/cache/blogapi/%s/%s/', $this->mid, $user_id);
|
||||
$uploaded_target_path = sprintf('/files/cache/blogapi/%s/%s/', $this->mid, $user_id);
|
||||
|
||||
switch($method_name) {
|
||||
// 블로그 정보
|
||||
// Blog information
|
||||
case 'blogger.getUsersBlogs' :
|
||||
$obj->url = getFullSiteUrl('');
|
||||
$obj->blogid = $this->mid;
|
||||
|
|
@ -92,8 +78,7 @@
|
|||
$content = getXmlRpcResponse($blog_list);
|
||||
printContent($content);
|
||||
break;
|
||||
|
||||
// 카테고리 목록 return
|
||||
// Return a list of categories
|
||||
case 'metaWeblog.getCategories' :
|
||||
$category_obj_list = array();
|
||||
if($category_list) {
|
||||
|
|
@ -111,10 +96,9 @@
|
|||
$content = getXmlRpcResponse($category_obj_list);
|
||||
printContent($content);
|
||||
break;
|
||||
|
||||
// 파일 업로드
|
||||
// Upload file
|
||||
case 'metaWeblog.newMediaObject' :
|
||||
// 파일 업로드 권한 체크
|
||||
// Check a file upload permission
|
||||
$oFileModel = &getModel('file');
|
||||
$file_module_config = $oFileModel->getFileModuleConfig($this->module_srl);
|
||||
if(is_array($file_module_config->download_grant) && count($file_module_config->download_grant)>0) {
|
||||
|
|
@ -151,8 +135,7 @@
|
|||
$content = getXmlRpcResponse($obj);
|
||||
printContent($content);
|
||||
break;
|
||||
|
||||
// 글 가져오기
|
||||
// Get posts
|
||||
case 'metaWeblog.getPost' :
|
||||
$document_srl = $params[0]->value->string->body;
|
||||
if(!$document_srl) {
|
||||
|
|
@ -163,7 +146,7 @@
|
|||
if(!$oDocument->isExists() || !$oDocument->isGranted()) {
|
||||
printContent( getXmlRpcFailure(1, 'no permission') );
|
||||
} else {
|
||||
// 카테고리를 사용하는지 확인후 사용시 카테고리 목록을 구해와서 Context에 세팅
|
||||
// Get a list of categories and set Context
|
||||
$category = "";
|
||||
if($oDocument->get('category_srl')) {
|
||||
$oDocumentModel = &getModel('document');
|
||||
|
|
@ -203,12 +186,11 @@
|
|||
}
|
||||
}
|
||||
break;
|
||||
|
||||
// 글작성
|
||||
// Write a new post
|
||||
case 'metaWeblog.newPost' :
|
||||
unset($obj);
|
||||
$info = $params[3];
|
||||
// 글, 제목, 카테고리 정보 구함
|
||||
// Get information of post, title, and category
|
||||
for($i=0;$i<count($info->value->struct->member);$i++) {
|
||||
$val = $info->value->struct->member[$i];
|
||||
switch($val->name->body) {
|
||||
|
|
@ -239,13 +221,11 @@
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
// 문서 번호 설정
|
||||
// Set document srl
|
||||
$document_srl = getNextSequence();
|
||||
$obj->document_srl = $document_srl;
|
||||
$obj->module_srl = $this->module_srl;
|
||||
|
||||
// 첨부파일 정리
|
||||
// Attachment
|
||||
if(is_dir($tmp_uploaded_path)) {
|
||||
$file_list = FileHandler::readDir($tmp_uploaded_path);
|
||||
$file_count = count($file_list);
|
||||
|
|
@ -276,8 +256,7 @@
|
|||
|
||||
printContent($content);
|
||||
break;
|
||||
|
||||
// 글 수정
|
||||
// Edit post
|
||||
case 'metaWeblog.editPost' :
|
||||
$tmp_val = $params[0]->value->string->body;
|
||||
if(!$tmp_val) $tmp_val = $params[0]->value->i4->body;
|
||||
|
|
@ -294,8 +273,7 @@
|
|||
|
||||
$oDocumentModel = &getModel('document');
|
||||
$oDocument = $oDocumentModel->getDocument($document_srl);
|
||||
|
||||
// 글 수정 권한 체크
|
||||
// Check if a permission to modify a document is granted
|
||||
if(!$oDocument->isGranted()) {
|
||||
$content = getXmlRpcFailure(1, 'no permission');
|
||||
break;
|
||||
|
|
@ -304,8 +282,7 @@
|
|||
$obj = $oDocument->getObjectVars();
|
||||
|
||||
$info = $params[3];
|
||||
|
||||
// 글, 제목, 카테고리 정보 구함
|
||||
// Get information of post, title, and category
|
||||
for($i=0;$i<count($info->value->struct->member);$i++) {
|
||||
$val = $info->value->struct->member[$i];
|
||||
switch($val->name->body) {
|
||||
|
|
@ -336,12 +313,10 @@
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
// 문서 번호 설정
|
||||
// Document srl
|
||||
$obj->document_srl = $document_srl;
|
||||
$obj->module_srl = $this->module_srl;
|
||||
|
||||
// 첨부파일 정리
|
||||
// Attachment
|
||||
if(is_dir($tmp_uploaded_path)) {
|
||||
$file_list = FileHandler::readDir($tmp_uploaded_path);
|
||||
$file_count = count($file_list);
|
||||
|
|
@ -374,27 +349,22 @@
|
|||
|
||||
printContent($content);
|
||||
break;
|
||||
|
||||
// 글삭제
|
||||
// Delete the post
|
||||
case 'blogger.deletePost' :
|
||||
$tmp_val = $params[0]->value->string->body;
|
||||
$tmp_arr = explode('/', $tmp_val);
|
||||
$document_srl = array_pop($tmp_arr);
|
||||
|
||||
// 글 받아오기
|
||||
// Get a document
|
||||
$oDocumentModel = &getModel('document');
|
||||
$oDocument = $oDocumentModel->getDocument($document_srl);
|
||||
|
||||
// 글 존재
|
||||
// If the document exists
|
||||
if(!$oDocument->isExists()) {
|
||||
$content = getXmlRpcFailure(1, 'not exists');
|
||||
|
||||
// 글 삭제 권한 체크
|
||||
// Check if a permission to delete a document is granted
|
||||
} elseif(!$oDocument->isGranted()) {
|
||||
$content = getXmlRpcFailure(1, 'no permission');
|
||||
break;
|
||||
|
||||
// 삭제
|
||||
// Delete
|
||||
} else {
|
||||
$oDocumentController = &getController('document');
|
||||
$output = $oDocumentController->deleteDocument($document_srl);
|
||||
|
|
@ -404,14 +374,13 @@
|
|||
|
||||
printContent($content);
|
||||
break;
|
||||
|
||||
// 최신글 받기
|
||||
// Get recent posts
|
||||
case 'metaWeblog.getRecentPosts' :
|
||||
// 목록을 구하기 위한 옵션
|
||||
$args->module_srl = $this->module_srl; ///< 현재 모듈의 module_srl
|
||||
// Options to get a list
|
||||
$args->module_srl = $this->module_srl; // /< module_srl of the current module
|
||||
$args->page = 1;
|
||||
$args->list_count = 20;
|
||||
$args->sort_index = 'list_order'; ///< 소팅 값
|
||||
$args->sort_index = 'list_order'; // /< Sorting values
|
||||
$logged_info = Context::get('logged_info');
|
||||
$args->search_target = 'member_srl';
|
||||
$args->search_keyword = $logged_info->member_srl;
|
||||
|
|
@ -441,8 +410,7 @@
|
|||
printContent($content);
|
||||
}
|
||||
break;
|
||||
|
||||
// 아무런 요청이 없을 경우 RSD 출력
|
||||
// Display RSD if there is no request
|
||||
default :
|
||||
|
||||
$homepagelink = getUrl('','mid',$this->mid);
|
||||
|
|
|
|||
|
|
@ -4,10 +4,10 @@
|
|||
/**
|
||||
* @file ./addons/blogapi/blogapi.func.php
|
||||
* @author NHN (developers@xpressengine.com)
|
||||
* @brief blogapi구현을 위한 함수 모음집
|
||||
* @brief Function collections for the implementation of blogapi
|
||||
**/
|
||||
|
||||
// 오류 표시
|
||||
// Error messages
|
||||
function getXmlRpcFailure($error, $message) {
|
||||
return
|
||||
sprintf(
|
||||
|
|
@ -16,8 +16,7 @@
|
|||
htmlspecialchars($message)
|
||||
);
|
||||
}
|
||||
|
||||
// 결과 표시
|
||||
// Display results
|
||||
function getXmlRpcResponse($params) {
|
||||
$buff = '<?xml version="1.0" encoding="utf-8"?>'."\n<methodResponse><params>";
|
||||
$buff .= _getEncodedVal($params);
|
||||
|
|
@ -25,8 +24,7 @@
|
|||
|
||||
return $buff;
|
||||
}
|
||||
|
||||
// 인코딩 처리
|
||||
// Encoding
|
||||
function _getEncodedVal($val, $is_sub_set = false) {
|
||||
if(is_int($val)) $buff = sprintf("<value><i4>%d</i4></value>", $val);
|
||||
elseif(is_string($val)&&preg_match('/^([0-9]+)T([0-9\:]+)$/', $val)) $buff = sprintf("<value><dateTime.iso8601>%s</dateTime.iso8601></value>\n", $val);
|
||||
|
|
@ -53,8 +51,7 @@
|
|||
if(!$is_sub_set) return sprintf("<param>\n%s</param>", $buff);
|
||||
return $buff;
|
||||
}
|
||||
|
||||
// 결과 출력
|
||||
// Display the result
|
||||
function printContent($content) {
|
||||
header("Content-Type: text/xml; charset=UTF-8");
|
||||
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
|
||||
|
|
|
|||
|
|
@ -4,8 +4,8 @@
|
|||
/**
|
||||
* @file captcha.addon.php
|
||||
* @author NHN (developers@xpressengine.com)
|
||||
* @brief 특정 action을 실행할때 captcha를 띄우도록 함
|
||||
* 영어 알파벳을 입력, 음성기능 추가
|
||||
* @brief Captcha for a particular action
|
||||
* English alphabets and voice verification added
|
||||
**/
|
||||
|
||||
if(!class_exists('AddonCaptcha'))
|
||||
|
|
@ -43,8 +43,8 @@
|
|||
Context::addHtmlHeader('<script type="text/javascript"> var captchaTargetAct = new Array("'.implode('","',$target_acts).'"); </script>');
|
||||
Context::addJsFile('./addons/captcha/captcha.js',false, '', null, 'body');
|
||||
}
|
||||
|
||||
// 게시판/ 이슈트래커의 글쓰기/댓글쓰기 액션 호출시 세션 비교
|
||||
// compare session when calling actions such as writing a post or a comment on the board/issue tracker module
|
||||
|
||||
if(!$_SESSION['captcha_authed'] && in_array(Context::get('act'), $target_acts)) {
|
||||
Context::loadLang('./addons/captcha/lang');
|
||||
$ModuleHandler->error = "captcha_denied";
|
||||
|
|
@ -56,11 +56,11 @@
|
|||
function before_module_init_setCaptchaSession()
|
||||
{
|
||||
if($_SESSION['captcha_authed']) return false;
|
||||
|
||||
// 언어파일 로드
|
||||
// Load language files
|
||||
|
||||
Context::loadLang(_XE_PATH_.'addons/captcha/lang');
|
||||
|
||||
// 키워드 생성
|
||||
// Generate keywords
|
||||
|
||||
$arr = range('A','Y');
|
||||
shuffle($arr);
|
||||
$arr = array_slice($arr,0,6);
|
||||
|
|
@ -106,31 +106,31 @@
|
|||
{
|
||||
$arr = array();
|
||||
for($i=0,$c=strlen($string);$i<$c;$i++) $arr[] = $string{$i};
|
||||
|
||||
// 글자 하나 사이즈
|
||||
// Font site
|
||||
|
||||
$w = 18;
|
||||
$h = 25;
|
||||
|
||||
// 글자 수
|
||||
// Character length
|
||||
|
||||
$c = count($arr);
|
||||
|
||||
// 글자 이미지
|
||||
// Character image
|
||||
|
||||
$im = array();
|
||||
|
||||
// 총사이즈로 바탕 이미지 생성
|
||||
// Create an image by total size
|
||||
|
||||
$im[] = imagecreate(($w+2)*count($arr), $h);
|
||||
|
||||
$deg = range(-30,30);
|
||||
shuffle($deg);
|
||||
|
||||
// 글자별 이미지 생성
|
||||
// Create an image for each letter
|
||||
|
||||
foreach($arr as $i => $str)
|
||||
{
|
||||
$im[$i+1] = @imagecreate($w, $h);
|
||||
$background_color = imagecolorallocate($im[$i+1], 255, 255, 255);
|
||||
$text_color = imagecolorallocate($im[$i+1], 0, 0, 0);
|
||||
|
||||
// 글자폰트(사이즈) 조절
|
||||
// Control font size
|
||||
|
||||
$ran = range(1,20);
|
||||
shuffle($ran);
|
||||
|
||||
|
|
@ -148,22 +148,23 @@
|
|||
}
|
||||
}
|
||||
|
||||
// 각글자 이미지를 합침
|
||||
// Combine images of each character
|
||||
|
||||
for($i=1;$i<count($im);$i++)
|
||||
{
|
||||
imagecopy($im[0],$im[$i],(($w+2)*($i-1)),0,0,0,$w,$h);
|
||||
imagedestroy($im[$i]);
|
||||
}
|
||||
|
||||
// 이미지 확대
|
||||
// Larger image
|
||||
|
||||
$big_count = 2;
|
||||
$big = imagecreatetruecolor(($w+2)*$big_count*$c, $h*$big_count);
|
||||
imagecopyresized($big, $im[0], 0, 0, 0, 0, ($w+2)*$big_count*$c, $h*$big_count, ($w+2)*$c, $h);
|
||||
imagedestroy($im[0]);
|
||||
|
||||
if(function_exists('imageantialias')) imageantialias($big,true);
|
||||
|
||||
// 배경 라인 및 점찍기
|
||||
// Background line
|
||||
|
||||
$line_color = imagecolorallocate($big, 0, 0, 0);
|
||||
|
||||
$w = ($w+2)*$big_count*$c;
|
||||
|
|
@ -207,8 +208,8 @@
|
|||
{
|
||||
$_data = FileHandler::readFile(sprintf($_audio, $string{$i}));
|
||||
|
||||
$start = rand(5, 68); // 해더 4바이트, 데이터 영역 64바이트 정도 랜덤하게 시작
|
||||
$datalen = strlen($_data) - $start - 256; // 마지막 unchanged 256 바이트
|
||||
$start = rand(5, 68); // Random start in 4-byte header and 64 byte data
|
||||
$datalen = strlen($_data) - $start - 256; // Last unchanged 256 bytes
|
||||
|
||||
for($j=$start;$j<$datalen;$j+=64)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -4,9 +4,9 @@
|
|||
/**
|
||||
* @file counter.addon.php
|
||||
* @author NHN (developers@xpressengine.com)
|
||||
* @brief 카운터 애드온
|
||||
* @brief Counter add-on
|
||||
**/
|
||||
// called_position가 before_display_content 일 경우 실행
|
||||
// Execute if called_position is before_display_content
|
||||
if(Context::isInstalled() && $called_position == 'before_module_init' && Context::get('module')!='admin' && Context::getResponseMethod() == 'HTML') {
|
||||
$oCounterController = &getController('counter');
|
||||
$oCounterController->procCounterExecute();
|
||||
|
|
|
|||
|
|
@ -4,31 +4,27 @@
|
|||
/**
|
||||
* @file member_communication.addon.php
|
||||
* @author NHN (developers@xpressengine.com)
|
||||
* @brief 사용자의 커뮤니케이션 기능을 활성화
|
||||
* @brief Promote user communication
|
||||
*
|
||||
* - 새로운 쪽지가 왔을 경우 팝업으로 띄움
|
||||
* - MemberModel::getMemberMenu 호출시 대상이 회원일 경우 쪽지 보내기 기능 추가합니다.
|
||||
* - MemberModel::getMemberMenu 호출시 친구 등록 메뉴를 추가합니다.
|
||||
* - Pop-up the message if new message comes in
|
||||
* - When calling MemberModel::getMemberMenu, feature to send a message is added
|
||||
* - When caliing MemberModel::getMemberMenu, feature to add a friend is added
|
||||
**/
|
||||
|
||||
// 비로그인 사용자면 중지
|
||||
// Stop if non-logged-in user is
|
||||
$logged_info = Context::get('logged_info');
|
||||
if(!$logged_info) return;
|
||||
|
||||
/**
|
||||
* 기능 수행 : 팝업 및 회원정보 보기에서 쪽지/친구 메뉴 추가. 시작할때 새쪽지가 왔는지 검사
|
||||
* Message/Friend munus are added on the pop-up window and member profile. Check if a new message is received
|
||||
**/
|
||||
if($called_position == 'before_module_init' && $this->module != 'member') {
|
||||
|
||||
// 커뮤니케이션 모듈의 언어파일을 읽음
|
||||
// Load a language file from the communication module
|
||||
Context::loadLang('./modules/communication/lang');
|
||||
|
||||
// 회원 로그인 정보중에서 쪽지등의 메뉴를 추가
|
||||
// Add menus on the member login information
|
||||
$oMemberController = &getController('member');
|
||||
$oMemberController->addMemberMenu('dispCommunicationFriend', 'cmd_view_friend');
|
||||
$oMemberController->addMemberMenu('dispCommunicationMessages', 'cmd_view_message_box');
|
||||
|
||||
// 새로운 쪽지에 대한 플래그가 있으면 쪽지 보기 팝업 띄움
|
||||
// Pop-up to display messages if a flag on new message is set
|
||||
$flag_path = './files/member_extra_info/new_message_flags/'.getNumberingPath($logged_info->member_srl);
|
||||
$flag_file = sprintf('%s%s', $flag_path, $logged_info->member_srl);
|
||||
|
||||
|
|
@ -43,41 +39,33 @@
|
|||
}
|
||||
|
||||
/**
|
||||
* 기능 수행 : 사용자 이름을 클릭시 요청되는 팝업메뉴의 메뉴에 쪽지 발송, 친구추가등의 링크 추가
|
||||
* Links are added on the pop-up menu which appears when clicking user name
|
||||
**/
|
||||
} elseif($called_position == 'before_module_proc' && $this->act == 'getMemberMenu') {
|
||||
|
||||
$oMemberController = &getController('member');
|
||||
$member_srl = Context::get('target_srl');
|
||||
$mid = Context::get('cur_mid');
|
||||
|
||||
// communication 모델 객체 생성
|
||||
// Creates communication model object
|
||||
$oCommunicationModel = &getModel('communication');
|
||||
|
||||
// 자신이라면 쪽지함 보기 기능 추가
|
||||
// Add a feature to display own message box.
|
||||
if($logged_info->member_srl == $member_srl) {
|
||||
|
||||
// 자신의 쪽지함 보기 기능 추가
|
||||
// Add your own viewing Note Template
|
||||
$oMemberController->addMemberPopupMenu(getUrl('','mid',$mid,'act','dispCommunicationMessages'), 'cmd_view_message_box', './modules/communication/tpl/images/icon_message_box.gif', 'self');
|
||||
|
||||
// 친구 목록 보기
|
||||
// Display a list of friends
|
||||
$oMemberController->addMemberPopupMenu(getUrl('','mid',$mid,'act','dispCommunicationFriend'), 'cmd_view_friend', './modules/communication/tpl/images/icon_friend_box.gif', 'self');
|
||||
|
||||
// 아니라면 쪽지 발송, 친구 등록 추가
|
||||
// If not, Add menus to send message and to add friends
|
||||
} else {
|
||||
// 대상 회원의 정보를 가져옴
|
||||
// Get member information
|
||||
$oMemberModel = &getModel('member');
|
||||
$target_member_info = $oMemberModel->getMemberInfoByMemberSrl($member_srl);
|
||||
if(!$target_member_info->member_srl) return;
|
||||
|
||||
// 로그인된 사용자 정보를 구함
|
||||
// Get logged-in user information
|
||||
$logged_info = Context::get('logged_info');
|
||||
|
||||
// 쪽지 발송 메뉴를 만듬
|
||||
// Add a menu for sending message
|
||||
if( $logged_info->is_admin == 'Y' || $target_member_info->allow_message =='Y' || ($target_member_info->allow_message == 'F' && $oCommunicationModel->isFriend($member_srl)))
|
||||
$oMemberController->addMemberPopupMenu(getUrl('','module','communication','act','dispCommunicationSendMessage','receiver_srl',$member_srl), 'cmd_send_message', './modules/communication/tpl/images/icon_write_message.gif', 'popup');
|
||||
|
||||
// 친구 등록 메뉴를 만듬 (이미 등록된 친구가 아닐 경우)
|
||||
// Add a menu for listing friends (if a friend is new)
|
||||
if(!$oCommunicationModel->isAddedFriend($member_srl))
|
||||
$oMemberController->addMemberPopupMenu(getUrl('','module','communication','act','dispCommunicationAddFriend','target_srl',$member_srl), 'cmd_add_friend', './modules/communication/tpl/images/icon_add_friend.gif', 'popup');
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,20 +4,18 @@
|
|||
/**
|
||||
* @file image_name.addon.php
|
||||
* @author NHN (developers@xpressengine.com)
|
||||
* @brief 사용자의 이미지이름/ 이미지마크등을 출력
|
||||
* @brief Display user image name/image mark
|
||||
*
|
||||
* <div class="member_회원번호">....</div> 로 정의가 된 부분을 찾아 회원번호를 구해서
|
||||
* 이미지이름, 이미지마크가 있는지를 확인하여 있으면 내용을 변경해버립니다.
|
||||
* Find member_srl in the part with <div class="member_회원번호"> .... </div>
|
||||
* Check if ther is image name and image mark. Then change it.
|
||||
**/
|
||||
|
||||
/**
|
||||
* 출력되기 바로 직전일 경우에 이미지이름/이미지마크등을 변경
|
||||
* Just before displaying, change image name/ image mark
|
||||
**/
|
||||
if($called_position != "before_display_content" || Context::get('act')=='dispPageAdminContentModify') return;
|
||||
|
||||
// 회원 이미지이름/ 마크/ 찾아서 대체할 함수를 담고 있는 파일을 include
|
||||
// Include a file having functions to replace member image name/mark
|
||||
require_once('./addons/member_extra_info/member_extra_info.lib.php');
|
||||
|
||||
// 1. 출력문서중에서 <div class="member_번호">content</div>를 찾아 MemberController::transImageName() 를 이용하여 이미지이름/마크로 변경
|
||||
// 1. Find a part <div class="member_번호"> content </div> in the output document, change it to image name/mark by using MemberController::transImageName()
|
||||
$output = preg_replace_callback('!<(div|span|a)([^\>]*)member_([0-9]+)([^\>]*)>(.*?)\<\/(div|span|a)\>!is', 'memberTransImageName', $output);
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -1,22 +1,19 @@
|
|||
<?php
|
||||
/**
|
||||
* @brief div 또는 span에 member_번호 가 있을때 해당 회원 번호에 맞는 이미지이름이나 닉이미지를 대체
|
||||
* @brief If member_srl exists in the div or span, replace to image name or nick image for each member_srl
|
||||
**/
|
||||
function memberTransImageName($matches) {
|
||||
|
||||
// 회원번호를 추출하여 0보다 찾으면 본문중 text만 return
|
||||
// If member_srl < 0, then return text only in the body
|
||||
$member_srl = $matches[3];
|
||||
if($member_srl<0) return $matches[5];
|
||||
|
||||
$site_module_info = Context::get('site_module_info');
|
||||
$oMemberModel = &getModel('member');
|
||||
$group_image = $oMemberModel->getGroupImageMark($member_srl,$site_module_info->site_srl);
|
||||
|
||||
// 회원이 아닐경우(member_srl = 0) 본문 전체를 return
|
||||
// If member_srl=o(not a member), return the entire body
|
||||
$nick_name = $matches[5];
|
||||
if(!$member_srl) return $matches[0];
|
||||
|
||||
// 전역변수에 미리 설정한 데이터가 있다면 그걸 return
|
||||
// If pre-defined data in the global variablesm return it
|
||||
if(!$GLOBALS['_transImageNameList'][$member_srl]->cached) {
|
||||
$GLOBALS['_transImageNameList'][$member_srl]->cached = true;
|
||||
$image_name_file = sprintf('files/member_extra_info/image_name/%s%d.gif', getNumberingPath($member_srl), $member_srl);
|
||||
|
|
@ -29,8 +26,7 @@
|
|||
$image_name_file = $GLOBALS['_transImageNameList'][$member_srl]->image_name_file;
|
||||
$image_mark_file = $GLOBALS['_transImageNameList'][$member_srl]->image_mark_file;
|
||||
}
|
||||
|
||||
// 이미지이름이나 마크가 없으면 원본 정보를 세팅
|
||||
// If image name and mark doesn't exist, set the original information
|
||||
if(!$image_name_file && !$image_mark_file && !$group_image) return $matches[0];
|
||||
|
||||
if($image_name_file) $nick_name = sprintf('<img src="%s%s" border="0" alt="id: %s" title="id: %s" style="vertical-align:middle;margin-right:3px" />', Context::getRequestUri(),$image_name_file, strip_tags($nick_name), strip_tags($nick_name));
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@
|
|||
}
|
||||
|
||||
/**
|
||||
* @brief hdml 헤더 출력
|
||||
* @brief hdml header output
|
||||
**/
|
||||
function printHeader() {
|
||||
header("Content-Type:text/x-hdml; charset=".$this->charset);
|
||||
|
|
@ -33,7 +33,7 @@
|
|||
}
|
||||
|
||||
/**
|
||||
* @brief 제목을 출력
|
||||
* @brief Output title
|
||||
**/
|
||||
function printTitle() {
|
||||
if($this->totalPage > $this->mobilePage) $titlePageStr = sprintf("(%d/%d)",$this->mobilePage, $this->totalPage);
|
||||
|
|
@ -41,8 +41,8 @@
|
|||
}
|
||||
|
||||
/**
|
||||
* @brief 내용을 출력
|
||||
* hasChilds()가 있으면 목록형을 그렇지 않으면 컨텐츠를 출력
|
||||
* @brief Output information
|
||||
* hasChilds() if there is a list of content types, otherwise output
|
||||
**/
|
||||
function printContent() {
|
||||
if($this->hasChilds()) {
|
||||
|
|
@ -56,10 +56,10 @@
|
|||
}
|
||||
|
||||
/**
|
||||
* @brief 버튼을 출력함
|
||||
* @brief Button to output
|
||||
**/
|
||||
function printBtn() {
|
||||
// 메뉴 형식
|
||||
// Menu Types
|
||||
if($this->hasChilds()) {
|
||||
if($this->nextUrl) {
|
||||
$url = $this->nextUrl;
|
||||
|
|
@ -73,7 +73,7 @@
|
|||
$url = $this->homeUrl;
|
||||
printf('<ce task=go label="%s" dest="%s">%s%s', $url->text, $url->url, $url->text, "\n");
|
||||
}
|
||||
// 컨텐츠 형식
|
||||
// Content Types
|
||||
} else {
|
||||
if($this->nextUrl) {
|
||||
$url = $this->nextUrl;
|
||||
|
|
@ -91,7 +91,7 @@
|
|||
}
|
||||
|
||||
/**
|
||||
* @brief 푸터 정보를 출력
|
||||
* @brief Footer information output
|
||||
**/
|
||||
function printFooter() {
|
||||
print $this->hasChilds()?'</choice>':'</display>';
|
||||
|
|
|
|||
|
|
@ -13,23 +13,22 @@
|
|||
}
|
||||
|
||||
/**
|
||||
* @brief hdml 헤더 출력
|
||||
* @brief hdml header output
|
||||
**/
|
||||
function printHeader() {
|
||||
print("<html><head>\n");
|
||||
if($this->totalPage > $this->mobilePage) $titlePageStr = sprintf("(%d/%d)",$this->mobilePage, $this->totalPage);
|
||||
printf("<title>%s%s</title></head><body>\n", htmlspecialchars($this->title),htmlspecialchars($titlePageStr));
|
||||
}
|
||||
|
||||
// 제목을 출력
|
||||
// Output title
|
||||
function printTitle() {
|
||||
if($this->totalPage > $this->mobilePage) $titlePageStr = sprintf("(%d/%d)",$this->mobilePage, $this->totalPage);
|
||||
printf('<%s%s><br>%s', htmlspecialchars($this->title),htmlspecialchars($titlePageStr),"\n");
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 내용을 출력
|
||||
* hasChilds()가 있으면 목록형을 그렇지 않으면 컨텐츠를 출력
|
||||
* @brief Output information
|
||||
* hasChilds() if there is a list of content types, otherwise output
|
||||
**/
|
||||
function printContent() {
|
||||
if($this->hasChilds()) {
|
||||
|
|
@ -45,7 +44,7 @@
|
|||
}
|
||||
|
||||
/**
|
||||
* @brief 버튼을 출력함
|
||||
* @brief Button to output
|
||||
**/
|
||||
function printBtn() {
|
||||
if($this->nextUrl) {
|
||||
|
|
@ -56,7 +55,7 @@
|
|||
$url = $this->prevUrl;
|
||||
printf('<a href="%s">%s</a><br>%s', $url->url, $url->text, "\n");
|
||||
}
|
||||
// 언어선택
|
||||
// Select Language
|
||||
if(!parent::isLangChange()){
|
||||
$url = getUrl('','lcm','1','sel_lang',Context::getLangType(),'return_uri',Context::get('current_url'));
|
||||
printf('<a href="%s">%s</a><br>%s', $url, 'Language : '.Context::getLang('select_lang'), "\n");
|
||||
|
|
@ -73,8 +72,7 @@
|
|||
printf('<a btn="%s" href="%s">%s</a><br>%s', $url->text, $url->url, $url->text, "\n");
|
||||
}
|
||||
}
|
||||
|
||||
// 푸터 정보를 출력
|
||||
// Footer information output
|
||||
function printFooter() {
|
||||
print("</body></html>\n");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,48 +2,40 @@
|
|||
/**
|
||||
* Mobile XE Library Class ver 0.1
|
||||
* @author NHN (developers@xpressengine.com) / lang_select : misol
|
||||
* @brief WAP 태그 출력을 위한 XE 라이브러리
|
||||
* @brief XE library for WAP tag output
|
||||
**/
|
||||
|
||||
class mobileXE {
|
||||
|
||||
// 기본 url
|
||||
// Base url
|
||||
var $homeUrl = NULL;
|
||||
var $upperUrl = NULL;
|
||||
var $nextUrl = NULL;
|
||||
var $prevUrl = NULL;
|
||||
var $etcBtn = NULL;
|
||||
|
||||
// 메뉴 네비게이션을 위한 변수
|
||||
// Variable for menu navigation
|
||||
var $childs = null;
|
||||
|
||||
// 기본 변수
|
||||
// Basic variable
|
||||
var $title = NULL;
|
||||
var $content = NULL;
|
||||
var $mobilePage = 0;
|
||||
var $totalPage = 1;
|
||||
var $charset = 'UTF-8';
|
||||
var $no = 0;
|
||||
|
||||
// 네비게이션 관련 변수
|
||||
// Navigation-related variables
|
||||
var $menu = null;
|
||||
var $listed_items = null;
|
||||
var $node_list = null;
|
||||
var $index_mid = null;
|
||||
|
||||
// Navigation On/ Off 상태 값
|
||||
// Navigation On/Off status value
|
||||
var $navigationMode = 0;
|
||||
|
||||
// 현재 요청된 XE 모듈 정보
|
||||
// XE module information currently requested
|
||||
var $module_info = null;
|
||||
|
||||
// 현재 실행중인 모듈의 instance
|
||||
// Currently running instance of the module
|
||||
var $oModule = null;
|
||||
|
||||
// Deck size
|
||||
var $deckSize = 1024;
|
||||
|
||||
// 언어 설정 변경
|
||||
// Changing the language setting
|
||||
var $languageMode = 0;
|
||||
var $lang = null;
|
||||
/**
|
||||
|
|
@ -59,8 +51,7 @@
|
|||
|
||||
$class_file = sprintf('%saddons/mobile/classes/%s.class.php', _XE_PATH_, $browserType);
|
||||
require_once($class_file);
|
||||
|
||||
// 모바일 언어설정 로드(쿠키가 안되어 생각해낸 방법...-캐시파일 재생성을 클릭하면 초기화된다..)
|
||||
// Download mobile language settings (cookies, not willing to come up when you click create cache file ...- is initialized ..)
|
||||
$this->lang = FileHandler::readFile('./files/cache/addons/mobile/setLangType/personal_settings/'.md5(trim($_SERVER['HTTP_USER_AGENT']).trim($_SERVER['HTTP_PHONE_NUMBER']).trim($_SERVER['HTTP_HTTP_PHONE_NUMBER'])).'.php');
|
||||
if($this->lang) {
|
||||
$lang_supported = Context::get('lang_supported');
|
||||
|
|
@ -85,7 +76,7 @@
|
|||
* @brief constructor
|
||||
**/
|
||||
function mobileXE() {
|
||||
// navigation mode 체크
|
||||
// Check navigation mode
|
||||
if(Context::get('nm')) {
|
||||
$this->navigationMode = 1;
|
||||
$this->cmid = (int)Context::get('cmid');
|
||||
|
|
@ -98,16 +89,16 @@
|
|||
}
|
||||
|
||||
/**
|
||||
* @brief navigation mode 체크
|
||||
* navigationMode 세팅과 모듈 정보의 menu_srl이 있어야 navigation mode = true로 return
|
||||
* @brief Check navigation mode
|
||||
* navigationMode settings and modules of information must be menu_srl return to navigation mode = true
|
||||
**/
|
||||
function isNavigationMode() {
|
||||
return ($this->navigationMode && $this->module_info->menu_srl)?true:false;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief langchange mode 체크
|
||||
* languageMode 세팅 있어야 true return
|
||||
* @brief Check langchange mode
|
||||
* true return should be set languageMode
|
||||
**/
|
||||
function isLangChange() {
|
||||
if($this->languageMode) return true;
|
||||
|
|
@ -115,12 +106,12 @@
|
|||
}
|
||||
|
||||
/**
|
||||
* @brief 언어 설정
|
||||
* 쿠키가 안되기 때문에 휴대전화마다 고유한 파일로 언어설정을 저장하는 파일 생성
|
||||
* @brief Language settings
|
||||
* Cookies Since you set your phone to store language-specific file, file creation
|
||||
**/
|
||||
function setLangType() {
|
||||
$lang_supported = Context::get('lang_supported');
|
||||
// 언어 변수가 있는지 확인하고 변수가 유효한지 확인
|
||||
// Make sure that the language variables and parameters are valid
|
||||
if($this->lang && isset($lang_supported[$this->lang])) {
|
||||
$langbuff = FileHandler::readFile('./files/cache/addons/mobile/setLangType/personal_settings/'.md5(trim($_SERVER['HTTP_USER_AGENT']).trim($_SERVER['HTTP_PHONE_NUMBER']).trim($_SERVER['HTTP_HTTP_PHONE_NUMBER'])).'.php');
|
||||
if($langbuff) FileHandler::removeFile('./files/cache/addons/mobile/setLangType/personal_settings/'.md5(trim($_SERVER['HTTP_USER_AGENT']).trim($_SERVER['HTTP_PHONE_NUMBER']).trim($_SERVER['HTTP_HTTP_PHONE_NUMBER'])).'.php');
|
||||
|
|
@ -130,7 +121,7 @@
|
|||
}
|
||||
|
||||
/**
|
||||
* @brief 현재 요청된 모듈 정보 세팅
|
||||
* @brief Information currently requested module settings
|
||||
**/
|
||||
function setModuleInfo(&$module_info) {
|
||||
if($this->module_info) return;
|
||||
|
|
@ -138,21 +129,18 @@
|
|||
}
|
||||
|
||||
/**
|
||||
* @brief 현재 실행중인 모듈 instance 세팅
|
||||
* @brief Set the module instance is currently running
|
||||
**/
|
||||
function setModuleInstance(&$oModule) {
|
||||
if($this->oModule) return;
|
||||
|
||||
// instance 저장
|
||||
// Save instance
|
||||
$this->oModule = $oModule;
|
||||
|
||||
// 현재 모듈의 메뉴가 설정되어 있으면 메뉴 정리
|
||||
// Of the current module if there is a menu by menu
|
||||
$menu_cache_file = sprintf(_XE_PATH_.'files/cache/menu/%d.php', $this->module_info->menu_srl);
|
||||
if(!file_exists($menu_cache_file)) return;
|
||||
|
||||
include $menu_cache_file;
|
||||
|
||||
// 정리된 menu들을 1차원으로 변경
|
||||
// One-dimensional arrangement of menu changes
|
||||
$this->getListedItems($menu->list, $listed_items, $node_list);
|
||||
|
||||
$this->listed_items = $listed_items;
|
||||
|
|
@ -162,8 +150,7 @@
|
|||
$k = array_keys($node_list);
|
||||
$v = array_values($node_list);
|
||||
$this->index_mid = $k[0];
|
||||
|
||||
// 현재 메뉴의 depth가 1이상이면 상위 버튼을 지정
|
||||
// The depth of the current menu, the top button to specify if one or more
|
||||
$cur_menu_item = $listed_items[$node_list[$this->module_info->mid]];
|
||||
if($cur_menu_item['parent_srl']) {
|
||||
$parent_srl = $cur_menu_item['parent_srl'];
|
||||
|
|
@ -177,12 +164,12 @@
|
|||
}
|
||||
|
||||
/**
|
||||
* @brief 접속 브라우저의 헤더를 판단하여 브라우저 타입을 return
|
||||
* 모바일 브라우저가 아닐 경우 null return
|
||||
* @brief Access the browser's header to determine the return type of the browser
|
||||
* Mobile browser, if not null return
|
||||
**/
|
||||
function getBrowserType() {
|
||||
if(Context::get('smartphone')) return null;
|
||||
// 브라우저 타입을 판별
|
||||
// Determine the type of browser
|
||||
$browserAccept = $_SERVER['HTTP_ACCEPT'];
|
||||
$userAgent = $_SERVER['HTTP_USER_AGENT'];
|
||||
$wap_sid = $_SERVER['HTTP_X_UP_SUBNO'];
|
||||
|
|
@ -197,19 +184,18 @@
|
|||
}
|
||||
|
||||
/**
|
||||
* @brief charset 지정
|
||||
* @brief Specify charset
|
||||
**/
|
||||
function setCharSet($charset = 'UTF-8') {
|
||||
if(!$charset) $charset = 'UTF-8';
|
||||
|
||||
//SKT는 euc-kr만 지원
|
||||
// SKT supports the euc-kr
|
||||
if(Context::get('mobile_skt')==1) $charset = 'euc-kr';
|
||||
|
||||
$this->charset = $charset;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 모바일 기기의 용량 제한에 다른 가상 페이지 지정
|
||||
* @brief Limited capacity of mobile devices, specifying a different virtual page
|
||||
**/
|
||||
function setMobilePage($page=1) {
|
||||
if(!$page) $page = 1;
|
||||
|
|
@ -217,10 +203,10 @@
|
|||
}
|
||||
|
||||
/**
|
||||
* @brief 목록형 데이터 설정을 위한 child menu지정
|
||||
* @brief Mokrokhyeong child menu for specifying the data set
|
||||
**/
|
||||
function setChilds($childs) {
|
||||
// menu개수가 9개 이상일 경우 자체 페이징 처리
|
||||
// If more than nine the number of menu paging processing itself
|
||||
$menu_count = count($childs);
|
||||
if($menu_count>9) {
|
||||
$startNum = ($this->mobilePage-1)*9;
|
||||
|
|
@ -235,8 +221,7 @@
|
|||
$childs = $new_childs;
|
||||
|
||||
$this->totalPage = (int)(($menu_count-1)/9)+1;
|
||||
|
||||
// next/prevUrl 지정
|
||||
// next/prevUrl specify
|
||||
if($this->mobilePage>1) {
|
||||
$url = getUrl('mid',$_GET['mid'],'mpage',$this->mobilePage-1);
|
||||
$text = sprintf('%s (%d/%d)', Context::getLang('cmd_prev'), $this->mobilePage-1, $this->totalPage);
|
||||
|
|
@ -253,21 +238,21 @@
|
|||
}
|
||||
|
||||
/**
|
||||
* @brief menu 출력대상이 있는지 확인
|
||||
* @brief Check the menu to be output
|
||||
**/
|
||||
function hasChilds() {
|
||||
return count($this->childs)?true:0;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief child menu반환
|
||||
* @brief Returns the child menu
|
||||
**/
|
||||
function getChilds() {
|
||||
return $this->childs;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief title 지정
|
||||
* @brief Specify title
|
||||
**/
|
||||
function setTitle($title) {
|
||||
$oModuleController = &getController('module');
|
||||
|
|
@ -276,28 +261,24 @@
|
|||
}
|
||||
|
||||
/**
|
||||
* @brief title 반환
|
||||
* @brief return title
|
||||
**/
|
||||
function getTitle() {
|
||||
return $this->title;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 컨텐츠 정리
|
||||
* HTML 컨텐츠에서 텍스트와 링크만 추출하는 기능
|
||||
* @brief Content Cleanup
|
||||
* In HTML content, the ability to extract text and links
|
||||
**/
|
||||
function setContent($content) {
|
||||
$oModuleController = &getController('module');
|
||||
$allow_tag_array = array('<a>','<br>','<p>','<b>','<i>','<u>','<em>','<small>','<strong>','<big>','<table>','<tr>','<td>');
|
||||
|
||||
|
||||
// 링크/ 줄바꿈, 강조만 제외하고 모든 태그 제거
|
||||
// Links/wrap, remove all tags except gangjoman
|
||||
$content = strip_tags($content, implode($allow_tag_array));
|
||||
|
||||
// 탭 여백 제거
|
||||
// Margins tab removed
|
||||
$content = str_replace("\t", "", $content);
|
||||
|
||||
// 2번 이상 반복되는 공백과 줄나눔을 제거
|
||||
// Repeat two more times the space and remove julnanumeul
|
||||
$content = preg_replace('/( ){2,}/s', '', $content);
|
||||
$content = preg_replace("/([\r\n]+)/s", "\r\n", $content);
|
||||
$content = preg_replace(array("/<a/i","/<\/a/i","/<b/i","/<\/b/i","/<br/i"),array('<a','</a','<b','</b','<br'),$content);
|
||||
|
|
@ -306,8 +287,7 @@
|
|||
while(strpos($content, '<br/><br/>')) {
|
||||
$content = str_replace('<br/><br/>','<br/>',$content);
|
||||
}
|
||||
|
||||
// 모바일의 경우 한 덱에 필요한 사이즈가 적어서 내용을 모두 페이지로 나눔
|
||||
// If the required size of a deck of mobile content to write down all the dividing pages
|
||||
$contents = array();
|
||||
while($content) {
|
||||
$tmp = $this->cutStr($content, $this->deckSize, '');
|
||||
|
|
@ -335,8 +315,7 @@
|
|||
}
|
||||
|
||||
$this->totalPage = count($contents);
|
||||
|
||||
// next/prevUrl 지정
|
||||
// next/prevUrl specify
|
||||
if($this->mobilePage>1) {
|
||||
$url = getUrl('mid',$_GET['mid'],'mpage',$this->mobilePage-1);
|
||||
$text = sprintf('%s (%d/%d)', Context::getLang('cmd_prev'), $this->mobilePage-1, $this->totalPage);
|
||||
|
|
@ -355,21 +334,21 @@
|
|||
}
|
||||
|
||||
/**
|
||||
* @brief byte수로 자르는 함수
|
||||
* @brief cutting the number of byte functions
|
||||
**/
|
||||
function cutStr($string, $cut_size) {
|
||||
return preg_match('/.{'.$cut_size.'}/su', $string, $arr) ? $arr[0] : $string;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 컨텐츠 반환
|
||||
* @brief Return content
|
||||
**/
|
||||
function getContent() {
|
||||
return $this->content;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief home url 지정
|
||||
* @brief Specifies the home url
|
||||
**/
|
||||
function setHomeUrl($url, $text) {
|
||||
if(!$url) $url = '#';
|
||||
|
|
@ -378,7 +357,7 @@
|
|||
}
|
||||
|
||||
/**
|
||||
* @brief upper url 지정
|
||||
* @brief Specify upper url
|
||||
**/
|
||||
function setUpperUrl($url, $text) {
|
||||
if(!$url) $url = '#';
|
||||
|
|
@ -387,7 +366,7 @@
|
|||
}
|
||||
|
||||
/**
|
||||
* @brief prev url 지정
|
||||
* @brief Specify prev url
|
||||
**/
|
||||
function setPrevUrl($url, $text) {
|
||||
if(!$url) $url = '#';
|
||||
|
|
@ -396,7 +375,7 @@
|
|||
}
|
||||
|
||||
/**
|
||||
* @brief next url 지정
|
||||
* @brief Specify next url
|
||||
**/
|
||||
function setNextUrl($url, $text) {
|
||||
if(!$url) $url = '#';
|
||||
|
|
@ -405,7 +384,7 @@
|
|||
}
|
||||
|
||||
/**
|
||||
* @brief 다음, 이전, 상위 이외에 기타 버튼 지정
|
||||
* @brief Next, Previous, Top button assignments other than
|
||||
**/
|
||||
function setEtcBtn($url, $text) {
|
||||
if(!$url) $url = '#';
|
||||
|
|
@ -418,32 +397,25 @@
|
|||
* @brief display
|
||||
**/
|
||||
function display() {
|
||||
// 홈버튼 지정
|
||||
// Home button assignments
|
||||
$this->setHomeUrl(getUrl(), Context::getLang('cmd_go_home'));
|
||||
|
||||
// 제목 지정
|
||||
// Specify the title
|
||||
if(!$this->title) $this->setTitle(Context::getBrowserTitle());
|
||||
|
||||
ob_start();
|
||||
|
||||
// 헤더를 출력
|
||||
// Output header
|
||||
$this->printHeader();
|
||||
|
||||
// 제목을 출력
|
||||
// Output title
|
||||
$this->printTitle();
|
||||
|
||||
// 내용 출력
|
||||
// Information output
|
||||
$this->printContent();
|
||||
|
||||
// 버튼 출력
|
||||
// Button output
|
||||
$this->printBtn();
|
||||
|
||||
// 푸터를 출력
|
||||
// Footer output
|
||||
$this->printFooter();
|
||||
|
||||
$content = ob_get_clean();
|
||||
|
||||
// 변환 후 출력
|
||||
// After conversion output
|
||||
if(strtolower($this->charset) == 'utf-8') print $content;
|
||||
else print iconv('UTF-8',$this->charset."//TRANSLIT//IGNORE", $content);
|
||||
|
||||
|
|
@ -451,7 +423,7 @@
|
|||
}
|
||||
|
||||
/**
|
||||
* @brief 페이지 이동
|
||||
* @brief Move page
|
||||
**/
|
||||
function movepage($url) {
|
||||
header("location:$url");
|
||||
|
|
@ -459,7 +431,7 @@
|
|||
}
|
||||
|
||||
/**
|
||||
* @brief 목록등에서 일련 번호를 리턴한다
|
||||
* @brief And returns a list of serial numbers in
|
||||
**/
|
||||
function getNo() {
|
||||
$this->no++;
|
||||
|
|
@ -468,7 +440,7 @@
|
|||
}
|
||||
|
||||
/**
|
||||
* @brief XE의 Menu 모듈이 값을 사용하기 쉽게 정리해주는 함수
|
||||
* @brief XE is easy to use Menu module is relieved during the function, value
|
||||
**/
|
||||
function getListedItems($menu, &$listed_items, &$node_list) {
|
||||
if(!count($menu)) return;
|
||||
|
|
@ -486,7 +458,7 @@
|
|||
}
|
||||
|
||||
/**
|
||||
* @brief XE 네비게이션 출력
|
||||
* @brief XE navigation output
|
||||
**/
|
||||
function displayNavigationContent() {
|
||||
$childs = array();
|
||||
|
|
@ -523,13 +495,12 @@
|
|||
}
|
||||
$this->setChilds($childs);
|
||||
}
|
||||
|
||||
// 출력
|
||||
// Output
|
||||
$this->display();
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 언어설정 메뉴 출력
|
||||
* @brief Language Settings menu, the output
|
||||
**/
|
||||
function displayLangSelect() {
|
||||
$childs = array();
|
||||
|
|
@ -561,37 +532,33 @@
|
|||
}
|
||||
|
||||
/**
|
||||
* @brief 모듈의 WAP 클래스 객체 생성하여 WAP 준비
|
||||
* @brief Module to create a class object of the WAP WAP ready
|
||||
**/
|
||||
function displayModuleContent() {
|
||||
// 선택된 모듈의 WAP class 객체 생성
|
||||
// Create WAP class objects of the selected module
|
||||
$oModule = &getWap($this->module_info->module);
|
||||
if(!$oModule || !method_exists($oModule, 'procWAP') ) return;
|
||||
|
||||
$vars = get_object_vars($this->oModule);
|
||||
if(count($vars)) foreach($vars as $key => $val) $oModule->{$key} = $val;
|
||||
|
||||
// 실행
|
||||
// Run
|
||||
$oModule->procWAP($this);
|
||||
|
||||
// 출력
|
||||
// Output
|
||||
$this->display();
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief WAP 컨텐츠를 별도로 구할 수 없으면 최종 결과물을 출력
|
||||
* @brief WAP content is available as a separate output if the final results
|
||||
**/
|
||||
function displayContent() {
|
||||
Context::set('layout','none');
|
||||
|
||||
// 템플릿 컴파일
|
||||
// Compile a template
|
||||
$oTemplate = new TemplateHandler();
|
||||
$oContext = &Context::getInstance();
|
||||
|
||||
$content = $oTemplate->compile($this->oModule->getTemplatePath(), $this->oModule->getTemplateFile());
|
||||
$this->setContent($content);
|
||||
|
||||
// 출력
|
||||
// Output
|
||||
$this->display();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -13,19 +13,19 @@
|
|||
}
|
||||
|
||||
/**
|
||||
* @brief wml 헤더 출력
|
||||
* @brief wml header output
|
||||
**/
|
||||
function printHeader() {
|
||||
header("Content-Type: text/vnd.wap.wml");
|
||||
header("charset: ".$this->charset);
|
||||
if($this->totalPage > $this->mobilePage) $titlePageStr = sprintf("(%d/%d)",$this->mobilePage, $this->totalPage);
|
||||
print("<?xml version=\"1.0\" encoding=\"".$this->charset."\"?><!DOCTYPE wml PUBLIC \"-//WAPFORUM//DTD WML 1.1//EN\" \"http://www.wapforum.org/DTD/wml_1.1.xml\">\n");
|
||||
// 카드제목
|
||||
// Card Title
|
||||
printf("<wml>\n<card title=\"%s%s\">\n<p>\n",htmlspecialchars($this->title),htmlspecialchars($titlePageStr));
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 제목을 출력
|
||||
* @brief Output title
|
||||
**/
|
||||
function printTitle() {
|
||||
if($this->totalPage > $this->mobilePage) $titlePageStr = sprintf("(%d/%d)",$this->mobilePage, $this->totalPage);
|
||||
|
|
@ -33,8 +33,8 @@
|
|||
}
|
||||
|
||||
/**
|
||||
* @brief 내용을 출력
|
||||
* hasChilds()가 있으면 목록형을 그렇지 않으면 컨텐츠를 출력
|
||||
* @brief Output information
|
||||
* hasChilds() if there is a list of content types, otherwise output
|
||||
**/
|
||||
function printContent() {
|
||||
if($this->hasChilds()) {
|
||||
|
|
@ -50,7 +50,7 @@
|
|||
}
|
||||
|
||||
/**
|
||||
* @brief 버튼을 출력함
|
||||
* @brief Button to output
|
||||
**/
|
||||
function printBtn() {
|
||||
if($this->nextUrl) {
|
||||
|
|
@ -61,7 +61,7 @@
|
|||
$url = $this->prevUrl;
|
||||
printf('<do type="vnd.prev" label="%s"><go href="%s"/></do>%s', $url->text, $url->url, "\n");
|
||||
}
|
||||
// 기타 해당사항 없는 버튼 출력 담당 (array로 전달) type??
|
||||
// Others are not applicable in charge of the button output (array passed) type??
|
||||
if($this->etcBtn) {
|
||||
if(is_array($this->etcBtn)) {
|
||||
foreach($this->etcBtn as $key=>$val) {
|
||||
|
|
@ -69,7 +69,7 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
// 언어선택
|
||||
// Select Language
|
||||
if(!parent::isLangChange()){
|
||||
$url = getUrl('','lcm','1','sel_lang',Context::getLangType(),'return_uri',Context::get('current_url'));
|
||||
printf('<do type="vnd.lang" label="%s"><go href="%s"/></do>%s', 'Language : '.Context::getLang('select_lang'), $url, "\n");
|
||||
|
|
@ -86,13 +86,11 @@
|
|||
printf('<do type="vnd.up" label="%s"><go href="%s"/></do>%s', $url->text, $url->url, "\n");
|
||||
}
|
||||
}
|
||||
|
||||
// 푸터 정보를 출력
|
||||
// Footer information output
|
||||
function printFooter() {
|
||||
print("</p>\n</card>\n</wml>");
|
||||
}
|
||||
|
||||
// 목록등에서 일련 번호를 리턴한다
|
||||
// And returns a list of serial numbers in
|
||||
function getNo() {
|
||||
if(Context::get('mobile_skt')==1) {
|
||||
return "vnd.skmn".parent::getNo();
|
||||
|
|
|
|||
|
|
@ -1,11 +1,10 @@
|
|||
<?php
|
||||
/**
|
||||
* @file addons/mobile/lang/jp.lang.php
|
||||
* @author NHN (developers@xpressengine.com) 翻訳:ミニミ
|
||||
* @brief 日本語言語パッケージ
|
||||
* @author NHN (developers@xpressengine.com) 翻 訳: ミニ ミ
|
||||
* @brief Japanese language package
|
||||
**/
|
||||
|
||||
// 言語選択部分 by misol
|
||||
// Choose the language part by misol
|
||||
$lang->president_lang = '現在言語';
|
||||
$lang->select_lang = '言語選択';
|
||||
$lang->lang_return = '戻る';
|
||||
|
|
|
|||
|
|
@ -2,10 +2,9 @@
|
|||
/**
|
||||
* @file addons/mobile/lang/ko.lang.php
|
||||
* @author NHN (developers@xpressengine.com)
|
||||
* @brief 한국어 언어팩 (기본적인 내용만 수록)
|
||||
* @brief Korean language pack (only the more basic)
|
||||
**/
|
||||
|
||||
// 언어 선택부분 by misol
|
||||
// Language selection by misol
|
||||
$lang->president_lang = '현재 언어';
|
||||
$lang->select_lang = '언어 선택';
|
||||
$lang->lang_return = '돌아가기';
|
||||
|
|
|
|||
|
|
@ -2,10 +2,9 @@
|
|||
/**
|
||||
* @file addons/mobile/lang/ko.lang.php
|
||||
* @author NHN (developers@xpressengine.com)
|
||||
* @brief 한국어 언어팩 (기본적인 내용만 수록)
|
||||
* @brief Korean language pack (only the more basic)
|
||||
**/
|
||||
|
||||
// 언어 선택부분 by misol
|
||||
// Language selection by misol
|
||||
$lang->president_lang = 'Дейсвующй язык';
|
||||
$lang->select_lang = 'Выбор языка';
|
||||
$lang->lang_return = 'Вернуться';
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
<?php
|
||||
/**
|
||||
* @file addons/mobile/lang/zh-CN.lang.php
|
||||
* @author NHN (developers@xpressengine.com) 翻译:guny
|
||||
* @brief 手机XE插件简体中文语言包
|
||||
* @author NHN (developers@xpressengine.com) 翻译: guny
|
||||
* @brief XE mobile phone plug-Simplified Chinese Language Pack
|
||||
**/
|
||||
|
||||
$lang->cmd_go_upper = '上一级';
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
<?php
|
||||
/**
|
||||
* @file addons/mobile/lang/zh-TW.lang.php
|
||||
* @author NHN (developers@xpressengine.com) 翻譯:royallin
|
||||
* @brief XE行動上網正體中文語言
|
||||
* @author NHN (developers@xpressengine.com) 翻译: royallin
|
||||
* @brief XE Mobile Internet Traditional Chinese Language
|
||||
**/
|
||||
// lang select by misol
|
||||
$lang->president_lang = '已選擇語言';
|
||||
|
|
|
|||
|
|
@ -4,58 +4,47 @@
|
|||
/**
|
||||
* @file mobile.addon.php
|
||||
* @author NHN (developers@xpressengine.com)
|
||||
* @brief 모바일XE 애드온
|
||||
* @brief Mobile XE add-on
|
||||
*
|
||||
* 헤더정보를 가로채서 모바일에서의 접속일 경우 WAP 태그로 컨텐츠를 출력함
|
||||
* If a mobile connection is made (see the header information), display contents with WAP tags
|
||||
*
|
||||
* 동작 시점
|
||||
* Time to call
|
||||
*
|
||||
* before_module_proc > 모바일 처리를 위해 모듈의 일반 설정을 변경해야 할 경우 호출
|
||||
* before_module_proc > call when changing general settings for mobile
|
||||
*
|
||||
* after_module_proc > 모바일 컨텐츠 출력
|
||||
* 동작 조건
|
||||
* after_module_proc > display mobile content
|
||||
* Condition
|
||||
**/
|
||||
|
||||
// 관리자 페이지는 무시
|
||||
// Ignore admin page
|
||||
if(Context::get('module')=='admin') return;
|
||||
|
||||
// 동작 시점 관리
|
||||
// Manage when to call it
|
||||
if($called_position != 'before_module_proc' && $called_position != 'after_module_proc' ) return;
|
||||
|
||||
// 모바일 브라우저가 아니라면 무시
|
||||
// Ignore if not mobile browser
|
||||
require_once(_XE_PATH_.'addons/mobile/classes/mobile.class.php');
|
||||
if(!mobileXE::getBrowserType()) return;
|
||||
|
||||
// mobile instance 생성
|
||||
// Generate mobile instance
|
||||
$oMobile = &mobileXE::getInstance();
|
||||
if(!$oMobile) return;
|
||||
|
||||
// 애드온 설정에서 지정된 charset으로 지정
|
||||
// Specify charset on the add-on settings
|
||||
$oMobile->setCharSet($addon_info->charset);
|
||||
|
||||
// 모듈의 정보를 세팅
|
||||
// Set module information
|
||||
$oMobile->setModuleInfo($this->module_info);
|
||||
|
||||
// 현재 모듈 객체 등록
|
||||
// Register the current module object
|
||||
$oMobile->setModuleInstance($this);
|
||||
|
||||
// 네비게이트 모드이거나 WAP class가 있을 경우 미리 컨텐츠를 추출하여 출력/ 종료
|
||||
// Extract content and display/exit if navigate mode is or if WAP class exists
|
||||
if($called_position == 'before_module_proc') {
|
||||
|
||||
if($oMobile->isLangChange()) {
|
||||
$oMobile->setLangType();
|
||||
$oMobile->displayLangSelect();
|
||||
}
|
||||
|
||||
// 네비게이트 모드이면 네비게이션 컨텐츠 출력
|
||||
// On navigation mode, display navigation content
|
||||
if($oMobile->isNavigationMode()) $oMobile->displayNavigationContent();
|
||||
|
||||
// WAP class가 있으면 WAP class를 통해 컨텐츠 출력
|
||||
// If you have a WAP class content output via WAP class
|
||||
else $oMobile->displayModuleContent();
|
||||
|
||||
// 네비게이트 모드가 아니고 WAP 클래스가 아니면 모듈의 결과를 출력
|
||||
// If neither navigation mode nor WAP class is, display the module's result
|
||||
} else if($called_position == 'after_module_proc') {
|
||||
// 내용 준비
|
||||
// Display
|
||||
$oMobile->displayContent();
|
||||
}
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -4,16 +4,14 @@
|
|||
/**
|
||||
* @file openid_delegation_id.addon.php
|
||||
* @author NHN (developers@xpressengine.com)
|
||||
* @brief OpenID Delegation ID 애드온
|
||||
* @brief OpenID Delegation ID Add-on
|
||||
*
|
||||
* 오픈아이디를 자신의 홈페이지나 블로그 주소로 이용할 수 있도록 해줍니다.
|
||||
* 꼭 설정을 통해서 사용하시는 오픈아이디 서비스에 해당하는 정보를 입력해주세요.
|
||||
* This enables to use openID as user's homepage or blog url.
|
||||
* Enter your open ID service information on the configuration.
|
||||
**/
|
||||
|
||||
// called_position이 before_module_init일때만 실행
|
||||
// Execute only wen called_position is before_module_init
|
||||
if($called_position != 'before_module_init') return;
|
||||
|
||||
// openid_delegation_id 애드온 설정 정보를 가져옴
|
||||
// Get add-on settings(openid_delegation_id)
|
||||
if(!$addon_info->server||!$addon_info->delegate||!$addon_info->xrds) return;
|
||||
|
||||
$header_script = sprintf(
|
||||
|
|
|
|||
|
|
@ -4,12 +4,11 @@
|
|||
/**
|
||||
* @file point.addon.php
|
||||
* @author NHN (developers@xpressengine.com)
|
||||
* @brief 포인트 레벨 아이콘 표시 애드온
|
||||
* @brief Icon-on-point level
|
||||
*
|
||||
* 포인트 시스템 사용중일때 사용자 이름 앞에 포인트 레벨 아이콘을 표시합니다.
|
||||
* Display point level icon before user name when point system is enabled.
|
||||
**/
|
||||
|
||||
// before_display_content 가 아니면 return
|
||||
// return unless before_display_content
|
||||
if($called_position != "before_display_content" || Context::get('act')=='dispPageAdminContentModify') return;
|
||||
|
||||
require_once('./addons/point_level_icon/point_level_icon.lib.php');
|
||||
|
|
|
|||
|
|
@ -1,34 +1,29 @@
|
|||
<?php
|
||||
/**
|
||||
* @brief 포인트 아이콘 변경을 위한 함수.
|
||||
* @brief Function to change point icon.
|
||||
**/
|
||||
function pointLevelIconTrans($matches) {
|
||||
$member_srl = $matches[3];
|
||||
if($member_srl<1) return $matches[0];
|
||||
|
||||
if(!isset($GLOBALS['_pointLevelIcon'][$member_srl])) {
|
||||
// 포인트 설정을 구해옴
|
||||
// Get point configuration
|
||||
if(!$GLOBALS['_pointConfig']) {
|
||||
$oModuleModel = &getModel('module');
|
||||
$GLOBALS['_pointConfig'] = $oModuleModel->getModuleConfig('point');
|
||||
}
|
||||
$config = $GLOBALS['_pointConfig'];
|
||||
|
||||
// 포인트 모델을 구해 놓음
|
||||
// Get point model
|
||||
if(!$GLOBALS['_pointModel']) $GLOBALS['_pointModel'] = getModel('point');
|
||||
$oPointModel = &$GLOBALS['_pointModel'];
|
||||
|
||||
// 포인트를 구함
|
||||
// Get points
|
||||
$point = $oPointModel->getPoint($member_srl);
|
||||
|
||||
// 레벨을 구함
|
||||
// Get level
|
||||
$level = $oPointModel->getLevel($point, $config->level_step);
|
||||
$text = $matches[5];
|
||||
|
||||
// 레벨 아이콘의 위치를 구함
|
||||
// Get a path where level icon is
|
||||
$level_icon = sprintf('%smodules/point/icons/%s/%d.gif', Context::getRequestUri(), $config->level_icon, $level);
|
||||
|
||||
// 최고 레벨이 아니면 다음 레벨로 가기 위한 per을 구함 :: 주석과 실제 내용이 맞지 않아 실제 내용을 수정
|
||||
// Get per to go to the next level if not a top level
|
||||
if($level < $config->max_level) {
|
||||
$next_point = $config->level_step[$level+1];
|
||||
$present_point = $config->level_step[$level];
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
/**
|
||||
* @file resize_image.addon.php
|
||||
* @author NHN (developers@xpressengine.com)
|
||||
* @brief 본문내 이미지 조절 애드온
|
||||
* @brief Add-on to resize images in the body
|
||||
**/
|
||||
|
||||
if($called_position == 'after_module_proc' && Context::getResponseMethod()=="HTML") {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue