Quote:
06-30-03 at 08:30 PM Robink said this in Post #257
Some people on my forums deliberately keep refreshing the Journal page to increase the number of views.
Is there any way to stop this?
(I know this is trivial )
|
Well, I have an idea for you. You might change the counts so they are only incremented when someone other than the journalist or a guest visits his page.
I added the parts in
yellow to journal.php. Don't forget the closing bracket!:
Quote:
// Increase view count by 1
// only if the reader is not the journalist and not a guest!
if (($bbuserinfo[userid] != $userid) AND ($bbuserinfo[userid]!=0)) {
$view_up = $DB_site->query("UPDATE journal SET views=views+1 where journalid = $journalid");
if(!$view_up)
echo "Query $viewup could not be executed";
}
|
The reason for not having guests increment the count is that a person could simply log out and hammer their journal to increase the post count. Unless guests were already disabled from reading, as recommended elsewhere in this thread.
Of course, to circumvent this protection, they will simply need to log in as someone else and then hammer the journal. But we needn't tell them that!
Regards,
Matt