I need your help bad . . I was wondering how I would display the category in more than two columns like 3 or 4 is this possible . . .? how would I do This to this :
my (@subcat) = @_;
my ($url, $numlinks, $mod, $subcat, $category_name, $description, $output, $i, $cat_desc);
my ($half) = int (($#subcat+2) / 2);
# Print Header.
$output = qq|<CENTER><TABLE BORDER=0 WIDTH="100%"><TR><TD VALIGN=TOP WIDTH="50%">\n|;
foreach $subcat (sort @subcat) {
($description) = @{$category{$subcat}}[2];
($cat_desc) = @{$category{$subcat}}[5];
# First let's get the name, number of links, and last modified date...
$url = "$build_root_url/" . &urlencode($subcat) . "/";
if ($cat_desc eq "") {
if ($subcat =~ m,.*/([^/]+)$,) {
$category_name = &build_clean($1);
}
else {
$category_name = &build_clean($subcat);
}
}
else {
$category_name = &build_last_title_mb($cat_desc);
} $numlinks = $stats{"$subcat"}[0];
$mod = $stats{"$subcat"}[1];
# We check to see if we are half way through, if so we stop this table cell
# and begin a new one (this lets us have category names in two columns).
if ($i == $half) {
$output .= qq|</UL></TD><TD VALIGN=TOP WIDTH="50%">\n|;
}
$i++;
# Then we print out the name linked, new if it's new, and popular if its popular.
$output .= qq|<dl><dt><$font><strong><A HREF="$url">$category_name</A></strong> ($numlinks) </font>|;
$output .= qq|<img src="/images/new123.gif"></font>| if (&days_old($mod) < $db_new_cutoff);
$output .= qq|</dt>|;
$output .= qq|<dd><$font>$description </font></dd>| if (!($description =~ /^[\s\n]*$/));
$output .= qq|</dl>|;
}
# Don't forget to end the unordered list..
$output .= "</TD></TR></TABLE></CENTER>\n";
return $output;
}
Thank You,
lpluby
my (@subcat) = @_;
my ($url, $numlinks, $mod, $subcat, $category_name, $description, $output, $i, $cat_desc);
my ($half) = int (($#subcat+2) / 2);
# Print Header.
$output = qq|<CENTER><TABLE BORDER=0 WIDTH="100%"><TR><TD VALIGN=TOP WIDTH="50%">\n|;
foreach $subcat (sort @subcat) {
($description) = @{$category{$subcat}}[2];
($cat_desc) = @{$category{$subcat}}[5];
# First let's get the name, number of links, and last modified date...
$url = "$build_root_url/" . &urlencode($subcat) . "/";
if ($cat_desc eq "") {
if ($subcat =~ m,.*/([^/]+)$,) {
$category_name = &build_clean($1);
}
else {
$category_name = &build_clean($subcat);
}
}
else {
$category_name = &build_last_title_mb($cat_desc);
} $numlinks = $stats{"$subcat"}[0];
$mod = $stats{"$subcat"}[1];
# We check to see if we are half way through, if so we stop this table cell
# and begin a new one (this lets us have category names in two columns).
if ($i == $half) {
$output .= qq|</UL></TD><TD VALIGN=TOP WIDTH="50%">\n|;
}
$i++;
# Then we print out the name linked, new if it's new, and popular if its popular.
$output .= qq|<dl><dt><$font><strong><A HREF="$url">$category_name</A></strong> ($numlinks) </font>|;
$output .= qq|<img src="/images/new123.gif"></font>| if (&days_old($mod) < $db_new_cutoff);
$output .= qq|</dt>|;
$output .= qq|<dd><$font>$description </font></dd>| if (!($description =~ /^[\s\n]*$/));
$output .= qq|</dl>|;
}
# Don't forget to end the unordered list..
$output .= "</TD></TR></TABLE></CENTER>\n";
return $output;
}
Thank You,
lpluby

