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
&html_print_headers;
print &load_template ('add_choose.html', {
title_linked => $title_linked,
%in,
%globals
});}

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
searchmacau.com
Quote Reply
Re: Modified Cat Select Mod In reply to
I would go through the Mod instructions and verify that you have added all the codes in the add.cgi, site_html_templates.pl, and template files.

Regards,

Eliot Lee

Quote Reply
Re: Modified Cat Select Mod In reply to
Dear Eliot,

Thanks for your help.


Best regards,

Nuno Duque
--------------------
Macau Search Engine
searchmacau.com