I am trying to find the category link template so I can change it from
sub site_html_print_cat in site_html_templates.pl to a category link template.
I have searched in the posts and found this link
http://www.gossamer-threads.com/...k%20Template;#103634
but it does not work since the code to replace does not match what is in that section. Here is the portion of that .pl
sub site_html_print_cat {
my (@subcat) = @_;
my ($url, $numlinks, $mod, $subcat, $category_name, $description, $output, $i);
$columns = 3;
$output = qq|<table width="100%" border="0" cellspacing="0" cellpadding="0">\n|;
$output .= qq|<tr>\n|;
foreach $subcat (sort @subcat) {
my $mod = $stats{"$subcat"}[3];
my $new_add = $stats{"$subcat"}[4];
($description) = @{$category{$subcat}}[2];
($subcatstyle) = @{$category{$subcat}}[9];
$url = "$build_root_url/" . &urlencode($subcat) . "/";
if ($subcat =~ m,.*/([^/]+)$,) {
$category_name = &build_clean($1);
}
else {
$category_name = &build_clean($subcat);
}
$numlinks = $stats{"$subcat"}[0];
# $mod = $stats{"$subcat"}[1];
if ($i == $columns) {
$output .= qq|</tr>\n<tr>|;
$i = 0;
}
$output .= qq|<td vAlign="top">\n|;
$output .= qq|<a href="$url">$category_name</a>\n|;
$output .= qq|<i>($numlinks)</i> \n|;
if ($new_add eq "Yes") {
$days_old = &days_old($stats{"$subcat"}[2]);
if ($days_old <= 2) { $output .= qq| $new_1|; }
elsif ($days_old <= 7) { $output .= qq| $new_3|; }
elsif ($days_old <= 14) { $output .= qq| $new_7|; }
}
if ($mod eq "Yes") { $output .= qq~ $updated~; }
$output .= qq|<br>|;
$output .= qq|$description\n| if (!($description =~ /^[\s\n]*$/));
$i++;
if ($subcatstyle =~ m,^\(([^\)]+)\)(\d)$, && $#{$subcategories{$subcat}} >= 0) {
($subcatstyle, $style) = ($1, $2);
$s = 0;
@subcatsub = split (/\|/, $subcatstyle);
$output .= qq~ ~ if ($style eq "1");
foreach $category_name (@subcatsub) {
foreach (sort @{$subcategories{$subcat}}) {
($subcatstyle eq "ALL" && $#subcatsub == 0) ?
($_ =~ m,.*/([^/]+)$, and $category_name = &build_clean($1)) :
($_ eq "$subcat/$category_name" or next);
if ($style eq "1") {
$length += length($category_name);
($length > $subcat_length) and last;
}
if ($s > 0) {
$output .= qq~, ~ and $length += 2 if ($style eq "1");
$output .= qq~ ~ if ($style eq "2");
}
$url = "$build_root_url/" . &urlencode($_) . "/";
$output .= qq~<Li>~ if ($style eq "2");
$output .= qq~<B><a class="subcat" href="$url"><FONT COLOR=black SIZE=2>$category_name</font></a></B>~;
$s++;
last if ($subcatstyle ne "ALL" && $#subcatsub > 0);
}
}
undef $length;
if ($s < $#{$subcategories{$subcat}}) {
$output .= qq~...~ if ($style eq "1");
}
$output .= qq~<BR>~;
$output .= qq|</td>\n|;
}
else { }}
$output .= "</tr>\n</table>\n";
return $output;
}
1;
I also searched for in the resources and found the link not working any longer.
http://www.gossamer-threads.com/...ces/jump.cgi?ID=1310
can anyone help with geting the protion of the program to an editable html page, please.
MetaSearchAt! and SearchAt! Directory
http://metasearchat.com
sub site_html_print_cat in site_html_templates.pl to a category link template.
I have searched in the posts and found this link
http://www.gossamer-threads.com/...k%20Template;#103634
but it does not work since the code to replace does not match what is in that section. Here is the portion of that .pl
sub site_html_print_cat {
my (@subcat) = @_;
my ($url, $numlinks, $mod, $subcat, $category_name, $description, $output, $i);
$columns = 3;
$output = qq|<table width="100%" border="0" cellspacing="0" cellpadding="0">\n|;
$output .= qq|<tr>\n|;
foreach $subcat (sort @subcat) {
my $mod = $stats{"$subcat"}[3];
my $new_add = $stats{"$subcat"}[4];
($description) = @{$category{$subcat}}[2];
($subcatstyle) = @{$category{$subcat}}[9];
$url = "$build_root_url/" . &urlencode($subcat) . "/";
if ($subcat =~ m,.*/([^/]+)$,) {
$category_name = &build_clean($1);
}
else {
$category_name = &build_clean($subcat);
}
$numlinks = $stats{"$subcat"}[0];
# $mod = $stats{"$subcat"}[1];
if ($i == $columns) {
$output .= qq|</tr>\n<tr>|;
$i = 0;
}
$output .= qq|<td vAlign="top">\n|;
$output .= qq|<a href="$url">$category_name</a>\n|;
$output .= qq|<i>($numlinks)</i> \n|;
if ($new_add eq "Yes") {
$days_old = &days_old($stats{"$subcat"}[2]);
if ($days_old <= 2) { $output .= qq| $new_1|; }
elsif ($days_old <= 7) { $output .= qq| $new_3|; }
elsif ($days_old <= 14) { $output .= qq| $new_7|; }
}
if ($mod eq "Yes") { $output .= qq~ $updated~; }
$output .= qq|<br>|;
$output .= qq|$description\n| if (!($description =~ /^[\s\n]*$/));
$i++;
if ($subcatstyle =~ m,^\(([^\)]+)\)(\d)$, && $#{$subcategories{$subcat}} >= 0) {
($subcatstyle, $style) = ($1, $2);
$s = 0;
@subcatsub = split (/\|/, $subcatstyle);
$output .= qq~ ~ if ($style eq "1");
foreach $category_name (@subcatsub) {
foreach (sort @{$subcategories{$subcat}}) {
($subcatstyle eq "ALL" && $#subcatsub == 0) ?
($_ =~ m,.*/([^/]+)$, and $category_name = &build_clean($1)) :
($_ eq "$subcat/$category_name" or next);
if ($style eq "1") {
$length += length($category_name);
($length > $subcat_length) and last;
}
if ($s > 0) {
$output .= qq~, ~ and $length += 2 if ($style eq "1");
$output .= qq~ ~ if ($style eq "2");
}
$url = "$build_root_url/" . &urlencode($_) . "/";
$output .= qq~<Li>~ if ($style eq "2");
$output .= qq~<B><a class="subcat" href="$url"><FONT COLOR=black SIZE=2>$category_name</font></a></B>~;
$s++;
last if ($subcatstyle ne "ALL" && $#subcatsub > 0);
}
}
undef $length;
if ($s < $#{$subcategories{$subcat}}) {
$output .= qq~...~ if ($style eq "1");
}
$output .= qq~<BR>~;
$output .= qq|</td>\n|;
}
else { }}
$output .= "</tr>\n</table>\n";
return $output;
}
1;
I also searched for in the resources and found the link not working any longer.
http://www.gossamer-threads.com/...ces/jump.cgi?ID=1310
can anyone help with geting the protion of the program to an editable html page, please.
MetaSearchAt! and SearchAt! Directory
http://metasearchat.com