Gossamer Forum
Home : Products : Links 2.0 : Discussions :

Modified Cat Select Mod

Quote Reply
Modified Cat Select Mod
I've already install the CAT SELECT MOD and the add_choose.html modification written by Eliot Lee which will change the add.html to add_choose.html if adding a category within the @excludecategory.

Change the sub main routine under add.cgi as follow:

# sub main

if ($db_single_category) {
my %is_valid = map { $_ => 1 } &category_list;
$ENV{'HTTP_REFERER'} =~ s,/[^/]+\.[^/]+$,,;
$ENV{'HTTP_REFERER'} =~ m,$build_root_url/(.+?)/?$,;
if ($is_valid{$1}) {
&site_html_add_form ($1)
else {
&site_html_add_choose ();
else {
&site_html_add_choose ();

Then create a new sub in the site_html_templates.pl called sub site_html_add_choose. It should look like the following:

sub site_html_add_choose {
# --------------------------------------------------------
# Recommend - choose category
print &load_template ('add_choose.html', {
title_linked => $title_linked,

Then create a new template file called add_choose.html. It could simply contain a message stating that users have to choose a category before adding sites.

But it seems to work only on the add site in the index.html, if I go to a excluded category the category under @excludecategories will be auto filled in the add.html, how can I make this modification work under the excludecategories?

This modification could be found at http://www.gossamer-threads.com/...25&Old=allposts"

Nuno Duque
Macau Search Engine
Subject Author Views Date
Thread Modified Cat Select Mod nduque 1147 Sep 25, 2000, 6:35 AM
Thread Re: Modified Cat Select Mod
Stealth 1100 Sep 26, 2000, 10:41 PM
Post Re: Modified Cat Select Mod
nduque 1088 Sep 27, 2000, 4:45 AM