mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-25 22:29:55 +09:00
Syndication API를 XE Core에 추가
git-svn-id: http://xe-core.googlecode.com/svn/sandbox@7640 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
ee1fc6237a
commit
1675d4c8d9
38 changed files with 1025 additions and 0 deletions
16
modules/syndication/tpl/channel.html
Normal file
16
modules/syndication/tpl/channel.html
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
{'<?xml version="1.0" encoding="utf-8"?>'}
|
||||
|
||||
<feed xmlns="http://www.w3.org/2005/Atom">
|
||||
<!--#include("./include.channel.html")-->
|
||||
<!--@if($articles->list)-->
|
||||
<!--@if($articles->next_url)--><link rel="next-in-thread" href="{htmlspecialchars($articles->next_url)}" /><!--@end-->
|
||||
<!--@foreach($articles->list as $key => $article)-->
|
||||
<!--#include("./include.articles.html")-->
|
||||
<!--@end-->
|
||||
<!--@elseif($deleted->list)-->
|
||||
<!--@if($deleted->next_url)--><link rel="next-in-thread" href="{htmlspecialchars($deleted->next_url)}" /><!--@end-->
|
||||
<!--@foreach($deleted->list as $key => $delete)-->
|
||||
<!--#include("./include.deleted.html")-->
|
||||
<!--@end-->
|
||||
<!--@end-->
|
||||
</feed>
|
||||
5
modules/syndication/tpl/channel.info.html
Normal file
5
modules/syndication/tpl/channel.info.html
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
{'<?xml version="1.0" encoding="utf-8"?>'}
|
||||
|
||||
<entry xmlns="http://www.w3.org/2005/Atom">
|
||||
<!--#include("./include.channel.html")-->
|
||||
</entry>
|
||||
56
modules/syndication/tpl/config.html
Normal file
56
modules/syndication/tpl/config.html
Normal file
|
|
@ -0,0 +1,56 @@
|
|||
<!--%import("css/syndication.css")-->
|
||||
<!--%import("js/syndication.js")-->
|
||||
<!--%import("filter/insert_service.xml")-->
|
||||
|
||||
<h3 class="xeAdmin">{$lang->syndication} <span class="gray">{$lang->cmd_management}</span></h3>
|
||||
<p class="summary">{$lang->about_syndication}</p>
|
||||
|
||||
<form action="./" method="get" onsubmit="return procFilter(this, insert_service);">
|
||||
<input type="hidden" name="year" value="{$year}" />
|
||||
<table cellspacing="0" class="rowTable">
|
||||
<tr>
|
||||
<th scope="row"><div>{$lang->my_syndication_url}</div></th>
|
||||
<td>
|
||||
http://<input type="text" name="site_url" value="{$site_url}" class="inputTypeText siteUrl" />
|
||||
<p>{$lang->about_my_syndication_url}</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><div>{$lang->syndication_service}</div></th>
|
||||
<td>
|
||||
<ul class="syndiService">
|
||||
<!--@foreach($services as $key => $val)-->
|
||||
<li>
|
||||
<input type="checkbox" name="target_services" value="{$val->service}" id="target_service_{$val->service}" <!--@if($val->selected)-->checked="checked"<!--@end--> />
|
||||
<label for="target_service_{$val->service}">{$val->service}</label>
|
||||
</li>
|
||||
<!--@end-->
|
||||
</ul>
|
||||
<p>{$lang->about_syndication}</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><div>{$lang->except_module}</div></th>
|
||||
<td>
|
||||
<select name="_except_module" id="_except_module" size="10" class="exceptModuleList">
|
||||
{@$except_module_srls = array()}
|
||||
<!--@foreach($except_module as $v)-->
|
||||
{@$except_module_srls[] = $v->module_srl}
|
||||
<option value="{$v->module_srl}">{$v->browser_title} ({$v->mid})</option>
|
||||
<!--@end-->
|
||||
</select>
|
||||
<ul class="midCommand">
|
||||
<li><a href="{getUrl('','module','module','act','dispModuleSelectList','id','except_module')}" onclick="popopen(this.href, 'ModuleSelect');return false;" class="button blue"><span>{$lang->cmd_insert}</span></a></li>
|
||||
<li><a href="#" onclick="removeExceptModule('except_module');return false;" class="button red"><span>{$lang->cmd_delete}</span></a></li>
|
||||
</ul>
|
||||
<p>{$lang->about_except_module}</p>
|
||||
<input type="hidden" name="except_module" id="except_module" value="{implode(',',$except_module_srls)}" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th colspan="2" class="button">
|
||||
<span class="button black strong"><input type="submit" value="{$lang->cmd_apply}" accesskey="s" /></span>
|
||||
</th>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
8
modules/syndication/tpl/css/syndication.css
Normal file
8
modules/syndication/tpl/css/syndication.css
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
@charset "utf-8";
|
||||
|
||||
input.siteUrl { width:400px; }
|
||||
ul.syndiService { list-style:none; margin:0; padding:0;}
|
||||
ul.syndiService li { padding:10px 0; margin:0;}
|
||||
select.exceptModuleList { width:400px; }
|
||||
ul.midCommand { margin:20px 0 0 0; padding:0; list-style:none; }
|
||||
ul.midCommand li { display:inline; margin:0 20px 0 0; padding:0;}
|
||||
5
modules/syndication/tpl/error.html
Normal file
5
modules/syndication/tpl/error.html
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
{'<?xml version="1.0" encoding="utf-8"?>'}
|
||||
<feed xmlns="http://www.w3.org/2005/Atom">
|
||||
<error>-1</error>
|
||||
<message>{$message}</message>
|
||||
</feed>
|
||||
8
modules/syndication/tpl/filter/insert_service.xml
Normal file
8
modules/syndication/tpl/filter/insert_service.xml
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
<filter name="insert_service" module="syndication" act="procSyndicationAdminInsertService" confirm_msg_code="confirm_submit">
|
||||
<form />
|
||||
<parameter />
|
||||
<response>
|
||||
<tag name="error" />
|
||||
<tag name="message" />
|
||||
</response>
|
||||
</filter>
|
||||
14
modules/syndication/tpl/include.articles.html
Normal file
14
modules/syndication/tpl/include.articles.html
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
|
||||
<entry>
|
||||
<id>{htmlspecialchars($article->id)}</id>
|
||||
<title>{htmlspecialchars($article->title)}</title>
|
||||
<updated>{$article->updated}</updated>
|
||||
<link rel="alternative" href="{$article->alternative_href}" />
|
||||
<link rel="channel" href="{htmlspecialchars($article->channel_id)}" />
|
||||
<link rel="channel-alternative" href="{$article->channel_alternative_href}" />
|
||||
<published>{date('Y-m-d\TH:i:s',ztime($article->regdate)).$time_zone}</published>
|
||||
<author>
|
||||
<name>{htmlspecialchars($article->nick_name)}</name>
|
||||
</author>
|
||||
<content>{htmlspecialchars($article->content)}</content>
|
||||
</entry>
|
||||
8
modules/syndication/tpl/include.channel.html
Normal file
8
modules/syndication/tpl/include.channel.html
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
<id>{htmlspecialchars($channel_info->id)}</id>
|
||||
<title>{htmlspecialchars($channel_info->title)}</title>
|
||||
<updated>{$channel_info->updated}</updated>
|
||||
<link rel="self" href="{htmlspecialchars($channel_info->self_href)}" />
|
||||
<link rel="alternative" href="{$channel_info->alternative_href}" />
|
||||
<!--@if($channel_info->rss_href)--><link rel="rss" href="{$channel_info->rss_href}" /><!--@end-->
|
||||
<type>{$channel_info->type}</type>
|
||||
<summary>{htmlspecialchars($channel_info->summary)}</summary>
|
||||
8
modules/syndication/tpl/include.channels.html
Normal file
8
modules/syndication/tpl/include.channels.html
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
<entry>
|
||||
<id>{htmlspecialchars($channel_info->id)}</id>
|
||||
<title>{htmlspecialchars($channel_info->title)}</title>
|
||||
<updated>{$channel_info->updated}</updated>
|
||||
<link rel="self" href="{htmlspecialchars($channel_info->self_href)}" />
|
||||
<link rel="alternative" href="{$channel_info->alternative_href}" />
|
||||
<summary>{htmlspecialchars($channel_info->summary)}</summary>
|
||||
</entry>
|
||||
8
modules/syndication/tpl/include.deleted.html
Normal file
8
modules/syndication/tpl/include.deleted.html
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
|
||||
<entry>
|
||||
<id>{htmlspecialchars($delete->id)}</id>
|
||||
<title>{htmlspecialchars($delete->title)}</title>
|
||||
<updated>{$delete->deleted}</updated>
|
||||
<link rel="alternative" href="{$delete->alternative_href}" />
|
||||
<deleted>{$delete->deleted}</deleted>
|
||||
</entry>
|
||||
5
modules/syndication/tpl/include.site.html
Normal file
5
modules/syndication/tpl/include.site.html
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
<id>{htmlspecialchars($site_info->id)}</id>
|
||||
<title>{htmlspecialchars($site_info->title)}</title>
|
||||
<updated>{$site_info->updated}</updated>
|
||||
<link rel="self" href="{htmlspecialchars($site_info->self_href)}" />
|
||||
<link rel="alternative" href="{$site_info->alternative_href}" />
|
||||
25
modules/syndication/tpl/js/syndication.js
Normal file
25
modules/syndication/tpl/js/syndication.js
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
function insertSelectedModules(id, module_srl, mid, browser_title) {
|
||||
var sel_obj = xGetElementById('_'+id);
|
||||
for(var i=0;i<sel_obj.options.length;i++) if(sel_obj.options[i].value==module_srl) return;
|
||||
var opt = new Option(browser_title+' ('+mid+')', module_srl, false, false);
|
||||
sel_obj.options[sel_obj.options.length] = opt;
|
||||
if(sel_obj.options.length>8) sel_obj.size = sel_obj.options.length;
|
||||
|
||||
doSyncExceptModules(id);
|
||||
}
|
||||
|
||||
function removeExceptModule(id) {
|
||||
var sel_obj = xGetElementById('_'+id);
|
||||
sel_obj.remove(sel_obj.selectedIndex);
|
||||
if(sel_obj.options.length) sel_obj.selectedIndex = sel_obj.options.length-1;
|
||||
doSyncExceptModules(id);
|
||||
}
|
||||
|
||||
function doSyncExceptModules(id) {
|
||||
var selected_module_srls = new Array();
|
||||
var sel_obj = xGetElementById('_'+id);
|
||||
for(var i=0;i<sel_obj.options.length;i++) {
|
||||
selected_module_srls.push(sel_obj.options[i].value);
|
||||
}
|
||||
xGetElementById(id).value = selected_module_srls.join(',');
|
||||
}
|
||||
21
modules/syndication/tpl/site.html
Normal file
21
modules/syndication/tpl/site.html
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
{'<?xml version="1.0" encoding="utf-8"?>'}
|
||||
<feed xmlns="http://www.w3.org/2005/Atom">
|
||||
<!--#include("./include.site.html")-->
|
||||
<!--@if(count($channels))-->
|
||||
<!--@foreach($channels as $key => $channel_info)-->
|
||||
<entry>
|
||||
<!--#include("./include.channel.html")-->
|
||||
</entry>
|
||||
<!--@end-->
|
||||
<!--@elseif(count($articles->list))-->
|
||||
<!--@if($articles->next_url)--><link rel="next-in-thread" href="{htmlspecialchars($articles->next_url)}" /><!--@end-->
|
||||
<!--@foreach($articles->list as $key => $article)-->
|
||||
<!--#include("./include.articles.html")-->
|
||||
<!--@end-->
|
||||
<!--@elseif(count($deleted->list))-->
|
||||
<!--@if($deleted->next_url)--><link rel="next-in-thread" href="{htmlspecialchars($deleted->next_url)}" /><!--@end-->
|
||||
<!--@foreach($deleted->list as $key => $delete)-->
|
||||
<!--#include("./include.deleted.html")-->
|
||||
<!--@end-->
|
||||
<!--@end-->
|
||||
</feed>
|
||||
4
modules/syndication/tpl/site.info.html
Normal file
4
modules/syndication/tpl/site.info.html
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
{'<?xml version="1.0" encoding="utf-8"?>'}
|
||||
<entry xmlns="http://www.w3.org/2005/Atom">
|
||||
<!--#include("./include.site.html")-->
|
||||
</entry>
|
||||
Loading…
Add table
Add a link
Reference in a new issue