Hi
on my site most users have more than one entry.
What do you think?
Are there some globals possible to show on an individual userpage
the 5 links with the most hits
and the 5 top rated links
of a user?
I found this global to show the last 5 entries of a user
my $LinkOwner = shift;
my $sth;
my $link_db = $DB->table ('Links');
$link_db->select_options ('ORDER BY ID DESC', 'LIMIT 6');
if ($LinkOwner) {
$sth = $link_db->select( { isNew => "Yes", isValidated => "Yes", LinkOwner => $LinkOwner } );
} else {
$sth = $link_db->select( { isNew => "Yes", isValidated => "Yes" } );
}
my $output = '';
while (my $link = $sth->fetchrow_hashref) {
$output .= Links::SiteHTML::display('link', $link);
}
return $output;
} Maybe this could changed to 5 top rated and 5 top hits??
Thanks
Matthias
Matthias
gpaed.de
on my site most users have more than one entry.
What do you think?
Are there some globals possible to show on an individual userpage
the 5 links with the most hits
and the 5 top rated links
of a user?
I found this global to show the last 5 entries of a user
Code:
sub { my $LinkOwner = shift;
my $sth;
my $link_db = $DB->table ('Links');
$link_db->select_options ('ORDER BY ID DESC', 'LIMIT 6');
if ($LinkOwner) {
$sth = $link_db->select( { isNew => "Yes", isValidated => "Yes", LinkOwner => $LinkOwner } );
} else {
$sth = $link_db->select( { isNew => "Yes", isValidated => "Yes" } );
}
my $output = '';
while (my $link = $sth->fetchrow_hashref) {
$output .= Links::SiteHTML::display('link', $link);
}
return $output;
}
Thanks
Matthias
Matthias
gpaed.de