PDA

View Full Version : How to delete defect tags?



StarBuG
Wed 28th May '08, 2:25pm
Hi

I had Zoints Tags running for a long time and because vBulletins Tag System does not offer an automated tag non tagged thread feature I converted my old tags to the vbulletin tags using this converter: http://www.vbulletin.org/forum/showthread.php?t=170314

However, Zoints Tags is a little buggy and there are tags that are defect (like a "0" tag or any number for that matter) which has no threads associated to it but shows up in the tag cloude.

How can I remove those tags?

Thank you in advance

StarBuG

Wayne Luke
Wed 28th May '08, 2:26pm
You can delete tags in the Admin CP under Threads & Posts.

StarBuG
Wed 28th May '08, 2:32pm
Thanks, but I got 360 pages of tags.
Isn't there a tag search?

Or show X Numbers of tags per page and a mark all tags on this page button?
That would make my live much easier

StarBuG
Wed 28th May '08, 3:02pm
I am not good when it comes to mysql queries but could you help me out and give me a query that removes all tags that contain non url confirm characters like : or . or anything like that and single character tags

That would be really much appreciated

Thank you in advance

StarBuG

David Grove
Wed 28th May '08, 6:32pm
Thanks, but I got 360 pages of tags.
Isn't there a tag search?

Or show X Numbers of tags per page and a mark all tags on this page button?
That would make my live much easier
No, but hopefully they will be added. http://www.vbulletin.com/forum/showthread.php?t=271693

StarBuG
Thu 29th May '08, 5:24am
Can noone help me here? PLEASE

Steve Machol
Thu 29th May '08, 4:10pm
I do not know what that query would be. Sorry.

David Grove
Thu 5th Jun '08, 3:45pm
If you still need this, I'll figure out the query for you. Do you still need it?

StarBuG
Thu 5th Jun '08, 6:56pm
Yes, definitely

On vBSEO they tried this one.
It seems very close but does not do the trick:

delete from tagthread where tagid IN ( select tagid from tag WHERE tagtext REGEXP '^![0-9a-zA-Z\s_-]{2,30}$')

delete from tagsearch where tagid IN ( select tagid from tag WHERE tagtext REGEXP '^![0-9a-zA-Z\s_-]{2,30}$')

delete from tag WHERE tagtext REGEXP '^![0-9a-zA-Z\s_-]{2,30}$'

the first query returns "0 deleted" so there is something wrong.

Maybe this helps you

Thanks in advance

StarBuG

David Grove
Sat 7th Jun '08, 12:45pm
That regular expression finds tags that are made entirely of anything that's not a number letter space underscore or dash. For example ">*(*()>>.." would match it. But if it contains at least one letter, number, space, underscore or dash, then it won't match. If you want to delete all tags that contain a period for example, try something like this:


SELECT tagid FROM `tag` WHERE `tagtext` LIKE '%.%'