It could be implemented inside of an extension using the ArticleSave hook. You can use $user->ifAllowed( '' ); to check if the saving user has the permissions to save without a category. And you can either do a regex on $text to see if there is a category tag in the page. Or you can parse $text using the parser, and use the ParserOutput to see if a category is inside the page or not. The method is your pick, the former is faster, but the latter will allow for use of templates with categories instead of only [[Category:]] tags.
~Daniel Friesen(Dantman) of: -The Gaiapedia (http://gaia.wikia.com) -Wikia ACG on Wikia.com (http://wikia.com/wiki/Wikia_ACG) -and Wiki-Tools.com (http://wiki-tools.com)
Christensen, Courtney wrote:
Swapnil schreef:
But it seems users are still creating pages without any category. How
can I
forcefully apply this policy so that users cannot create a page
without a
category? Is there any way to impose this rule in mediawiki.
Try http://www.mediawiki.org/wiki/Extension:Postloader
If you have a default category that articles can be saved to then you could add the [[Category:Default]] to every article. Or you could use something like this: http://www.mediawiki.org/wiki/Extension:CategorySuggest
I'm pretty sure you can also check to make sure a category has been selected and not allow a save to complete without it. Especially if your category entry spot is its own form element.
Good luck! -Courtney
Wikitech-l mailing list Wikitech-l@lists.wikimedia.org http://lists.wikimedia.org/mailman/listinfo/wikitech-l