Update of /cvsroot/php-blog/serendipity/templates/default
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32695
Added Files:
Tag: branch-smarty
commentform.tpl comments.tpl content.tpl entries.tpl index.tpl
smarty_layout.php trackbacks.tpl
Removed Files:
Tag: branch-smarty
layout.php
Log Message:
added smarty template files
--- NEW FILE: comments.tpl ---
<!-- TODO: Remove recursion of serendipity_printEntries() :( -->
{$comments_list}
--- NEW FILE: commentform.tpl ---
<div class="serendipityCommentForm">
<a id="serendipity_CommentForm"></a>
<form id="serendipity_comment" action="{$commentform_url}" method="post">
<div><input type="hidden" name="serendipity[entry_id]" value="{$commentform_id}" /></div>
<table border="0" width="100%" cellpadding="3">
<tr>
<td class="serendipity_commentsLabel">{$CONST.NAME}</td>
<td class="serendipity_commentsValue"><input type="text" name="serendipity[name]" value="{$commentform_name}" size="30" /></td>
</tr>
<tr>
<td class="serendipity_commentsLabel">{$CONST.EMAIL}</td>
<td class="serendipity_commentsValue"><input type="text" name="serendipity[email]" value="{$commentform_email}" /></td>
</tr>
<tr>
<td class="serendipity_commentsLabel">{$CONST.HOMEPAGE}</td>
<td class="serendipity_commentsValue"><input type="text" name="serendipity[url]" value="{$commentform_url}" /></td>
</tr>
<tr>
<td class="serendipity_commentsLabel">{$CONST.IN_REPLY_TO}</td>
<td class="serendipity_commentsValue">{$commentform_replyTo}</td>
</tr>
<tr>
<td class="serendipity_commentsLabel">{$CONST.COMMENT}</td>
<td class="serendipity_commentsValue">
<textarea rows="10" cols="40" name="serendipity[comment]">{$commentform_data}</textarea><br />
{$plugin_frontend_comment}
</td>
</tr>
{if $is_commentform_showToolbar}
<tr>
<td> </td>
<td class="serendipity_commentsLabel">
<input id="checkbox_remember" type="checkbox" name="serendipity[remember]" {$commentform_remember} /><label for="checkbox_remember">{$CONST.REMEMBER_INFO}</label>
{if $is_allowSubscriptions}
<br />
<input id="checkbox_subscribe" type="checkbox" name="serendipity[subscribe]" {$commentform_subscribe} /><label for="checkbox_subscribe"> {$CONST.SUBSCRIBE_TO_THIS_ENTRY}</label>
{/if}
</td>
</tr>
{/if}
{if $is_moderate_comments}
<tr>
<td class="serendipity_commentsValue serendipity_msg_important" colspan="2">{$CONST.COMMENTS_WILL_BE_MODERATED}</td>
</tr>
{/if}
<tr>
<td> </td>
<td><input type="submit" name="serendipity[submit]" value="{$CONST.SUBMIT_COMMENT}" /> <input type="submit" name="serendipity[preview]" value="{$CONST.PREVIEW}" /></td>
</tr>
</table>
</form>
</div>
--- NEW FILE: entries.tpl ---
<!-- ENTRIES START -->
{if $is_short_mode}
<div class='serendipity_date'>{$CONST.TOPICS_OF} {$short_timestamp|formatTime:DATE_FORMAT_ENTRY}</div>
<div class="serendipity_entry">
{section name=date loop=$bydate}
{section name=x loop=$bydate[date]}
<a href="{$byedate[date][x].entryLink}">{$bydate[date][x].title}</a>
<br />
{/section}
{/section}
</div>
{else}
{section name=date loop=$bydate}
<div class="serendipity_Entry_Date">
<h3 class="serendipity_date">{$dateref[date]|formatTime:DATE_FORMAT_ENTRY}</h3>
{section name=x loop=$bydate[date]}
<h4 class="serendipity_title"><a href="{$bydate[date][x].entryLink}">{$bydate[date][x].title}</a></h4>
<div class="serendipity_entry">
{if is_array($bydate[date][x][categories])}
<span class="serendipity_entryIcon">
{section name=cat loop=$bydate[date][x][categories]}
<a href="{$serendipityHTTPPath}{$serendipityRewritePrefix}{$CONST.PATH_CATEGORIES}/{$bydate[date][x][categories].categoryid}-{$bydate[date][x][categories].category_name|makeFilename}"><img class="serendipity_entryIcon" title="{$bydate[date][x][categories].category_name|escape}{$bydate[date][x][categories].category_description|emptyPrefix}" alt="{$bydate[date][x][categories].category_name|escape}" src="{$bydate[date][x][categories].category_icon}" /></a>
{/section}
</span>
{/if}
<div class="{$bydate[date][x].extended_css}">
{$bydate[date][x].body}
</div>
{if $bydate[date][x].is_extended}
<div class="serendipity_entry_extended"><a id="extended"></a>{$bydate[date][x].extended}</div>
{/if}
{if $bydate[date][x].is_extended_link}
<br /><a href="{$bydate[date][x].entryLink}#extended">{$bydate[date][x].title|printf:VIEW_EXTENDED_ENTRY}</a><br /><br />
{/if}
<div class='serendipity_entryFooter'>
{$CONST.POSTED_BY} {$bydate[date][x].username}
{if is_array($bydate[date][x].categories)}
{$CONST.IN} {section name=cat loop=$bydate[date][x].categories}<a href="{$serendipityHTTPPath}{$serendipityRewritePrefix}{$CONST.PATH_CATEGORIES}/{$bydate[date][x].categories[cat].categoryid}-{$bydate[date][x].categories[cat].category_name|makeFilename}">{$bydate[date][x].categories[cat].category_name|escape}</a> {/section}
{/if}
{$CONST.AT} <a href="{$bydate[date][x].entryLink}">{$bydate[date][x].timestamp|formatTime:'%H:%M'}</a>
{if $bydate[date][x].is_comments}
{if $is_popup}
| <a href="{$serendipityHTTPPath}comment.php?serendipity[entry_id]={$bydate[date][x].id}&serendipity[type]=comments" onclick="window.open(this.href, \'comments\', \'width=480,height=480,scrollbars=yes\'); return false;">{$bydate[date][x].comments_label} ({$bydate[date][x].comments})</a>
{else}
| <a href="{$bydate[date][x].entryLink}#comments">{$bydate[date][x].comments_label} ({$bydate[date][x].comments})</a>
{/if}
{/if}
{if $bydate[date][x].is_trackbacks}
{if $is_popup}
| <a href="{$serendipityHTTPPath}comment.php?serendipity[entry_id]={$bydate[date][x].id}&serendipity[type]=trackbacks" onclick="window.open(this.href, \'comments\', \'width=480,height=480,scrollbars=yes\'); return false;">{$bydate[date][x].trackbacks_label} ({$bydate[date][x].trackbacks})</a>
{else}
| <a href="{$bydate[date][x].entryLink}#trackbacks">{$bydate[date][x].trackbacks_label} ({$bydate[date][x].trackbacks})</a>
{/if}
{/if}
{if $bydate[date][x].is_owner}
| <a href="{$serendipityBaseURL}serendipity_entries.php?serendipity[action]=admin&serendipity[adminModule]=entries&serendipity[adminAction]=edit&serendipity[id]={$bydate[date][x].id}">{$CONST.EDIT_ENTRY}</a>
{/if}
{$bydate[date][x].add_footer}
</div>
</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_{$bydate[date][x].id}.rdf"
trackback:ping="{$serendipityBaseURL}comment.php?type=trackback&entry_id={$bydate[date][x].id}"
dc:title="{$bydate[date][x].title}"
dc:identifier="{$bydate[date][x].rdf_ident}" />
</rdf:RDF>
-->
{$bydate[date][x].plugin_display_dat}
{if $CONST.DATA_UNSUBSCRIBED}
<br /><div class="serendipity_center serendipity_msg_notice">{$CONST.DATA_UNSUBSCRIBED|printf:UNSUBSCRIBE_OK}</div><br />
{/if}
{if $CONST.DATA_TRACKBACK_DELETED}
<br /><div class="serendipity_center serendipity_msg_notice">{$CONST.DATA_TRACKBACK_DELETED|printf:TRACKBACK_DELETED}</div><br />
{/if}
{if $CONST.DATA_TRACKBACK_APPROVED}
<br /><div class="serendipity_center serendipity_msg_notice">{$CONST.DATA_TRACKBACK_APPROVED|printf:TRACKBACK_APPROVED}</div><br />
{/if}
{if $CONST.DATA_COMMENT_DELETED}
<br /><div class="serendipity_center serendipity_msg_notice">{$CONST.DATA_COMMENT_DELETED|printf:COMMENT_DELETED}</div><br />
{/if}
{if $CONST.DATA_COMMENT_APPROVED}
<br /><div class="serendipity_center serendipity_msg_notice">{$CONST.DATA_COMMENT_APPROVED|printf:COMMENT_APPROVED}</div><br />
{/if}
{if $entry_id and $is_popup != true}
<div class="serendipity_comments">
<br />
<a id="trackbacks"></a>
<div class="serendipity_commentsTitle">{$CONST.TRACKBACKS}</div>
<div class="serendipity_center">
<a style="font-weight: normal" href="{$serendipityBaseURL}comment.php?type=trackback&entry_id={$entry_id}" onclick="alert('{$CONST.TRACKBACK_SPECIFIC_ON_CLICK|escape:htmlall}'); return false;" title="{$CONST.TRACKBACK_SPECIFIC_ON_CLICK|escape}">{$CONST.TRACKBACK_SPECIFIC}</a>
</div>
<br />
{$TRACKBACKS}
</div>
</div>
{/if}
{if $entry_id}
<div class="serendipity_comments">
<br />
<a id="comments"></a>
<div class="serendipity_commentsTitle">{$CONST.COMMENTS}</div>
<div class="serendipity_center">{$CONST.DISPLAY_COMMENTS_AS}
{if $is_cview_linear}
({$CONST.COMMENTS_VIEWMODE_LINEAR} | <a href="{$serendipityHTTPPath}{$serendipityIndexFile}?url={$bydate[date][x].commURL}&serendipity[cview]={$CONST.VIEWMODE_THREADED}#comments">{$CONST.COMMENTS_VIEWMODE_THREADED}</a>)
{else}
(<a href="{$serendipityHTTPPath}{$serendipityIndexFile}?url={$bydate[date][x].commURL}&serendipity[cview]={$CONST.VIEWMODE_LINEAR}#comments">{$CONST.COMMENTS_VIEWMODE_LINEAR}</a> | {$CONST.COMMENTS_VIEWMODE_THREADED})
{/if}
</div>
{$COMMENTS}
{section name=message loop=$comments_messagestack}
<div class="serendipity_center serendipity_msg_important">{$comments_messagestack[message]}</div>
{/section}
{if $is_comment_added}
<br />
<div class="serendipity_center serendipity_msg_notice">{$CONST.COMMENT_ADDED}</div>
{elseif $is_comment_closed}
<br />
<div class="serendipity_center serendipity_msg_important">{$CONST.COMMENTS_CLOSED}</div>
{else}
<br />
<div class="serendipity_commentsTitle">{$CONST.ADD_COMMENT}</div>
{$COMMENTFORM}
{/if}
</div>
{/if}
{$bydate[date][x].plugin_backend_preview}
{/section}
</div>
{/section}
<div class='serendipity_entryFooter' style="text-align: center">
{if $footer_prev_page}
<a href="{$footer_prev_page}">« {$CONST.PREVIOUS_PAGE}</a>
{/if}
{if $footer_info}
({$footer_info})
{/if}
{if $footer_next_page}
<a href="{$footer_next_page}">» {$CONST.NEXT_PAGE}</a>
{/if}
{$plugin_entries_footer}
</div>
{/if}
<!-- ENTRIES END -->
--- layout.php DELETED ---
--- NEW FILE: smarty_layout.php ---
<?php # $Id: smarty_layout.php,v 1.1.2.1 2004/09/09 15:00:45 garvinhicking Exp $
include_once('serendipity_config.inc.php');
include_once(S9Y_INCLUDE_PATH . 'serendipity_plugin_api.php');
include_once(S9Y_INCLUDE_PATH . 'serendipity_sidebar_items.php');
if (!$serendipity['embed'] || $serendipity['embed'] === 'false' || $serendipity['embed'] === false) {
ob_start();
serendipity_plugin_api::generate_plugins('left', 'td');
$serendipity['smarty']->assign('left_sidebar', ob_get_contents());
ob_end_clean();
ob_start();
serendipity_plugin_api::generate_plugins('right', 'td');
$serendipity['smarty']->assign('right_sidebar', ob_get_contents());
ob_end_clean();
}
if (!isset($serendipity['GET']['range']) || !is_numeric($serendipity['GET']['range'])) {
$serendipity['GET']['range'] = date('Ymd');
}
// The main area
switch ($serendipity['GET']['action']) {
// User wants to read the diary
case 'read':
if (isset($serendipity['GET']['id'])) {
serendipity_printEntries(array(serendipity_fetchEntry('id', $serendipity['GET']['id'])), 1);
} else {
serendipity_printEntries(serendipity_fetchEntries($serendipity['GET']['range'], true, 15));
}
break;
// User searches
case 'search':
$r = serendipity_searchEntries($serendipity['GET']['searchTerm']);
if (strlen($serendipity['GET']['searchTerm']) <= 3) {
$serendipity['smarty']->assign('content_message', SEARCH_TOO_SHORT);
break;
}
if ($r === true) {
$serendipity['smarty']->assign('content_message', sprintf(NO_ENTRIES_BLAHBLAH, $serendipity['GET']['searchTerm']));
break;
}
$serendipity['smarty']->assign('content_message', sprintf(YOUR_SEARCH_RETURNED_BLAHBLAH, $serendipity['GET']['searchTerm'], count($r)));
serendipity_printEntries($r);
break;
// Show the archive
case 'archives':
serendipity_printArchives();
break;
// Welcome screen or whatever
default:
serendipity_printEntries(serendipity_fetchEntries(null, true, 15));
}
?>
--- NEW FILE: index.tpl ---
{if $is_xhtml}
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/xhtml1-transitional.dtd">
{else}
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
{/if}
{if $is_embedded != true}
<html>
<head>
<title>{$head_title}</title>
<meta http-equiv="Content-Type" content="text/html; charset={$head_charset}" />
<meta name="Powered-By" content="Serendipity v.{$head_version}" />
<link rel="stylesheet" type="text/css" href="{$serendipityHTTPPath}serendipity.css.php" />
<link rel="alternate" type="application/rss+xml" title="RSS" href="{$serendipityBaseURL}{$serendipityRewritePrefix}feeds/index.rss2" />
<link rel="alternate" type="application/x.atom+xml" title="Atom" href="{$serendipityBaseURL}{$serendipityRewritePrefix}feeds/atom.xml" />
{if $entry_id}
<link rel="pingback" href="{$serendipityBaseURL}comment.php?type=pingback&entry_id={$entry_id}" />
{/if}
{$plugin_frontend_header}
</head>
<body>
{else}
{$plugin_frontend_header}
{/if}
{if $is_raw_mode != true}
<div id="serendipity_banner">
<h1><a class="homelink1" href="{$serendipityBaseURL}">{$blogTitle}</a></h1>
{if $blogSubTitle}
<h2><a class="homelink2" href="{$serendipityBaseURL}">{$blogSubTitle}</a></h2>
{elseif $blogDescription}
<h2><a class="homelink2" href="{$serendipityBaseURL}">{$blogDescription}</a></h2>
{/if}
</div>
<table id="mainpane">
<tr>
{$left_sidebar}
<td id="content" valign="top">{$CONTENT}</td>
{$right_sidebar}
</tr>
</table>
{/if}
{$raw_data}
{if $is_embedded != true}
</body>
</html>
{/if}
--- NEW FILE: trackbacks.tpl ---
{if $trackbacks == false}
<div class="serendipity_center">{$CONST.NO_TRACKBACKS}</div>
{/if}
{section name=id loop=$comments}
{if empty($comments[id].url)}
{assign var="link" value=$comments[id].email}
{else}
{assign var="link" value=$comments[id].url}
{/if}
{if empty($comments[id].author)}
{assign var="name" value=$CONST.ANONYMOUS}
{else}
{assign var="name" value=$comments[id].author}
{/if}
<div class="serendipity_comment">
<a href="{$link|strip_tags}" {'blank'|xhtml_target}>{$title}</a><br />
<b>{$CONST.EXCERPT}:</b>
{$comments[id].body|strip_tags|escape:all}<br />
<div class="serendipity_comment_source">
<b>Weblog:</b> {$name|strip_tags}<br />
<b>{$CONST.TRACKED}:</b> {$comments[id].timestamp|formatTime:'%b %d, %H:%M'}
{if $is_trackbacks_owner}
(<a href="{$serendipityBaseURL}comment.php?serendipity[delete]={$comments[id].id}&serendipity[entry]={$comments[id].id}&serendipity[type]=trackbacks">{$CONST.DELETE}</a>)
{/if}
</div>
</div>
<br />
{/section}
--- NEW FILE: content.tpl ---
<!-- CONTENT START -->
{$content_message}
{$ENTRIES}
<!-- CONTENT END -->
|