Habari - RN Tag Cloud Plugin

Introduction

This plugin show the tag cloud of your Habari blog.

Installation

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

Configuration Option

After activated it, click button to setup the plugin.
  • No. of tags shown (blank for all tags) - Number of tags to be shown. Leave it blank for showing all tags
  • Tag(s) to be hidden - Specify the tag(s) to be hidden
  • Popularity by Color? - Use color to visualize the popularity of tag
  • Color of least popular tag
  • Color of most popular tag
  • Popularity by Size? - User font size to visualize the popularity of tag
  • Size of least popular tag
  • Size of size popular tag
  • Font Unit - Either '%', 'em' or 'px'
Usage
$theme->tag_cloud();

An unordered list will be generated. You have to use CSS to style it.

Note
  • Version 1.2 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.
  • Version 1.3
    • Changed from using theme variable to theme function, please note the change of usage
    • There is a new button added to the plugin page of dashboard to let you to clear the cache. Normally, you don't need to click it since the cache will be expired and regenerated automatically when new post published or some other tag related changes that affect the output of tag cloud. However, if you found something wrong with your tag cloud output or it doesn't appear at all, you can click this button to clear the cache and let the new cache generated automatically.
    • The option 'Tag(s) to be hidden' has been changed to use textmulti of FormUI, you have to re-configure it if you have setting there previously

Changelog

  • Version 0.5 - Initial release
  • Version 0.6 - Add the option to hide some tag(s)
  • Version 0.7 - Added SQLite support
  • Version 0.8 - Improved configuration page - support i18n, change to use drop down selection box for some fields and improved validation to eliminate incorrect input
  • Version 0.9 - Fixed the validation problem in configuration page. Thanks miklb for the information
  • Version 1.0 - Fixed the problem of broken Habari when there is no entry. Thanks S. point out this problem
  • Version 1.1 - Added PostgreSQL support. Fixed the failure of size / color fading when the usage count per tag is small
  • Version 1.2 - Modified to support new FormUI and setup default configuration option during activation
  • Version 1.3 - Modified to use theme function instead of theme variable and added cache support
  • Version 1.3a - Clear the cache during deactivation
Download here (Downloaded 538 times)

======================

簡介

這個 plugin 是將 Habari blog 內的 tag 以 tag cloud 形式顯示。。安裝
  1. 將下載了的 zip file 解壓
  2. 把 'tagcloud' folder 放在 /user/plugins 中,然後啟動 plugin

設定選項

啟動 plugin 後,click 按鈕 來設定選項。

  • No. of tags shown (blank for all tags) - Tags 顯示的數量,如果想顯示所有 tags,請留空這欄
  • Tag(s) to be hidden - 希望隱藏的 tag(s)
  • Popularity by Color? - 用顏色來顯示 tags 的使用量
  • Color of least popular tag - 使用最少的 tag 的顏色
  • Color of most popular tag - 使用最多的 tag 的顏色
  • Popularity by Size? - 用大小字型來顯示 tags 的使用量
  • Size of least popular tag - 使用最少的 tag 的大小
  • Size of size popular tag - 使用最多的 tag 的大小
  • Font Unit - 有 '%'、'em' 及 'px' 可供選擇
使用方法
$theme->tag_cloud();

一個 Unordered list 會產生出來,需要用 CSS 來修飾顯示效果。

注意事項
  • Version 1.2 轉用了新的 FormUI 加上跟隨了新的 configuration name 命名,請使用 Habari SVN r1948 或以後的版本,及重新設定 plugin
  • Version 1.3
    • 由使用 theme variable 轉至用 theme function,請留意使用方法的改變。
    • 在 dashboard 的 plugin 頁面中加入了一個新按鈕 。正常來說是不用按這按鈕的,因為當有新文章發表或其他會影響輸出有關 tag 的改變,cache 都會自動更新,但如果發現 tag cloud 的輸出有問題,或甚至沒有任何東西顯示出來的話,大家可以按這按鈕來清除 cache。
    • 選項 'Tag(s) to be hidden' 改用了 FormUI 的 textmulti,若果之前曾設定過這選項,請重新再設定一次

版本資料

  • Version 0.5 - 最初公開版本
  • Version 0.6 - 新增隱藏 tag 選項
  • Version 0.7 - 支援 SQLite
  • Version 0.8 - 改善設定頁面,支援 i18n,部份選項改用 drop down selection box 和將設定檢查改良以避免錯誤設定
  • Version 0.9 - 修正設定頁面的檢查程序,多謝 miklb 提出問題所在
  • Version 1.0 - 修正了沒有文章時令到 Habari 壞掉的問題,多謝 S. 提出問題所在
  • Version 1.1 - 支援 PostgreSQL,修正了一些使用量低的 tag 不能正常使用 size / color fading
  • Version 1.2 - 使用了新的 FormUI 和在啟動 plugin 時自動設定 plugin 的預設選項
  • Version 1.3 - 由 theme variable 改用 theme function,新增 cache 支援
  • Version 1.3a - 在 deactivate plugin 時刪除 cache

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

22 Responses to “Habari - RN Tag Cloud Plugin”

  1. 3717

    Hi, great to see this is ready for the plugin as this will be popular.

    Do you have to remind early users of Habari which svn version would be OK or that if older version is used rewrite_rules tables should be updated with the latest one?

  2. 3720

    @sfong, thanks for reminding me, I've forgot to mention it. I have amended the post with that reminder.

  3. 15574

    在sqlite环境下这个插件输出会有点问题.
    PDO drivers:sqlite2, sqlite
    建议将:tagcloud.plugin.php的第271行:
    "SELECT t.tag_text , t.tag_slug , t.id , COUNT(t2p.post_id) AS cnt, "
    改为:
    "SELECT t.tag_text as tag_text , t.tag_slug as tag_slug , t.id as id , COUNT(t2p.post_id) AS cnt, "

  4. 17240

    tinyau, it seems you still need to set colors for the settings, even if you choose the "no" option.

  5. 17305

    @miklb, stupid me, I have used the stored plugin option (Popularity by Color) to check against current color code in FormUI field. Therefore, if 'Popularity by Color' is 'Yes' previously, you can't clear the color code even you opt to not use color setting.

    I have to study how to write the validator to check for the values more than one field. In the mean time, you can set color setting to 'No', save it first and then clear the color code. Thanks for your information. ;)

  6. 18516

    heya,

    Great plugin, one bug however. If there are no posts/tags, it will break Habari. You have to delete the tagcloud folder to restore this. Here is the error I've been getting:

    Error: Undefined offset: 0
    D:\xampplite\htdocs\habari\user\plugins\tagcloud\tagcloud.plugin.php : Line 331

  7. 18548

    @S., thanks for your problem report. I'll fix it in the next version. ;)

  8. 27775

    天佑,可以分享一下你的habari下载管理插件吗?

  9. 27782

    @fireyy:我那個 download counter plugin,因為不懂設定畫面怎樣用 FormUI 制作,所以用法是非常人手的,要自行加 record 到 table 內,所以還未適合發放出來。

  1. 5179 RN Tag Cloud Plugin 0.6 @ 天佑的自由天地
  2. 5931 Because I Learn » Blog Archive » This is DarkHalf 0.1
  3. 17209 RN Tag Cloud Plugin 0.8 @ 天佑的自由天地
  4. 17275 :: Swanky Theme - Blogging Meta ::
  5. 17380 RN Tag Cloud Plugin 0.9 @ 天佑的自由天地
  6. 17415 Code Bus - Redarry Theme available for Habari
  7. 17846 A WhiteBox :: Charcoal theme updated
  8. 18638 RN Tag Cloud Plugin 1.0 @ 天佑的自由天地
  9. 22453 RN Tag Cloud Plugin 1.1 @ 天佑的自由天地
  10. 25209 Habari - RN Tag Cloud Plugin @ 天佑的自由天地
  11. 25210 RN Tag Cloud Plugin 1.2 @ 天佑的自由天地
  12. 27439 RN Tag Cloud Plugin 1.3 @ 天佑的自由天地
  13. 27719 RN Tag Cloud Plugin 1.3a @ 天佑的自由天地

Leave a Reply