Gossamer Forum
Home : Products : Links 2.0 : Customization :

Show the subcategories in HP

Quote Reply
Show the subcategories in HP
How do i get to show the subcategories in the home page?
It only shows the categories...

Quote Reply
Re: Show the subcategories in HP In reply to
Use the Subcategories like Yahoo v.2.0 or v.2.1. Version 2.1 is linked in the Resource (Click on Resources link at the top of the forum web pages.) Center and it is the first place to check for FAQs and Modifications.

Regards,

Eliot Lee

Quote Reply
Re: Show the subcategories in HP In reply to
I keep getting an error when i tro ty build the pages...

Quote Reply
Re: Show the subcategories in HP In reply to
I already followed all the instructiones but i get always the same error:

Error including libraries: Unmatched right bracket at /home/fun/www/cgi-bin/links/admin/site_html_templates.pl line 447, at end of line
syntax error at /home/fun/www/cgi-bin/links/admin/site_html_templates.pl line 447, near "}"
Make sure they exist, permissions are set properly, and paths are set correctly.


This is what i paste in the site_html_templates.pl and this is what i think it is giving me errors.
It must be something really stupid but i can't find out what it is!

# 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;
}


Can anyone help me?

Quote Reply
Re: Show the subcategories in HP In reply to
Search this forum for junko Drew sub site html print cat and you will find quite a few Threads where junko, another Links 2.0 User, has generously posted a copy of his sub site_html_print_cat routine.

After searching the Resource Center...you should spend some more time searching the forums for solutions.

Regards,

Eliot Lee

Quote Reply
Re: Show the subcategories in HP In reply to
I did, now the build works but instead of showing the subcategories it shows three dots ...
do you know why?

Quote Reply
Re: Show the subcategories in HP In reply to
Guys i finally found out the problem!
There is no resource on this forum that explains the yahoo mod completely, there is always something missing.
I found out becuase i browsed through all the posts about the mod...

Quote Reply
I just did this one last night. In reply to
There are some problems with this mod in the resource section. However, the forum message has been edited, and is (nearly) correct. Is it possible for someone to change the link to the forum message (found at the end of the mod instructions) instead of the mod instructions?

The only thing that isn't spelled out in the forum message (until the 20th post or so) is that when you do the final replace in site_html_templates.pl to are replacing from the given comment to the end of that subroutine.

If anyone's interested, here's what I finally came up with. The Categories are pretty much the way I had envisioned (some variation on Yahoo 2.1), the rest of the page is still being improved:

http://churchsite.gatheringspot.com/links2/

Lloyd Sommerer

Quote Reply
Re: I just did this one last night. In reply to
Contact gotze privately...he is the Resource Center editor.

Regards,

Eliot Lee

Quote Reply
Re: I just did this one last night. In reply to
Can you post the mod to get links to show up on the homepage under their respective categories?