Extension talk:NiceCategoryList2

Almost Nothing Displays at All
I'm running mw v1.6 with php v4.4.7 and NCL v1 with the include in localsettings.

With code like this: Category:Books then I get a list of the pages in the BOoks category. However, no matter what code I put in, I can't get the ncl to list all the categories. (I only have top level categories BTW).

Has anyone else had this or can anyone suggest anything here? Thanks!.

New option to sort regarding the key
I added a new option to avoid ncl to sort the list alphabetically, to have index key sorting like mediawiki does.

Thanks for your extension of the extension. Jej 10:46, 9 November 2006 (UTC)

Cannot add more than one set of ncl tags
Why can't I add more than one set of tags in a page?

Sarwar (sarwar@metafour.com)


 * It seems to be working for me... maybe try the new version? JohanTheGhost 00:42, 2 March 2007 (UTC)

Broken with 1.9a
I'm running a recently-upgraded 1.9a, and I get this with any NCL listing: UNIQa23a55a20531f14-ncl-00000002-QINU Or something similar anyway. Different everytime I load the page. Not sure what's up, can you perhaps tell me what to fix? &#8465;ilver&#167;&#8465;ide 18:39, 4 January 2007 (UTC)


 * Yup, I've finally run into this myself. I've uploaded a new version which seems to fix it. Cheers, JohanTheGhost 00:36, 2 March 2007 (UTC)


 * Do you have this fix in v1.0 also? I have MW 1.8.3 and recently run into same problem... Thanks! Khitrenovich 11:05, 25 July 2007 (UTC)

Help (mediawiki 1.6,ncl 1.0)
I've installed the code[includes....] in my localsetting.php, and upload the version 1.0 in extensions. And when i put category:... , it display the category listing when I modified the page but when I saved, it isnt display anything.(sorry for my bad english) Idon't understand.--Add 02:23, 19 June 2007 (UTC)


 * I don't know why that would be, but it sounds like a cache issue.... edit it again, and do "Show preview" -- does the list appear? And when you save again, what exactly is displayed? JohanTheGhost 15:23, 20 June 2007 (UTC)


 * I have already test that, but when I do "Preview" it display correctly the category, but when i save it display "nothing", a blank. I have put require_once("$IP/extensions/NiceCategoryList.php");, maybe if I change it to require_once($IP."/extensions/NiceCategoryList.php"); but I thing that it's no importante.I test and i post if it anything changed.--Add 02:26, 21 June 2007 (UTC)


 * The only thing I can think of is that another extension may be interfering with it. Someone recently had a similar problem with the SelectCategory extension.  Do you have other extensions installed?  What happens if you disable them (comment out the "require_once" lines from LocalSettings)?  JohanTheGhost 14:51, 21 June 2007 (UTC)



MediaWiki: 1.6.10 PHP: 4.4.3-dev (cgi-fcgi) MySQL: 5.0.37 Extensions:

* Special pages: o Edit Count, Gets the edit count of a user, by Benjamin Peterson o MakeBot, Special page allows local bureaucrats to grant and revoke bot permissions, by Rob Church * Parser hooks: o CharInsert, Allows creation of JavaScript box for inserting non-standard characters, by Brion Vibber o Edit Count, Gets the edit count of a user, by Benjamin Peterson o MultipleUpload, Allows users to upload several files at once., by Travis Derouin o NiceCategoryList, generate a category page showing all pages in a category, including subcategories, by Kichik o Sort, Simplify the creation of sorted lists., by Rob Church * Other: o Newuserlog, adds a log of account creations to Special:Log, by Ævar Arnfjörð Bjarmason

style=compact not working?
Hi,

Great extension! Im fairly new to MediaWiki but would really like to use your extension. I installed it but for some reason when I specify the style=compact option nothing shows up. If I used the style=bullet option it works, but I'm really after that nice compact look :(

Im running php5, MW 1.10. Tried NiceCategoryList version 1 but still no luck. Any idea?

Thanks again

Cheers


 * Weird. I just upgraded my test wiki to 1.10, and style=compact works fine for me; in fact, it's the style I use for my main index.  Here's the exact code (it's in a template which I include in category pages):

Category:
 * Try these exact parameters; if there's some parameter combination which doesn't work, let me know, and I'll try to fix it. Otherwise, all I can suggest is that you have some strange conflict with another extension you have installed.  Try temporarily disabling them one by one to see if you can find which one is causing problems? JohanTheGhost 15:50, 5 July 2007 (UTC)
 * I'm having the same problem.
 * These are my extensions :
 * CategoryTree
 * Contributors
 * Duplicator
 * NiceCategoryList
 * ParserFunctions
 * Google Maps Extension (version 0.7.7)
 * I've tried and switched them of, but no change.
 * MediaWiki: 1.10.1, PHP: 5.2.3 (cgi-fcgi), MySQL: 4.1.11-Debian_4sarge7-log
 * --Luc Verhelst 12:56, 10 August 2007 (UTC)


 * Yes, I am also having the same problem. All parameters work except for style=compact. --Magick 09:42, 4 September 2007 (UTC)

style=compact and headings=bullet working together
JohanTheGhost: style=compact and headings=bullet don't quite work together if you have categories which have non-category siblings. For example, if you have a category 1, and you have 1.1 and 1.2 under 1, but you also have an articles X and Y under category 1, then NCL2 renders something like this:
 * Category 1
 * Article X • Article Y


 * Category 1.1
 * Category 1.2
 * Notice that the articles introduce a newline before the subcategories. MediaWiki thinks this means that the subcategories are not part of the category list, and puts two bullets in front of Category 1.1. You can solve this by doing, e.g.,


 * Category 1 :Article X • Article Y
 * Category 1.1
 * Category 1.2
 * Doing this without breaking the other layout types looks a little annoying, though.
 * Follow-up: I think I fixed that bug, plus made "style=bullet headings=bullet" work properly in the situation where categories and articles are siblings. I posted my changes as version 2.1.

Allow for parser syntax
This is a great extension. However, I was trying to use it in a template and ran into an issue that the template arguements were not getting parsed by the extension. This is typical for non parser-style extensions. I have made the modifications to your code, v2.0. See below

Broken with 1.10.1?
Sorry to bother you. I'm having a strange problem with NCL2 and mediawiki-1.10.1 that I'm hoping you can help me with. I've used the following code in a page:

Category:Universal Foundation

However, it shows up like this:

UNIQ645602511ba5a312-ncl-00000002-QINU

Any ideas what I'm doing wrong? Perhaps it's the new version of mediawiki.

Thanks! Ben

Compact Style, Bullet Headings
When I used the combination of "compact" for style, and "bullet" for headings, I didn't like the way it put large "heading" type listings of the individual articles together on one line. Obviously, I wanted them on one line (that's why I chose compact for the stye), but didn't like the large headings.

To change that, I took the following code (beginning at my line 400):

and added an elseif as shown below

I'm not a programmer, just a network guy. I don't know how well this will work with other combinations, but it did just what I wanted on my system. If someone with better programming skills wants to look at this and clean it up some so it works seamlessly for others, have at it.

--Herb Parsons 17:47, 7 December 2007 (UTC)

Show All Categories
I have a relatively small site with < 100 categories and a maximum expected depth of 3 or 4. Is it possible to list all categories without first forcing the categories into a single category?

Tnabtaf 00:11, 29 January 2008 (UTC)

Busted under mw 1.12 - Failed to create title!
the use of the parser (which afaik is pretty much for generating html from wiki markup) can cause a problem if the parser is appending NewPP limit info in a little html comment to the string passed in....which happens to be the category name you specified.

the resulting string of course doesn't match any categories, and you'll just get a message that says it 'Failed to create title!'

I'm sure there's a simple way to tell the parser not to add the NewPP info comment, but since my experience with mediawiki code and php is approaching about 1 hour now I just modified this extension to strip off the comment if it's there. Look in the code and find:

replace it with:

I assume if/when someone fixes this "properly" this entire blurb can get whacked

Failed to create title!
NCL seems to be broken. I get "Failed to create title!" all the time. Even Category:Scripts does not work. NCL V1.0 works, but V2.0 should work as well w/ mediawiki 1.12.0rc1. Visus 13:12, 2 April 2008 (UTC)

Stale Content / Extension Doesn't refresh
I ran into a nasty problem with this extension: every time you changed what category something was in, you had to re-edit the page with the tags in it, and even worse, sometimes the page itself would disappear for no good reason, with a re-edit necessary to see it again! The only suggestion I got was to change $wgParserCacheType to CACHE_NONE. However, this just made the whole page disappear, and not come back even after a re-edit. I scoured other extensions, and I think I found the solution. Just add this code to the extension:

in the hookNiceCategoryList function, add this near the top: $DisableCache = true;

And later on in the same function, after fetchCategoryLinks is called add these line: if ($DisableCache) { global $wgVersion; $dbr =& wfGetDB( DB_SLAVE ); # Do not cache this wiki page. # for details see http://public.kitware.com/Wiki/User:Barre/MediaWiki/Extensions global $wgTitle, $wgDBprefix; $ts = mktime; $now = gmdate("YmdHis", $ts +120); $ns = $wgTitle->getNamespace; $ti = $dbr->addQuotes($wgTitle->getDBkey); $version = preg_replace("/^([1-9]).([1-9]).*/", "\\1\\2", $wgVersion); $sql = "UPDATE $wgDBprefix". "page SET page_touched='$now' WHERE page_namespace=$ns AND page_title=$ti"; $dbr->query($sql, __METHOD__); }

As you can see, I borrowed this fix from another extension, but as far as I can tell, it works great!

Language problems
Got a rather simple problem, I dont know what the top Category is in my language (Danish). For some reason, some tags are translated, while others are not.... how do I figure the correct replacement for "Category:Category"? --Asset 17:44, 18 July 2008 (UTC)

Conflict with Terminology extension ?
Does anyone have the same issue ? when activating terminology extension on my MW 12 then I can use the NCL tag only once in a page, all the rest of the page is ignored... Help... :)

Thanks Doc

Does not work with Konqueror
The Monospace layout is strongly disturbed on pages with NCL. See www.opus-info.org

Thanks for your help. Gabuzo 10:58, 14 November 2008 (UTC)

skipping images
I don't like images to turn up in my pagelist. To exclude images (my default), I added some code.

Org:

New (added line 183):

And changed

to look like this (starts at my line 389, added 2 extra if's)

hear say: “I'm not a programmer, just a network guy. I don't know how well this will work with other combinations, but it did just what I wanted on my system. If someone with better programming skills wants to look at this and clean it up some so it works seamlessly for others, have at it.” (qoute Herb Parsons)

wiki font size changed after installed NCL2
In IE8, font size become larger and the login page becomes blank(the login input box and it's title text does not appear). When I clikc "Compatible Mode", the login page returns normal, but the size is still incorrect.

The NCL version is 2.2.

123.112.62.102 02:22, 18 March 2009 (UTC)

Incompatible with MediaWiki 1.13.2?
Hello, I've installed NiceCategoryList on MediaWiki 1.13.2, but no subcategories are displayed. I am using NiceCategory List 2.2. Is this a known issue?

Stefan

working only for logged-in users
I'm using NCL2.2 on MW1.14 and some strange things happen. NCL behaves correctly if a user is logged in into the wiki, but it does not display the tree if a mere visitor passes by this page: http://wiki.piratenpartei.de/Kategoriebaum now I'm puzzled how to debug this behaviour. --Jamasi 12:30, 15 June 2009 (UTC)

Categories are available twice
Hello, I implemented this extension on my website and it works fine in general, but: I put tags in one of Category: pages and I can see the subcategories list from NCL extension, but I see original Mediawiki list of subcategories below. Is it possible to fix via extension or should I write my own hack ? Thank you in advance.

Vadim

Some update for this Extension
This update will allow you to choose how many article to show on the list. Settings will include an object name 'number'. Default, 'number'=0. It's mean all articles in the Category will be shown. If 'number' != 0, number of article(s) will be shown is 'number', randomly. If Articles's count < 'number', all article(s) will be shown.

For example: Category Name Add an option to settings: Show randomly 'number' of articles:

Using this for category pages
How would I use this extension or something similar for the category pages in MediaWiki? I don't want the alphabetical ordering that MW provides automatically.