Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Bulk movement of links from one category to another??

Quote Reply
Bulk movement of links from one category to another??
Is there any way of easily moving links in a category to another category rather than doing it individually which would take a loooong time? I wish the Browse area would have a function to allow you to do that? I have a lot of links in some "old" categories that I would like to relocate to their new categories.

Thanks.

mgeyman
Quote Reply
Re: [mgeyman] Bulk movement of links from one category to another?? In reply to
Not as far as I'm aware - but you could do it in the monitor. Backup first. I'm guessing something like this would do it (unless some of your links are already in the new category as well as the old in which case I think you'll get duplicates in the new category):

UPDATE CatLinks SET CategoryID='new number' WHERE CategoryID='old number'
Quote Reply
Re: [mgeyman] Bulk movement of links from one category to another?? In reply to
Anyone know how to do this?
Quote Reply
Re: [netnow21] Bulk movement of links from one category to another?? In reply to
As said above, use:

UPDATE glinks_CatLinks SET CategoryID = 'new number' WHERE CategoryID = 'old number'

...then run Database > Repair Tables , so that the category counts are fixed.

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] Bulk movement of links from one category to another?? In reply to
I have a link in 1 category, and would like to copy to the other 6000 categories,

SO do I have to


UPDATE glinks_CatLinks SET CategoryID = 'new number' WHERE CategoryID = 'old number'

SO do i have to manually put the category id for all 6000 cats?
Quote Reply
Re: [netnow21] Bulk movement of links from one category to another?? In reply to
Hi,

In that case, you would need a little script to do that.

1) Upload this script to your admin folder
2) Edit this line:

my $link_id = 1234;

..and change the 1234 to whatever the LinkID is that you want to put in ALL the categories

3) CHMOD to 755
4) Run from your browser, with http://www.domain.com/cgi-bin/admin/add_to_cats.cgi
5) Run Database > Repair Tables
6) That it, should be in all your categories now

Hopefully that does what you want (please backup your database first, in case it doesn't do what you want ;))

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!