Habari - RN Related Posts Plugin

General

This plugin is used to show the related posts based on the intersection of tags. More the tags are the same, more the relatedness will be.

Installation

  1. Unzip the file
  2. Put the folder 'relatedposts' to /user/plugins and activate it

Configuration Option

After activated it, click <configure> button next to <Deactivate> button to setup the plugin.

Usage

echo $related_posts;

An unordered list will be shown with the following structure.

<ul class="related-post">
<li class="related-post-odd">Post 1</li>
<li class="related-post-even">Post 2</li>
<li class="related-post-odd">Post 3</li>
.
.
</ul>

You can use CSS to style the output.

Note

  • Version 1.0 modified to use new FormUI and comply to the new standard of configuration name, please make sure you are using Habari SVN r1948 or later and configure the plugin again.

Changelog

  • Version 0.5 - Initial release
  • Version 0.6 - Changed to use theme variable instead of function call to better support MVC model of Habari
  • Version 0.7 - Add configuration page to setup number of related posts to be shown
  • Version 0.8 - Support SQLite
  • Version 0.9 - Support PostgreSQL, i18n
  • Version 1.0 - Modified to support new FormUI, some code cleanups and setup default configuration option during activation
  • Version 1.1 - Fixed the duplicated posts problem that caused by plugin hook 'action_add_template_vars()' called several times and output is appended to template variable '$related_posts' several times due to no initialization is done.

Download here (Downloaded 804 times)

簡介

這個 plugin 是用作顯示 related posts,據著 tag 的關聯來斷定文章是否有關,愈多 tag 相同,關聯性便愈高。

安裝

  1. 將下載了的 zip file 解壓
  2. 把 'relatedposts' folder 放在 /user/plugins 中,然後啟動 plugin

設定選項

啟動 plugin 後,click 在 <Deactivate> 按鈕旁的 <configure> button 來設定選項。

使用方法

echo $related_posts;

以下結構的 unordered list 將會顯示出來。

<ul class="related-post">
<li class="related-post-odd">Post 1</li>
<li class="related-post-even">Post 2</li>
<li class="related-post-odd">Post 3</li>
.
.
</ul>

大家可使用 CSS 來修飾顯示效果。

注意事項

  • Version 1.0 轉用了新的 FormUI 加上跟隨了新的 configuration name 命名,請使用 Habari SVN r1948 或以後的版本,及重新設定 plugin

版本資料

  • Version 0.5 - 最初發布版本
  • Version 0.6 - 由 function call 改為 theme variable,這樣可更切合 Habari 的 MVC model
  • Version 0.7 - 加入使用 FormUI 做的設定頁面,可設定 related posts 的顯示數量
  • Version 0.8 - 支援 SQLite
  • Version 0.9 - 支援 PostgreSQL、i18n
  • Version 1.0 - 使用了新的 FormUI、code cleanups 和在啟動 plugin 時自動設定 plugin 的預設選項
  • Version 1.1 - 修正了因 plugin hook 'action_add_template_vars()' call 了數次而忘記 initialize template variable '$related_posts' 引致的重覆 posts 問題

下載連結(已經下載了 804 次)

16 Responses to “Habari - RN Related Posts Plugin”

  1. 3042

    国人关注的好像很少啊!

  2. 3165

    @偶愛偶妻:我想我是華人圈中極少數留意 Habari 甚至有意轉用 Habari 的人。

  3. 3290

    Same as the other one (as you said structure is the same) and I also got 500 error, this time I just commented that line out and this works again.

  4. 3291

    @sfong, what the error message shown in apache error log?

  5. 3235

    其实我也挺关注的.呵呵.但是离转换平台还有段距离.现在的Habari还有许多对中文用户来说的硬伤,比如文章链接地址,如果文章名称为中文的话那链接地就惨不忍睹了.

  6. 3184

    @iHao 對我來說已經接近轉用 Habari 的時機,最好可支援 XMLRPC 和留言 email alert,但沒有也不是大問題,估計最快九月我應該可以轉到 Habari 去。

  7. 19634

    Hi,

    I got a error when I install Habari,

    the message/log are:

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

    Server error!

    The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there was an error in a CGI script.

    If you think this is a server error, please contact the webmaster.
    Error 500
    localhost
    04/18/08 15:01:59
    Apache/2.2.8 (Win32) DAV/2 mod_ssl/2.2.8 OpenSSL/0.9.8g mod_autoindex_color PHP/5.2.5

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

  8. 27563

    running latest HEAD, the plugin is echoing the list of related posts 4 times. Any ideas?

  9. 29029

    天呐,问题总算解决了,谢谢天佑,我这边的问题也解决了,就差升级0.5的DB了。

  1. 75758 Habari主题Dark Autumn修改 - 天真小院儿
  2. 64059 Miklb's Mindless Ramblings
  3. 29013 RN Related Posts Plugin 1.1 @ 天佑的自由天地
  4. 25197 RN Related Posts Plugin 1.0 @ 天佑的自由天地
  5. 17274 :: Swanky Theme - Blogging Meta ::

Leave a Reply