十二月 29, 2006
[教學講義]外掛程式-Recent Comments-最近迴響
在panel.template 或是備 links.template 或footer.template(模板:standard)中加入以下語法:
--------------------------------------------
{if $recentcomments->isEnabled()}
<h2>最近迴響</h2>
{assign var=comments value=$recentcomments->getRecentComments()}
<ul>
{foreach from=$comments item=comment}
{assign var=commentpostid value=$comment->getArticleId()}
{assign var=commentpost value=$recentcomments->getArticle($commentpostid)}
<li><a title="View comments by {$comment->getUsername()}" href="{$url->postPermalink($commentpost)}#{$comment->getId()}"><b>{$comment->getUsername()}¡G</b>{$comment->getText()|truncate:100:"..."|strip_tags}</a></li>
{/foreach}
</ul>
{/if}
-----------------------------------------------------
回應文章
Re: [教學講義]外掛程式-Recent Comments-最近迴響

Re: [教學講義]外掛程式-Recent Comments-最近迴響
親愛的老師,我加了之卻沒作用,是為何呢?
我的模版是andreas01的架構,我把上述的內容複製到sidebar-r.template,因為我想要顯示在右方,問題在哪裡呢?

不好意思,剛剛的問題已經解決,因為外掛沒打開,呵呵!小笨~
但新問題來了,那個sidebar的版面粉醜,你會調整嗎?我研究半天都不得其門而入,救救我吧!