置頂文章

十二月 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}

----------------------------------------------------- 


發佈者: 莊志明 at 21:40│  點閱次數 (1326)│ 修改文章管理迴響[資訊教育]部落格教學講義

回應文章

Re: [教學講義]外掛程式-Recent Comments-最近迴響

不好意思,剛剛的問題已經解決,因為外掛沒打開,呵呵!小笨~

但新問題來了,那個sidebar的版面粉醜,你會調整嗎?我研究半天都不得其門而入,救救我吧!

好吧!!!等今天把教室整理好…我再來錄個影片教學好了…
yyhsu Posted by  http://月光女俠 at 14/11/2007, 07:07

Re: [教學講義]外掛程式-Recent Comments-最近迴響

親愛的老師,我加了之卻沒作用,是為何呢?
我的模版是andreas01的架構,我把上述的內容複製到sidebar-r.template,因為我想要顯示在右方,問題在哪裡呢?

yyhsu Posted by  http://月光女俠 at 14/11/2007, 06:54
 

發表迴響

(必要)
authimage
   

Powered by LifeType. Design by colaccl.com


Bad Behavior 已經阻擋了 229 個過去 7 天試圖闖關的垃圾迴響與引用。