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)
-   -   [Release v2] Who's Online (https://vborg.vbsupport.ru/showthread.php?t=16152)

Mitrofan 05-16-2001 12:53 PM

Its normal to see some people more than once in whose online and it was not intended to be a exact real-time statistics of where the users are.

If you don't log-out, the session table has no way of updating itself.

If you don't logout and just close the browser, you still going to be listed in users online on forum home page for the duration of the time-out set in admin CP

The same with who's online, if user closed the browser, then comes back to forum it will list him twice for some time untill his first session times out.

There must be the way to improve this hack to only show the latest session info for the user.

I think this hack needs at least one or two more improvement, Kevin knows what it is.

tubedogg 05-16-2001 12:54 PM

Unfortunately I'm not entirely sure how to fix this. I'm already pulling the records as distinct from the session table, so it should only pull one record per userid.

The other thing you mentioned,
Quote:

If you are inactive for a while and then click on refresh, you might find that there's nobody on
this can happen if you are inactive for 15 minutes (or however long the cookie timeout is set in the Admin CP) and then refresh the page. Your session has expired and when your refresh the page, it creates a new session for you, however it happens while the page is loading so it won't find that session and display it. That also applies to the other things you mentioned (being seen as other places). This does not apply to the problem of appearing multiple times.

I'll keep looking into it.

tubedogg 05-16-2001 01:06 PM

I have released the latest version (v0.2.2) of Who's Online. You can download it from the first post in this thread. To upgrade, just reupload online.php to your server.

kesha1 05-17-2001 04:22 AM

It's me again, your critic :)
No, actually I'm your admierer. I just want this thing to work perfectly, therefor I think I'm helpful.
BTW, thank you very much for your email, I think you are an exceptionally nice guy.
Another problem: If you leave the Who's Online window open and your IP (I think this is the reason) changes, because of re-connecting a dile-up, for example,
refreshing of the page will show that you are not there.
It is kinda important for me, and I hope there is a solution to that.
Thank you in advance.

Hooper 05-17-2001 07:41 AM

Not sure if anyone is interested, but I've installed a javascript that will allow for manual and automatic page refresh that can be set to a certain number of seconds. This pretty much solves the refresh as far as I'm concerned. Not that most people wouldn't refresh by their browser anyhow, but.....some won't.

http://www.gimmetech.com/wol.gif

Javascript Code: for auto refresh..

<head>
<title></title>
<script language="JavaScript">
<!--

var sURL = unescape(window.location.pathname);

function doLoad()
{

setTimeout( "refresh()", 60*1000 );
}

function refresh()
{

window.location.href = sURL;
}
//-->
</script>

<script language="JavaScript1.1">
<!--
function refresh()
{

window.location.replace( sURL );
}
//-->
</script>

<script language="JavaScript1.2">
<!--
function refresh()
{

window.location.reload( false );
}
//-->
</script>
</head>
<body onload="doLoad()">
</body>
</html>

Javascript code for manual refresh:..

<html>
<head>
<script language="JavaScript">

var sURL = unescape(window.location.pathname);

function refresh()
{
window.location.href = sURL;
}
//-->
</script>

<script language="JavaScript1.1">
<!--
function refresh()
{
window.location.replace( sURL );
}
//-->
</script>

<script language="JavaScript1.2">
<!--
function refresh()
{
window.location.reload( false );
}
//-->
</script>
</head>

<body>

<p><a href="javascript:refresh()"><img src="images/wolbutton.gif" border="0"
align="middle" width="71" height="70"></a>image as a button</p>

</body>
</html>


I have both manual and auto installed. Both work fine together. I would install the auto above the manual in the header. And of course be sure to put everything in its proper place.
This is installed in the online template. Also I wouldn't advise installing a metatag refresh. These can cause problems. ;)

If you decide to use this for your WOL and have problems with it, PM me instead of posting in here unless Kevin states otherwise. ;)

SeeYa....

kesha1 05-17-2001 02:04 PM

Very helpful script,
Thanks a lot

kesha1 05-17-2001 02:21 PM

As far as I've noticed, the visitors are not doubled in the small table version of Who's Online in a front page.
I don't really know how it's done, but hope this observation might help.

tubedogg 05-17-2001 02:34 PM

Kesha: Yes, that's why I'm at such a loss. The code that pulls the records from the database is basically identical to the code that is used on the front page. I'm going to continue trying various things. Hopefully I'll get it worked out soon.

kesha1 05-18-2001 09:32 AM

2 things:
1. The IP displayed in Who's Online is the one that belongs to the person who's looking at it. All the users have the same IP. So, I believe that variable $ipaddress is not the one that should be used there.
2. How can I change the title underneath the boards name from Who's Online to Who's On or Who's Alive, and place a pic to the right from it.
Thank you in advance

Mas*Mind 05-21-2001 10:46 PM

Couple of 'bugs'

1) I'm still listed twice

2) Some links are displayed as: Viewing post #128099#post128099 in thread "Dudek bedankt" and the url is then:

htp://feyenoord.messagebase.nl/showthread.php?postid=128099#post128099post128099post128099

(with http instead of htp ofcourse, otherwise he wouldn't printed the whole url)

Mas*Mind 05-21-2001 11:19 PM

I think that the users are listed twice (or multiple's) because you now also select the location...

When you have 2 sessions from the same user now everything will be the same (session.userid,username,invisible) except for the location...

So DISTINCT doesn't work then, because he 'sees' those 2 records as two different ones because of the locationfield...

There could be a workaround on this...Make an array or something; New record -> userid allready in the array? skip it...otherwise -> add userid to array -> list user

Only troubles would be with guests then...or you can check on the ipaddress if (s)he's allready listed

c-pr0mpt 05-23-2001 06:28 AM

Hi. I installed this hack today and my prob is that when someone comes on, they pop on whos online quickly. But when they leave the site it takes around 15 minutes before it knows they left.

How can I fix this?

c-pr0mpt 05-23-2001 07:04 AM

I lowered my cookie timeout to 60 seconds to "cover up" this problem. But I would really appreciate a true fix to this problem.

tubedogg 05-23-2001 10:23 AM

This is the exact same way the Who's Online on the front page of your forums works, and there's no way around it unless you leave your cookie timeout at a very low number (which I would not suggest). Hence, there's really no "fix", although I don't consider it a problem.

c-pr0mpt 05-23-2001 05:09 PM

How come normally it works though? Before I did this, it worked right a way. Is there anything I may have accidentally done, that would make it take so long?

Thanks for advice on Cookie Timeout. I will put it back at a higher number.

eva2000 05-24-2001 06:28 PM

just installed this and found there are two instances of this found in sessions.php


PHP Code:

Around line 237find
      $DB_site
->query("UPDATE session SET lastactivity=".time()."$styleup WHERE sessionhash='".addslashes($session['sessionhash'])."'");
and 
replace it with
      $DB_site
->query("UPDATE session SET lastactivity=".time().",location='".addslashes($scriptpath)."'$styleup WHERE sessionhash='".addslashes($session['sessionhash'])."'"); 


i replaced both any problems with that ?

Hooper 05-24-2001 06:56 PM

Maybe what Eva posted above is the problem. :cool:

eva2000 05-24-2001 06:59 PM

Quote:

Originally posted by Hooper
Maybe what Eva posted above is the problem. :cool:
maybe but i'm a bit confused as to what the exact problem is hehe

tubedogg 05-24-2001 09:01 PM

Sorry, in that other thread I meant what line number...but anyway actually you should be putting it in both places - the first one should be covered by finding line 195 and the second line 237. :)

Hooper 05-24-2001 09:09 PM

Ok, I have this correct then.

Thanks Kevin.

eva2000 05-24-2001 09:34 PM

Quote:

Originally posted by tubedogg
Sorry, in that other thread I meant what line number...but anyway actually you should be putting it in both places - the first one should be covered by finding line 195 and the second line 237. :)
great :) although it still shows username more than once

Hooper 05-24-2001 10:34 PM

Quote:

Originally posted by eva2000
great :) although it still shows username more than once
Eva,

Not that it takes much, but you are confusing the heck out of me.
:D

catocom 05-25-2001 05:39 AM

well I think I installed everything right...
I'm double checking now.
I don't get any error messages, and the board
seems the same.
I'm doing the admin viewing only option.
When I click the link in cp it says loading for a minute,
then it's done, but there is nothing there.

Got any ideas???

oh yeah I've also got several styles.
do I have to put the new templates in all of them?

eva2000 05-25-2001 05:53 AM

Quote:

Originally posted by Hooper


Eva,

Not that it takes much, but you are confusing the heck out of me.
:D

don't worry get use to it :D

i did notice when i first visited my forum for today i couldn't see my own username on the forumhome current active user list could of been my eyes playing with me or an effect of this hack ?

Hooper 05-25-2001 05:58 AM

I haven't got it to work correctly either. Still a detail or two to work out I believe. I'm having the same situations as you.

Do like it though. Shouldn't be to much to fix for the Kevin the Hack Pro. ;)

catocom 05-25-2001 06:08 AM

oh I almost forgot
I made a mod to this line

<a href="../online.php?s=<?php echo $session[sessionhash]; ?>&action=move"> View Online Users </a>

I took out the ../
if I put it in it does give an error that says
Quote:

The specified CGI application misbehaved by not returning a complete set of HTTP headers. The headers it did return are:
I've got it in this way now, since it was the original.

I have double checked everyting and it is as it should be
according to the instructions.
also I was doing a new install.

catocom 05-25-2001 02:52 PM

Geezus
I can't believe I did that !

LOL
I put the online.php in the admin dir insted of the root.

Works like a charm now :D

eva2000 05-27-2001 07:18 AM

had to remove the hack seems my Current Active User figure get's misreported and even myself don't show up on the list until i browse around my forum for a while and refresh the main page...

i have 59 sessions via phpmyadmin but only 17 members/guests showed up

Hooper 05-27-2001 07:28 AM

Hope this one gets figured out soooon.... This is my all time favorite hack. :D

max 05-27-2001 07:05 PM

Is there a way to make this online.php file show the # or members/posts/threads too?

Freddie Bingham 05-27-2001 07:14 PM

The session table is updated at the completion of a page output so if you go to index.php as the first page of your visit you will not see yourself until you refresh.

catocom 05-27-2001 11:03 PM

Quote:

Originally posted by max
Is there a way to make this online.php file show the # or members/posts/threads too?
Yeah That would be nice.

max 05-28-2001 03:49 AM

Quote:

Originally posted by max
Is there a way to make this online.php file show the # or members/posts/threads too?
This post here solved most of my problems and answered the questions I had on this topic: http://www.vbulletin.com/forum/showt...?threadid=2658

Thanks alot to eva2000 and TechTalk :D

The only other thing I wanted to know, is to get a separate page to show all Online Members, and where exactly they are browsing. To have it looking sort of like this:

Screenshot http://www.studenten-city.de/stf/pmstats.jpg

I don't know if this hack Online hack can do something like this, or would it be another separate hack?

tubedogg 05-28-2001 03:25 PM

That's what this hack does...?

Hooper 05-28-2001 03:29 PM

Wow, check it out TubeDogg is a Moderator. Congrats Tube.:D

max 05-28-2001 04:00 PM

Quote:

Originally posted by tubedogg
That's what this hack does...?
tubedogg, but it's not formatted anyway.. it just displays this info in the wide open unless you <include> it someplace..

and it also doesn't show you where they're browsing exactly, which i'm not sure if this hack can do..

Actually, let me show you exactly what I mean:

Click here to see the perfect example

catocom 05-28-2001 07:48 PM

Oh
in that case I retract my earlier statement. :D

I meant something like the
members page + online + some stats + ip addys....
like a sizable spread sheet that you could see everything
at once, with maybe the buttons like are in the members page,
but only show all this for the members that are online,
and have a button like the pm that would popup a
windows just like pm, but work like icq.

Now is that asking for the world or what...:D

daydreamer 05-31-2001 11:32 PM

Hello,

After carefully following the instructions, I get the following error:

Warning: Variable $loggedins is not an array or string in /home/noc/dre-www/board/online.php3 on line 29

Parse error: parse error in /home/noc/dre-www/board/online.php3 on line 44


Thanks
dd

daydreamer 06-01-2001 11:33 AM

:( Anyone? :(

Hooper 06-01-2001 07:20 PM

Did you backup your sessions.php? If you did you may opt to rename the hacked sessions.php and put your backed up sessions back on the server. If you don't get the error, then you need to go through your hack or rehack.

;)


All times are GMT. The time now is 04:51 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.01437 seconds
  • Memory Usage 1,831KB
  • 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
  • (1)bbcode_php_printable
  • (9)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)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