Extension talk:TagAsCategory

Problem
The links created by the extension are wrong in my wiki. Instead linking to "http://wiki.example.com/index.php?title=Special:Categories" it links to "http://wiki.example.com/Special%3ACategories" with "%3A" instead of ":" and without "index.php?title=" this does not work.

Similar Problem on Wiki V1.14
I get the following error page when I try to add a tag. --Mark Weiser 10:27, 13 May 2009 (UTC) The action specified by the URL is invalid. You might have mistyped the URL, or followed an incorrect link. This might also indicate a bug in the software used by MTSGWiki.

Will take a look
Thanks for the heads-up - I'll take a look. I believe our blog is running in the mode that rewrites URLs. There's probably a way to build a link programmatically through the API that will be compatible with both URL syntaxes. --Gbarnett 22:06, 7 August 2007 (UTC)

Same Problem on Wiki v1.15.1
I echo the issue of the original problem. I still use "index.php?title=" which breaks the extension. In other words, clicking on 'Tags' returns the URL "http://wiki.example.com/Special%3ACategories" with "%3A" instead of ":" and without "index.php?title=" this does not work. --SomaticJourney 08:44, 6 February 2010 (UTC)
 * Anyone? --SomaticJourney 15:57, 13 February 2010 (UTC)

File called ArticleTagger.php??
Should the file actually be called ArticleTagger.php? If the require functionis looking for extensions/TagAsCategory/TagAsCategory.php, shouldn't you then have to cretae a directory in extensions called TagAsCategory and then in that directory, name your file TagAsCategory.php?

Yes, should be called TagAsCategory.php
Sorry, the extension used to be called "ArticleTagger", but we renamed it to "TagAsCategory" because we felt it was more descriptive.

I've replaced the references to "ArticleTagger" in the extension page with "TagAsCategory" -- sorry about the typo.

--Gbarnett 13:23, 10 August 2007 (UTC)

A function I would like to see.
A very nice feature would be to have a drop-down list of all your categories appearing, or an AJAX auto complete feature showing existing categories as you type.

Deleteing tags
How do you delete a wrongly named Tag ?
 * I just edit the article and manually remove the tag from the article.  This extension simply makes it easy to inject the category tags into articles... removing them is still through the normal means.  --Brianadkins 21:53, 13 September 2007 (UTC)

Thanks I am New to this. see also Project talk:Categories

Note for people running a custom skin
You need the "catlinks" div to exist in your skin.

essentially //name of div identifying categories the page belongs to if (document.getElementById('catlinks')) {   document.getElementById('divLocationForTagForm').appendChild(document.getElementById('tagform')); }

You can just rename the div if you've ignored / heavily modified monobook.

Neilkt 01:53, 16 September 2007 (UTC)

example sites?
Anyone have any example sites running this extension? I would like to see it in action.

--Smarbin 07:09, 19 September 2007 (UTC)


 * Yes: Esopedia This is one --Claudio Carli 01:37, 22 January 2009 (UTC)

Localized message for "Add tag"
For those who haven't figured it out, you can localize the "Add tag" button in the TagAsCategory.php file.

Example with danish text: $wgMessageCache->addMessages(       array ( 'addtag' => 'Tilf&oslash;j kategori', 'notags' => '(none)' -- Kirjapan 10:33, 17 October 2007 (UTC)
 * 1) add localized messages for the "Add Tag" and "(none)" interface strings

How to prevent it appearing on defined pages?
Hello, I've tried this excellent script and think it is very helpful for the user to easy add 'tags' to the page. However, I would really like to be able to prevent this add-tag form from appearing on certain defined pages, ie: Main_Page | Foos_Feet etc. It would also be very handy to be able to prevent the add-tag from appearing on all the pages in a certain NameSpace, as well as preventing it from appearing on Category pages. Would this be possible? Another feature that would be great is for non-registered readers to not even see the add-tag form at all. Sadly my coding skills are zeroish so I can't hack it ZooHoo 01:25, 7 December 2007 (UTC)


 * I have zero coding skills, but would like to exclude the tag as category for at least the main page... anyone? --Mark Weiser 02:11, 4 July 2008 (UTC)


 * I have changed it to be called by tag placed at the and of page, so you can add it only to the pages that need it. Here it is:

Parhom 12:40, 4 August 2009 (UTC)

Refresh Issue & Possible Fix
Hi,

Greate extension. However, I came across an issue. Whenever I used the Add Tag feature, the tag wouldn't show up until I refreshed the browser, changed articles or edited the article. HOWEVER, when I edited the article, I found that the Tag had been added every time I hit refresh.

I.e.
 * I hit Add Tag, then refresh so I can see it. Refresh once more, again and finally once more.  I then hit EDIT.  The tag now appears four times in the page text (it still only displays once when you view the article).

I fixed this by making a few tweaks to the last section of TagAsCategory.php, as detailed below.

-- AerosAtar

Code Modification: Multiple tags at once
I love this extensions, but wanted to ability to add multiple tags at one time. So I updated the code to do this. I changed the form used to add tags (to make it larger) and modified the tagAction function to allow multiple tags. Here's the updated code:

-JCamozzi
 * Why split on space? This means that you can't have categories with spaces. Would make more sense to split on a comma, or somesuch. - 220.233.239.174 09:20, 27 May 2008 (UTC)

Prevent appearance on main_page?
How to prevent it from appearing on certain pages like main_page?

Problems with HTML rewrite on 0 category case
The div containing "Tags: (none)" and the "Add Tag" form are not controllable via main.css (monobook shows a box around the category section of a page). I would appreciate a solution to this. BTW: I have checked with IE6 and IE7. --82.113.113.82 09:07, 11 March 2009 (UTC)

I found a solution for this: It was a CSS-referencing problem only - just don't create the attribute "id" to the div-tag, but the attribute "className", value "catlinks". This works fine and we do not need id "catlinks", since effectively, there exists no catlink.

Warning: Cannot modify header information
headers already sent by (output started at /opt/lampp/htdocs/wiki.lan/wiki/extensions/TagAsCategory/TagAsCategory.php:188) in /opt/lampp/htdocs/wiki.lan/wiki/includes/WebResponse.php on line 16

I got that error in MW 1.14.0.

Problem when tagging
I get this message when tagging a page :

Warning: Illegal offset type in isset or empty in /www/htdocs/w00845b3/nvcwiki.com/fr/includes/Title.php on line 128

Warning: Illegal offset type in /www/htdocs/w00845b3/nvcwiki.com/fr/includes/Title.php on line 150

Using MW 1.11.2

Thanks anyway for this very usefull extension !

--Dieudo 08:23, 24 August 2009 (UTC)

specify to users that tag creation is case sensitive
I made a quick modification to the extension. When you add a tag/category it is case-sensitive, so why not inform the user of that issue to save the admin less clean up work. Edit extensions/TagAsCategory/TagAsCategory.php and customize the 'Add Tag' variable. As you can see below, I added (Note:case sensitive) to it.

(hint hint nudge nudge): It would be awesome to have some type of AJAX suggest list of tags to choose from when typing a tag in to the input box that can translate case-insensitivity to the correct tag/category.

Thanks for the awesome extension! --SomaticJourney 09:01, 6 February 2010 (UTC)