mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-07 18:51:41 +09:00
스프링노트 모듈에서 pageid 지정시 해당 페이지만 보기 또는 해당 페이지부터 보기 옵션 기능 추가
git-svn-id: http://xe-core.googlecode.com/svn/sandbox@3382 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
6d1e27a3c4
commit
1fee1ce68f
10 changed files with 56 additions and 3 deletions
|
|
@ -9,6 +9,9 @@
|
|||
$lang->springnote_openid = "OpenID";
|
||||
$lang->springnote_userkey = "User Key";
|
||||
$lang->springnote_pageid = "Page Number";
|
||||
$lang->springnote_pageid_setup = '페이지 번호 설정';
|
||||
$lang->springnote_pageid_option_only = '지정된 페이지만 보여주기 (목록 보이지 않음)';
|
||||
$lang->springnote_pageid_option_list = '지정된 페이지부터 보이기 (목록 보임)';
|
||||
$lang->springnote_domain = "도메인 지정";
|
||||
|
||||
$lang->page_url = "Original URL";
|
||||
|
|
@ -22,5 +25,6 @@
|
|||
$lang->about_springnote_openid = "Please input your OpenID that created Springnote";
|
||||
$lang->about_springnote_userkey = 'User Key is needed to enable Springnote module.<br />Please input generated User Key after entering your OpenID at [<a href="https://api.openmaru.com/delegate_key/springnote?app_id=www.zeroboard.com&openid=" onclick="window.open(this.href);return false;">Get User Key</a>] .';
|
||||
$lang->about_springnote_pageid = 'Please input pageid if you want to display specific page first.';
|
||||
$lang->about_springnote_pageid_setup = '페이지 번호 지정시 해당 페이지만 보이기(목록 비포함), 해당 페이지부터 보이기(목록 포함)등을 지정할 수 있습니다';
|
||||
$lang->about_springnote_domain = '자신의 스프링노트가 아닌 다른 도메인의 스프링노트를 입력할 수 있습니다. (http://도메인.springnote.com 에서 도메인값만 입력해주세요)';
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -9,6 +9,9 @@
|
|||
$lang->springnote_openid = "オープンID";
|
||||
$lang->springnote_userkey = "ユーザーKey";
|
||||
$lang->springnote_pageid = "ページ番号";
|
||||
$lang->springnote_pageid_setup = '페이지 번호 설정';
|
||||
$lang->springnote_pageid_option_only = '지정된 페이지만 보여주기 (목록 보이지 않음)';
|
||||
$lang->springnote_pageid_option_list = '지정된 페이지부터 보이기 (목록 보임)';
|
||||
$lang->springnote_domain = "도메인 지정";
|
||||
|
||||
$lang->page_url = "元のURL";
|
||||
|
|
@ -22,5 +25,6 @@
|
|||
$lang->about_springnote_openid = "スプリングノートでページを作成したオープンIDを入力してください。";
|
||||
$lang->about_springnote_userkey = 'スプリングノートとの連動するためのユーザKeyを入力してください。<br />[<a href="https://api.openmaru.com/delegate_key/springnote?app_id=www.zeroboard.com&openid=" onclick="window.open(this.href);return false;">ユーザーキー受信</a>]をクリックして入力して生成されるキーの値を入力してください。';
|
||||
$lang->about_springnote_pageid = '使用するスプリングノートの中の特定ページを出力したい場合、「pageid」の値を入力してください。';
|
||||
$lang->about_springnote_pageid_setup = '페이지 번호 지정시 해당 페이지만 보이기(목록 비포함), 해당 페이지부터 보이기(목록 포함)등을 지정할 수 있습니다';
|
||||
$lang->about_springnote_domain = '자신의 스프링노트가 아닌 다른 도메인의 스프링노트를 입력할 수 있습니다. (http://도메인.springnote.com 에서 도메인값만 입력해주세요)';
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -9,6 +9,9 @@
|
|||
$lang->springnote_openid = "오픈아이디";
|
||||
$lang->springnote_userkey = "사용자 Key";
|
||||
$lang->springnote_pageid = "페이지 번호";
|
||||
$lang->springnote_pageid_setup = '페이지 번호 설정';
|
||||
$lang->springnote_pageid_option_only = '지정된 페이지만 보여주기 (목록 보이지 않음)';
|
||||
$lang->springnote_pageid_option_list = '지정된 페이지부터 보이기 (목록 보임)';
|
||||
$lang->springnote_domain = "도메인 지정";
|
||||
|
||||
$lang->page_url = "원본 URL";
|
||||
|
|
@ -22,5 +25,6 @@
|
|||
$lang->about_springnote_openid = "스프링노트에서 페이지를 제작한 오픈아이디를 입력해주세요";
|
||||
$lang->about_springnote_userkey = '스프링노트 연동을 위한 사용자 Key값을 입력해주셔야 합니다.<br />[<a href="https://api.openmaru.com/delegate_key/springnote?app_id=www.zeroboard.com&openid=" onclick="window.open(this.href);return false;">사용자 키 받기</a>] 를 클릭하셔서 오픈아이디를 입력하시고 생성되는 키값을 입력해주세요.';
|
||||
$lang->about_springnote_pageid = '사용하시려는 스프링노트 중 특정 페이지를 먼저 출력하고자 하실때 pageid값을 입력해주세요';
|
||||
$lang->about_springnote_pageid_setup = '페이지 번호 지정시 해당 페이지만 보이기(목록 비포함), 해당 페이지부터 보이기(목록 포함)등을 지정할 수 있습니다';
|
||||
$lang->about_springnote_domain = '자신의 스프링노트가 아닌 다른 도메인의 스프링노트를 입력할 수 있습니다. (http://도메인.springnote.com 에서 도메인값만 입력해주세요)';
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -9,6 +9,9 @@
|
|||
$lang->springnote_openid = "Открытый ID";
|
||||
$lang->springnote_userkey = "Ключ юзера";
|
||||
$lang->springnote_pageid = "Номер страницы";
|
||||
$lang->springnote_pageid_setup = '페이지 번호 설정';
|
||||
$lang->springnote_pageid_option_only = '지정된 페이지만 보여주기 (목록 보이지 않음)';
|
||||
$lang->springnote_pageid_option_list = '지정된 페이지부터 보이기 (목록 보임)';
|
||||
$lang->springnote_domain = "도메인 지정";
|
||||
|
||||
$lang->page_url = "Оригинальный URL";
|
||||
|
|
@ -22,5 +25,6 @@
|
|||
$lang->about_springnote_openid = "Пожалуйста, введите Ваш OpenID, который создал Springnote.";
|
||||
$lang->about_springnote_userkey = 'Ключ юзера нужен для того, чтобы включить Springnote модуль.<br />Пожалуйста, введите сгенерированный Ключ Юзера после ввода Вашего OpenID на [<a href="https://api.openmaru.com/delegate_key/springnote?app_id=www.zeroboard.com&openid=" onclick="window.open(this.href);return false;">Получить Ключ Юзера</a>] .';
|
||||
$lang->about_springnote_pageid = 'Пожалуйста, введите pageid, если вы хотите отобразить определенную страницу сначала.';
|
||||
$lang->about_springnote_pageid_setup = '페이지 번호 지정시 해당 페이지만 보이기(목록 비포함), 해당 페이지부터 보이기(목록 포함)등을 지정할 수 있습니다';
|
||||
$lang->about_springnote_domain = '자신의 스프링노트가 아닌 다른 도메인의 스프링노트를 입력할 수 있습니다. (http://도메인.springnote.com 에서 도메인값만 입력해주세요)';
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -101,6 +101,7 @@
|
|||
<!--@end-->
|
||||
|
||||
<!-- 전체 목록 -->
|
||||
<!--@if($pages)-->
|
||||
<div class="pageSearch">
|
||||
<form action="./" method="get">
|
||||
<input type="hidden" name="mid" value="{$mid}" />
|
||||
|
|
@ -117,6 +118,7 @@
|
|||
{@ $_idx++}
|
||||
<!--@end-->
|
||||
</div>
|
||||
<!--@end-->
|
||||
|
||||
<!-- 하단 텍스트 출력 -->
|
||||
{$module_info->footer_text}
|
||||
|
|
|
|||
|
|
@ -111,7 +111,7 @@
|
|||
/**
|
||||
* @brief springnote 페이지 목록 가져오기
|
||||
**/
|
||||
function getPages($query = null, $fulltext = true) {
|
||||
function getPages($query = null, $fulltext = true, $p_pageid = 0) {
|
||||
|
||||
if($query) {
|
||||
if($this->domain) $url = sprintf('%s&q=%s&fulltext=%d', $this->getUrl(), urlencode($query), $fulltext?1:0);
|
||||
|
|
@ -154,6 +154,8 @@
|
|||
else $root->child[] = &$pages[$pageid];
|
||||
}
|
||||
|
||||
if($p_pageid) $this->getNodes($root->child, $p_pageid, $root);
|
||||
|
||||
$pages = array();
|
||||
$this->arrangePages($pages, $root->child, 0);
|
||||
|
||||
|
|
@ -162,6 +164,21 @@
|
|||
return $pages;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 특정 노드아래만 검색을 하기 위할때 해당 노드의 page_id를 받아서 해당 노드tree만 리턴
|
||||
**/
|
||||
function getNodes($list, $p_pageid, &$root) {
|
||||
if(!count($list)) return;
|
||||
foreach($list as $key => $val) {
|
||||
if($val->pageid == $p_pageid) {
|
||||
$root = $val;
|
||||
return;
|
||||
}
|
||||
|
||||
if($val->child) $this->getNodes($val->child, $p_pageid, $root);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 스프링노트 서버에서 보내준 페이지를 정렬
|
||||
**/
|
||||
|
|
|
|||
|
|
@ -38,7 +38,8 @@
|
|||
if(!$this->grant->list) return $this->dispSpringnoteMessage('msg_not_permitted');
|
||||
|
||||
$pageid = (int)Context::get('pageid');
|
||||
if(!$pageid) $pageid = $this->module_info->pageid;
|
||||
if($this->module_info->pageid && $this->module_info->pageid_option != 'list') $pageid = $this->module_info->pageid;
|
||||
if(!$pageid && $this->module_info->pageid) $pageid = $this->module_info->pageid;
|
||||
|
||||
$q = Context::get('q');
|
||||
|
||||
|
|
@ -55,7 +56,11 @@
|
|||
}
|
||||
|
||||
// 페이지 목록 가져오기
|
||||
$pages = $oSpringnoteModel->getPages($q, true);
|
||||
if($this->module_info->pageid && $this->module_info->pageid_option != 'list') $pages = null;
|
||||
else {
|
||||
if($this->module_info->pageid && $this->module_info->pageid_option == 'list') $pages = $oSpringnoteModel->getPages($q, true, $this->module_info->pageid);
|
||||
else $pages = $oSpringnoteModel->getPages($q, true);
|
||||
}
|
||||
|
||||
Context::set('page', $page);
|
||||
Context::set('pages', $pages);
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@
|
|||
<param name="openid" target="springnote_openid" />
|
||||
<param name="userkey" target="springnote_userkey" />
|
||||
<param name="pageid" target="springnote_pageid" />
|
||||
<param name="pageid_option" target="springnote_pageid_option" />
|
||||
<param name="domain" target="springnote_domain" />
|
||||
<param name="springnote_name" target="mid" />
|
||||
<param name="module_srl" target="module_srl" />
|
||||
|
|
|
|||
|
|
@ -25,6 +25,10 @@
|
|||
<th scope="row">{$lang->springnote_pageid}</th>
|
||||
<td>{$module_info->pageid} </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">{$lang->springnote_pageid_setup}</th>
|
||||
<td><!--@if($module_info->pageid_option!='list')-->{$lang->springnote_pageid_option_only}<!--@else-->{$lang->springnote_pageid_option_list}<!--@end--></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">{$lang->springnote_domain}</th>
|
||||
<td>{$module_info->domain} </td>
|
||||
|
|
|
|||
|
|
@ -65,6 +65,14 @@
|
|||
<p>{$lang->about_springnote_pageid}</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">{$lang->springnote_pageid_setup}</th>
|
||||
<td>
|
||||
<p><input type="radio" name="springnote_pageid_option" value="only" <!--@if($module_info->pageid_option!='list')-->checked="checked"<!--@end--> id="springnote_pageid_option_only" /> <label for="springnote_pageid_option_only">{$lang->springnote_pageid_option_only}</label></p>
|
||||
<p><input type="radio" name="springnote_pageid_option" value="list" <!--@if($module_info->pageid_option=='list')-->checked="checked"<!--@end--> id="springnote_pageid_option_list" /> <label for="springnote_pageid_option_list">{$lang->springnote_pageid_option_list}</label></p>
|
||||
<p>{$lang->about_springnote_pageid_setup}</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">{$lang->springnote_domain}</th>
|
||||
<td>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue