Gossamer Forum
Home : Products : Links 2.0 : Customization :

Re: Can you do this mod

Quote Reply
Re: Can you do this mod In reply to
I use the following codes in the add.cgi file (which is based on the Category Select Codes that Bobsie wrote awhile ago):

1) Add the following codes in your sub main routine in the add.cgi file:

Code:

else {
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 ();
}
}


2) Add a new sub-routine in the site_html_templates.pl file called sub site_html_add_choose routine. This sub should look like the following:

Code:

sub site_html_add_choose {
# --------------------------------------------------------
# Recommend - Choose Category

&html_print_headers;
print &load_cgi_template ('add_choose.html', {
%in,
%globals
});
}


3) Create a new template file called add_choose.html. In this file, you can include the Category List OR Category Redirect tags that are defined in the following FAQ/Tutorial:

http://anthrotech.com/cgi/links/faqs/catlist/
http://anthrotech.com/...links/faqs/redirect/

What this will allow you to do is the following:

1) Keep the same header and footer files in ALL your pages including the homepage.
2) Reinforce browsing of your site, so that people have to choose a category before adding their site.

Hope this helps.

Regards,

Eliot Lee
Subject Author Views Date
Thread Can you do this mod tekno 1401 May 31, 2000, 4:30 AM
Thread Re: Can you do this mod
Bobsie 1355 May 31, 2000, 8:20 AM
Thread Re: Can you do this mod
Stealth 1352 May 31, 2000, 8:38 AM
Thread Re: Can you do this mod
Bobsie 1336 May 31, 2000, 3:21 PM
Post Re: Can you do this mod
Stealth 1328 May 31, 2000, 3:32 PM
Post Re: Can you do this mod
tekno 1313 Jun 1, 2000, 1:43 AM