Is there any way to get the hopto menu to appear on cgi generated pages?
Dec 26, 1999, 10:26 AM
Enthusiast (504 posts)
Dec 26, 1999, 10:26 AM
Post #3 of 16
Views: 4243
Merry Christmas Jerry
It is a mod for a drop down menu for the categories.
------------------
www.nzcid.godzone.net.nz
New Zealand Christian Internet Directory
It is a mod for a drop down menu for the categories.
------------------
www.nzcid.godzone.net.nz
New Zealand Christian Internet Directory
Dec 28, 1999, 9:08 PM
Enthusiast (504 posts)
Dec 28, 1999, 9:08 PM
Post #4 of 16
Views: 4245
Hi Elliot!
Thanks very much. I did this as a matter of course. The definitions are still in the various sub sites but it does not show up on the cgi generated pages.
------------------
www.nzcid.godzone.net.nz
New Zealand Christian Internet Directory
Thanks very much. I did this as a matter of course. The definitions are still in the various sub sites but it does not show up on the cgi generated pages.
------------------
www.nzcid.godzone.net.nz
New Zealand Christian Internet Directory
Dec 28, 1999, 10:36 PM
Enthusiast (504 posts)
Dec 28, 1999, 10:36 PM
Post #5 of 16
Views: 4244
Is anyone able to help with this one?
------------------
www.nzcid.godzone.net.nz
New Zealand Christian Internet Directory
------------------
www.nzcid.godzone.net.nz
New Zealand Christian Internet Directory
The only thing I can think of is defining the hopto tag in the various defined tag section of the cgi created template files (like sub site_html_add_form), like you have done for the category.html and home.html template files.
Other than that...I don't know what to tell ya, Ian.
Regards,
------------------
Eliot Lee
Anthro TECH,L.L.C
www.anthrotech.com
----------------------
Other than that...I don't know what to tell ya, Ian.
Regards,
------------------
Eliot Lee
Anthro TECH,L.L.C
www.anthrotech.com
----------------------
Dec 29, 1999, 1:08 PM
Novice (45 posts)
Dec 29, 1999, 1:08 PM
Post #8 of 16
Views: 4245
Hi I'm not sure but it seems like you could easily add it as Jerry said. yOu could add it to add.cgi in site_html_templates
sub site_html_add_form
add
hopto => &hopto_category,
right above
%globals
If not a links cgi put this in the cgi script
$hopto = &hopto_category;
then put $hopto in the print statment where you want it to show up.
it will have to require
site_html_template.pl
nph-build
and god knows what else.
Good Luck. Might be able to help more if I knew what cgi script you were trying to add it to.
hopto mod can be found here
http://www.gossamer-threads.com/...um3/HTML/004245.html
------------------
http://bartour.hypermart.net
sub site_html_add_form
add
hopto => &hopto_category,
right above
%globals
If not a links cgi put this in the cgi script
$hopto = &hopto_category;
then put $hopto in the print statment where you want it to show up.
it will have to require
site_html_template.pl
nph-build
and god knows what else.
Good Luck. Might be able to help more if I knew what cgi script you were trying to add it to.
hopto mod can be found here
http://www.gossamer-threads.com/...um3/HTML/004245.html
------------------
http://bartour.hypermart.net
Dec 29, 1999, 3:13 PM
Enthusiast (504 posts)
Dec 29, 1999, 3:13 PM
Post #9 of 16
Views: 4245
Greetings All!
Mutt!
It is your mod I am using and on all the pages that are not cgi generated it works okay.
I have this in the site.template.html.pl and <%hopto%> in the various templates where I want it to show up.
# --------------------------------------------------------
# This routine determines how the add form page will look like.
#
&html_print_headers;
my $category = shift;
$category ?
($category = qq~$category <input type=hidden name="Category" value="$category">~) :
($category = &build_select_field ("Category", "$in{'Category'}"));
print &load_template ('add.html', {
Category => $category,
hopto => &hopto_category,
%globals
});
}
And the drop down menu does not appear. I would like to add the mod to other cgi pages as well as a form of navigation.
------------------
www.nzcid.godzone.net.nz
New Zealand Christian Internet Directory
[This message has been edited by Ian Conza (edited December 29, 1999).]
Mutt!
It is your mod I am using and on all the pages that are not cgi generated it works okay.
I have this in the site.template.html.pl and <%hopto%> in the various templates where I want it to show up.
Code:
sub site_html_add_form { # --------------------------------------------------------
# This routine determines how the add form page will look like.
#
&html_print_headers;
my $category = shift;
$category ?
($category = qq~$category <input type=hidden name="Category" value="$category">~) :
($category = &build_select_field ("Category", "$in{'Category'}"));
print &load_template ('add.html', {
Category => $category,
hopto => &hopto_category,
%globals
});
}
And the drop down menu does not appear. I would like to add the mod to other cgi pages as well as a form of navigation.
------------------
www.nzcid.godzone.net.nz
New Zealand Christian Internet Directory
[This message has been edited by Ian Conza (edited December 29, 1999).]
Dec 29, 1999, 4:25 PM
Veteran (2260 posts)
Dec 29, 1999, 4:25 PM
Post #10 of 16
Views: 4254
hmm...
ok.. this is going to suck... especially if you have alot of categories..
in site_html_templates.pl
open DB, $db_category_name;
LINE: while (<DB> ) {
/^#/ and next LINE;
/^\s*$/ and next LINE;
chomp;
push @categories, (split /\Q$db_delim\E/, $_)[$db_main_category];
}
close DB;
$output = qq~
<script>
<!--
function taking() {
location= document.take.take2.options[document.take.take2.selectedIndex].value
}
//-->
</script>
<form name="take"><b><font size="2">Hop to: </font></b>
<select name="take2">
<option selected value="">Select a Category</option>
<option value="">-------------------------------</option>
~;
foreach (sort @categories) {
$output .= qq~<option value="$build_root_url/$_/">~ . &build_unlinked_title ($_) . qq~</option>~;
}
$output .= qq~</select><input type="button" value="Go!" name="B1" onClick="taking()"></form>~;
}
use it like...
in CGI generated ones only.. if you load this in html built ones then you will waste alot of bandwidth
just say you did.. it'd be like running nph-build.cgi over 500 times in a row.. well.. depending on how many categories and links you have..
jerry
ok.. this is going to suck... especially if you have alot of categories..
in site_html_templates.pl
Code:
sub hopto_cgi { open DB, $db_category_name;
LINE: while (<DB> ) {
/^#/ and next LINE;
/^\s*$/ and next LINE;
chomp;
push @categories, (split /\Q$db_delim\E/, $_)[$db_main_category];
}
close DB;
$output = qq~
<script>
<!--
function taking() {
location= document.take.take2.options[document.take.take2.selectedIndex].value
}
//-->
</script>
<form name="take"><b><font size="2">Hop to: </font></b>
<select name="take2">
<option selected value="">Select a Category</option>
<option value="">-------------------------------</option>
~;
foreach (sort @categories) {
$output .= qq~<option value="$build_root_url/$_/">~ . &build_unlinked_title ($_) . qq~</option>~;
}
$output .= qq~</select><input type="button" value="Go!" name="B1" onClick="taking()"></form>~;
}
use it like...
Code:
hopto => &hopto_cgi,in CGI generated ones only.. if you load this in html built ones then you will waste alot of bandwidth
just say you did.. it'd be like running nph-build.cgi over 500 times in a row.. well.. depending on how many categories and links you have..
jerry
Nov 12, 2000, 11:27 AM
User (76 posts)
Nov 12, 2000, 11:27 AM
Post #12 of 16
Views: 4118
Gurus ... help me, please !!!
Is it possible to list only the subcategories for a determinated category instead list all ?
eg.
I want to put a drop down in my Sports category listing only his subcategories thus:
Category:
Sports
Drop Down:
Baseball
Soccer
Basketball
Football
Any ideas to make this ???
Regards,
marcoBR
Is it possible to list only the subcategories for a determinated category instead list all ?
eg.
I want to put a drop down in my Sports category listing only his subcategories thus:
Category:
Sports
Drop Down:
Baseball
Soccer
Basketball
Football
Any ideas to make this ???
Regards,
marcoBR