Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Bulk links change

Quote Reply
Bulk links change
Hi

Is there a quick way to change the value all the links in a given category from isSponsored eq No to Yes without having to go through them one at a time..
Regards
KaTaBd

Users plug In - Multi Search And Remote Search plug in - WebRing plug in - Muslims Directory
Quote Reply
Re: [katabd] Bulk links change In reply to
I don't think it can be done from lsql. You probably would need to write a short script since it involves two tables if you wanted to directly change the values.

A rough example of the concept but not the exact syntax: ie. Using perl connecting to your database, SELECT LinkID FROM CATLinks WHERE CategoryID=12. This should give you a list of link id's asociated with the category. You would output that into an array, then loop through the array with an UPDATE statement for the Links table.

A temporary workaround on the template level could be to use xssi or the set value method in GT::Template--set a value, say sponsor = "true" on your category page based on the title of the category. Then on the link template page say somethink like if sponsor="true" then generate the link differently.

Chris
Quote Reply
Re: [estjohn] Bulk links change In reply to
Hi

thanks

I already found a solution for this without undergoing any changes...
Regards
KaTaBd

Users plug In - Multi Search And Remote Search plug in - WebRing plug in - Muslims Directory
Quote Reply
Re: [katabd] Bulk links change In reply to
How'd you do it, KaTaBd ??

Thanks Smile

------------------------------------------
Quote Reply
Re: [DogTags] Bulk links change In reply to
I used a global to recognize the images and deleted the whole isimage field i was trying to update..
Regards
KaTaBd

Users plug In - Multi Search And Remote Search plug in - WebRing plug in - Muslims Directory
Quote Reply
Re: [katabd] Bulk links change In reply to
Thanks very much, KaTaBd Smile

------------------------------------------