Extension talk:Add Article to Category
From MediaWiki.org
Thank you for the great extension!
http://www.taichiwiki.org--Kohyin 05:20, 3 February 2007 (UTC)
What is the ENDFORM thingy in the code??
This is really a great extension and very helpfull.
I had a suggestion : based on this extension can it be possible your you to create an Add Category to Category extension? So when you have some nested categories, you can create a category inside another one (and so an article) the easiest way possible.
Thanks
--Romainpelissier 14:49, 12 March 2007 (UTC)
- HI, yes, it is actually not difficult, just add a checked box, when it is check, the title will be added the text :"Category:".
- However, you can also just input: "Category:whatever" into the text field, and it will add a category to a category.
- --BiGreat 14:42, 13 March 2007 (UTC)
Thanks for the reply. You mention a 'checkbox', can you explain this a little please? It seems not to be an extension so I don't really know how to add a check box ...
Thanks
--Romainpelissier 20:08, 14 March 2007 (UTC)
[edit] edit into
This looks like a useful extension; I've made a slight tweak to cleanup up the way Category: is displayed. I think it would also be useful to have an edit intro in the new page, like the input box extension does. -Steve Sanbeg 21:53, 28 March 2007 (UTC)
I also noticed that it looks a little strange in the diff view; it may be better to supress that somehow. -Steve Sanbeg 22:28, 6 April 2007 (UTC)
[edit] New Feature - boilerplate --Dtsig 17:38, 15 May 2007 (UTC)
The users really like this feature. We use this along with CategoryTree so the user can get to the correct category before creating a page. How hard would it be to modify to create the new page based on the category it is being created in. For example, category DOCUMENTATION-FUNCTIONAL would have a specific template created for it. Then on the create retrieve the article and place in instead of 'add your content here'
I have been trying to work this out but being really new to mediawiki it is a bit overwhelming. If you have any ideas i would appreciate them.
- I'd guess it's not too hard; you can look at meta:inputbox for an example of preloaded text, then figure out from the title what template you want to preload, and load it if it exists. -Steve Sanbeg 22:29, 15 May 2007 (UTC)
exist anyway for implements this extension for MediaWiki 1.7.x? Thanks!
cFcVwM sd89f984q34slf
[edit] minor bug
i'm using mediawiki version 1.10. i get the following notices:
Notice: Undefined index: category in F:\web\htdocs\wiki\extensions\articletocategory\articletocategory.php on line 26
Notice: Undefined index: new in F:\web\htdocs\wiki\extensions\articletocategory\articletocategory.php on line 27
when i do the following:
- create a new article and add a link to a category that doesn't exist yet.
- click on that category-link
- --> notices are shown
as soon as i save the category-page i don't get those messages anymore.
[edit] my problem with Add Article to Category
When I add a article to a Category, it will not let me add it if the same article name is used it another category.
e.g History I would like the article to be Call e.g HMS Victory History were HMS Vctory is the Category and History is what is typed in the box? This way I only have to type History each time I enter a new Ship
- HMS Victory
- History
- Construction
- USS Cario
- History
- Construction
- A category is just a way of grouping related articles. What you want is probably closer to a subpage -Steve Sanbeg 16:22, 17 September 2007 (UTC)
[edit] Parse error line 70
I am using MediaWiki 1.5.8 and when I install your extesnion I get the following error message:
Parse error: parse error, unexpected '(', expecting '}' in W:\www\writing\components\com_mambowiki\extensions\articletocategory.php on line 70
However if I remove line 70
<input type='hidden' name="category" value="{$catpage->mTitle->getText()}">
the extensions seems to work!? Is it OK to do that or will I have problems later on? It is a very nice user-friendly addition so I hope I can continue sing it minus the line 70? Thanks 79.66.177.10 15:44, 17 September 2007 (UTC)
- Probably, your mediawiki is too old, and is missing a function. It looks like that line tells it what category to put the article in, so it wouldn't get a category without it. -Steve Sanbeg 16:22, 17 September 2007 (UTC)
- Thanks. Yet it still works without the category output. I'll try to keep using it anyway, since the rest of the functionality is OK. I'm using MamboWiki which is a Joomla component and which uses Mediawiki 1.5.8. I'll try to upgrade Mediawiki and see what happens
[edit] Internalisation
Hi, nice but dirty hack. I am missing a i18n file. Now the 'system messages' are hard-coded and static.
Furthermore: the table tag messes up positioning of other div's that may reside in category pages (templates for clean-up, warnings etc.)
However: it works for me, and users like it. Nice job.
[edit] Css bug
Hi, works fine but I notice a Css bug with the monobook skin. If you colorize the content body section, you can see it displaces a rectangular section; i haven't quite worked out why this is.
[edit] Extra feature - add existing page to category
It would be good to be able to add existing pages to categories. I think this could be done with what you've already got:
- IF PAGENAME doesn't exist, THEN edit PAGENAME with content="Add content here \n\n >[[Category:CATEGORYNAME]]
- IF PAGENAME does exist AND PAGENAME is not in CATEGORYNAME, THEN edit PAGENAME, with content=content+"\n >[[Category:CATEGORYNAME]]
- IF PAGENAME does exist AND PAGENAME is in CATEGORYNAME, THEN edit PAGENAME, with content=content
Hope that makes sense. I might try it, or feel free too yourself. Would make this extension invaluable. now I just gotta find a similar extension to add arbitrary categories to arbitrary pages, all at once. cheers. --210.14.103.108 11:33, 27 November 2007 (UTC)
[edit] Patch: Permission Check
Using Extension:CategoryPermissions you'll get the inputbox even if you are not allowed to create articles into that category. So i've added a userCan Check:
--- orig/articletocategory.php 2008-01-10 15:39:48.000000000 +0100 +++ folke/articletocategory.php 2008-01-10 15:40:30.000000000 +0100 @@ -46,6 +46,10 @@ global $wgScript; $Action = htmlspecialchars( $wgScript ); + if (!$catpage->mTitle->quickUserCan( 'edit' ) || !$catpage->mTitle->quickUserCan( 'create')) { + return true; + } + //$wgOut->addWikiText( "Test");
--Folke 14:47, 10 January 2008 (UTC)
[edit] NameSpaces
Is there a way to add this feature to other namespaces? It currently only works for "category" I just created a new namespace called "Directory". Is there a way to included it in this field? (Ed March 27, 2008)
[edit] Can you disable the input box on selected categories?
I use your extension and it works great but I have three categories that I want sysops control over, not allow additional articles. Is there a way I can disable the input box for those 3 categories? Thank you! Nancy April 3, 2008
[edit] Control over which categories have this
Is there any way to control which categories have this displayed? I only want it on one top-level category page.
.S

