Gossamer Forum
Home : Products : Links 2.0 : Customization :

YAHOO v2.1 problems

Quote Reply
YAHOO v2.1 problems
I have the script up n' running and is currently using (ALL)2. The script displays the vertical listing really nice.

I have now changed all the necessary variables to (ALL)1.
However, the sub categories does not show up. There is a blank space where the categories are supposed to show up.

I have searched the forum without any success. I even gave the olympics a miss so that I could try to find an answer to the problem Smile.

Any suggestions?

Regards,

Joe

Quote Reply
Re: YAHOO v2.1 problems In reply to
you need to put the catagory name in
the description area for the sub catagories

ron

Islandflyer.Com
http://islandflyer.com/links/pages/
Quote Reply
Re: YAHOO v2.1 problems In reply to
Thank you for your reply.

The strange thing is that it was all working fine with the sub categories listing when I was using (ALL)2 - the vertical listing. However, I have know changed all the variables to (ALL)1, but it only displays a blank space where the sub-categories are supposed to appear on my home html page.

I had a look at your index.html page islandflyer; that is exactly how I would like to display my sub-categories.

My old vertical sub-category listing was nice, but I prefer the horizontal style instead.

Any assistance is highly appreciated.

Regards,

Joe


Quote Reply
Re: YAHOO v2.1 problems In reply to
Make sure that the $description variable near the conditional statement that includes (1) is changed to $category_name in the sub site_html_print_cat routine in the site_html_templates.pl file.

Regards,

Eliot Lee

Quote Reply
Re: YAHOO v2.1 problems In reply to
Thanks again for your support and helpful advice.

I have included my sub site_html_print_cat below. I copied it from the link (posted by Junko I believe) which has been provided in a large number of links lately. I read in one of the threads that one can increase the sub_category length in the links.cfg file; however, I am not really sure how to go about that.

Thanks again for a great forum with always great help.

sub site_html_print_cat {
# --------------------------------------------------------
# This routine determines how the list of categories will look.
# We now use a table to split the category name up into two columns.
# For each category you can use the following variables:
#
# $url : The URL to go to that category
# $category_name : The category name with _ and / removed.
# $category_descriptions{$subcat}: The category description (if any).
# $numlinks : The number of links inside that category (and subcategories).
# $mod : The newest link inside of that category.
#

my (@subcat) = @_;
my ($url, $numlinks, $mod, $subcat, $category_name, $description, $output, $i);
my ($half) = int (($#subcat+2) / 2);

# Print Header.
$output = qq|<div class="margin"><table width="80%" border="0" cellspacing="0" cellpadding="0"><tr><td class="catlist" valign="top">\n|;

foreach $subcat (sort @subcat) {
($description) = @{$category{$subcat}}[2];
($subcatstyle) = @{$category{$subcat}}[8];

# First let's get the name, number of links, and last modified date...
$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];

# 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|</td><td class="catlist" valign="top">\n|;
}
$i++;

# Then we print out the name linked, new if it's new, and popular if its popular.
$output .= qq|<a class="catlist" href="$url">$category_name</a> <font class="catlist">($numlinks)</font> |;
$output .= qq|<small><sup class="new">new</sup></small>| if (&days_old($mod) < $db_new_cutoff);
$output .= qq|<BR>|;

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~<a class="subcat" href="$url">$category_name</a>~;
$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;
}
1;

Regards,

Joe

Quote Reply
Re: YAHOO v2.1 problems In reply to
i had the same problem..here what i have done...in admin.cgi delete category and then add the same category...and built all..
it worked for me
Gregor