![]() |
I seem to be getting "oops1"... what is that, and how do I fix it?
|
It can't complete the first query for some reason.
Try replacing Code:
$db=mysql_connect($servername,$dbusername,$dbpassword); Code:
$db=mysql_connect($servername,$dbusername,$dbpassword) or die("can't connect"); |
Yes.. I'm still getting the same error message.. "oops1".
|
I'm also not running on VB 2.. but, it should work, shouldn't it?
|
You must be running vB2 of some variety (beta 1, 2, 3, 4, or 5, or RC1, 2, or 3). It will not work with v1.1.x. Sorry.
|
Hi Kevin,
Thanks for this useful hack. Do you think it is possible to further customise the message shown? Re: 1 guest/member instead of showing the message as 1 guests online. notice the pural for guest? show msg as "There is 1 guest online." same thing for 0 members Re: 0 guest/member So if's it O members online and 2 guests online. Instead of showing msg as "0 members and 2 guests online" Show message as: "2 guests online" and don't show the o members part. same thing for 0 guest. And don't show any message if there are o member and o guest online. Re: warning msg I have a few layers of includes for my site, when i use the script it shows Warning: MySQL Connection Failed: Access denied for user: 'XXXXXXX@localhost' (Using password: NO) in /home/XXXXX/public_html/online.php on line 46 It works after i added the two following lines just above $db=mysql_connect($servername,$dbusername,$dbpassw ord); $dbusername="myusername"; $dbpassword="mypassword"; |
I just installed this hack and it works well, I also added a small code to also show the total number of registered members:
$usernum = mysql_query("Select count(*) from user"); $users = mysql_fetch_array($usernum); Then just put $users[0] where you want to display total members Anyway, my problem is that when I turn off the usernames and want to only display the number of members online, the number of members seems to be much higher than what is says on the forum home page under logged in members. For example on my forum home page it may say 34 members and 80 guests, and using this hack it would say 70 members and 80 guests online It seems that it correctly reports the number of guests online, but the number of members is too high. When I set $usernames to 'on', then it shows the same users as on the forum home page under users online, so the only incosistency with the total users online is when I turn the $usernames off. What can I do to fix this? |
I have a fresh install with no hacks. I am trying to figure out why when this SSI'd to the front page always shows (1) Guest online no matter what. Then if I log in it goes to (0)guests (1)Member.
This is what I was having a problem with before. Should it not have (0) for both when noone is in the forums? Update: It does go back to (0)'s for both after about a half hour or so. What causes the delay? Thanks Hooper |
feedback:
The script is showing 8 members and 2 guests online while forums is showing currently 3 members and 2 guests on the boards. |
Great hack! I have the same problem as Byron. It is because of the cookies. Not sure if anything can be done about that.
|
All times are GMT. The time now is 01:42 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|