Gossamer Forum
Home : Products : Links 2.0 : Customization :

top_x does not include links in sub categories

Quote Reply
top_x does not include links in sub categories
Hi,

I am using Widgetz top_x mod. It works fine in my sub categories. However, in the higher level categories that have sub categories in them only the top x links from that category - and not the sub categories - are shown.

For example, if I had a top link in Category/Subcategory and if it was popular enough to be in the top x of Category it would not show.

If anyone can help I will greatly appreciate it.

Here is my code:

Code:


sub build_top_x {
# --------------------------------------------------------
my ($category) = @_;
my (@values, $top_cat, @topx, $topxhtml, $count);
$original = $db_sort_links;
$db_sort_links = $db_id;
@lastx = &build_sorthit (@{$links{$category}});
$db_sort_links = $original;
my $display = 5;

(($#topx+1) / ($#db_cols+1) >= 5) or $display = ($#topx+1)/($#db_cols+1);
for ($i = 0; $i < $display; $i++) {
%tmp = &array_to_hash ($i, @topx);
$tmp{Title} =~ s/^(.{17}).*$/$1.../;
$count = $i+1;
$topxhtml .= "$count. $tmp{'Title'}<br>\n[/url]";}
return $topxhtml;
}









Last edited by:

Tramstones: Dec 27, 2001, 4:54 AM
Quote Reply
Re: Anyone know? In reply to
I know there are quite a few people who are having problems with this so if anyone has the slightest idea please post it and maybe I can figure it out from there.

Thanks,

Andrew