Gossamer Forum
Home : Products : Gossamer Links : Discussions :

restrict categories on add.cgi

Quote Reply
restrict categories on add.cgi
Hi,

I would like to restrict the categories in which users can add links through add.cgi
How can I do that?

Thanks in advance for your answers,

Vercyb
Quote Reply
Re: [vercyb] restrict categories on add.cgi In reply to
That functionality is currently not built into Gossamer Links. To do that you'll have to write a plugin to hook into the add code and perform your checks there.

Adrian
Quote Reply
Re: [brewt] restrict categories on add.cgi In reply to
Im still an idiot and are not able to program plugins; so

1. make your own select with html

or

2. find the function for spitting out cats for the form, copy it and make a second one,
where you ask something like get all cats with fatherid=0 or get all cats with special field_add_allowed=yes
then change the call inside the scripts. Then you need a further option value for errors while adding or for modify.

Sorry is only theoretical, but i cant look for the stuff at the moment.
Quote Reply
Re: [vercyb] restrict categories on add.cgi In reply to
Hi:

Have a look here:-

http://www.gossamer-threads.com/perl/gforum/gforum.cgi?post=280159;search_string=limit%20category;#280159


Regards,


Clint.
--------------------------
http://AffiliatesDirectory.com
The Affiliate Programs Directory
Quote Reply
Re: [Clint] restrict categories on add.cgi In reply to
Sorry to take this off topic, but Clint, your breadcrumb isn't working in IE6, I get blank pages on anything except the home page, feel free to pm me for more details.
Quote Reply
Re: [vercyb] restrict categories on add.cgi In reply to
I do it this way,

<%loop category_loop%>
<%ifnot Full_Name contains 'someword'%><option value="<%escape_html ID%>"<%if selected%> selected="selected"<%endif%>><%'&nbsp;&nbsp;' x $CatDepth%><%Name%><%endif%> </option>
<%endloop%>

That stops people from selecting someword and every category under it.