vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   Who's online on non-vB page (with usernames) (https://vborg.vbsupport.ru/showthread.php?t=12010)

badmeetsevil 05-13-2001 12:22 AM

I seem to be getting "oops1"... what is that, and how do I fix it?

tubedogg 05-13-2001 12:34 AM

It can't complete the first query for some reason.

Try replacing
Code:

$db=mysql_connect($servername,$dbusername,$dbpassword);
mysql_select_db($dbname);

with
Code:

$db=mysql_connect($servername,$dbusername,$dbpassword) or die("can't connect");
mysql_select_db($dbname) or die("can't get db");

and tell me if you still get the same error or a different error.

badmeetsevil 05-13-2001 01:39 AM

Yes.. I'm still getting the same error message.. "oops1".

badmeetsevil 05-13-2001 01:40 AM

I'm also not running on VB 2.. but, it should work, shouldn't it?

tubedogg 05-13-2001 01:54 AM

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.

Byron 05-13-2001 06:58 AM

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";

Mitrofan 05-13-2001 02:47 PM

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?

Hooper 05-14-2001 10:26 PM

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

Byron 05-24-2001 02:31 PM

feedback:

The script is showing 8 members and 2 guests online

while forums is showing

currently 3 members and 2 guests on the boards.

Degen 05-25-2001 07:34 PM

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
  • Page Generation 0.01156 seconds
  • Memory Usage 1,732KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete