mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-22 04:39:55 +09:00
제로보드 이전 모듈 보완
git-svn-id: http://xe-core.googlecode.com/svn/trunk@2274 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
988a44756f
commit
6b6303ff79
11 changed files with 48 additions and 24 deletions
|
|
@ -48,8 +48,8 @@
|
|||
{$module_category[$val->module_category_srl]->title}
|
||||
<!--@end-->
|
||||
</td>
|
||||
<td><a href="{getUrl('act','dispBoardAdminBoardInfo','module_srl',$val->module_srl)}" class="blue">{$val->mid}</a></td>
|
||||
<td>{htmlspecialchars($val->browser_title)}</td>
|
||||
<td><div class="tLeft"><a href="{getUrl('act','dispBoardAdminBoardInfo','module_srl',$val->module_srl)}" class="blue">{$val->mid}</a></div></td>
|
||||
<td><div class="tLeft">{htmlspecialchars($val->browser_title)}</div></td>
|
||||
<td class="tahoma">{$val->is_default}</td>
|
||||
<td class="tahoma">{$val->skin}</td>
|
||||
<td class="tahoma">{$val->admin_id}</td>
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
<column name="category_srl" var="category_srl" filter="number" default="0" />
|
||||
<column name="is_notice" var="is_notice" notnull="notnull" default="N" />
|
||||
<column name="is_secret" var="is_secret" notnull="notnull" default="N" />
|
||||
<column name="title" var="title" notnull="notnull" minlength="2" maxlength="250" />
|
||||
<column name="title" var="title" notnull="notnull" minlength="1" maxlength="250" />
|
||||
<column name="content" var="content" notnull="notnull" />
|
||||
<column name="readed_count" var="readed_count" default="0" />
|
||||
<column name="voted_count" var="voted_count" default="0" />
|
||||
|
|
|
|||
|
|
@ -23,6 +23,7 @@
|
|||
var $default_group_srl = 0;
|
||||
|
||||
var $module_srl = 0;
|
||||
var $target_path = 0;
|
||||
var $category_srl = 0;
|
||||
var $category_list = array();
|
||||
var $msg = null;
|
||||
|
|
@ -103,6 +104,8 @@
|
|||
|
||||
// 변수 체크
|
||||
$this->module_srl = Context::get('module_srl');
|
||||
$this->target_path = Context::get('target_path');
|
||||
if(substr($this->target_path,-1)!="/") $this->target_path .= "/";
|
||||
$this->category_srl = Context::get('category_srl');
|
||||
$xml_file = Context::get('xml_file');
|
||||
$this->start_position = $this->position = (int)Context::get('position');
|
||||
|
|
@ -166,12 +169,12 @@
|
|||
$str = fgets($fp,1024);
|
||||
$buff .= $str;
|
||||
|
||||
$buff = preg_replace_callback("!<root([^>]*)>!is", array($this, '_parseRootInfo'), trim($buff));
|
||||
$buff = preg_replace_callback("!<member user_id=\"([^\"]*)\">(.*?)<\/member>!is", array($this, '_importMember'), trim($buff));
|
||||
$buff = preg_replace_callback("!<root([^>]*)>!is", array($this, '_parseRootInfo'), $buff);
|
||||
$buff = preg_replace_callback("!<member user_id=\"([^\"]*)\">(.*?)<\/member>!is", array($this, '_importMember'), $buff);
|
||||
|
||||
if($this->start_position+$this->limit_count <= $this->position) {
|
||||
$is_finished = false;
|
||||
$this->file_point = ftell($fp);
|
||||
$this->file_point = ftell($fp) - strlen($buff);;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -262,6 +265,14 @@
|
|||
$this->oCommentController = &getController('comment');
|
||||
$this->oTrackbackController = &getController('trackback');
|
||||
|
||||
$oDocumentModel = &getModel('document');
|
||||
$tmp_category_list = $oDocumentModel->getCategoryList($this->module_srl);
|
||||
if(count($tmp_category_list)) {
|
||||
foreach($tmp_category_list as $key => $val) $this->category_list[$val->title] = $key;
|
||||
} else {
|
||||
$this->category_list = array();
|
||||
}
|
||||
|
||||
$is_finished = true;
|
||||
|
||||
$fp = @fopen($xml_file, "r");
|
||||
|
|
@ -271,13 +282,13 @@
|
|||
while(!feof($fp)) {
|
||||
$str = fread($fp,1024);
|
||||
$buff .= $str;
|
||||
$buff = preg_replace_callback("!<root([^>]*)>!is", array($this, '_parseRootInfo'), trim($buff));
|
||||
if(!$this->category_srl) $buff = preg_replace_callback("!<categories>(.*?)</categories>!is", array($this, '_parseCategoryInfo'), trim($buff));
|
||||
$buff = preg_replace_callback("!<document sequence=\"([^\"]*)\">(.*?)<\/document>!is", array($this, '_importDocument'), trim($buff));
|
||||
$buff = preg_replace_callback("!<root([^>]*)>!is", array($this, '_parseRootInfo'), $buff);
|
||||
if(!$this->category_srl) $buff = preg_replace_callback("!<categories>(.*?)</categories>!is", array($this, '_parseCategoryInfo'), $buff);
|
||||
$buff = preg_replace_callback("!<document sequence=\"([^\"]*)\">(.*?)<\/document>!is", array($this, '_importDocument'), $buff);
|
||||
|
||||
if($this->start_position+$this->limit_count <= $this->position) {
|
||||
$is_finished = false;
|
||||
$this->file_point = ftell($fp);
|
||||
$this->file_point = ftell($fp) - strlen($buff);;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -312,7 +323,8 @@
|
|||
}
|
||||
|
||||
if(file_exists($path)) {
|
||||
@copy($path, $tmp_filename);
|
||||
if(!eregi("^http",$this->target_path)) @copy($this->target_path.$path, $tmp_filename);
|
||||
else FileHandler::getRemoteFile($this->target_path.$path, $tmp_filename);
|
||||
$file_info['tmp_name'] = $tmp_filename;
|
||||
$file_info['name'] = $filename;
|
||||
$this->oFileController->insertFile($file_info, $this->module_srl, $args->document_srl, $download_count, true);
|
||||
|
|
@ -452,14 +464,6 @@
|
|||
|
||||
if(!is_array($category_list)) $category_list = array($category_list);
|
||||
|
||||
$oDocumentModel = &getModel('document');
|
||||
$tmp_category_list = $oDocumentModel->getCategoryList($this->module_srl);
|
||||
if(count($tmp_category_list)) {
|
||||
foreach($tmp_category_list as $key => $val) $this->category_list[$val->title] = $key;
|
||||
} else {
|
||||
$this->category_list = array();
|
||||
}
|
||||
|
||||
$oDocumentController = &getAdminController('document');
|
||||
|
||||
foreach($category_list as $key => $val) {
|
||||
|
|
|
|||
|
|
@ -47,4 +47,6 @@
|
|||
$lang->about_type_module = 'If you are transfering the board or articles information, select this option';
|
||||
$lang->about_type_syncmember = 'If you are trying to synchronize the member information after transfering member and article information, select this option';
|
||||
$lang->about_importer = "You can transfer Zeroboard4, Zeroboard5 Beta or other program's data into ZeroboardXE's data.\nIn order to tranfer, you have to use <a href=\"#\" onclick=\"winopen('');return false;\">XML Exporter</a> to convert the data you want into XML File then upload it.";
|
||||
|
||||
$lang->about_target_path = "첨부파일을 받기 위해 제로보드4가 설치된 위치를 입력해주세요.\n같은 서버에 있을 경우 /home/아이디/public_html/bbs 등과 같이 제로보드4의 위치를 입력하시고\n다른 서버일 경우 http://도메인/bbs 처럼 제로보드가 설치된 곳의 url을 입력해주세요";
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -47,4 +47,6 @@
|
|||
$lang->about_type_module = 'データ変換の対象が書き込みデータである場合は選択してください。';
|
||||
$lang->about_type_syncmember = '会員情報と書き込みデータなどの変換を行った後、会員情報を同期化する必要がある場合は、選択してください。';
|
||||
$lang->about_importer = "ゼロボード4、zb5betaまたは他のプログラムの書き込みデータをゼロボードXEのデータに変換することができます。\n変換するためには、<a href=\"#\" onclick=\"winopen('');return false;\">XML Exporter</a>を利用して変換したい書き込みデータをXMLファイルで作成してアップロードしてください。";
|
||||
|
||||
$lang->about_target_path = "첨부파일을 받기 위해 제로보드4가 설치된 위치를 입력해주세요.\n같은 서버에 있을 경우 /home/아이디/public_html/bbs 등과 같이 제로보드4의 위치를 입력하시고\n다른 서버일 경우 http://도메인/bbs 처럼 제로보드가 설치된 곳의 url을 입력해주세요";
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@
|
|||
1 => 'Step 1. 이전 대상 선택',
|
||||
12 => 'Step 1-2. 대상 모듈 선택',
|
||||
13 => 'Step 1-3. 대상 분류 선택',
|
||||
2 => 'Step 2. XML파일 업로드',
|
||||
2 => 'Step 2. XML파일 지정',
|
||||
3 => 'Step 2. 회원정보와 게시물의 정보 동기화',
|
||||
);
|
||||
|
||||
|
|
@ -30,7 +30,7 @@
|
|||
1 => '이전을 하려는 XML파일의 종류를 선택해주세요.',
|
||||
12 => '데이터 이전을 할 대상 모듈을 선택해주세요.',
|
||||
13 => '데이터 이전을 할 대상 분류를 선택해주세요.',
|
||||
2 => "데이터 이전을 할 XML파일의 위치를 입력해주세요.\n같은 계정일 경우 상대 또는 절대 경로를, 다른 서버에 업로드 되어 있으면 http://주소.. 를 입력해주세요",
|
||||
2 => "데이터 이전을 할 XML파일의 경로를 입력해주세요.\n상대 또는 절대 경로를 입력하시면 됩니다",
|
||||
3 => '회원정보와 게시물의 정보가 이전후에 맞지 않을 수 있습니다. 이 때 동기화를 하시면 user_id를 기반으로 올바르게 동작하도록 합니다.',
|
||||
);
|
||||
|
||||
|
|
@ -47,4 +47,6 @@
|
|||
$lang->about_type_module = '데이터 이전 대상이 게시판등의 게시물 정보일 경우 선택해주세요';
|
||||
$lang->about_type_syncmember = '회원정보와 게시물정보등을 이전후 회원정보 동기화 해야 할때 선택해주세요';
|
||||
$lang->about_importer = "제로보드4, zb5beta 또는 다른 프로그램의 데이터를 제로보드XE 데이터로 이전할 수 있습니다.\n이전을 위해서는 <a href=\"#\" onclick=\"winopen('');return false;\">XML Exporter</a>를 이용해서 원하는 데이터를 XML파일로 생성후 업로드해주셔야 합니다.";
|
||||
|
||||
$lang->about_target_path = "첨부파일을 받기 위해 제로보드4가 설치된 위치를 입력해주세요.\n같은 서버에 있을 경우 /home/아이디/public_html/bbs 등과 같이 제로보드4의 위치를 입력하시고\n다른 서버일 경우 http://도메인/bbs 처럼 제로보드가 설치된 곳의 url을 입력해주세요";
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -47,4 +47,6 @@
|
|||
$lang->about_type_module = '数据导入对象是版面主题时请选择';
|
||||
$lang->about_type_syncmember = '会员信息和文章信息导入后需要同步会员信息时请选择。';
|
||||
$lang->about_importer = "不仅可以导入Zeroboard 4,Zb5beta的数据,也可以把其他程序数据导入到Zeroboard XE当中。\n导入数据时请利用 <a href=\"#\" onclick=\"winopen('');return false;\">XML Exporter</a>生成XML文件后再上传。";
|
||||
|
||||
$lang->about_target_path = "첨부파일을 받기 위해 제로보드4가 설치된 위치를 입력해주세요.\n같은 서버에 있을 경우 /home/아이디/public_html/bbs 등과 같이 제로보드4의 위치를 입력하시고\n다른 서버일 경우 http://도메인/bbs 처럼 제로보드가 설치된 곳의 url을 입력해주세요";
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
<filter name="step12" module="importer" act="procImporterAdminStep12">
|
||||
<form>
|
||||
<node target="target_module" required="true" />
|
||||
<node target="target_path" required="true" />
|
||||
</form>
|
||||
<parameter />
|
||||
<response callback_func="completeStep12">
|
||||
|
|
|
|||
|
|
@ -48,6 +48,13 @@
|
|||
</select>
|
||||
</div>
|
||||
|
||||
<br />
|
||||
<div class="desc">{nl2br($lang->about_target_path)}</div>
|
||||
<div>
|
||||
Path/URL : <input type="text" name="target_path" id="target_path" class="inputTypeText w400" />
|
||||
</div>
|
||||
|
||||
|
||||
<div class="tRight gap1">
|
||||
<span class="button"><input type="submit" value="{$lang->cmd_next}" /></span>
|
||||
</div>
|
||||
|
|
@ -76,6 +83,7 @@
|
|||
<div id="step2" style="display:none">
|
||||
<form action="./" method="get" onsubmit="return doStep2(this)" id="fo_step2">
|
||||
<input type="hidden" name="module_srl" value="" />
|
||||
<input type="hidden" name="target_path" value="" />
|
||||
<input type="hidden" name="category_srl" value="" />
|
||||
<input type="hidden" name="position" value="0" />
|
||||
<input type="hidden" name="file_point" value="0" />
|
||||
|
|
|
|||
|
|
@ -75,6 +75,9 @@ function doStep2(fo_obj) {
|
|||
fo_obj.category_srl.value = category_srl;
|
||||
}
|
||||
|
||||
var target_path = xGetElementById("target_path").value;
|
||||
fo_obj.target_path.value = target_path;
|
||||
|
||||
procFilter(fo_obj, import_xml);
|
||||
|
||||
|
||||
|
|
@ -100,7 +103,7 @@ function completeImport(ret_obj) {
|
|||
|
||||
if(is_finished=='Y') {
|
||||
alert(ret_obj["message"]);
|
||||
location.href = location.href;
|
||||
//location.href = location.href;
|
||||
} else {
|
||||
var fo_obj = xGetElementById('fo_step2');
|
||||
fo_obj.position.value = position;
|
||||
|
|
|
|||
|
|
@ -9,8 +9,8 @@
|
|||
<column name="password" var="password" notnull="notnull" />
|
||||
<column name="email_id" var="email_id" notnull="notnull" />
|
||||
<column name="email_host" var="email_host" notnull="notnull" />
|
||||
<column name="user_name" var="user_name" notnull="notnull" minlength="2" maxlength="40" />
|
||||
<column name="nick_name" var="nick_name" notnull="notnull" minlength="2" maxlength="40" />
|
||||
<column name="user_name" var="user_name" notnull="notnull" minlength="1" maxlength="40" />
|
||||
<column name="nick_name" var="nick_name" notnull="notnull" minlength="1" maxlength="40" />
|
||||
<column name="homepage" var="homepage" />
|
||||
<column name="blog" var="blog" />
|
||||
<column name="birthday" var="birthday" />
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue