Extension talk:WikiCategoryTagCloud
From MediaWiki.org
[edit] Warning link not working
- I clicked on this and it went nowhere: "http://central.wiki-tools.com/wiki/Extension:Wiki_Category_Tag_Cloud"
Can we remove the big yellow box?
- Download-Link is not working - if someone needs the Code, we can send a copy of an old "Wiki Category Tag Cloud (Version 1.0.1)" --Martin 16:39, 2 July 2009 (UTC)
[edit] How to exclude Templates from Showing
This is a great extension. However, at the moment, it is showing all my templates as well as the more meaningful categories. Is there any way that I can change it so that it doesn't include any categories with the word template in them? A kind of wildcard *template* exclude? Any help/advice much appreciated. Thanks
[edit] Thanks
--Sean.mcclowry 11:14, 5 November 2007 (UTC) Great extension! I am using it and here and it works very well. All categories are shown here.
[edit] Additional Configuration Information
--Sean.mcclowry 11:24, 5 November 2007 (UTC) Some additional config info that applies more broadly but I forgot when I initial configured this extension:
- Sometimes categories will take a while to refresh (i.e. if you delete a category it will stay in the cache a while
- Don't use spaces after commas in the exclude list
- Use underscores between multi word categories in the exclude list
[edit] Great Extension.
I amended the code in my copy so that hovering over a link shows the number of pages in that category.
My first attempt at amending an extension so this may not work for everyone but did the job on my site and didn't seem to break anything else.
Replace Line 123 (In the version I downloaded - may differ in other versions!):
$currentRow = "<a class=\"" . implode( ' ', $link_classes ) . "\" style=\"{$style}\" href=\"" . $title->getLocalURL() . "\">" . $title->getText() . "</a> ";
With:
if ($tags[$i][1] == 1) { $page_text = ' Page'; } else { $page_text = ' Pages'; } $alt_text = $tags[$i][1] . $page_text . ' in ' . $title->getText(); $currentRow = "<a class=\"" . implode( ' ', $link_classes ) . "\" style=\"{$style}\" title=\"$alt_text \" href=\"" . $title->getLocalURL() . "\">" . $title->getText() . "</a> ";
BrillyuntWebby 20:02, 12 November 2007 (UTC)
[edit] How to include all pages in a subcategory
I was wondering if there was any way to include all the pages in the subcategory as "members" of the parent category so that the name of the category is given more prominence. Right now, a category with 2 articles and 2 subcategories is as large as a category with 4 articles, which is misleading since the category in the first case contains more information and, in theory, should be larger.
[edit] Bug?
After Installation I get always a "Parse error: syntax error, unexpected T_OBJECT_OPERATOR in /< mywikipath>/extensions/tag_cloud.php on line 44"
excluding the lines 40-46
/*
function invalidateCache() {
$titles[0] = explode( "\n", wfMsg('tagcloudpages') );
for ($i = 0; $i < count($titles); $i++) {
Title :: newFromText($titles[$i])->invalidateCache();
}
}
*/
I'll get an cache delay after an update of my Tags
dite-at-campus.upb.de
- Should be fixed in svn. Dantman 03:23, 10 July 2009 (UTC)
[edit] strange cache problem
the extension works and looks great but when i try submit anything the entire wiki is unreacable from the browser im using... all it gives me is a done page with nothing displayed. i can then use ie but after submitting in ie i get the same problem. only thing i can think that may be causing a problem is fckeditor
thanks westie
[edit] Locating the code
I can't see any code that I can paste into the extension php file. And I can't follow the link in the yellow box at the top in the hope of finding it there. Does anyone know where the code can be found perhaps? Thanks. 82.133.123.210 22:43, 4 May 2009 (UTC)
[edit] Problem with modern-skin (MW 1.13.5 and 1.14.0)
Hi, I am using the modern-skin for MediaWiki. After installing the extension I get the following message:
Warning: Cannot modify header information - headers already sent by (output started at .../extensions/WikiCategoryTagCloud/WikiCategoryTagCloud.php:2) in .../includes/WebResponse.php on line 16
Is there anything that I can do about it. Help is greatly appreciaded. Thank you --Marbot 11:49, 5 July 2009 (UTC)
- Did I mention that this is a great extension. A must for a lot of wikis which increases the usability in respect of finding content. If working, it would be even better. --Marbot 11:54, 5 July 2009 (UTC)
[edit] Problem with color-changes of Linkstyle
<tagcloud style="background: #FF1414;" linkstyle="color: #FFFFFE;"> min_size=100 min_count=15 increase_factor = 200 exclude=browse </tagcloud>
You get the Error-Message:
Uninitialized string offset: -1 in /home/twiki/www/extensions/WikiCategoryTagCloud/WikiCategoryTagCloud.php on line 123 Notice:
To fix the problem, make following changes
Line 119 to 127
for ($i = 0; $i < $count; $i++) { $textSize = $MIN_SIZE + ($INCREASE_FACTOR * ($tags[$i][1])) / ($max); $title = Title::makeTitle( NS_CATEGORY, $tags[$i][0] ); $style = $link_style; if( $style != '' && $style{-1} != ';' ) $style .= ';'; $style .= "font-size: {$textSize}%;"; $currentRow = "<a class=\"" . implode( ' ', $link_classes ) . "\" style=\"{$style}\" href=\"" . $title->getLocalURL() . "\">" . $title->getText() . "</a> "; $htmlOut = $htmlOut . $currentRow; }
Replace with:
for ($i = 0; $i < $count; $i++) { $textSize = $MIN_SIZE + ($INCREASE_FACTOR * ($tags[$i][1])) / ($max); $title = Title::makeTitle( NS_CATEGORY, $tags[$i][0] ); $style = $link_style; if( $style != '' && substr($style,-1) != ';' ) $style .= ';'; $style .= "font-size: {$textSize}%;"; $currentRow = "<a class=\"" . implode( ' ', $link_classes ) . "\" style=\"{$style}\" href=\"" . $title->getLocalURL() . "\">" . $title->getText() . "</a> "; $htmlOut = $htmlOut . $currentRow; }
Shortform:
if( $style != '' && $style{-1} != ';' ) $style .= ';';
->
if( $style != '' && substr($style,-1) != ';' ) $style .= ';';
- Fix committed into svn. Dantman 03:17, 10 July 2009 (UTC)
[edit] Extension breaks when rendered on pages with Special:NewPages link with no results
In MediaWiki version 1.13.4, a link to the PopularCategories template fails to render properly on a page that also has a link to the Special:NewPages template if there are no new pages listed on the NewPages special page. Instead of showing the tag cloud, the infamous UNIQ...QINU string was displayed instead. Once the link to Special:NewPages was removed or prevented from rendering with nowiki tags, the tag cloud renders fine. The problem is worked around simply by adding a new page to the wiki, thereby populating the NewPages page.
Chances are that most people will never experience this issue, as it only happened to us because we were splitting our wiki and killed off the new pages data, but it could crop up under other circumstances as well so it might be worth a little debugging time by someone better versed in PHP than I, as I couldn't figure out a code fix to prevent it.
Memitim 16:13, 23 July 2009 (UTC)
[edit] Category name
Thank you for this extension! Is it possible to "exclude" a category if its name contains a comma? May you please add an 'exclude_like' parameter, in order to have the underlying SQL SELECT use the '%' SQL operator? Natmaka 13:43, 28 July 2009 (UTC)
[edit] Undefined index 'linkstyle' on line 66
Here is the whole string mediawiki is returning:
Notice: Undefined index: linkstyle in $IP\extensions\WikiCategoryTagCloud\WikiCategoryTagCloud.php on line 66
Note I added the $IP variable above to mask my actual server name.
Any ideas? Thanks -- Gomeztogo 06:58, 20 November 2009 (UTC)
[edit] Update
I worked around it by putting a blank linkstyle="" in the tag cloud declaration.
I may wrap the $params => ['linkstyle'] in an if statement if this becomes a problem.