Gossamer Forum
Home : Products : Links 2.0 : Discussions :

Exclude Mod with Yahoo template

Quote Reply
Exclude Mod with Yahoo template
I cannt seems to be able to implement the code in the last part of it (irony), I use the Template of Yahoo, and cannot find the suetable lines to Replace, http://goodstuff.orphanage.com/rcat_mod.html , those are the stuff that need to be changed in the site_html_templates.pl :
Here's the tricky part in the template :
(This is the Need to Be Changed tricky part)
** sub site_html_add_failure

Change:
$in{'Category'} ?
($in{'Category'} = qq~<input type=hidden name="Category" value="$in{'Category'}">$in{'Category'}~) :
($in{'Category'} = &build_select_field ("Category"));
to read:
if (defined $in{'Category'}) {
$category =
qq~$in{'Category'}~;
}
else {
if (!@exclude_categories) {
$category = &build_select_field ("Category");
}
else {
$category = &get_cat_select_list;
}
}


--------
My template .pl thingy : (Where it needs to be changed)
sub site_html_add_failure {
# --------------------------------------------------------
# This routine determines how the add failure page will look like.

my ($errormsg) = shift;
$in{'Category'} or ($in{'Category'} = &build_select_field ("Category"));

&html_print_headers;
print &load_template ('add_error.html', {
error => $errormsg,
%in,
%globals
});

}

-------
What should i do?