Gossamer Forum
Home : Products : Links 2.0 : Customization :

Password Mod for Templates & Category Select Problem??

Quote Reply
Password Mod for Templates & Category Select Problem??
Hello,

I guess this question would be for Bobsie mostly, since he is the creater of the category select modification.

The password modification for templates and the Category Select modification seem to conflict with each other. In site_html_templates.pl file their is a sub called
Code:
sub site_html_modify_form
There are changes made to this sub in both of the modifications. I installed the password modification first, so it looks like the category select mod works, (haven't really tested it thoroughly.

The password modification makes this change to the sub:
Code:
sub site_html_modify_form {
# --------------------------------------------------------
# This routine determines how the modify form page will look like.

my %rec = @_;
my $category = &build_select_field ("Category", "$rec{'Category'}");

&html_print_headers;
print &load_template ('modify.html', {
category => $category,
%rec,
%globals
});
}

while the Category select Modification makes thisa change:
Code:
Change:

my $category = &build_select_field ("Category", "$in{'Category'}");

to read:

if (!@exclude_categories) {
($category = &build_select_field ("Category"));
}
else {
($category = &get_cat_select_list);
}

Do you know how I can make these two modifications work together. Any help is greatly appreciated.

Thanks Smile

------------------
James L. Murray
VirtueTech, Inc.
www.virtuetech.com


[This message has been edited by Ground Zero (edited July 22, 1999).]
Quote Reply
Re: Password Mod for Templates & Category Select Problem?? In reply to
It would seem to me that all you need to do is change the line in the Category Select mod that reads:

Quote:
($category = &build_select_field ("Category"));

to read:

Quote:
($category = &build_select_field ("Category", "$rec{'Category'}"));

That should work okay.
Quote Reply
Re: Password Mod for Templates & Category Select Problem?? In reply to
Never mind...

[This message has been edited by oldmoney (edited August 10, 1999).]
Quote Reply
Re: Password Mod for Templates & Category Select Problem?? In reply to
OK, so what about if the Alternate Category mod is in the mix too? P/W plus Category Select give you this:

Code:

&html_print_headers;
my $category = shift;
$category ?

if ($category) {
($category =
qq~$category<input type=hidden name="Category" value="$category">~);
}
else {
if (!@exclude_categories) {
($category = &build_select_field ("Category", "$rec{'Category'}"));
}
else {
($category = &get_cat_select_list);
}
}

And what I'm trying to get it going with is this:

Code:

&html_print_headers;

my $category = shift;
my $category = &build_select_field ("Category", "$category");
my $altcategories = &build_select_field
("AltCategories","$in{'AltCategories'}","AltCategories","MULTIPLE Size=3");
my $location = &build_select_field ("Location", "$location");

This forum has been helpful beyond belief, to the point where a non-programmer like myself can hot-rod this script to the nines, but now I'm stuck... any ideas?

spyderdood
Quote Reply
Re: Password Mod for Templates & Category Select Problem?? In reply to
Spyderdood,

Have you looked at this?
http://www.concepts2000.com/Mods/join.html

It combines the AltCategory mod and my Category Select Mod.
Quote Reply
Re: Password Mod for Templates & Category Select Problem?? In reply to
Thanks Bobsie -
That looks like what I need, but I think it's gonna have to wait until I've had some sleep Smile