用 Google 搜尋:

無聊人的無聊故事

WordPress plugin - Comments Status

— by C.H.Weng @ 9:22 下午

Comments Status

Introducing

可以計算評論總數,並且可以輸出評論一覽。

Features

  • 可計算評論總數。
  • 可輸出評論一覽。
  • 可計算引用連結總數。
  • 可輸出引用連結一覽。

Demo

本站右側選單上就有這個 plugin 的示範效果。

Download

目前版本:0.2

http://www.chweng.idv.tw/downloads/comments-status.zip

Installation

安裝啟用
  1. 將解壓縮出來的 comments-status.php 放到 WordPress 的 plugin 資料夾,預設為 wp-content/plugins。
  2. 在控制台中啟用這個 plugin。
輸出評論數量
  1. 開啟目前使用佈景的相關檔案,例如 sidebar.php。
  2. 在要顯示評論數量的地方,加上這個程式碼:
    <?php echo comments_count(); ?>
輸出引用連結數量
  1. 開啟目前使用佈景的相關檔案,例如 sidebar.php。
  2. 在要顯示評論數量的地方,加上這個程式碼:
    <?php echo trackbacks_count(); ?>
輸出評論清單
  1. 在 WordPress 主目錄下開一個新的 php 檔,名稱不限,只要副檔名為 php 即可。
  2. 檔案內容如下:
    <?php require(dirname(__FILE__).'/wp-blog-header.php'); ?>
    <?php get_header(); ?>
    <div id="content" class="narrowcolumn">
    <h2>評論列表</h2>
    <?php comments_archives('comment'); ?>
    </div>
    <?php get_sidebar(); ?>
    <?php get_footer(); ?>
  3. 存檔後即可使用,請以一般超連結開啟對應網址即可。
輸出引用連結清單
  1. 在 WordPress 主目錄下開一個新的 php 檔,名稱不限,只要副檔名為 php 即可。
  2. 檔案內容如下:
    <?php require(dirname(__FILE__).'/wp-blog-header.php'); ?>
    <?php get_header(); ?>
    <div id="content" class="narrowcolumn">
    <h2>引用連結列表</h2>
    <?php comments_archives('trackback'); ?>
    </div>
    <?php get_sidebar(); ?>
    <?php get_footer(); ?>
  3. 存檔後即可使用,請以一般超連結開啟對應網址即可。

Version History

沒什麼意外的話,應該是不會有改版了。

  • 0.2:
    • 新增統計引用連結(trackbacks)
    • 新增輸出引用連結清單
  • 0.1: 初次釋出

共有 31 條評論

  1. 謝謝您的這個 plugin,好用。

    不過「所有評論列表」,會把已刪除的和垃圾留言也一併列出,這一點可能需要修正一下。

    謝謝。

  2. 修正了~

    同樣的檔案請再下載一次、解壓縮後蓋掉原本的就可以了。

    版號我也沒改,懶得再寫 change log 了*-*

  3. 不知道為什麼 翻到第三面就錯誤哩= ="
    麻煩您了... 感謝
    http://bibi.daxp.com/wp/wp-comments_archives.php?page=3

  4. 請再試試看:)

  5. 可以了!
    是不是把引用給拿掉了!?

    嗯 感謝^^

    另外我可以偷你的選單的伸縮功能嗎?

  6. 我忘了我拿掉什麼了..+_+

    不過我很認真數了一下你站上的評論數量,含引用的話總共應該是 39 個沒錯,
    從 comment list 裡面也可以看到引用的內容,所以應該是拿掉了 spam 或未審核的內容吧……

    另外那個選單請盡情夾走,如果夾不到的話我再幫你打包+_+

    不過我是用很笨的方法自己拼裝 code 上去,所以不要妄想有什麼 plugin 可以做那個玩意兒+_+

  7. 哈哈...
    我會依樣畫葫蘆的把他塞進去的= =+

    感謝^^

  8. 偷到了= =+
    偷東西我最會啦XD"
    (謎:這有啥好自豪的...)

    接下來就是修改版面啦^^

  9. 哇哈哈...
    文章上面忘記註明顯示引用數目的語法了..
    應該是「trackbacks_coun()」沒錯吧?

  10. 抱歉 少一個t
    應該是「trackbacks_count()」才對= =

  11. 是的,你得到它了!

    感謝你的提醒,我等等會補上說明。

  12. 話說你的小圖好漂亮啊 囧..

  13. Hello, nice site look this:

    I have a following situation:

    Wordpress (2.1) installed in "abc" directory (/abc/) and a .htaccess file modified as Wordpress said:
    There is just one problem - when I load that .htaccess my [server's] error pages are being ignored - i.e. when I type wrong adress (www.myserver.com/blabla) it redirects me to the error page of the Wordpress template.http://phentermine-adipex-ionamin.hieldes.info phentermine adipex ionamin phentermine adipex ionamin

  14. 您好, 謝謝您寫了這個外掛, 我有一個小問題, 如果輸出的地方不用文章排序, 只需要按日期排序所有留言, 要怎麼改呢? 謝謝您!

  15. 不好意思, 又是我...這個外掛真的寫得很好, 是我找到唯一一個有辦法呈現所有comment而且分頁的; 不過頁碼的link好像寫錯了耶! 點下去會變成文章的page, 並不是comment的page說...我點了你的comment頁, 也有這種情形喲!

  16. 我知道了,不過目前暫時沒辦法修正,等我一個月吧 XD

  17. 沒關係, 我有做了單獨一頁就ok了, 小改了頁碼的地方, 加上#comment可以直接連到該頁的comment欄, 另外我也翻譯了一個英文版, 再寄給您看喔! 真的很謝謝你寫了這個外掛, 我看wordpress.org的forum也很多人在找這個外掛哩!

  18. 嗨,我已經稍微看過囉,應該是因為主程式升級到 2.3 以後才出現的新問題,目前已經獲得解決。

    您寫給我的信我有收到,內附的那個英文版連結似乎失效了。不過無論如何,都歡迎你改寫重新發布,方便的話記得附一下原出處,滿足我小小的虛榮心就可以了 XD

  19. [...] Visit [...]

  20. I tried using the plugin but some asian characters were included in the code and it caused some errors. Do you have an English version of the plugin?

    Thanks!
    Sandra

  21. I've made a special English version for you. Hope this helps.

    Please download at http://www.badongo.com/file/8018911

  22. Thank you for the English version!

    It was working great until I logged out and tried to log back in. I get the following error:

    Warning: Cannot modify header information - headers already sent by (output started at /home/psmark/public_html/cctemp/wp-content/plugins/comments-status.php:1) in /home/psmark/public_html/cctemp/wp-login.php on line 12

    I know the comments-status.php file uses the header() and so does wp-login.php and pluggable.php. They both conflict with the plugin. Any idea how to fix this?

  23. Try to disable the GZIP function at Option > Reading in your admin panel

  24. It was already disabled. :(

  25. There is some linux-based servers suffer from this hard situation.

    I'm sorry that I couldn't indicate the problem and fix it.

    But I have a compromised solution.
    There was only one header() at line 45 of this plugin, please modify this line from
    header('Location: '.$_SERVER['PHP_SELF']);
    into
    $curpage=1;

    This might works..

  26. Hi C.H.

    It fixed some of the problem.

    Here is what I get when I try to post a comment:

    Warning: Cannot modify header information - headers already sent by (output started at /wp-content/plugins/comments-status.php:1) in /wp-content/plugins/subscribe-to-comments/subscribe-to-comments.php on line 817

    Warning: Cannot modify header information - headers already sent by (output started at /wp-content/plugins/comments-status.php:1) in /wp-includes/pluggable.php on line 329

    Here is what I get when I log out:

    Warning: Cannot modify header information - headers already sent by (output started at /wp-content/plugins/comments-status.php:1) in /wp-login.php on line 12

    Warning: Cannot modify header information - headers already sent by (output started at /wp-content/plugins/comments-status.php:1) in /wp-includes/pluggable.php on line 379

    Warning: Cannot modify header information - headers already sent by (output started at /wp-content/plugins/comments-status.php:1) in /wp-includes/pluggable.php on line 380

    Warning: Cannot modify header information - headers already sent by (output started at /wp-content/plugins/comments-status.php:1) in /wp-includes/pluggable.php on line 381

    Warning: Cannot modify header information - headers already sent by (output started at /wp-content/plugins/comments-status.php:1) in /wp-includes/pluggable.php on line 382

    Warning: Cannot modify header information - headers already sent by (output started at /wp-content/plugins/comments-status.php:1) in /wp-includes/pluggable.php on line 329

  27. After editing the plugin file, you should save it as UTF-8 encoded without BOM.

    I always use EmEditor to do that, if you don't have a Windows platform, please google out a text editor supports saving UTF-8 file without BOM on your own.

  28. Thanks for sharing this plug-in! It's just what I needed. It mostly works great, except for the page numbering system. Clicking on page 2 works OK, but later page numbers don't. I'm seeing URLs for pages 3 and beyond that look like this:
    http://techgrl.com/all-comments/?page=2?page=3

    Has anyone else noticed this? Is there a solution? Thanks!!

  29. You have only 20 comments so that page numbers 2 and later may not work properly.

    And I'm wondering how you get the freak URL with parameter page=2?page=3 ?

  30. [...] Comments Status 0.2 [...]

  31. Same problem as Steve.

發表評論

(必須輸入。)
(必須輸入,但不會公開。)
(選擇性輸入、公開資訊。)

不可以 使用 HTML 標籤;你 可以 使用 BBCode 標籤。
目前支援的標籤: b color email i img size strong u url。

Comment Preview
↑Meta↑
↑Authors↑
↓Search↓
↑Categories↑
↑Recent Posts↑
↓Most Popular Posts↓
↑Recent Comments↑
↓Recent Trackbacks↓
↓Archives↓
↓Themes↓
Powered by WordPress™
Valid RSS & Atom Feed