smarty3 compat

This commit is contained in:
Garvin Hicking 2011-01-06 17:46:43 +00:00
parent ada93a01c5
commit fd480a58d4
6 changed files with 16 additions and 11 deletions

View File

@ -70,7 +70,12 @@ function &serendipity_printTrackbacks(&$trackbacks) {
function &serendipity_smarty_fetch($block, $file, $echo = false) {
global $serendipity;
$output =& $serendipity['smarty']->fetch('file:'. serendipity_getTemplateFile($file, 'serendipityPath'), null, null, ($echo === true && $serendipity['smarty_raw_mode']));
if (strpos($serendipity['smarty']->_version, '2', 1)) {
$output =& $serendipity['smarty']->fetch('file:'. serendipity_getTemplateFile($file, 'serendipityPath'), null, null, ($echo === true && $serendipity['smarty_raw_mode']));
} else {
$output =& $serendipity['smarty']->fetch('file:'. serendipity_getTemplateFile($file, 'serendipityPath'), null, null, null, ($echo === true && $serendipity['smarty_raw_mode']));
}
$serendipity['smarty']->assign_by_ref($block, $output);
return $output;

View File

@ -2,8 +2,8 @@
<div class='serendipity_date'>{$CONST.TOPICS_OF} {$dateRange.0|@formatTime:"%B, %Y"}</div>
<div class="serendipity_entry">
{foreach from=$entries item="entries"}
{foreach from=$entries.entries item="entry"}
{foreach from=$entries item="sentries"}
{foreach from=$sentries.entries item="entry"}
<div class="archive_summary"><h4 class="archive_summary_title">{$entry.id} - <a href="{$entry.link}">{$entry.title|truncate:80:" ..."}</a></h4>
{$entry.timestamp|@formatTime:DATE_FORMAT_ENTRY}. {$CONST.POSTED_BY} <a href="{$entry.link_author}">{$entry.author}</a> {if $entry.categories} {$CONST.IN} {foreach from=$entry.categories item="entry_category" name="categories"}<a href="{$entry_category.category_link}">{$entry_category.category_name|@escape}</a>{/foreach}{/if}</div>
{/foreach}

View File

@ -3,8 +3,8 @@
<div class="serendipity_entry">
<ul>
{foreach from=$entries item="entries"}
{foreach from=$entries.entries item="entry"}
{foreach from=$entries item="sentries"}
{foreach from=$sentries.entries item="entry"}
<li><a href="<?= $entry['link'] ?>"><?= $entry['title'] ?></a>
<div class="summary_posted_by"><?= POSTED_BY ?> <span class="posted_by_author"><?= $entry['author'] ?></span> <?= ON ?> <span class="posted_by_date">{$entry.timestamp|@formatTime:DATE_FORMAT_ENTRY}</span></div></li>
<?php endforeach; ?>

View File

@ -3,8 +3,8 @@
<div class="serendipity_entry">
<ul>
{foreach from=$entries item="entries"}
{foreach from=$entries.entries item="entry"}
{foreach from=$entries item="sentries"}
{foreach from=$sentries.entries item="entry"}
<li><a href="{$entry.link}">{$entry.title}</a>
<br />{$CONST.POSTED_BY} {$entry.author} {$CONST.ON} {$entry.timestamp|@formatTime:DATE_FORMAT_ENTRY}</li>
{/foreach}

View File

@ -3,8 +3,8 @@
<div class="serendipity_entry">
<ul>
{foreach from=$entries item="entries"}
{foreach from=$entries.entries item="entry"}
{foreach from=$entries item="sentries"}
{foreach from=$sentries.entries item="entry"}
<li><a href="{$entry.link}">{$entry.title}</a>
<div class="summary_posted_by">{$CONST.POSTED_BY} <span class="posted_by_author">{$entry.author}</span> {$CONST.ON} <span class="posted_by_date">{$entry.timestamp|@formatTime:DATE_FORMAT_ENTRY}</span></div></li>
{/foreach}

View File

@ -2,9 +2,9 @@
<div class='serendipity_date'>{$CONST.TOPICS_OF} {$dateRange.0|@formatTime:"%B, %Y"}</div>
<div class="serendipity_entry">
{foreach from=$entries item="entries"}
{foreach from=$entries item="sentries"}
<ul>
{foreach from=$entries.entries item="entry"}
{foreach from=$sentries.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}