Gossamer Forum
Home : Products : Gossamer Links : Discussions :

detail hits combined with hits?

Quote Reply
detail hits combined with hits?
I have both options for users, forced detail pages and regular links. Would it be possible to use Pugdocs details hits and the regular hits and combine them to count both to show on the link.html?

Thanks!
Quote Reply
Re: [SSmeredith] detail hits combined with hits? In reply to
Try a simple global. Something like;

Code:
sub {

my $ID = shift;

my $sth = $DB->table('Links')->select( { ID => $ID } );
while (my $hit = $sth->fetchrow_hashref) {
return $hit->{Hits} + $hit->{YOURDETAILEdCOUNTFIELD};
}
}

Then call with;

<%global_name($ID)%>

You need to replace "YOURDETAILEdCOUNTFIELD" with the field name for the details hits.. I can't remember off the top of my head what its called Tongue

Hope that works :)

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] detail hits combined with hits? In reply to
Super - works great

btw, it's Detailed_Hits

Thanks Andy!