Gossamer Forum
Home : Products : Links 2.0 : Customization :

how to RESTRICT link post / add to some CATEGORIES?

Quote Reply
how to RESTRICT link post / add to some CATEGORIES?
Hello, I would like to know how i can RESTRICT addition of links to certain categories.

Basically I have main categories and sub categories, such as:

MAIN CATEGORY

Sub Cat 1

Sub Cat 2

etc...

I want people to be forced to add the link to the sub categories 1 or 2 and NOT be able to post it to the main category. How can I achieve that?

Thank you.

Marc
Quote Reply
Re: [marcnyc] how to RESTRICT link post / add to some CATEGORIES? In reply to
http://goodstuff.orphanage.com/rcat_mod.html
Quote Reply
Re: [Tho:mas] how to RESTRICT link post / add to some CATEGORIES? In reply to
Whatever happened to Bobsie, anyway?

--Philip
Links 2.0 moderator
Quote Reply
Re: [King Junko II] how to RESTRICT link post / add to some CATEGORIES? In reply to
Wondering myself. Hope he's fine!
Last logon: Jun 4, 2001.
Quote Reply
Re: [King Junko II] how to RESTRICT link post / add to some CATEGORIES? In reply to
...and JPDeni
Quote Reply
Re: [Tho:mas] how to RESTRICT link post / add to some CATEGORIES? In reply to
while you guys talk about other things I just wanted to thank Tho:mas for his help! Thanks I didn't know that site, it sure is a valuable resource if I'll use Links 2.0!

Thanks Cool
Quote Reply
Re: [marcnyc] how to RESTRICT link post / add to some CATEGORIES? In reply to
Pirate

Hi I have a couple of questions I hope you may answer for me.
I have been directed to your Links 2.0 Category Select List Mod and I followed the procedure online at http://goodstuff.orphanage.com/rcat_mod.html

It said that the version is for Links v2.0and I have Links v2.1, so I think there are some differences.

It says that "All changes are made in links.cfg, nph-build.cgi, site_html.pl (if not using templates), and site_html_templates.pl (if using templates)."

I am not using templates and so I thought I would only have to edit links.cfg, nph-build.cgi and site_html.pl but it turned out that add.cgi has to be edited too and above all that site_html.pl only allows the first of the modifications you say. What I am trying to say is that I am assuming that by not using templates I should ignore the file site_html_templates.pl and apply the changes you describe for that file to the file site_html.pl (because you wrote: "For the purpose of this mod, all instructions below for site_html_templates.pl should be considered identical for site_html.pl"), BUT it turned out that, while site_html_templates.pl seems to have the parts you refer to, site_html.pl DOES NOT HAVE ANY OF THE PARTS (except the first) that you refer to and there I do not know how to proceed. Should I apply the changes to site_html_templates.pl even though I don't use templates? Should I apply only the first change (the possible one) to site_html.pl? What should I do?

Also after doing the modifications I have buildt the database. The links are there and the mod works but everytime I build the database I get the following error and I don't know what to do and if I should be concerned about it:

CGI ERROR
==========================================
Error Message : fatal error: Undefined subroutine &main::site_html_cat_select_list called at nph-build.cgi line 1242.

Script Location : nph-build.cgi Perl Version : 5.006

Form Variables
-------------------------------------------

Environment Variables
-------------------------------------------
list follows

I have changed nph-build.cgi like you said but I have not changed anything at line 1242. The line it mentions, looks like this:

$category = &site_html_cat_select_list (@rootcat) if ($#rootcat >= 0);


Please let me know if you can help me. Thank you.