UseBB Community

The official board for UseBB help and discussion

UseBB Community » Bug Reports » [INVALID] Board always shows 0 guests

[INVALID] Board always shows 0 guests

Page: 1

Author Post
Member
Registered: Jun 2007
Posts: 122
Location: Gatineau, QC, Canada
Hi Dietrich,

Is it normal that when I'm logged in, the Whos' Online box shows:
In the last 60 minutes, 1 member and 0 guest have visited the forums.

But if I logout, it shows:
In the last 60 minutes, 0 member and 0 guest have visited the forums.


Shouldn't it show 1 guest?

Also;
Quote
See http://usebb.sourceforge.net/cvs/. The checkins mailing list even contains diffs for each change.


Got the grasp of the CVS changes and what I do is make a small phpBB style mod for those people I switched to useBB who don't understand CVS and email it to them.

BTW, I really like the new changes where you can apply HTML tags in the Terms of Use page.

Cheers,
Gene
« Last edit by Dietrich on Sun Jul 15, 2007 9:46 am. »
Moderator
Registered: Oct 2005
Posts: 449
Location: canada
Did you try refreshing the page or clicking 'Home' in the navigation?
Member
Registered: Jun 2007
Posts: 122
Location: Gatineau, QC, Canada
Gaia wrote
Did you try refreshing the page or clicking 'Home' in the navigation?


Hey! Welcome back!

Yup, but to no avail, even surfed to another site and reloaded my board and nada...

Wonder if it has anything to do with session handling or cookies...

Cheers,
Gene
Moderator
Registered: Oct 2005
Posts: 449
Location: canada
Thanks :).

Hmm, could be, try re-starting your browser ( exit and restart the application ). I am sure it is just some browser/cookie bug that does it.
Member
Registered: Jun 2007
Posts: 122
Location: Gatineau, QC, Canada
Gaia wrote
Thanks :).

Hmm, could be, try re-starting your browser ( exit and restart the application ). I am sure it is just some browser/cookie bug that does it.


Nope, still shows 0 guests but shows that I was on. Could be an IP/cookie thing?

You're welcome to have a look (also the rules page mod, modifed fields and BBcode, etc) at:

My test 1.0.7 site

Gene
Moderator
Registered: Oct 2005
Posts: 449
Location: canada
Yea, it's not counting me as a guest either. I'm not sure, maybe try setting the 60 minutes back to 30 minutes and see if it works, else you will just have to wait for some help from Dietrich.
Member
Registered: Jun 2007
Posts: 122
Location: Gatineau, QC, Canada
Gaia wrote
Yea, it's not counting me as a guest either. I'm not sure, maybe try setting the 60 minutes back to 30 minutes and see if it works, else you will just have to wait for some help from Dietrich.


Did just that and nothing has changed, strange thing is, if I log in and look at the Detailed online list, I see you there as a guest on the index page.

Hope Dietrich will be able to answer that.

Gene
Developer
Registered: Apr 2004
Posts: 2218
Location: Belgium
This is not a bug but a limitation of sprintf(), you probably removed "(%d hidden)" from the translation strings. Since these parameters (%s and %d) are not numbered or named, the second %d in the string is the number of hidden members (based on what's the second parameter to sprintf() in the code).

So, what it shows is the number of online members and the number of hidden ones, not guests. You could workaround it by trying to comment the hidden part, i.e.
In the last %d minutes, %d member <!--(%d hidden)--> and %d guest have visited the forums.

etc.

This was already discussed for 2.0 in the mailing list, the new translation system won't have this problem.
_______________
--Dietrich (developer)
UseBB roadmap, dev mailing list & weblog
Member
Registered: Jun 2007
Posts: 122
Location: Gatineau, QC, Canada
Thanks Dietrich,

I had removed (%hidden) from the strings and restored them to orignal then commented out the hidden part and that was the solution. Care to give me a small explanation between the two (removing or commenting out)? I always thought that commenting out code was the same as deleting it.

Thanks,
Gene
Developer
Registered: Apr 2004
Posts: 2218
Location: Belgium
<!-- ---> only causes the text to be hidden in HTML, in a PHP string this doesn't make any difference. For this fix to work you only need to make sure there are three %d occurences, commenting out makes it invisible in HTML since this is what you want.

The current approach with sprintf() is fast but causes many problems, such as this one and the fact that you can't change the order of the data.
_______________
--Dietrich (developer)
UseBB roadmap, dev mailing list & weblog
Member
Registered: Jun 2007
Posts: 122
Location: Gatineau, QC, Canada
Thanks for the info, very helpful and another lesson learned. I knew about the HTML bit but didn't know about the PHP one.

Thanks again,
Gene
Member
Registered: Jun 2007
Posts: 122
Location: Gatineau, QC, Canada
Just to close the subject being it's not in a valid forum, now that I have the guests showing, why is it that when I login then logout, I get:

In the last 60 minutes, 0 members and 1 guest have visited the forums.

Does the code only count the online people but not the total for the amount set of time, whether they're still online or not?

If I login and out using 2 different usernames, shouldn't it show:

In the last 60 minutes, 2 members and 2 guest have visited the forums?

Sorry to be a pain...
Gene
:oops:
Member
Registered: Jun 2007
Posts: 122
Location: Gatineau, QC, Canada
I also have to keep in mind that I'm doing this using the same computer (IP and cookie), wonder if that could be the reason...

Cheers,
Gene
Developer
Registered: Apr 2004
Posts: 2218
Location: Belgium
Guests are counted per IP address.
_______________
--Dietrich (developer)
UseBB roadmap, dev mailing list & weblog
Member
Registered: Jun 2007
Posts: 122
Location: Gatineau, QC, Canada
Dietrich wrote
Guests are counted per IP address.


Thanks Dietrich, kinda suspected that. Guess this also applies to Memebrs.

Cheers,
Gene
:D
Member
Registered: Jun 2007
Posts: 122
Location: Gatineau, QC, Canada
Guess we can close this subject... LOL

Gene

Page: 1

UseBB Community » Bug Reports » [INVALID] Board always shows 0 guests

UseBB Community is powered by UseBB 1 Forum Software