Talk:Wiki Category Tag Cloud

From Wiki-Tools

Jump to: navigation, search

Your line 28 in the tarball snapshot lacks a , --149.225.2.32 12:01, 11 May 2008 (UTC)

[edit] Bugs and request

Hi. The bugs I found.

  1. When style, class, linkstyle or linkclass parameters are not given, PHP returns Notice: Undefined index: class in /w/extensions/WikiCategoryTagCloud/WikiCategoryTagCloud.php on line 59 and so on. Setting class="" style="" linkclass="" linkstyle="" fixes it, but these parameters should be optional.
  2. There is a missing comma here at line <lang source="php">'url' => 'http://wiki-tools.com/wiki/Wiki_Category_Tag_Cloud'</lang>.

And the request: I would love to see this extension generating category cloud only from subcategories of given category / categories, like DynamicPageList does.

Thanks! Ruiz 18:49, 19 July 2008 (UTC)

Those parameters are optional, what you are getting is not a PHP Error, but a PHP Notice, you got that because your error reporting is a little to strict, it's nitpicking on coding style there. Whatever the case I've released a 1.0.1 with that and the comma issue fixed. As for the request, that's something that gets a little more into complex stuff. This extension is an ugly coded extension which I merely derived from another one. Honestly I'd sooner rewrite the whole extension and only rip out the code for generating the tag cloud (The only good thing about the original YATC was it's tag cloud style looked better than the others) and write my own backend, than just try adding random features to this one. Dantman 07:01, 20 July 2008 (UTC)
You are right. Setting error_reporting(0) is better than error_reporting(E_ALL) when wiki is stable and nothing should go wrong. I'll be looking for a new version of Wiki Category Tag Cloud. It will make wikis so Web 2.0, along with ShareThis extension. ;) Ruiz 12:02, 20 July 2008 (UTC)

[edit] empty class property

If you want to avoid empty "class" properties in your wiki categories cloud, you can replace

This

$currentRow = "<a class=\"" . implode( ' ', $link_classes ) . "\" style=\"{$style}\" href=\"" . $title->getLocalURL() . "\">" . $title->getText() . "</a>&nbsp; ";


to this

if (count($link_classes)>0 && implode( ' ', $link_classes )!="") 
{			
    $link_classes_part = "class=\"" . implode( ' ', $link_classes ) . "\"";
}
else $link_classes_part = "";
$currentRow = "<a $link_classes_part style=\"{$style}\" href=\"" . $title->getLocalURL() . "\">" . $title->getText() . "</a>&nbsp; ";
Personal tools
Nadir Point Network