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)

MomofThree 01-21-2002 08:04 PM

I tried this hack and got an "oops1" on the page.

Can someone please help me? :(

Thank you.

MomofThree 01-21-2002 11:52 PM

*bump*

pretty please, help me? :)

Chamber 01-25-2002 01:31 PM

Will this work across sub-domains?

I have my forums @ http://forum.northants-chamber.co.uk and would like to add this hack to http://www.northants-chamber.co.uk

Can you see any problems with trying that ?

snack 01-25-2002 04:05 PM

Im on a NT machine... when i try it i get this error message ...


Fatal error: Failed opening required '/sng.net/www/vb/admin/config.php' (include_path='') in E:\nthc-spc\seandan\sngnet\sng.net\www\online.php on line 46


anyone know whats the problem? tubedog???


http://www.sng.net/

Ninth Dimension 02-03-2002 05:58 PM

Fantastic hack, just what I needed, thank you.

Rapclick 02-05-2002 01:34 AM

any chance of this working with Vb 2.2.1 ?

FWC 02-05-2002 02:01 AM

Quote:

Originally posted by Rapclick
any chance of this working with Vb 2.2.1 ?
It works with both 2.2.1 and 2.2.2.

MomofThree 02-05-2002 04:22 PM

Quote:

Originally posted by MomofThree
I tried this hack and got an "oops1" on the page.

Can someone please help me? :(

Thank you.

Does anyone know why I'm getting this error? :(

Lucky 02-06-2002 08:15 PM

Does anyone know if this works with vbportal3.0pr7 with vb2.2.2?

waddy 02-07-2002 02:45 PM

Works great !!

Thanks

But i would really just like a total number - members and guests added together .... example Users on Forum :

Can anyone do this please ?

waddy 02-07-2002 07:09 PM

To have the total of both Member and Guest put this code

$somenumber=$regmemberson+$guestson;
endwhile;
echo("Users on forums: $somenumber.");
?>

Under:

while($guest = mysql_fetch_array($guests)):
$guestson = number_format($guest[guestsonline]);

Lucky 02-07-2002 07:39 PM

will this hack work with the variable to show online users numbers with fireflys hack?

SaintDog 02-13-2002 12:33 AM

Hello TubeDogg, I was wondering if you would please help me out if possible? I am using this hack and for some reason, when I leave the main page to goto the forums, then come back to the main page it will double the amount of people one.

Take for instance (right now), I am online on my forums and then I went back to the main page and it said their were 7 members online, when I was the only one online (I checked, no invisible users either).

Could the reason be me browsing the board with cookies? If so, I will not worry about it, if that is not the reason, maybe you or someone else could help me out and tell me what is the problem.

Thanks,

- SaintDog

lordofgun 02-13-2002 03:59 AM

i'm also having the problem in v 2.2.2 where the number of users on my seperate page is more than the number of users shown on the message boards.

anyone help please? :D

SaintDog 02-13-2002 06:54 AM

Good to know I am not the only one having this small problem :)

Lucky 02-13-2002 09:52 AM

Any support here?

monaarts 03-07-2002 03:10 PM

Quote:

Originally posted by J-OST
Yes, I'm looking for a sidebar version as well. :)

What exactly do you mean???


-Joe

monaarts 03-07-2002 03:20 PM

The problem is that the people are stored in a Database called Session... In session, there can be multiple people and sometimes people not logged into teh forums but thier session is there..
I am working on a nice 'ipgrade' for this hack.. It will be available later on today! :D


-Joe

monaarts 03-07-2002 05:17 PM

<a href="https://vborg.vbsupport.ru/showthread.php?threadid=35832" target="_blank">https://vborg.vbsupport.ru/showt...threadid=35832</a>

lowlight 03-20-2002 09:00 PM

How do I put a line break between "Member(s) On" and "Guest(s) On" ?

I don't know PHP :o

Ninth Dimension 03-20-2002 09:09 PM

find
echo("Member(s) on: $regmemberson. Guest(s) on: $guestson.");
replace with
echo("Member(s) on: $regmemberson.<br>Guest(s) on: $guestson.");

lowlight 03-20-2002 09:13 PM

Duh... I thought of that, but I didn't even try it... Thanks! :D

Ninth Dimension 03-20-2002 09:41 PM

did it work? (it should have)

lowlight 03-21-2002 12:40 AM

Yup it worked

Now my next question:

Which is faster, PHP includes, or SSI? I have the option of both...

Ninth Dimension 03-21-2002 12:48 AM

i personally use PHP includes, due to the simple fact that all of my pages are built using PHP, however, if you are running a series of normal shtml pages, and only using PHP on some of them, it might be easier to use the SSI.

But it's up to you at the end of the day really :)

lowlight 03-21-2002 09:22 AM

Well my whole site is going to be PHP based soon, so I thought I would use PHP includes... But I seem to be having a problem...

Say I am using the includes on my home page (index.php)....

I want to use includes in a subdir (say /included/)

The problem is, my IMG tags aren't right when I include... If I use IMG SRC ="image.gif", the references on the included page all point to root (root/image.gif), rather than /included/image.gif

If the page is on another subdir (say /reviews/), the img tags all change to that subdir... (/reviews/image.php)

So what should I do? I think SSI would work for now, and if that's the case I can just use .inc on the included pages (I assume both SSI and PHP will include those files just fine)...

But to keep things simple for my programmer, I'd like to use PHP includes all the way through...

Ideas?

monaarts 03-21-2002 04:17 PM

Hey,
When you post an image do it liek this:

../image.gif

That will bring you back one directory.. :) if you want to go back two directorys do this:

../../image.gif...

Or if you want to go back a directory and into one do somethign like this:

../images/image.gif

I hope that helps you..


-Joe

lowlight 03-22-2002 06:21 AM

Quote:

Originally posted by monaarts
Hey,
When you post an image do it liek this:

../image.gif

That will bring you back one directory.. :) if you want to go back two directorys do this:

../../image.gif...

Or if you want to go back a directory and into one do somethign like this:

../images/image.gif

I hope that helps you..


-Joe

That's what I did... it doesn't work

ice!~neko 03-23-2002 07:27 AM

what code do i put into the main page to get it to show up?

E 03-23-2002 08:05 AM

ill definetly use it when my page is up

lowlight 03-25-2002 09:00 PM

OK I fixed the problem by using true html for the image and links... IE rather than use /img/image.gif I use http://www.domain.com/img/image.gif

It works now! :D

Xube 04-13-2002 03:07 PM

Can a few of you who have got this hack working post links to examples of your pages where it works? I'd like to see what this looks like when functioning and the hytek.com link provided doesn't show a page at all. Thanks.

ixian 05-23-2002 03:38 AM

Quote:

Originally posted by Xube
Can a few of you who have got this hack working post links to examples of your pages where it works? I'd like to see what this looks like when functioning and the hytek.com link provided doesn't show a page at all. Thanks.
I wouldn't get worked up about it. I certainly appreciate Tubedogg - he has done some killer hacks and I use them - but this one doesn't work, for the simple fact that if you include it on another page it will display many more people being on then there actually are. For example, your who's online in the forums might say 22, but the hack will say 40 (or whatever).

And before you get excited and think it's reflecting total people on your site, not just forums - no it isn't. It's double-counting some logins. Don't know why - no one has answered that one.

The modified hack another member posted does the same thing. Personally, I think a hack that's supposed to show how many people are online that doesn't get the correct number is fairly useless. Not being insulting, just stating the facts.

Steve St.Lauren 05-29-2002 05:54 PM

I just finished getting this script up and running on our site. I ran into the same problems many of you did with the script reporting far more members than the forums did. I've got a fix that's working for me and my version of the hack reports the same number of members and guests as the forums do. I replaced lines 69-74 of the script that read like this:

Quote:

} else {
$regmembers = mysql_query("SELECT DISTINCT COUNT(userid) AS membersonline FROM session WHERE userid>0 AND lastactivity>$datecut") or die("oops2");
while($members = mysql_fetch_array($regmembers)) {
$regmemberson = number_format($members[membersonline]);
}
}
and I replaced them with these lines:
Quote:

} else {

// Added by SS
$regmemberson=0;
$loggedins=mysql_query("SELECT DISTINCT session.userid,username,invisible,usergroupid
FROM session
LEFT JOIN user ON (user.userid=session.userid)
WHERE session.userid>0 AND session.lastactivity>$datecut
ORDER BY invisible ASC, username ASC");
while ($loggedin=mysql_fetch_array($loggedins)) {
$regmemberson++;}



// $regmembers = mysql_query("SELECT DISTINCT COUNT(*) AS membersonline FROM session WHERE userid>0 AND lastactivity>$datecut") or die("oops2");
// while($members = mysql_fetch_array($regmembers)) {
// $regmemberson = number_format($members[membersonline]);
// }
}
I'm also attaching a copy of the full script as I'm running it (except with the admin directory name changed at the top. My version is in a vertical table approximately 95 pixels wide that I put on the side of the site. I've only done that for the list of statistics only - I didn't mess with the username list part.

Basically all I did was take the code out of the index.php file that was used for counting up the users and modified the variables and plugged it in there. Hopefully this will help you guys get it up and running and useful. I suppose there's a possibility that more errors will show up but I've been watching mine for 45 minutes now and it's been consistent that entire time.

-Steve St.Laurent
Webmaster of http://www.turbodieselregister.com

Steve St.Lauren 05-29-2002 06:01 PM

Xube - here's a few examples.

The original hack with usernames listed - http://www.turbodieselregister.com/forums/online3.php

The original hack with usernames turned off - http://www.turbodieselregister.com/forums/online2.php

and my version with usernames off and displayed vertically in a table - http://www.turbodieselregister.com/forums/online.php

Lethal 06-01-2002 04:15 AM

cool i'll use this one, thanks

Webmasta XT 06-09-2002 05:35 PM

How can I add an Image b4 every username? since how these things show up, don't match my layout, I have a arrow b4 every username, and Image Arrow, HOW CAN I ADD THAT???

Webmasta XT 06-09-2002 05:41 PM

I added this code
in the online.php
PHP Code:

echo(" &nbsp; <img src="http://xtreme-gods.net/layout/icon.jpg"> $regmemberson"); 

But I get this error
PHP Code:

Parse errorparse error in /home/virtual/site24/fst/var/www/html/online1.php on line 81 


importmix 06-21-2002 08:31 AM

I don't mean to both you Steve St.Lauren, but is there any way you can tell me how to use your code...but to just show total (members + guest) as one number?

Steve St.Lauren 06-21-2002 02:06 PM

Here you go importmix. Attached is an online.php that will do what you're looking for. Simply edit this file and put the path to your admin directory (full path) near the top and then replace your online.php with this one (backup your old one first). I replaced the two lines that say members and guest with one line that says online and combine the two.


All times are GMT. The time now is 01:02 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.01311 seconds
  • Memory Usage 1,825KB
  • 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_php_printable
  • (7)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)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