[pLog-svn] r6349 - templates/branches/lifetype-1.2/unported/buggy
jondaley at devel.lifetype.net
jondaley at devel.lifetype.net
Mon Apr 28 13:32:17 EDT 2008
Author: jondaley
Date: 2008-04-28 13:32:17 -0400 (Mon, 28 Apr 2008)
New Revision: 6349
Modified:
templates/branches/lifetype-1.2/unported/buggy/post.template
templates/branches/lifetype-1.2/unported/buggy/postandcomments.template
Log:
added comments and commentform
Modified: templates/branches/lifetype-1.2/unported/buggy/post.template
===================================================================
--- templates/branches/lifetype-1.2/unported/buggy/post.template 2008-04-28 17:22:29 UTC (rev 6348)
+++ templates/branches/lifetype-1.2/unported/buggy/post.template 2008-04-28 17:32:17 UTC (rev 6349)
@@ -3,9 +3,9 @@
{assign var="postOwner" value=$post->getUserInfo()}
<span class="shadedark">{$postOwner->getUsername()}</span>
<span class="shadelight">{$locale->formatDate($postDate,"%d %B, %Y %H:%M")}</span>
-<span class="shadedark">{foreach name=categories from=$post->getCategories() item=postCategory}<a href="{$url->postCategoryLink($post)}">{$postCategory->getName()}</a>{if !$smarty.foreach.categories.last}, {/if}{/foreach}</span>
+<span class="shadedark">{foreach name=categories from=$post->getCategories() item=postCategory}<a href="{$url->categoryLink($postCategory)}">{$postCategory->getName()}</a>{if !$smarty.foreach.categories.last}, {/if}{/foreach}</span>
<span class="shadelight"><a title="{$locale->tr("permalink_title")}" href="{$url->postPermalink($post)}">{$locale->tr("permalink")}</a></span>
<span class="shadedark"><a href="{$url->postTrackbackStatsLink($post)}">{$locale->tr("trackbacks")} ({$post->getNumTrackbacks()})</a></span>
<p>
{$post->getText()}
-</p>
\ No newline at end of file
+</p>
Modified: templates/branches/lifetype-1.2/unported/buggy/postandcomments.template
===================================================================
--- templates/branches/lifetype-1.2/unported/buggy/postandcomments.template 2008-04-28 17:22:29 UTC (rev 6348)
+++ templates/branches/lifetype-1.2/unported/buggy/postandcomments.template 2008-04-28 17:32:17 UTC (rev 6349)
@@ -8,7 +8,44 @@
<a href="{$url->postPermalink($prevpost)}" title="Previous post: {$prevpost->getTopic()}">»</a>
{/if}
</p>
- {assign var="poster" value=$post->getUserInfo()}
<!-- {$url->postTrackbackLink($post)} -->
{include file="$blogtemplate/post.template"}
+
+{if $blogsettings->getValue("comments_enabled") &&
+$post->getCommentsEnabled()==1 || $comments }<h2
+id="comments">{$locale->tr("comments")|capitalize}</h2>
+{/if}
+ {pager style="links"}
+ {foreach from=$comments item=comment}
+<div class="comment">
+<h3 class="commentheader">{if $comment->getTopic() != null}
+{$comment->getTopic()|strip_tags}{else}Re:
+<em>{$post->getTopic()|strip_tags}</em>{/if}</h3>
+
+<p class="commentposterinfo">
+ {assign var="postDate" value=$comment->getTimestamp()}
+ {if $comment->getUserUrl() != ""}<a
+ href="{$comment->getUserUrl()}">{$comment->getUsername()}</a>
+ {else}
+ {$comment->getUsername()}
+ {/if} | {$locale->formatDate($postDate, "%d/%m/%Y,
+ %H:%M")}
+</p>
+
+<div class="commenttext">
+{if $comment->IsPosterAuthenticated()}
+ {assign var=poster value=$comment->getUser()}
+ {if $poster->hasPicture()}
+ {assign var=posterimg value=$poster->getPicture()}
+ {assign var=commenter value=$comment->getUser()}
+ <img src="{$posterimg->getPreviewLink()}"
+ alt="{$commenter->getUserName()}" />
+ {/if}
+{/if}
+{$comment->getText()}
+</div>
+</div>
+ {/foreach}
+
+{include file="$blogtemplate/commentform.template"}
{include file="$blogtemplate/footer.template"}
More information about the pLog-svn
mailing list