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)

tubedogg 05-06-2001 10:00 PM

UPDATE: v0.2.2 has been released, fixing the problem of session hashes not always being removed and replaced correctly in the URLs of where people are. It also attempts to fix the problem of members appearing on the list twice, however don't hold your breath on this one.
To upgrade, just reupload online.php to your server.
--------------------------------
Old update: v0.2.1 has been released. If you already have this hack installed and working you DO NOT NEED TO UPGRADE! The only change is I adjusted the instructions to account for an error in the order I had them in. THERE IS NO CHANGE TO THE HACK ITSELF. If you have not gotten this installed and working yet, please download the zip file (online021.zip) and work from that one.
--------------------------------
Old Update: You can now see where guests are on your board. To upgrade, simply download the new zip file, and read the UPGRADE INSTRUCTIONS in the online.txt file.
--------------------------------
Old Update: I fixed a small bug that was making one long string out of the URL :eek: To upgrade, just replace online.php on your server.
--------------------------------
Old Update: I added the missing mysql.php file. :o
--------------------------------

This has been requested many, many times. It produces a page that displays who's online and where they are. You can link to it from anywhere on your board, or make it just for Admins and Moderators (instructions for that included).

Hack version: v0.2.2

For version: vB2 RC2

Files needed: online.php

Files to edit: admin/sessions.php, possibly admin/index.php and mod/index.php

Templates to edit/create: online, online_userbits, online_guestbits, possibly forumhome_loggedinusers

Instructions are included in the zip file.

Feedback wanted. :)
Please do not PM or IM me about this hack. Please post it in this thread. Thanks! :)

eva2000 05-07-2001 04:28 AM

:cool: i'll let you know how it goes soon :D

nuno 05-07-2001 04:45 AM

tubedogg
i'm getting this message when going to cp after making changes in sessions.php

There seems to have been a slight problem with the database. Please try again by pressing the refresh button in your browser.

An E-Mail has been dispatched to our Technical Staff, who you can also contact if the problem persists.

We apologise for any inconvenience.

tubedogg 05-07-2001 04:46 AM

View the source of the page and copy and paste the error here, or copy and paste the email you got from it, please.

Freddie Bingham 05-07-2001 04:47 AM

I took a quick glance at your work and I don't see where you told anyone to create the location field in the session table :eek:

tubedogg 05-07-2001 04:51 AM

I think I need to go smack my head against a wall for a while.

Wow. I cannot believe I forgot that. The file is right here, waiting for inclusion.

OK let's back up a step. Anyone who has already done so, please redownload the zip file and make sure you run the mysql.php file included. (See the instructions for more on what do to.)

:o

Thank you, Freddie! :)

nuno 05-07-2001 05:23 AM

now its working but when i go to online.php in location field i get this url:

http://127.0.0.1/vb2rc2/upload/vb2rc2uploadindex.php

it should be

http://127.0.0.1/vb2rc2/upload/vb2rc2/upload/index.php

tubedogg 05-07-2001 05:44 AM

nuno, do me a favor and try something. In online.php, find
Code:

                $location=str_replace("/","",$location);
and replace it with
Code:

                if (strrpos($location,"/")!==false) {
                        $num = strrpos($location,"/");
                        $location = substr_replace($location,"/",$num,1);
                }

and tell me if that fixes it.

nuno 05-07-2001 05:52 AM

fixed Kevin
thank you so much ;)

nuno 05-07-2001 06:15 AM

Kevin its not showing Guests location :confused:
And i need to refresh page to see my location when viewing who's online, if i dont refresh page i get that i'm seeing Board Main page

tubedogg 05-07-2001 06:20 AM

I hadn't thought about guests...I suppose I could include them. Let me do a little work on it and I'll post the results.

tubedogg 05-07-2001 06:22 AM

Quote:

Originally posted by nuno
And i need to refresh page to see my location when viewing who's online, if i dont refresh page i get that i'm seeing Board Main page
That I can't fix. It's the same as when you first surf in, you don't always appear as being online on the list on the front page. In this case it's because your location is updated at the same time the page is prepared, or slightly after (by a few milliseconds). If that's the worst problem the script presents, I think we're doing pretty good, eh? ;)

nuno 05-07-2001 06:30 AM

Quote:

That I can't fix
:(
ok, np.
Could you please fix it for Guests?
thank you ;)

tubedogg 05-07-2001 07:25 AM

I updated the zip file above with v0.2.0. You can now see what guests are doing on your board as well.

nuno 05-07-2001 07:32 AM

Done :)
Thank you Kevin

bokhalifa 05-07-2001 07:42 AM

Thanks tubedogg for Update:)

nuno 05-07-2001 07:51 AM

Kevin
something is wrong m8
After modifying sessions.php i run mysql.php and i always get this message:

There seems to have been a slight problem with the database. Please try again by pressing the refresh button in your browser.

An E-Mail has been dispatched to our Technical Staff, who you can also contact if the problem persists.

We apologise for any inconvenience

Why??

tubedogg 05-07-2001 07:55 AM

First, you *have* to post the error message itself (view the source of the page and copy that here, or copy the email you should get, here). The message you keep posting is just vB's nice way of presenting the error.

But in this case I have a pretty good idea what your problem is. Are you upgrading? If so, you need to ONLY DO the upgrade instructions in online.txt. If you already installed the hack, running mysql.php will give you an error every time because it's trying to add a column that already exists. If you are upgrading. go back and reread the upgrade instructions in online.txt (it's 3 or 4 lines, that's it).

nuno 05-07-2001 08:00 AM

i see
i know what you mean
but my problem is that i dont get any emails i dunno why :confused:

nuno 05-07-2001 08:12 AM

I'd just deleted 3 new templates and run mysql.php and i'm getting same message

tubedogg 05-07-2001 08:14 AM

Did you read the upgrade instructions in online.txt?

It sounds like you did not. Once again, you cannot rerun mysql.php. It will give you the same error again and again. It has nothing to do with templates.

At this point, recreate the 3 templates, and make sure you have uploaded online.php. It should work then.

bokhalifa 05-07-2001 08:17 AM

my also i have this error


vBulletin (cp) Database error!

mysql error number: 1054

mysql error: Unknown column 'location' in 'field list'
:confused:

tubedogg 05-07-2001 08:20 AM

You did not run mysql.php, did you?

You must read the instructions very carefully and make sure you follow them exactly.

nuno 05-07-2001 08:30 AM

Parse error: parse error, expecting `T_STRING' or `T_VARIABLE' or `T_NUM_STRING' in /home/user/s/l/b/slb2001/www/online.php(250) : eval()'d code on line 36

tubedogg 05-07-2001 08:45 AM

I'm not quite sure why you're just getting this error now, but regardless, I have made an adjustment and updated the zip file in the first post. Download it and just reupload online.php from it.

nuno 05-07-2001 08:58 AM

Parse error: parse error, expecting `T_STRING' or `T_VARIABLE' or `T_NUM_STRING' in /home/user/s/l/b/slb2001/www/online.php(241) : eval()'d code on line 36

Kevin, i dunno whats wrong, i read upgrade instructions, uploaded latest online.php and that message is all i get

tubedogg 05-07-2001 09:24 AM

Nuno, I'm really not sure what to tell you.

Can you do me a favor? Rename your online.php file to online.phps on the server. Let me know when you've done this and I'll take a look at it.

nuno 05-07-2001 09:26 AM

done

tubedogg 05-07-2001 09:29 AM

Crap...didn't work. Can you email me your online.php file to kevin@tubescan.com ?

nuno 05-07-2001 09:32 AM

its working now :)
guess what
i switched templates :D
sorry Kevin ;)
Thanks

tubedogg 05-07-2001 09:34 AM

glad you got it working...i had no idea what was wrong. there was nothing else i could fix! :)

nuno 05-07-2001 09:38 AM

Kevin one last question:
When i'm seeing a thread or replying to a thread, shouldnt online.php show me exactly that message instead of Browsing Board??

tubedogg 05-07-2001 09:47 AM

If you are viewing or replying to a thread, yes it should (and did in all my testing). Maybe have someone else go around the board while you look at online.php - you may be seeing that message because you are looking at online.php (although it should be saying Viewing Who's Online then anyway...).

fruitsalad 05-07-2001 10:39 AM

works wonderfully

any thoughts on how i can get it to work with non-vb pages which i have required global.php
at the moment it just says browsing the board for people on the non vb pages.

tubedogg 05-07-2001 11:00 AM

My system is very, very crude. It doesn't actually figure out which page the person is on, it just looks for clues in the file name (e.g. if the filename is memberlist.php, they must be looking at the memberlist, etc.). If you look through the online.php, you'll see the different places I've planned for, and you'll also see where it defaults to "Browsing Board".

One thought that just came to me is you could make a list of all the vB files. From that list, remove any that I've accounted for already in the script. Then, do a big if(strpos()===false) statement with all of those names. If it's none of those names, then they're not browsing the board. However, this is also awkward. You might also try following the "clue-and-result" system. If they're looking at a page called "mail" with the variables "send=yes" then they're sending mail. That kind of thing.

Someday I'll figure out a better way to do this. :) Just not today.

fruitsalad 05-07-2001 11:37 AM

oh dats cool..

i already felt lost looking at the code, what you just said confused me more lol

when i had this working for vB 1.1x they actually wrote the url to the location field if i remember correctly.

Freddie Bingham 05-07-2001 01:31 PM

Kevin did this hack in the same style that the hack for 1.1.x was done.

JJR512 05-07-2001 08:23 PM

Tubedogg, I'm looking forward to getting this hack on my site...except I can't, I'm having a little trouble. I've modified sessions.php as prescribed, and I've uploaded that file, mysql.php and online.php, again as per the instructions. However, when I try the next step, running mysql.php, I get an error message.

This is the meat of the error:
Quote:

<!-- Database error in vBulletin Control Panel: Invalid SQL: INSERT INTO session (sessionhash,userid,host,useragent,lastactivity,lo cation) VALUES ('a70bf25218fcc096dc225ee88971d1c9','384','63.208. 191.85','Mozilla/4.0 (compatible; MSIE 6.0b; Windows NT 5.0','','989269645')
mysql error: Unknown column 'location' in 'field list'
mysql error number: 1054
Date: Monday 07th of May 2001 05:07:25 PM
Script: /forums/admin/mysql.php
Referer:
-->
Any suggestions/ideas/etc.? You can hit me on ICQ if you want.

Dioxin 05-07-2001 08:34 PM

very very nice hack :D

thanx a lot from germany, but i have one problem:

some links in my online.php page look like this:

http://www.aktienboard.com/vb/showth...0348#post20348post20348post20348

i think this is a bug. this link contains the string "post20348" three times...

perhaps you forgot to initialize a variable?? i could not resolve the bug...perhaps you have an idea.. thanx a lot

greets, dioxin!! :)

the link: http://www.aktienboard.com/vb/online.php

fruitsalad 05-07-2001 11:02 PM

Quote:

Originally posted by JJR512
Tubedogg, I'm looking forward to getting this hack on my site...except I can't, I'm having a little trouble. I've modified sessions.php as prescribed, and I've uploaded that file, mysql.php and online.php, again as per the instructions. However, when I try the next step, running mysql.php, I get an error message.

This is the meat of the error:


Any suggestions/ideas/etc.? You can hit me on ICQ if you want.

I had that problem when trying to run mysql.php too. I just opened it and cut and paste the command in that file to phpmyadmin and created the location field from there.


All times are GMT. The time now is 04:43 PM.

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.01375 seconds
  • Memory Usage 1,820KB
  • 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
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)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