![]() |
How to display currently online users on any normal PHP page
Hey all.
How can I produce a list of users that are currently online in the forum. I want to then print these out on a normal PHP page that is not part of the vbulletin software. Each name would link to the users profile. I expect this will need to use javascript although I would prefer to use php to do this so that it is server side processed and prints out static html code. Any thoughts or help would be great :) Thanks, David |
As stated before in many other threads, you need to replicate what vBulletin does to do this in index.php.
|
Think I just replied to you in another thread asking if you could link to one of these other posts or provide more detail as based on your reply I have no idea what you are on about :)
Thanks :) --------------- Added [DATE]1217943513[/DATE] at [TIME]1217943513[/TIME] --------------- Quote:
Thank you for your help, I need a little more direction though. Thanks. |
Open up the index.php page. Find and copy the whole section under "// ### LOGGED IN USERS ###" You may have to include a couple of the files listed right below where it says "// ### REQUIRE BACK-END ###"
|
Fantastic. Thank you. A much more helpful reply. Think I can sort this now. :)
--------------- Added [DATE]1217962579[/DATE] at [TIME]1217962579[/TIME] --------------- Having some trouble. The page I want to show the info on is in the root while my forum is in a folder called /forum/ and I get this error Warning: main(/home/public_html/includes/init.php) [function.main]: failed to open stream: No such file or directory in /home/public_html/forum/global.php on line 20 I edited global.php to include the right path but that then breaks the forum. Any thoughts on how to load it with the right base path being used etc? --------------- Added [DATE]1217965242[/DATE] at [TIME]1217965242[/TIME] --------------- Ok. Got a little further by using Code:
// ######################### REQUIRE BACK-END ############################ But now I get Fatal error: Call to a member function on a non-object in /home/public_html/forum/includes/functions.php on line 1303 --------------- Added [DATE]1217966241[/DATE] at [TIME]1217966241[/TIME] --------------- Give up. can't get this to work. :( |
Wouldn't this work?
PHP Code:
|
Get rid of the second chdir.
PHP Code:
|
Just FYI so you know... None of these worked. I have made a custom SQL call instead
|
Yeah, all you really need is the query SQL. The rest you can create yourself if you have knowledge of PHP.
|
Quote:
|
All times are GMT. The time now is 11:39 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 | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|