Gossamer Forum
Home : Products : Links 2.0 : Customization :

to admin control user submit at any specific category and/or subcat (templates)

Quote Reply
to admin control user submit at any specific category and/or subcat (templates)
Set auto-select category to 1
Install Nested If Mod
Add following field to category
Code:
UserSubmit => [8, 'alpha', 5, 3, 0, 'no', '']
On your category template, enclose the submit select in ifnot tags
Code:
<%ifnot UserSubmit%>
<FONT SIZE="1" FACE="Verdana, Arial">
<a href="<%build_root_url%>">Home</a> |
<a href="<%db_cgi_url%>/add.cgi">Submit a Link</a> |
<a href="<%db_cgi_url%>/modify.cgi">Modify a Link</a> |
<a href="<%db_cgi_url%>/search.cgi">Search</a>
</FONT>
<%endif%>
In the above, when the admin adds a category, he deletes "no" from the UserSubmit field and the nav selections will be available to the user. Invert the logic to if "yes", and you could have all categories available unless the admin deleted the "yes" from the field.
Quote Reply
Re: to admin control user submit at any specific category and/or subcat (templates) In reply to
How does it prevent the user from selecting the category when the Add a Link is on a non-category page?
Quote Reply
Re: to admin control user submit at any specific category and/or subcat (templates) In reply to
I'm using templates throughout. I have -or will- delete all links to add.cgi from the templates. With $db_single_category = 1; in links.cfg the user will have to be in a category approved to receive user-submits before he'll ever see the "Add A Resource" button or hypertext.

Bob