Any ideas on how to archieve that?
Jul 17, 2002, 2:35 PM
Veteran / Moderator (17366 posts)
Jul 17, 2002, 2:35 PM
Post #2 of 4
Views: 543
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
IMPORTANT: I've now moved to ultranerds.co.uk, and the .com will no longer work!
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package (plugins total "value" $3,325 & rising, for just $350)| GLinks ULTRA Package PRO (plugins total "value" $5,625 & rising, for just $500)
Support Forum | Links SQL Plugins | DMOZ Dumps | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Compare our different Plugin packages *new* Free CSS Templates
Andy (mod)
andy@ultranerds.co.uk
IMPORTANT: I've now moved to ultranerds.co.uk, and the .com will no longer work!
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package (plugins total "value" $3,325 & rising, for just $350)| GLinks ULTRA Package PRO (plugins total "value" $5,625 & rising, for just $500)
Support Forum | Links SQL Plugins | DMOZ Dumps | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Compare our different Plugin packages *new* Free CSS Templates
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.
Regards,
Amanda
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.
Regards,
Amanda


Re: [Evoken] disallow additions to the root category?