beta.0.1.6 배포를 위해 sandbox를 trunk로 복사

git-svn-id: http://xe-core.googlecode.com/svn/trunk@2640 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
zero 2007-09-20 07:03:26 +00:00
commit 27c535b12b
24 changed files with 170 additions and 72 deletions

View file

@ -64,6 +64,19 @@
return $output;
}
/**
* @brief 주어진 파일을 컴파일 바로 return
**/
function compileDirect($tpl_path, $tpl_filename) {
$this->tpl_path = $tpl_path;
$this->tpl_file = $tpl_file;
$tpl_file = $tpl_path.$tpl_filename;
if(!file_exists($tpl_file)) return;
return $this->_compileTplFile($tpl_file);
}
/**
* @brief tpl_file이 컴파일이 되어 있는 것이 있는지 체크
**/
@ -78,7 +91,7 @@
/**
* @brief tpl_file을 compile
**/
function _compileTplFile($tpl_file, $compiled_tpl_file) {
function _compileTplFile($tpl_file, $compiled_tpl_file = '') {
// tpl 파일을 읽음
$buff = FileHandler::readFile($tpl_file);
@ -112,7 +125,7 @@
// $buff = preg_replace('/ +/', ' ', $buff);
// 컴파일된 코드를 파일에 저장
FileHandler::writeFile($compiled_tpl_file, $buff);
if($compiled_tpl_file) FileHandler::writeFile($compiled_tpl_file, $buff);
return $buff;
}

View file

@ -478,13 +478,6 @@ function chkMemberMenu(evt) {
obj = obj.parentNode;
}
if(!obj || !obj.className || obj.className.search("member_")==-1) {
// IE6의 경우 닫았던 select박스를 모두 표시
if(xIE6) {
var list = xGetElementsByTagName("SELECT");
for (var i=0; i<list.length; i++) {
list[i].style.visibility = list[i].getAttribute("old_visibility");
}
}
return;
}
@ -550,15 +543,6 @@ function displayMemberMenu(ret_obj, response_tags, params) {
}
if(html) {
// IE6의 경우 select박스를 모두 숨겨버림
if(xIE6) {
var list = xGetElementsByTagName("SELECT");
for (var i=0; i<list.length; i++) {
list[i].setAttribute("old_visibility", list[i].style.visibility);
list[i].style.visibility = 'hidden';
}
}
// 레이어 출력
xInnerHtml('membermenuarea', "<div class=\"box\">"+html+"</div>");
xWidth(area, xWidth(area));

View file

@ -26,7 +26,7 @@
$lang->cmd_cancel = '取消';
$lang->cmd_back = '返回';
$lang->cmd_vote = '推荐';
$lang->cmd_copy = '副本';
$lang->cmd_copy = '复制';
$lang->cmd_move = '查看';
$lang->cmd_move_up = '向上';
$lang->cmd_move_down = '向下';
@ -37,8 +37,8 @@
$lang->cmd_select = '选择';
$lang->cmd_select_all = '全部选择';
$lang->cmd_unselect_all = '全部解除';
$lang->cmd_close_all = '全部关闭';
$lang->cmd_open_all = '全部开';
$lang->cmd_close_all = '全部折叠';
$lang->cmd_open_all = '全部开';
$lang->cmd_reload = '从新载入';
$lang->cmd_close = '关闭';
$lang->cmd_open = '打开';

View file

@ -14,7 +14,7 @@
* 내용은 제로보드XE의 버전을 관리자 페이지에 표시하기 위한 용도이며
* config.inc.php의 수정이 없더라도 공식 릴리즈시에 수정되어 함께 배포되어야
**/
define('__ZBXE_VERSION__', '0.1.5');
define('__ZBXE_VERSION__', '0.1.6');
/**
* @brief 디버깅 메세지 출력

View file

@ -518,8 +518,19 @@
$tree[$parent_srl][$category_srl] = $node;
}
// 세션 디렉토리 변경 구문
$php_script = "";
if(!ini_get('session.auto_start')) {
if(!is_dir("./files/sessions")) {
FileHandler::makeDir("./files/sessions");
@chmod("./files/sessions", 0777);
}
$php_script = 'session_cache_limiter("no-cache, must-revalidate"); ini_set("session.gc_maxlifetime", "18000"); if(is_dir("../../sessions")) session_save_path("../../sessions/"); session_start();';
}
// xml 캐시 파일 생성
$xml_buff = sprintf('<?php header("Content-Type: text/xml; charset=UTF-8"); header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); header("Cache-Control: no-store, no-cache, must-revalidate"); header("Cache-Control: post-check=0, pre-check=0", false); header("Pragma: no-cache"); @session_start(); ?><root>%s</root>', $this->getXmlTree($tree[0], $tree));
$xml_buff = sprintf('<?php %s header("Content-Type: text/xml; charset=UTF-8"); header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); header("Cache-Control: no-store, no-cache, must-revalidate"); header("Cache-Control: post-check=0, pre-check=0", false); header("Pragma: no-cache"); @session_start(); ?><root>%s</root>', $php_script, $this->getXmlTree($tree[0], $tree));
// 파일 저장
FileHandler::writeFile($xml_file, $xml_buff);

View file

@ -3,31 +3,37 @@
<grants>
<grant name="list" default="guest">
<title xml:lang="ko">목록</title>
<title xml:lang="zh-CN">目录</title>
<title xml:lang="en">list</title>
<title xml:lang="jp">リスト</title>
</grant>
<grant name="write_document" default="guest">
<title xml:lang="ko">글 작성</title>
<title xml:lang="zh-CN">发表新主题</title>
<title xml:lang="en">write document</title>
<title xml:lang="jp">書き込む</title>
</grant>
<grant name="write_comment" default="guest">
<title xml:lang="ko">댓글 작성</title>
<title xml:lang="zh-CN">发表评论</title>
<title xml:lang="en">write comment</title>
<title xml:lang="jp">コメント作成</title>
</grant>
<grant name="fileupload" default="guest">
<title xml:lang="ko">파일 첨부</title>
<title xml:lang="zh-CN">附件</title>
<title xml:lang="en">file upload</title>
<title xml:lang="jp">添付ファイル</title>
</grant>
<grant name="comment_fileupload" default="guest">
<title xml:lang="ko">댓글 파일 첨부</title>
<title xml:lang="zh-CN">评论附件</title>
<title xml:lang="en">comment file upload</title>
<title xml:lang="jp">コメントファイル添付</title>
</grant>
<grant name="manager" default="root">
<title xml:lang="ko">관리</title>
<title xml:lang="zh-CN">管理</title>
<title xml:lang="en">manager</title>
<title xml:lang="jp">管理</title>
</grant>

View file

@ -9,7 +9,7 @@
</grant>
<grant name="view" default="guest">
<title xml:lang="ko">열람</title>
<title xml:lang="zh-CN">浏览</title>
<title xml:lang="zh-CN">查看</title>
<title xml:lang="jp">閲覧</title>
<title xml:lang="en">view</title>
</grant>
@ -27,13 +27,13 @@
</grant>
<grant name="fileupload" default="guest">
<title xml:lang="ko">파일 첨부</title>
<title xml:lang="zh-CN">上传文</title>
<title xml:lang="zh-CN"></title>
<title xml:lang="jp">ファイル添付</title>
<title xml:lang="en">file upload</title>
</grant>
<grant name="comment_fileupload" default="guest">
<title xml:lang="ko">댓글 파일 첨부</title>
<title xml:lang="zh-CN">上传文</title>
<title xml:lang="zh-CN">评论附</title>
<title xml:lang="jp">コメントファイル添付</title>
<title xml:lang="en">comment file upload</title>
</grant>

View file

@ -4,7 +4,8 @@
* @author zero <zero@nzeo.com>
* @brief 评论(comment)模块语言包
**/
$lang->cmd_delete_checked_comment = '删除所选项目';
$lang->cmd_toggle_checked_comment = '反选';
$lang->cmd_delete_checked_comment = '删除所选';
$lang->msg_cart_is_null = '请选择要删除的评论。';
$lang->msg_checked_comment_is_deleted = '已删除%d个评论。';

View file

@ -270,18 +270,21 @@
return $oTrackbackModel->getTrackbackList($this->document_srl, $is_admin);
}
function thumbnailExists($width) {
if(!$this->getThumbnail($width)) return false;
function thumbnailExists($width, $height) {
if(!$this->getThumbnail($width, $height)) return false;
return true;
}
function getThumbnail($width = 80) {
function getThumbnail($width = 80, $height = 0) {
if(!$height) $height = $width;
// 문서의 이미지 첨부파일 위치를 구함
$document_path = sprintf('./files/attach/images/%d/%d/',$this->get('module_srl'), $this->get('document_srl'));
if(!is_dir($document_path)) FileHandler::makeDir($document_path);
// 썸네일 임시 파일명을 구함
$thumbnail_file = sprintf('%sthumbnail_%d.jpg', $document_path, $width);
if($width != $height) $thumbnail_file = sprintf('%sthumbnail_%dx%d.jpg', $document_path, $width, $height);
else $thumbnail_file = sprintf('%sthumbnail_%d.jpg', $document_path, $width);
// 썸네일이 있더라도 글의 수정시간과 비교해서 다르면 다시 생성함
if(file_exists($thumbnail_file)) {
@ -309,7 +312,7 @@
$filename = $file->uploaded_filename;
if(!file_exists($filename)) continue;
FileHandler::createImageFile($filename, $thumbnail_file, $width, $width, 'jpg');
FileHandler::createImageFile($filename, $thumbnail_file, $width, $height, 'jpg');
if(file_exists($thumbnail_file)) return Context::getRequestUri().$thumbnail_file;
}
}
@ -332,7 +335,7 @@
return;
}
FileHandler::createImageFile($tmp_file, $thumbnail_file, $width, $width, 'jpg');
FileHandler::createImageFile($tmp_file, $thumbnail_file, $width, $height, 'jpg');
@unlink($tmp_file);
return Context::getRequestUri().$thumbnail_file;

View file

@ -3,7 +3,7 @@
<grants>
<grant name="write_document" default="guest">
<title xml:lang="ko">글 작성</title>
<title xml:lang="zh-CN">发表新帖</title>
<title xml:lang="zh-CN">留言</title>
<title xml:lang="jp">書き込み作成</title>
</grant>
<grant name="write_comment" default="guest">

View file

@ -168,7 +168,7 @@
$lang->about_member_default = '将成为注册会员时的默认用户组。';
$lang->about_openid = '用OpenID注册时该网站只保存用户名和 邮件等基本信息密码和认证处理是在提供OpenID服务的站点中得到解决。';
$lang->about_openid_leave = '오픈아이디의 탈퇴는 현 사이트에서의 회원 정보를 삭제하는 것입니다.<br />탈퇴 후 로그인하시면 새로 가입하시는 것으로 되어 작성한 글에 대한 권한을 가질 수 없게 됩니다';
$lang->about_openid_leave = '删除OpenID就等于永久删除站内用户的信息。<br />被删除后的重新登录就等于新会员注册,因此对以前自己写的主题将失去相应权限。';
$lang->about_member = "可以添加/修改/删除会员及管理用户组或注册表单的会员管理模块。\n此模块不仅可以生成缺省用户组以外的其他用户组来管理会员,并且通过注册表单的管理获得除会员基本信息以外的扩展信息。";
?>
?>

View file

@ -0,0 +1,8 @@
<filter name="openid_leave_member" module="member" act="procMemberOpenIDLeave" confirm_msg_code="confirm_leave">
<form />
<parameter />
<response callback_func="completeLeave">
<tag name="error" />
<tag name="message" />
</response>
</filter>

View file

@ -0,0 +1,28 @@
{@ $member_title = $lang->msg_leave_member}
<!--#include("./common_header.html")-->
<!--%import("filter/openid_leave_member.xml")-->
<form id="fo_insert_member" action="./" method="get" onsubmit="return procFilter(this, openid_leave_member)">
<input type="hidden" name="mid" value="{$mid}" />
<input type="hidden" name="document_srl" value="{$document_srl}" />
<input type="hidden" name="page" value="{$page}" />
<table cellspacing="0" class="memberInfoTable gap1" title="$lang->msg_leave_member}">
<col width="140" />
<col />
<tr class="first-child">
<th scope="row">{$lang->user_id}</th>
<td>
{$member_info->user_id}
<p>{$lang->about_openid_leave}</p>
</td>
</tr>
</table>
<div class="help tCenter">
<span class="button"><input type="submit" value="{$lang->cmd_leave}" accesskey="s" /></span>
<a href="{getUrl('act','dispMemberInfo','member_srl','')}" class="button"><span>{$lang->cmd_back}</span></a>
</div>
</form>
<!--#include("./common_footer.html")-->

View file

@ -33,7 +33,7 @@
$lang->cmd_make_child = '添加下级菜单';
$lang->cmd_move_to_installed_list = "查看生成目录";
$lang->cmd_enable_move_menu = "移动菜单 (选择后用鼠标拖动)";
$lang->cmd_enable_move_menu = "菜单顺序(勾选后用鼠标拖动)";
$lang->cmd_search_mid = "查找 mid";
$lang->msg_cannot_delete_for_child = '有下级菜单的菜单不能删除。';

View file

@ -282,8 +282,19 @@
$tree[$parent_srl][$menu_item_srl] = $node;
}
// 세션 디렉토리 변경 구문
$php_script = "";
if(!ini_get('session.auto_start')) {
if(!is_dir("./files/sessions")) {
FileHandler::makeDir("./files/sessions");
@chmod("./files/sessions", 0777);
}
$php_script = 'session_cache_limiter("no-cache, must-revalidate"); ini_set("session.gc_maxlifetime", "18000"); if(is_dir("../../sessions")) session_save_path("../../sessions/"); session_start();';
}
// xml 캐시 파일 생성
$xml_buff = sprintf('<?php header("Content-Type: text/xml; charset=UTF-8"); header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); header("Cache-Control: no-store, no-cache, must-revalidate"); header("Cache-Control: post-check=0, pre-check=0", false); header("Pragma: no-cache"); @session_start(); ?><root>%s</root>', $this->getXmlTree($tree[0], $tree));
$xml_buff = sprintf('<?php %s header("Content-Type: text/xml; charset=UTF-8"); header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); header("Cache-Control: no-store, no-cache, must-revalidate"); header("Cache-Control: post-check=0, pre-check=0", false); header("Pragma: no-cache"); @session_start(); ?><root>%s</root>', $php_script, $this->getXmlTree($tree[0], $tree));
// php 캐시 파일 생성
$php_output = $this->getPhpCacheCode($tree[0], $tree);

View file

@ -3,6 +3,6 @@
<table name="menu_layout" />
</tables>
<conditions>
<condition operation="in" column="menu_srl" var="menu_srls" filter="number" notnull="notnull" />
<condition operation="in" column="menu_srl" var="menu_srls" notnull="notnull" />
</conditions>
</query>

View file

@ -245,7 +245,8 @@
$args->layout_srl = $layout_srl;
$args->menu_srls = implode(',',$menu_srl_list);
return executeQuery('module.updateModuleLayout', $args);
$output = executeQuery('module.updateModuleLayout', $args);
return $output;
}
}
?>

View file

@ -6,6 +6,6 @@
<column name="layout_srl" var="layout_srl" />
</columns>
<conditions>
<condition operation="in" column="menu_srl" var="menu_srls" filter="number" notnull="notnull"/>
<condition operation="in" column="menu_srl" var="menu_srls" notnull="notnull"/>
</conditions>
</query>

View file

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<module version="0.1">
<title xml:lang="ko">외부 페이지</title>
<title xml:lang="zh-CN">外页面</title>
<title xml:lang="zh-CN">页面</title>
<title xml:lang="jp">外でページ</title>
<title xml:lang="en">Outside Page</title>
<title xml:lang="es">Afuera Página</title>
@ -12,7 +12,7 @@
<name xml:lang="en">zero</name>
<name xml:lang="es">zero</name>
<description xml:lang="ko">외부페이지를 제로보드XE내부로 삽입시키는 모듈</description>
<description xml:lang="zh-CN">외부페이지를 제로보드XE내부로 삽입시키는 모듈</description>
<description xml:lang="zh-CN">可以把外部页面插入到 Zeroboard XE内部的模块。</description>
<description xml:lang="jp">외부페이지를 제로보드XE내부로 삽입시키는 모듈</description>
<description xml:lang="en">외부페이지를 제로보드XE내부로 삽입시키는 모듈</description>
<description xml:lang="es">외부페이지를 제로보드XE내부로 삽입시키는 모듈</description>

View file

@ -3,7 +3,7 @@
<grants>
<grant name="view" default="guest">
<title xml:lang="ko">열람</title>
<title xml:lang="zh-CN">浏览</title>
<title xml:lang="zh-CN">查看</title>
<title xml:lang="jp">閲覧</title>
<title xml:lang="en">view</title>
</grant>

View file

@ -21,9 +21,6 @@
function dispOpageIndex() {
// 권한 체크
if(!$this->grant->view) return $this->stop('msg_not_permitted');
// opage controller 생성
$oOpageController = &getController('opage');
// 외부 페이지 모듈의 정보를 구함
$oOpageModel = &getModel('opage');
@ -35,7 +32,22 @@
$caching_interval = $module_info->caching_interval;
// 캐시 파일 지정
$cache_file = sprintf("./files/cache/opage/%d.cache", $module_info->module_srl);
$cache_file = sprintf("./files/cache/opage/%d.cache.php", $module_info->module_srl);
// http 인지 내부 파일인지 점검
if(eregi("^http:\/\/",$path)) $content = $this->getHtmlPage($path, $caching_interval, $cache_file);
else $content = $this->executeFile($path, $caching_interval, $cache_file);
Context::set('opage_content', $content);
// 결과 출력 템플릿 지정
$this->setTemplateFile('content');
}
/**
* @brief 외부 http로 요청되는 파일일 경우 파일을 받아와서 저장 return
**/
function getHtmlPage($path, $caching_interval, $cache_file) {
// 캐시 검사
if($caching_interval > 0 && file_exists($cache_file) && filemtime($cache_file) + $caching_interval*60 > time()) {
@ -44,26 +56,16 @@
} else {
// 경로에 http://가 있는 경우와 없는 경우를 비교
if(eregi("^http:\/\/",$path)) {
FileHandler::getRemoteFile($path, $cache_file);
$content = FileHandler::readFile($cache_file);
// 서버 내부에 있는 경우
} elseif(file_exists($path)) {
ob_start();
@include($path);
$content = ob_get_contents();
ob_end_clean();
FileHandler::writeFile($cache_file, $content);
}
FileHandler::getRemoteFile($path, $cache_file);
$content = FileHandler::readFile($cache_file);
}
// opage controller 생성
$oOpageController = &getController('opage');
// 외부 서버의 페이지 일 경우 이미지, css, javascript등의 url을 변경
if(eregi("^http:\/\/",$path)) {
$content = $oOpageController->replaceSrc($content, $path);
}
$content = $oOpageController->replaceSrc($content, $path);
// 해당 문서를 utf-8로 변경
$buff->content = $content;
@ -82,10 +84,39 @@
$body_script = $oOpageController->getBodyScript($content);
if(!$body_script) $body_script = $content;
Context::set('opage_content', $body_script);
return $content;
}
// 결과 출력 템플릿 지정
$this->setTemplateFile('content');
/**
* @brief 내부 파일일 경우 include하도록 캐시파일을 만들고 처리
**/
function executeFile($path, $caching_interval, $cache_file) {
// 캐시 검사
if($caching_interval <1 || !file_exists($cache_file) || filemtime($cache_file) + $caching_interval*60 <= time()) {
if(file_exists($cache_file)) @unlink($cache_file);
// 경로와 파일이름을 구함
$tmp_path = explode('/',$path);
$filename = $tmp_path[count($tmp_path)-1];
$filepath = ereg_replace($filename."$","",$path);
// 컴파일 시도
$oTemplate = &TemplateHandler::getInstance();
$script = $oTemplate->compileDirect($filepath, $filename);
FileHandler::writeFile($cache_file, $script);
}
// include후 결과를 return
if(file_exists($cache_file)) {
ob_start();
@include($cache_file);
$content = ob_get_contents();
ob_end_clean();
}
return $content;
}
}

View file

@ -3,7 +3,7 @@
<grants>
<grant name="view" default="guest">
<title xml:lang="ko">열람</title>
<title xml:lang="zh-CN">浏览</title>
<title xml:lang="zh-CN">查看</title>
<title xml:lang="jp">閲覧</title>
<title xml:lang="en">view</title>
</grant>

View file

@ -44,13 +44,14 @@
</tbody>
</table>
</form>
<!-- 버튼 -->
<div class="fr gap1">
<span class="button"><input type="submit" value="{$lang->cmd_delete_checked_poll}" /></span>
</div>
</form>
<!-- 페이지 네비게이션 -->
<div class="pageNavigation">
<a href="{getUrl('page','','module_srl','')}" class="goToFirst"><img src="../../admin/tpl/images/bottomGotoFirst.gif" alt="{$lang->first_page}" width="7" height="5" /></a>

View file

@ -4,8 +4,8 @@
* @author zero <zero@nzeo.com>
* @brief 引用(trackback) 模块的基本语言包
**/
$lang->cmd_delete_checked_trackback = '删除所选项目';
$lang->cmd_toggle_checked_trackback = '反选';
$lang->cmd_delete_checked_trackback = '删除所选';
$lang->msg_cart_is_null = '请选择要删除的文章';
$lang->msg_checked_trackback_is_deleted = '已删除%d个引用';