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) - Specify the number of tags to be shown. This option only effective if no parameter is provided to theme function
  • 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( $no_of_tags );

$no_of_tags - this parameter is optional. If no parameter is provided, the value of configuration option 'No. of tags shown' would be used except those tag(s) to be hidden.

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
  • Version 1.5 - removed the option 'No. of tags shown' from configuration, use parameter passing to control the number of tags to be shown

  • Version 1.6 - reintroduced the configuration option 'No. of tags shown', please note when this option is effective

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
  • Version 1.4 - Added support of multi-site installation
  • Version 1.5 - Added support of multiple instance of tag cloud display
  • Version 1.6 - Added back the configuration option 'No. of tags shown'
  • Version 1.6a - Modified to support both Habari 0.7-alpha (trunk) and Habari 0.6.x (stable) version
  • Version 1.7 - Modified to support "Tags as Terms" introduced from r3829 in trunk

Download

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

簡介

這個 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) - tag(s) 的顯示數量,這選項只在沒有 parameter 提供給 theme function 時才生效
  • 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( $no_of_tags );

$no_of_tags - 這個 parameter 不是必需的,如沒有的話,便會自動選用設定選頊 "No. of tags shown" 內的數值,所有非隱藏的 tags 皆會顯示。

一個 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 1.5 - 移除了設定頁 "No. of tags shown" 的選項,改為以 parameter passing 來控制 tags 顯示的數量

  • Version 1.6 - 重新加入設定頁 "No. of tags shown" 的選項,請留意這選項的生效情況

版本資料

  • 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
  • Version 1.4 - 支援 multi-site 安裝
  • Version 1.5 - 支援多個不同數量的 tag cloud 顯示
  • Version 1.6 - 重新加入設定頁 "No. of tags shown" 的選項
  • Version 1.6a - 支援 Habari 0.7-alpha (trunk) 和 Habari 0.6.x (stable) 版本

下載

48 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 內,所以還未適合發放出來。

  10. 34943

    This is a great plugin, but for some reason with my upgrade to Habari 0.5, it's not recognizing that the plugin has been configured. I've installed your latest version too, and reconfigured everything... but still no luck. What setting am I missing? Thanks much!

  11. 35102

    @ElizabethN, what version of plugin are you using previously? The usage of plugin is changed in version 1.3 from

    echo $tag_cloud;

    to

    $theme->tag_cloud();
  12. 41714

    Hello,

    thank you for your plugins, I'm already using a lot of them. ;-)

    One question: With an older version of the tag-cloud-plugin, I'v managed to modify it, so it puts out a limited number of tags on one page and all tags on another page. But I can't figure out how to do this with version 1.4.

    Is it possible to use something like: $theme->tag_cloud(number_of_tags) ? e.g.

    $theme->tag_cloud(35);

    Thanks in advance and keep up the good work!

    John

  13. 41850

    @John, that's a good suggestion. I can incorporate it in the next version. Hopefully, it could be released in a few days. ;)

  14. 43942

    @John, the new version was already released to support your requested feature. Please have a try. ;)

  15. 44067

    Wow! 1000 thanks! <3>

  16. 80747

    Hiya Tinyau :)

    Do you have an updated for the latest taxonomy changes coming soon? :)

  17. 80774

    @Randy, the updated version is uploaded. ;)

  18. 80788

    Thanks! Uh, also disregard my poor grammar in my previous comment. :D

  19. 81397

    激活插件时系统提示“是一个旧的插件,并且不包括一个XML信息文件。”。我装的是最新的0.7 alpha 版。

  20. 81398

    不好意思,看错了,出错信息是另外一个插件。
    上面的留言删掉吧。

  21. 82931

    Great plug in by the Chinese. I'd definitely try this one, it is useful.

  1. 86435 Habari – miújság? :: arkanoid.hu
  2. 81369 Sound of Breaking
  3. 81295 宅事
  4. 80877 Plans for hMallow 2 - hMallow 2
  5. 80771 RN Tag Cloud Plugin 1.7 @ 天佑的自由天地

Leave a Reply