Gossamer Forum
Home : Products : DBMan : Installation :

Top Ten Mod: Format Questions

Quote Reply
Top Ten Mod: Format Questions
Hey there,

I just got the Top Ten Records/Display Counter mod working (woohoo! Smile) and I was wondering how I can put a line break after each article that comes up in the top ten? Right now the links to them are on the far left of the page all in one line, no line breaks...I looked through the code and though I could figure it out, but I havn't been able to...

...also, is there someway to display their total views along with the link? I'm using the short-long display mod BTW. Smile

Chris
Quote Reply
Re: Top Ten Mod: Format Questions In reply to
Nevermind on the line breaks thing, I've got it in a better layout...however I'd still be grateful if someone could show me how to display how many views the article has on the Top Ten page...

Chris Smile
Quote Reply
Re: Top Ten Mod: Format Questions In reply to
I'm really not sure what you're asking. Can you try again? Smile


------------------
JPD






Quote Reply
Re: Top Ten Mod: Format Questions In reply to
Carol,

I was wondering if there was a way to display the total times an article has been viewed NEXT to the article link on the "Top Ten" page?

Chris
Quote Reply
Re: Top Ten Mod: Format Questions In reply to
Now I get it! (I'm a little dense sometimes. Smile )

Sure.

You have currently:

Code:
%rec = (&get_record($toplist));
print qq|
<a href="$db_script_link_url&$db_key=$rec{$db_key}&view_records=1">$rec{'FieldName'}</a>
|;

You just need to add the code for getting the count.

Code:
%rec = (&get_record($toplist));
$count_up= "$counter_dir/$rec{$db_key}";
open (COUNT, "<$count_up");
$countup = <COUNT>;
close COUNT;

print qq|
<a href="$db_script_link_url&$db_key=$rec{$db_key}&view_records=1">$rec{'FieldName'}</a>
($countup)
|;

That will put the number of accesses next to the link in parentheses.


------------------
JPD