歡迎光臨, 訪客. 請先 登入註冊一個帳號.
五月 04, 2024, 05:20:44 上午
19595 文章 在 3865 主題 由 4580 會員
最新註冊會員: aa123aa1
LifeType 中文開發論壇  |  開發  |  外掛程式  |  分享一個外掛給大家參考! « 上篇主題 下篇主題 »
頁: [1]
作者 主題: 分享一個外掛給大家參考!  (閱讀 12171 次)
loveyoyo
新手見習
*
文章: 8


檢視個人資料
« 於: 四月 28, 2005, 05:05:05 下午 »

這是一個可以回覆迴響的外掛程式,有興趣的朋友可以參考。
comment
answer1
answer2
...
comment
...

程式碼:
This plugin will generate a nested list of comments. In order to use it, edit your postandcomments.template file and where it says: 

   {foreach from=$comments item=comment}  
with:

   {assign var=comments value=$nestedcomments->getNestedComments($post)}
   {foreach from=$comments item=comment}
In order to nest the comments, you can check the value of the "depth" field in order to know how deeply a certain comment should be nested but keeping in mind that the array of comments is already sorted correctly:

   {assign var=comments value=$nestedcomments->getNestedComments($post)}
   {foreach from=$comments item=comment}
     <div class="comment_{$comment->getValue("depth")}">
      {$comment->getTopic()}<br/>
      {$comment->getText()}<br/>
     </div>
   {/foreach}
In order to apply different graphical styles for different levels of nesting, define up to 6 "comment_X" CSS classes (as in "comment_1", "comment_2", "comment_3", etc) in the CSS file used by your template set.

    .comment_1 {
     margin-left: 10px;
    }
    .comment_2 {
     margin-left: 20px;
    }
    .comment_3 {
     margin-left: 30px;
    }
    ...
    .comment_6 {
     margin-left: 60px;
    }
By default there can only be up to 6 levels of nesting but this limit is configurable by editing the plugin file.


原始說明
http://forums.lifetype.net/viewtopic.php?t=2208

下載
http://www.lifetype.net/blog.php/plog_development_journal/resource/miscellaneous/view/nestedcomments.zip

我已經安裝成功,不錯用唷!
已記錄

謝謝你們無私的奉獻~
win2kpro sp4 IIS 5.0 / localhost:80
AppServ 2.4.0 / localhost:8080 / plog 1.0
(Apache 1.3.29 + PHP 4.3.6 + MySQL 4.0.18 + phpMyAdmin 2.5.6 + ImageMagick 6.0.4 Q16)
markwu
系統管理員
超級會員
*****
文章: 3928


Mark Wu


檢視個人資料 個人網站
« 回覆文章 #1 於: 四月 28, 2005, 05:16:09 下午 »

這是 Oscar 自己寫的外掛程式喔! 吐舌頭

Mark
已記錄

loveyoyo
新手見習
*
文章: 8


檢視個人資料
« 回覆文章 #2 於: 四月 28, 2005, 05:27:50 下午 »

引用自: markwu
這是 Oscar 自己寫的外掛程式喔! 吐舌頭

Mark


我好喜歡呢!這裡沒找到我要的答案,所以就去http://forums.lifetype.net挖寶,沒想到還到這麼實用的外掛,真不賴呢!
(英文不好,所以不敢提出問題^^)

不過我希望迴響除了能回覆之外,也能夠編修(限blogowner或管理員),那就更棒了~
已記錄

謝謝你們無私的奉獻~
win2kpro sp4 IIS 5.0 / localhost:80
AppServ 2.4.0 / localhost:8080 / plog 1.0
(Apache 1.3.29 + PHP 4.3.6 + MySQL 4.0.18 + phpMyAdmin 2.5.6 + ImageMagick 6.0.4 Q16)
24Hrz.net
新手見習
*
文章: 7


檢視個人資料
« 回覆文章 #3 於: 五月 06, 2005, 08:31:05 下午 »

我有問題!!! 吐舌頭

我嘗試reply別人的comment時, 按reply,但沒反應, 是不是我安裝有問題??
同時,我的smilies也有問題
還有原本的comment也變得怪怪 點我來看我的問題

my plog http://24hrz.net
已記錄
markwu
系統管理員
超級會員
*****
文章: 3928


Mark Wu


檢視個人資料 個人網站
« 回覆文章 #4 於: 五月 09, 2005, 02:18:31 上午 »

引用自: 24Hrz.net
我有問題!!! 吐舌頭

我嘗試reply別人的comment時, 按reply,但沒反應, 是不是我安裝有問題??
同時,我的smilies也有問題
還有原本的comment也變得怪怪 點我來看我的問題

my plog http://24hrz.net


看不出來耶!看起來好像沒作用?

Mark
已記錄

luckybbdog
新手見習
*
文章: 45


檢視個人資料
« 回覆文章 #5 於: 十二月 17, 2005, 12:45:26 上午 »

按照说的试了几次,但还是不行。
把{foreach name=comment from=$comments item=comment}
改成了
{assign var=comments value=$nestedcomments->getNestedComments($post)}
{foreach name=comment from=$comments item=comment}
<div class="comment_{$comment->getValue("depth")}">

再在原来的
{$comment->getTopic()}<br/>
      {$comment->getText()}<br/>

后加</div>

但按了别人的回复之后也没动静。
« 最後編輯時間: 十二月 17, 2005, 08:51:57 上午 由 luckybbdog » 已記錄
頁: [1]
LifeType 中文開發論壇  |  開發  |  外掛程式  |  分享一個外掛給大家參考! « 上篇主題 下篇主題 »
    前往: