Archived
1
0

Also support "last X" REST interface

This commit is contained in:
Garvin Hicking
2006-08-02 10:07:34 +00:00
commit 80e14346a5
1775 changed files with 195589 additions and 0 deletions
+89
View File
@@ -0,0 +1,89 @@
/* Basic CSS taken from http://www.blogger.com/styles/atom.css */
feed {
display:block;
font-family:verdana, sans-serif;
margin:2%;
font-size:90%;
color:#000000;
background:#ffffff;
}
title {
display:block;
font-size:1.3em;
color:inherit;
background:inherit;
font-weight:bold;
}
tagline, link {
display:block;
font-size:0.9em;
}
id, modified {
display:none;
}
generator {
display:block;
font-size:0.9em;
}
info {
display:block;
margin:3em 4em 3em 4em;
color:#CC3333;
background:#FFFF66;
border:solid #CCCC66 2px;
text-align:center;
padding:1.5em;
font-family:mono;
font-size:0.8em;
}
entry {
display:block;
color:inherit;
background:inherit;
padding:0;
margin:1em 1em 4em 1em;
}
entry modified, entry name {
display:inline;
color:#999999;
background:inherit;
font-size:0.8em;
}
entry created, entry issued, entry id {
display:none;
}
/* Using a single 'commentRSS' and 'comments' is used for compatibility to Opera */
slash\:comments, wfw\:commentRss, commentRss, comments, wfw\:comment, comment {
display:none;
}
entry title {
display:block;
font-size:1em;
font-weight:bold;
color:inherit;
background:inherit;
padding:1em 1em 0em 1em;
margin:0;
border-top:solid 1px #dddddd;
}
content {
display:block;
font-size:0.9em;
color:inherit;
background:inherit;
padding:1em;
line-height:1.5em;
}
+52
View File
@@ -0,0 +1,52 @@
<p>
<p><a href='{$serendipityBaseURL}/rss.php?version=2.0&amp;type=comments&amp;cid={$commentform_id}'><abbr title="Really Simple Syndication">RSS</abbr> feed for comments on this post.</a></p>
<h2 id="postcomment">Leave a comment</h2>
<form action="{$commentform_action}#feedback" method="post" id="commentform">
<p>
{serendipity_hookPlugin hook="frontend_comment" data=$commentform_entry}
</p>
<p>
<input id="name" type="text" name="serendipity[name]" value="{$commentform_name}" size="28" tabindex="1" />
<label for="author">{$CONST.NAME}</label>
</p>
<p>
<input type="text" id="email" name="serendipity[email]" value="{$commentform_email}" size="28" tabindex="2" />
<label for="email">{$CONST.EMAIL}</label>
</p>
<p>
<input id="url" type="text" name="serendipity[url]" value="{$commentform_url}" size="28" tabindex="3" />
<label for="url">{$CONST.HOMEPAGE}</label>
</p>
<p>
<label for="comment">{$CONST.COMMENT}</label><br />
<textarea id="comment" rows="4" cols="40" name="serendipity[comment]">{$commentform_data}</textarea>
</p>
{if $is_commentform_showToolbar}
<p>
<input id="checkbox_remember" type="checkbox" name="serendipity[remember]" {$commentform_remember} />
<label for="checkbox_remember">{$CONST.REMEMBER_INFO}</label>
</p>
{if $is_allowSubscriptions}
<p>
<input id="checkbox_subscribe" type="checkbox" name="serendipity[subscribe]" {$commentform_subscribe} />
<label for="checkbox_subscribe">{$CONST.SUBSCRIBE_TO_THIS_ENTRY}</label>
</p>
{/if}
{/if}
{if $is_moderate_comments}
<p>{$CONST.COMMENTS_WILL_BE_MODERATED}</p>
{/if}
<p>
<input type="hidden" name="serendipity[entry_id]" value="{$commentform_id}" />
<input type="submit" name="serendipity[submit]" value="{$CONST.SUBMIT_COMMENT}" />
<input type="submit" name="serendipity[preview]" value="{$CONST.PREVIEW}" />
</p>
</form>
</p>
+12
View File
@@ -0,0 +1,12 @@
{foreach from=$comments item=comment}
<li id="comment-{$comment.id}">
<p>
{if $comment.body == 'COMMENT_DELETED'}
{$CONST.COMMENT_IS_DELETED}
{else}
{$comment.body}
{/if}
</p>
<p><cite>Comment by {if $comment.url}<a href="{$comment.url}" rel='external'>{$comment.username|@default:$CONST.ANONYMOUS}</a>{else}{$comment.username|@default:$CONST.ANONYMOUS}{/if} &#8212; {$comment.timestamp|@formatTime:'%m/%d/%Y'} @ <a href="#comment-{$comment.id}">{$comment.timestamp|@formatTime:'%I:%M %p'}</a></cite></p>
</li>
{/foreach}
+7
View File
@@ -0,0 +1,7 @@
<!-- CONTENT START -->
{$content_message}
{$ENTRIES}
{$ARCHIVES}
<!-- CONTENT END -->
+66
View File
@@ -0,0 +1,66 @@
{serendipity_hookPlugin hook="entries_header" addData="$entry_id"}
{foreach from=$entries item="dategroup"}
{if $dategroup.is_sticky}
<h2>{$CONST.STICKY_POSTINGS}</h2>
{else}
<h2>{$dategroup.date|@formatTime:DATE_FORMAT_ENTRY}</h2>
{/if}
{foreach from=$dategroup.entries item="entry"}
<div class="post">
<h3 class="storytitle" id="post-{$entry.id}"><a href="{$entry.link}" rel="bookmark" title="Permanent Link: {$entry.title}">{$entry.title}</a></h3>
<div class="meta">Filed under:
<ul class="post-categories">{foreach from=$entry.categories item="entry_category"}
<li><a title="View all posts in {$entry_category.category_name}" href="{$serendipityHTTPPath}{$serendipityRewritePrefix}{$CONST.PATH_CATEGORIES}/{$entry_category.category_id}-{$entry_category.category_name|@makeFilename}">{$entry_category.category_name}</a></li>
{/foreach}</ul>
&#8212; {$entry.author} @ {$entry.timestamp|@formatTime:'%I:%M %p'}
</div>
<div class="storycontent">
<p>
{$entry.body}
{if $entry.is_extended}
{$entry.extended}
{/if}
</p>
{if $entry.has_extended and not $is_single_entry and not $entry.is_extended}
<p><a href="{$entry.link}#extended">{$CONST.VIEW_EXTENDED_ENTRY|@sprintf:$entry.title}</a></p>
{/if}
</div>
<div class="feedback">
<a href="{$entry.link}#comments">Comments ({$entry.comments+$entry.trackbacks})</a>
{$entry.add_footer}
</div>
<!--
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/"
xmlns:dc="http://purl.org/dc/elements/1.1/">
<rdf:Description
rdf:about="{$serendipityBaseURL}{$serendipityRewritePrefix}feeds/ei_{$entry.id}.rdf"
trackback:ping="{$serendipityBaseURL}comment.php?type=trackback&amp;entry_id={$entry.id}"
dc:title="{$entry.title_rdf|@default:$entry.title}"
dc:identifier="{$entry.rdf_ident}" />
</rdf:RDF>
-->
{$entry.plugin_display_dat}
{if $is_single_entry and not $is_preview}
<h2 id="comments">Comments <a href="#postcomment" title="Leave a comment">&raquo;</a></h2>
<p>The <acronym title="Uniform Resource Identifier">URI</acronym> to TrackBack this entry is: <em>{$serendipityBaseURL}comment.php?type=trackback&amp;entry_id={$entry.id}</em></p>
<ol id="commentlist">
{serendipity_printTrackbacks entry=$entry.id}
{serendipity_printComments entry=$entry.id mode=$CONST.VIEWMODE_LINEAR}
</ol>
{$COMMENTFORM}
{/if}
</div>
{/foreach}
{foreachelse}
{if not $plugin_clean_page}
{$CONST.NO_ENTRIES_TO_PRINT}
{/if}
{/foreach}
+19
View File
@@ -0,0 +1,19 @@
{serendipity_hookPlugin hook="entries_header"}
{foreach from=$archives item="archive"}
<table cellspacing="4" cellpadding="4" border="0">
<tr>
<td colspan="4"><h2>{$archive.year}</h2></td>
</tr>
{foreach from=$archive.months item="month"}
<tr>
<td width="100"><img src="{serendipity_getFile file="img/graph_bar_horisontal.png"}" height="10" width="{math width=100 equation="count * width / max" count=$month.entry_count max=$max_entries format="%d"}" style="border: 1px solid #000000"></td>
<td>{$month.date|@formatTime:"%B"}</td>
<td>{$month.entry_count} {$CONST.ENTRIES}</td>
<td>({if $month.entry_count}<a href="{$month.link}">{/if}{$CONST.VIEW_FULL}{if $month.entry_count}</a>{/if})</td>
<td>({if $month.entry_count}<a href="{$month.link_summary}">{/if}{$CONST.VIEW_TOPICS}{if $month.entry_count}</a>{/if})</td>
</tr>
{/foreach}
</table>
{/foreach}
<div class='serendipity_entryFooter' style="text-align: center">
{serendipity_hookPlugin hook="entries_footer"}</div>
+15
View File
@@ -0,0 +1,15 @@
{serendipity_hookPlugin hook="entries_header"}
<div class='serendipity_date'>{$CONST.TOPICS_OF} {$dateRange.0|@formatTime:"%B, %Y"}</div>
<div class="serendipity_entry">
{foreach from=$entries item="entries"}
<ul>
{foreach from=$entries.entries item="entry"}
<li><a href="{$entry.link}">{$entry.title}</a>
<br />{$CONST.POSTED_BY} {$entry.username} {$CONST.ON} {$entry.timestamp|@formatTime:DATE_FORMAT_ENTRY}</li>
{/foreach}
</ul>
{/foreach}
</div>
<div class='serendipity_entryFooter' style="text-align: center">
{serendipity_hookPlugin hook="entries_footer"}</div>
+45
View File
@@ -0,0 +1,45 @@
body {
font-size: 10pt;
padding: 10px;
color: #333333;
background-color: #FAFFFF;
font-size: 9.5pt;
font-weight: normal;
font-family: verdana, arial, geneva, helvetica, sans-serif;
direction: {LANG_DIRECTION};
}
/** Embedded images with the s9y image manager **/
.serendipity_imageComment_center,
.serendipity_imageComment_left,
.serendipity_imageComment_right {
border: 1px solid black;
background-color: #EFEFEF;
margin: 3px;
}
.serendipity_imageComment_center {
}
.serendipity_imageComment_left {
float: left;
}
.serendipity_imageComment_right {
float: right;
}
.serendipity_imageComment_img,
.serendipity_imageComment_img img {
margin: 0px;
padding: 0px;
border: 0px;
}
.serendipity_imageComment_txt {
margin: 0px;
padding: 3px;
clear: both;
font-size: 9pt;
}
+49
View File
@@ -0,0 +1,49 @@
{if $is_embedded != true}
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>{$head_title|@default:$blogTitle} {if $head_subtitle} - {$head_subtitle}{/if}</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta name="generator" content="Serendipity v.{$head_version}" />
<style type="text/css" media="screen">
@import url( {serendipity_getFile file="wp-layout.css"} );
</style>
{serendipity_hookPlugin hook="frontend_header"}
</head>
<body>
{/if}
{if $is_raw_mode != true}
<div id="rap">
<h1 id="header"><a href="{$serendipityBaseURL}" title="{$head_title|@default:$blogTitle}: {$head_subtitle|@default:$blogDescription}">{$head_title|@default:$blogTitle}</a></h1>
<div id="content">
{$CONTENT}
</div>
{/if}
{$raw_data}
{if $leftSidebarElements or $rightSidebarElements}
<div id="menu">
<ul>
{if $leftSidebarElements}{serendipity_printSidebar side="left"}{/if}
{if $rightSidebarElements}{serendipity_printSidebar side="right"}{/if}
</ul>
</div>
{/if}
</div>
<p class="credit"><cite>Powered by <a href="http://www.s9y.org/" title="Powered by Serendipity PHP Weblog"><strong>Serendipity</strong></a></cite></p>
{serendipity_hookPlugin hook="frontend_footer"}
{if $is_embedded != true}
</body>
</html>
{/if}
+4
View File
@@ -0,0 +1,4 @@
Name: WP-compat
Author: Evan Nemerson
Date: 20/11-2004
Engine: yes
+32
View File
@@ -0,0 +1,32 @@
<table id="wp-calendar">
<caption>{$plugin_calendar_head.month_date|formatTime:"%B '%y":false}</caption>
<thead>
<tr>
<th abbr="Sunday" scope="col" title="Sunday">S</th>
<th abbr="Monday" scope="col" title="Monday">M</th>
<th abbr="Tuesday" scope="col" title="Tuesday">T</th>
<th abbr="Wednesday" scope="col" title="Wednesday">W</th>
<th abbr="Thursday" scope="col" title="Thursday">T</th>
<th abbr="Friday" scope="col" title="Friday">F</th>
<th abbr="Saturday" scope="col" title="Saturday">S</th>
</tr>
</thead>
<tfoot>
<tr>
<td colspan="3" id="prev">{if $plugin_calendar_head.minScroll le $plugin_calendar_head.month_date}<a href="{$plugin_calendar_head.uri_previous}" title="View posts for previous month">&laquo;</a>{/if}</td>
<td class="pad">&nbsp;</td>
<td colspan="3" id="next">{if $plugin_calendar_head.maxScroll ge $plugin_calendar_head.month_date}<a href="{$plugin_calendar_head.uri_next}" title="View posts for previous month">&raquo;</a>{/if}</td>
</tr>
</tfoot>
<tbody>
{foreach from=$plugin_calendar_weeks item="week"}
<tr>
{foreach from=$week.days item="day"}
<td class="serendipity_calendarDay {$day.classes}"{if isset($day.properties.Title)} title="{$day.properties.Title}"{/if}>{if isset($day.properties.Active) and $day.properties.Active}<a href="{$day.properties.Link}">{/if}{$day.name|@default:"&#160;"}{if isset($day.properties.Active) and $day.properties.Active}</a>{/if}</td>
{/foreach}
</tr>
{/foreach}
</tbody>
</table>
+5
View File
@@ -0,0 +1,5 @@
{foreach from=$plugindata item=item}
<li id="{$item.class}">{$item.title}
{$item.content}
</li>
{/foreach}
+6
View File
@@ -0,0 +1,6 @@
{foreach from=$trackbacks item=trackback}
<li id="trackback-{$trackback.id}">
<p><strong>{$trackback.title}</strong><br />{$trackback.body|@strip_tags|@escape:all}</p>
<p><cite>Trackback by <a href='{$trackback.url|@strip_tags}' rel='external'>{$trackback.author|@default:$CONST.ANONYMOUS}</a> &#8212; {$trackback.timestamp|@formatTime:$CONST.DATE_FORMAT_SHORT} @ <a href="#trackback-{$trackback.id}">{$trackback.timestamp|@formatTime:'%g:%M %a'}</a></cite> </p>
</li>
{/foreach}
+145
View File
@@ -0,0 +1,145 @@
/* Serendipity WP default
By Evan Nemerson
December 11, 2004
This is just a simple template modeled after the default one. It is
meant mostly as something to collect dust while you use a custom WP
theme, but it can also be used to guide you in creating your own.
It is licensed under the BSD license, like the rest of Serendipity,
and unlike most WP themes (which are GPL). */
#content {
border-right: 1px dashed #000000;
border-bottom: 1px solid #000000;
border-top: 0px;
background-color: #FFFFFF;
position: absolute;
margin-right: 16em;
}
#menu {
vertical-align: top;
background: white;
width: 16em;
position: absolute;
right: 0;
}
#content > * {
padding: 10px;
margin: 10px;
width: auto;
}
#menu > ul {
display: block;
list-style: none;
padding-left: 0;
margin: 1em;
}
#menu > ul > li {
font-size: 1.2em;
font-weight: bold;
margin-bottom: 1em;
padding-bottom: 1em;
border-bottom: solid 2px #36558C;
}
#menu > ul > li > * {
font-size: 0.83em;
font-weight: normal;
}
body {
font-size: 10pt;
margin: 0;
font-size: 10px;
font-family: verdana, arial, helvetica, sans-serif;
margin-bottom: 30px;
}
input, textarea {
font-size: 10pt;
font-family: verdana, arial, helvetica, sans-serif;
}
th, td {
font-size: 10pt;
}
p, td, th, div, span {
font-family: verdana, arial, helvetica, sans-serif;
}
#header {
margin: auto;
width: 100%;
padding: 1em;
background-image: url(../default/img/background.png);
border-bottom: 1px solid #000000;
}
#header a,
#header a:hover,
#header a:link,
#header a:visited {
color: #FFFFFF;
font-family: Verdana, Arial, Geneva, Helvetica, sans-serif;
text-decoration: none;
}
h2 {
font-family: Verdana, Arial, Geneva, Helvetica, sans-serif;
font-size: large;
color: #333333;
margin: 0;
margin-top: 20px;
text-align: right;
}
.storytitle {
font-family: Verdana, Arial, Geneva, Helvetica, sans-serif;
font-size: medium;
font-weight: bold;
margin-top: 1em;
color: #333333;
border-bottom: 2px solid #36558C;
}
.storytitle a:link,
.storytitle a:visited {
text-decoration: none;
border: 0;
color: #000000;
}
.meta > ul > li, ul.post-meta li {
display: inline;
}
.meta > ul {
display: inline;
list-style: none;
margin: 0;
padding: 0;
}
.storytitle {
margin: auto;
}
.storytitle a:hover {
color: #FF0000;
}
.storycontent {
font-family:Verdana, Arial, Geneva, Helvetica, sans-serif;
color: #333333;
font-size: 1.3em;
font-weight: normal;
padding-right: 10px;
width: 95%;
margin: auto;
margin-top: 1em;
}