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.

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)

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)

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.