Gossamer Forum
Home : Products : Gossamer Links : Development, Plugins and Globals :

disallow additions to the root category?

Quote Reply
disallow additions to the root category?
Any ideas on how to archieve that?
Quote Reply
Re: [xpert] disallow additions to the root category? In reply to
How about adding a plugin, that checks if the category has a father ID? If it doesn't, then its a root catgory (guessing here..as I've never done this before).

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: [xpert] disallow additions to the root category? In reply to
I managed to achieve this (with the PHP front-end) by adding an ENUM column to the category table called "CanAdd" and editing the query (Utils.inc.php in the PHP version) where the category list is generated to include:

SELECT ID, Full_Name FROM ${PREFIX}Category WHERE CanAdd ='Yes' ORDER BY Full_Name

If you set the default value of CanAdd to "Yes", then all you need to do is update the categories you don't want people adding links to by changing the value to "No".

I don't know Perl, so I'm not sure exactly which bits you'd need to edit to make the changes successfully, however someone with Perl knowledge might be able to re-interperet this into something useful for you. Smile

Regards,
Amanda

Quote Reply
Re: [Evoken] disallow additions to the root category? In reply to
Did anyone figure out how to do this yet? Maybe is there another way to regenerate a cat_list to include in the add.cgi where i can take out the root categories?