Gentleman, I usually don't post anything here without trying for days first but I'm going in circles with something that I bet is going to be a simple thing to correct.
I'm trying to use categories with images on the side and everything seems to be working well except that I cannot get rid of a douple space problem between my Categories and Yahoo Style Subcategories. See link below:
http://dream2reality.com/pages/
Here is what my "site_html_templates" code looks like:
"site_html_templates"
# Then we print out the name linked, new if it's new, and popular if its popular.
if (@{$category{$subcat}}[9] =~ ".gif") {
$output .= qq|<dl><dt><img src="@{$category{$subcat}}[9]"><a class="link" href="$url">$category_name</a><small class="numlinks"> ($numlinks)</small></font> |;
}
else{
$output .= qq|<dl><dt><a href="$url">$category_name</a> ($numlinks) |;
}
$output .= qq|<medium><sup><font color="red">new</font></sup></medium>| if (&days_old($mod) < $db_new_cutoff);
$output .= qq|</dt>|;
$output .= qq|<dd><span>$description</span></dd>| if (!($description =~ /^[\s\n]*$/));
$output .= qq|</dl>|;
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~<font face="Arial" size="1"><a href="$url">$category_name</a></font>~;
$s++;
last if ($subcatstyle ne "ALL" && $#subcatsub > 0);
}
}
undef $length;
if ($s < $#{$subcategories{$subcat}}) {
$output .= qq~...~ if ($style eq "1");
}
$output .= qq~<BR>~;
}
else { }}
# Don't forget to end the table..
$output .= "</td></tr></table></div>\n";
return $output;
}
I seem to be able to to fix the double spacing issue when I replace the </dl> and </dt> with <br> (see code below) but what happens next is this:
http://dream2reality.com/pages/sample.htm
My categories on the next page do not fall underneath each other.
# Then we print out the name linked, new if it's new, and popular if its popular.
if (@{$category{$subcat}}[9] =~ ".gif") {
$output .= qq|<dl><dt><img src="@{$category{$subcat}}[9]"><a class="link" href="$url">$category_name</a><small class="numlinks"> ($numlinks)</small></font> |;
}
else{
$output .= qq|<dl><dt><a href="$url">$category_name</a> ($numlinks) |;
}
$output .= qq|<medium><sup><font color="red">new</font></sup></medium>| if (&days_old($mod) < $db_new_cutoff);
$output .= qq|</dt>|;
$output .= qq|<dd><span>$description</span></dd>| if (!($description =~ /^[\s\n]*$/));
$output .= qq|</br>|;
http://dream2reality.com/pages/sample.htm
Can anyone help me tweak this problem?
Thank you bery much
I'm trying to use categories with images on the side and everything seems to be working well except that I cannot get rid of a douple space problem between my Categories and Yahoo Style Subcategories. See link below:
http://dream2reality.com/pages/
Here is what my "site_html_templates" code looks like:
"site_html_templates"
# Then we print out the name linked, new if it's new, and popular if its popular.
if (@{$category{$subcat}}[9] =~ ".gif") {
$output .= qq|<dl><dt><img src="@{$category{$subcat}}[9]"><a class="link" href="$url">$category_name</a><small class="numlinks"> ($numlinks)</small></font> |;
}
else{
$output .= qq|<dl><dt><a href="$url">$category_name</a> ($numlinks) |;
}
$output .= qq|<medium><sup><font color="red">new</font></sup></medium>| if (&days_old($mod) < $db_new_cutoff);
$output .= qq|</dt>|;
$output .= qq|<dd><span>$description</span></dd>| if (!($description =~ /^[\s\n]*$/));
$output .= qq|</dl>|;
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~<font face="Arial" size="1"><a href="$url">$category_name</a></font>~;
$s++;
last if ($subcatstyle ne "ALL" && $#subcatsub > 0);
}
}
undef $length;
if ($s < $#{$subcategories{$subcat}}) {
$output .= qq~...~ if ($style eq "1");
}
$output .= qq~<BR>~;
}
else { }}
# Don't forget to end the table..
$output .= "</td></tr></table></div>\n";
return $output;
}
I seem to be able to to fix the double spacing issue when I replace the </dl> and </dt> with <br> (see code below) but what happens next is this:
http://dream2reality.com/pages/sample.htm
My categories on the next page do not fall underneath each other.
# Then we print out the name linked, new if it's new, and popular if its popular.
if (@{$category{$subcat}}[9] =~ ".gif") {
$output .= qq|<dl><dt><img src="@{$category{$subcat}}[9]"><a class="link" href="$url">$category_name</a><small class="numlinks"> ($numlinks)</small></font> |;
}
else{
$output .= qq|<dl><dt><a href="$url">$category_name</a> ($numlinks) |;
}
$output .= qq|<medium><sup><font color="red">new</font></sup></medium>| if (&days_old($mod) < $db_new_cutoff);
$output .= qq|</dt>|;
$output .= qq|<dd><span>$description</span></dd>| if (!($description =~ /^[\s\n]*$/));
$output .= qq|</br>|;
http://dream2reality.com/pages/sample.htm
Can anyone help me tweak this problem?
Thank you bery much