1
meme
is that bug ?
  • 2003/6/20 3:29

  • meme

  • Quite a regular

  • Posts: 271

  • Since: 2002/12/10


hi

when u visit a topic in newbb it count you only one time

i was thinking its only on my newbb but when i try it here its give the same result only one count

thanks

2
meme
Re: is that bug ?
  • 2003/6/20 8:58

  • meme

  • Quite a regular

  • Posts: 271

  • Since: 2002/12/10


please
need to count every visit

any help ?

3
AndreyRa
Re: is that bug ?
  • 2003/6/23 23:31

  • AndreyRa

  • Just popping in

  • Posts: 17

  • Since: 2003/3/16


No its a feature (c) ;)
Actually this it is made to prevent extra charge of the counter by simple updating of page.

Here is the hack:
file: \modules\newbb\viewtopic.php, serach for this lines
if ( empty($topic_lastread[$topic_id]) ) {
    
$sql 'UPDATE '.$xoopsDB->prefix('bb_topics').' SET topic_views = topic_views + 1 WHERE topic_id ='$topic_id;
    
$xoopsDB->queryF($sql);
}


and chage it for this: Quote:

//if ( empty($topic_lastread[$topic_id]) ) { //not needed
$sql = 'UPDATE '.$xoopsDB->prefix('bb_topics').' SET topic_views = topic_views + 1 WHERE topic_id ='. $topic_id;
$xoopsDB->queryF($sql);
//}


That's all!

4
meme
Re: is that bug ?
  • 2003/6/23 23:50

  • meme

  • Quite a regular

  • Posts: 271

  • Since: 2002/12/10


thanks its work everything fine now

5
CheChen
Re: is that bug ?
  • 2004/7/18 1:30

  • CheChen

  • Just popping in

  • Posts: 23

  • Since: 2004/6/7 1


THX AndreyRa, it helped me too.

Login

Who's Online

222 user(s) are online (154 user(s) are browsing Support Forums)


Members: 0


Guests: 222


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Apr 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits