Extension talk:WikiCategoryTagCloud/Archive

FCKeditor causes " " to render in edit mode
when using fckeditor as default editor, the tagcloud tag gets interpreted in edit mode. --80.149.253.142 14:25, 25 July 2011 (UTC)

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

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.

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

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!):

With:

BrillyuntWebby 20:02, 12 November 2007 (UTC)

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.

Bug?
After Installation I get always a "Parse error: syntax error, unexpected T_OBJECT_OPERATOR in / /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)

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

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)

Problem with color-changes of Linkstyle
 min_size=100 min_count=15 increase_factor = 200 exclude=browse

You get the Error-Message: To fix the problem, make following changes

Line 119 to 127

Replace with:

Shortform:

->


 * Fix committed into svn. Dantman 03:17, 10 July 2009 (UTC)

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)

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)

Nice extension! Minor problem: some automatically generated maintenance categories have a comma in their name, these keep showing. Alvaro Ortiz Troncoso (talk) 08:04, 28 July 2015 (UTC)

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)

Update
My Solution to the Problem:

Solved in Git
This problem is now solved in the newest version from Git, which will be the version for MediaWiki 1.21 and newer. --88.130.100.151 19:16, 23 May 2013 (UTC)

PHP Error on save
I get an PHP error if I try to save a page: PHP Warning: Illegal offset type in isset or empty in D:\htdocs\wiki\includes\Title.php on line 117 PHP Warning: Illegal offset type in D:\htdocs\wiki\includes\Title.php on line 139

Win2k3 IIS MediaWiki 1.16.1 PHP 5.2.14 (cgi-fcgi) MySQL 5.1.53-community --Pdcemulator 10:02, 15 March 2011 (UTC)

I have exactly the same problem. In error_log file (Apache) I get following errors: [error] [client IP] PHP Warning: Illegal offset type in /includes/Title.php on line 139, referer: http://.../...&action=edit [error] [client IP] PHP Notice: Array to string conversion in /includes/Title.php on line 2286, referer: http://.../...&action=edit MediaWiki 1.16.1 on CentOS (2.6.18-92.el5) with PHP 5.2.10

Any ideas? Thanks a lot! --Danny373 08:49, 20 May 2011 (UTC)

Solution (?)
Hi there! We had a similar error while using the MultiUpload-Extension along with WikiCategoryTagCloud. After every successful upload we got this for every uploaded file: Warning: Illegal offset type in isset or empty in (...)/includes/Title.php on line 117 Warning: trim expects parameter 1 to be string, array given in (...)/includes/Title.php on line 2286 We found out, that there is a minor bug in the code of function "invalidateCache" of WikiCategoryTagCloud. In the line $titles[0] = explode( "\n", wfMsg( 'tagcloudpages' ) ); the whole "exploded" tagcloudpages go as a second array into the first slot of $titles[0]. So that later on in the code there is no single string to be handed, but a whole array ("expects parameter 1 to be string, array given"). To correct the error we changed the above line to this: $titles = explode( "\n", wfMsg( 'tagcloudpages' ) ); This way all lines (page_titles) from the article Mediawiki:Tagcloudpages implicitly build up an array in the variable $titles and can be referenced correctly later on in the function’s code.

System: MediaWiki 1.16.5, PHP 5.3.3, MySQL 5.0.77

--Cram132 15:13, 30 June 2011 (UTC)


 * SUCCESS! This solution worked for me. Thanks --webken 17:15, 15 September 2011 (UTC)
 * SUCCESS! Cram132, your solution is working also in my case! :) Many, many thanks! --Danny373 10:50, 23 September
 * SUCCESS! this eliminated the "illegal offset" error for me too 29 December 2011 (UTC)

Feature request: parameter include
Hi, it would be very cool to have an parameter allowing to set the categories to include rather than excluding them. I some cases this might be very useful. Thank you for considering this. Cheers --&#91;&#91;kgh&#93;&#93; 19:13, 17 April 2011 (UTC)
 * Similar request: parameter to only include those categories the page is actually a member of. 198.182.56.5 19:08, 19 August 2015 (UTC)

PostgreSQL
Error in SQL Statement. There is an incompatibility. The Select Statement looks like this:

SELECT cl_to as title, COUNT(*) as count FROM categorylinks GROUP BY cl_to HAVING count >= 0 ORDER BY cl_to ASC

In PostgreSQL the alias count is not working. Reason &rarr; http://archives.postgresql.org/pgsql-sql/2004-02/msg00143.php

You can change the code to

SELECT cl_to as title, COUNT(*) as count FROM categorylinks GROUP BY cl_to HAVING count(*) >= 0 ORDER BY cl_to ASC

this will also work on PostgreSQL and MySQL. There is no performance issue. PostgreSQL executes  only once. The code should be patched or fixed. --Cinhtau 12:49, 28 July 2011 (UTC)

show tagcloud in sidebar or footer
Is it possible to embedd the tag cloud in the sidebar or footer of mediawiki 1.17? Or is there another way to show it on every page? --Nilsja 14:32, 18 October 2011 (UTC)

Include and namespace
Great, but is it possible to add category (and not only exclude) and to manage namespace for include/exclude?

Furthermore, is it possible to manage only the parent of the categories. Now I'm listing every category in Wiki,tens and tens.

Thank in advance.

--WhiteTigerItaly (talk) 16:38, 4 October 2012 (UTC)

Undefined index (✅)
Debug information: Notice: Undefined index: linkstyle in /home/www/web64951/html/extensions/WikiCategoryTagCloud/WikiCategoryTagCloud.php on line 66


 * You should upgrade to a newer version - both the wiki and then also WikiCategoryTagCloud. In current versions this error has been solved. --88.130.87.202 19:06, 4 May 2015 (UTC)

Exclude Subcategories
I just started to create subcategories by placing the parent category in the description of the new subcategory. It seems to work as expected. However, the WikiCategoryTagCloud is now listing the Category and both its subcategories. Proceeding, the Cloud would soon 'explode' by growing and growing. To prevent this, only Top-Categories (no Subcategories) should be displayed. Any chance to exclude all subcategories?

Patch
I wrote a couple of functions to add the above feature. You can enable and disable it by placing onlyRootCategory=true in your tag on the page (like the exclude=browse option). This is written for only two layers (Top/RootCategories with one layer of SubCategories). You may use the hasSubCategories($currentCategory) function to implement a recursive loop for deeper subcategory trees. Save content in WikiCategoryTagCloud_new.patch and apply:

Vulnerable to SQL Injection?
Isn't the loop that processes $exclude_condition vulnerable to SQLI? There's nothing that sanitizes $excluded_categories[$i], so a hostile agent could use this as a vector. Not hip to PHP enough to suggest any remediation, but thought I'd bring it to your attention to address. 198.182.56.5 19:04, 19 August 2015 (UTC)
 * Thanks for informing people about (possible) security problems! This one has in the meantime been fixed.
 * In the future, please do not disclose security issues to the public! Instead, follow the procedure on reporting security bugs! --88.130.88.113 23:05, 8 December 2015 (UTC)

Category Sidebar
I have just switched to this extension and it works great for our internal wiki. We upgrade to 1.26, the old extension no longer worked as a result and was no longer in development.

However the old extension had a sidebar, which just looked horrible yet I needed to add it back in. So I have done the below modifications. It is a complete mess I know that, just wanted it in quickly to keep the peace.

If someone wants to tidy it up and improve it, please feel free.

For the file extension.json I add the following hook;

For the file WikiCategoryTagCloud.class.php I added the following code withing the class;

Set a basecategory
Is there a way to set a basecategory? As example: in a wiki of films; if i would collect the genre in an main-category named "genre". I would like to only show the categories in "genre", not other categories, like studio, producer something like that. is there a way to show only the cats (with the allready established filters (more than x) )? --Gunnar.offel (talk) 21:28, 10 October 2019 (UTC)


 * I added this here for it not to be forgotten. --&#91;&#91;kgh&#93;&#93; (talk) 21:36, 17 October 2019 (UTC)