Gossamer Forum
Home : Products : Links 2.0 : Customization :

Hopto mod

Quote Reply
Hopto mod
Is there any way to get the hopto menu to appear on cgi generated pages?
Quote Reply
Re: Hopto mod In reply to
please explain.. is hopto a game for bunnies?

it does sound fun.. (well not really).. but what's HOPTO?

Smile

jerry
Quote Reply
Re: Hopto mod In reply to
Merry Christmas Jerry Smile

It is a mod for a drop down menu for the categories.


------------------
www.nzcid.godzone.net.nz
New Zealand Christian Internet Directory




Quote Reply
Re: Hopto mod In reply to
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




Quote Reply
Re: Hopto mod In reply to
Is anyone able to help with this one?

------------------
www.nzcid.godzone.net.nz
New Zealand Christian Internet Directory




Quote Reply
Re: Hopto mod In reply to
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
----------------------


Quote Reply
Re: Hopto mod In reply to
if i knew what hopto was.. i'd probably be able to give you a better answer.. but is it generated with a template?

if so you can easily say..

$hopto = &site_html_hopto ();

and then put it into the cgi generated page..

hopto => $hopto,

<%hopto%>

jerry
Quote Reply
Re: Hopto mod In reply to
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
Quote Reply
Re: Hopto mod In reply to
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.

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).]
Quote Reply
Re: Hopto mod In reply to
hmm...

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 Smile

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
Quote Reply
Re: Hopto mod In reply to
Thanks Jerry Smile

------------------
www.nzcid.godzone.net.nz
New Zealand Christian Internet Directory




Quote Reply
Re: Hopto mod In reply to
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


Quote Reply
Re: Hopto mod In reply to
would be a impossible hack ??? why not resposnses ???

please, help me ...

Quote Reply
Re: Hopto mod In reply to
It is possible to change the button with an image in the following line:

<input type="button" value="Go!" name="B1" onClick="taking()"> ?

Thanks,
Andrej

Quote Reply
Re: Hopto mod In reply to
yea...change the type to image.

Regards,

Eliot Lee
Quote Reply
Re: Hopto mod In reply to
I have tryed many times before but w/o success...the most interseting thing is that on other forms (like search) perfectly work.