darnoldy
23rd October 2007, 04:18 AM
Over at vBSEO they've just published an article. Here's a quick summery of it. Go check it out :)
Title: Display Users Viewing non-vBulletin Pages in "Online Users"
Author: NeutralizeR
Published: Tue, 11 Sep 2007 12:01:52 GMT
Full Article: http://www.vbseo.com/f34/display-users-viewing-non-vbulletin-pages-online-users-16307/
Hi,
I had some non-vBulletin pages integrated to the vBulletin database and i wanted to show the users viewing those pages in Online Users so i used this piece of code at the top of the non-vBulletin pages:
PHP Code:
You can remove the lines related to vBadvanced if you don't have it installed.
More information can be found here:
How to create your own vBulletin-powered page! (uses vBulletin templates) (http://www.vbulletin.org/forum/showthread.php?t=62164)
-----------------------------------------------------------------------------
Let's say you have a page nothing to do with vBulletin & vBulletin database (wordpress pages, external html pages, even pages of your other domains etc...) and you still want to show the page viewers in Online Users of vBulletin.
Step - 1
Create a page called 'extra_online_users.php'.
Copy these lines in it:
PHP Code:
Extra Online Users
Save and upload this page to your domain or forum root.
Step - 2
Open your non-vbulletin page and copy these lines to the very bottom of your page:
(Note: Before )
HTML Code:
Now, anybody visits your non-vbulletin page will be displayed at "Online Users".
But it will show their location as "Unknown Location". We can fix this of course.
Step - 3
Go to your AdminCP > Plugins & Products > Plugin Manager > Add new Plugin
Product: vBulletin
Hook Location: online_location_process
Title: Extra Online Users Process
Execution Order: 5
Code: PHP Code:
if ($filename == 'extra_online_users.php')
{
$userinfo['activity'] = 'extra_online_users';
}
Save.
Go to your AdminCP > Plugins & Products > Plugin Manager > Add new Plugin
Product: vBulletin
Hook Location: online_location_unknown
Title: Extra Online Users Unknown
Execution Order: 5
Code: PHP Code:
if ($userinfo['activity'] == 'extra_online_users')
{
$handled = true;
$userinfo['action'] = 'Viewing -your custom page title comes here-';
$userinfo['where'] = '-your custom page title-';
}
Save.
If you want to apply this tutorial for more than one page, just create another instance of "extra_online_users.php" and name it like "extra_online_users2.php".
Don't forget to add the lines to the plugins and make the name changes.
Demo and screenshots:
Messenger Blog (http://msn-live-messenger.msxlabs.org/)
(a wordpress blog - http://www.msxlabs.org/msxteam/NeutralizeR/msxlabsbanner.gif this image at the footer is called by iframe 'extra_online_users.php')
The viewer is displayed as:
http://dts.msxlabs.org/NeutralizeR/Snap129.png
Feel free to ask any questions realated to this tutorial.
Display Users Viewing non-vBulletin Pages in "Online Users" tutorial by NeutralizeR (http://www.msxlabs.org/forum/members/1-neutralizer.html) @ MsXLabs (http://www.msxlabs.org/)
Original thread:
Display Users Viewing non-vBulletin Pages in "Online Users" - vBulletin.org Forum (http://www.vbulletin.org/forum/showthread.php?t=157329)
(affiliate link)
http://www.vbseo.com/aff/banners/banner_vbseo_468x60_01.gif (http://www.vbseo.com/295_1_1_4/)
Title: Display Users Viewing non-vBulletin Pages in "Online Users"
Author: NeutralizeR
Published: Tue, 11 Sep 2007 12:01:52 GMT
Full Article: http://www.vbseo.com/f34/display-users-viewing-non-vbulletin-pages-online-users-16307/
Hi,
I had some non-vBulletin pages integrated to the vBulletin database and i wanted to show the users viewing those pages in Online Users so i used this piece of code at the top of the non-vBulletin pages:
PHP Code:
You can remove the lines related to vBadvanced if you don't have it installed.
More information can be found here:
How to create your own vBulletin-powered page! (uses vBulletin templates) (http://www.vbulletin.org/forum/showthread.php?t=62164)
-----------------------------------------------------------------------------
Let's say you have a page nothing to do with vBulletin & vBulletin database (wordpress pages, external html pages, even pages of your other domains etc...) and you still want to show the page viewers in Online Users of vBulletin.
Step - 1
Create a page called 'extra_online_users.php'.
Copy these lines in it:
PHP Code:
Extra Online Users
Save and upload this page to your domain or forum root.
Step - 2
Open your non-vbulletin page and copy these lines to the very bottom of your page:
(Note: Before )
HTML Code:
Now, anybody visits your non-vbulletin page will be displayed at "Online Users".
But it will show their location as "Unknown Location". We can fix this of course.
Step - 3
Go to your AdminCP > Plugins & Products > Plugin Manager > Add new Plugin
Product: vBulletin
Hook Location: online_location_process
Title: Extra Online Users Process
Execution Order: 5
Code: PHP Code:
if ($filename == 'extra_online_users.php')
{
$userinfo['activity'] = 'extra_online_users';
}
Save.
Go to your AdminCP > Plugins & Products > Plugin Manager > Add new Plugin
Product: vBulletin
Hook Location: online_location_unknown
Title: Extra Online Users Unknown
Execution Order: 5
Code: PHP Code:
if ($userinfo['activity'] == 'extra_online_users')
{
$handled = true;
$userinfo['action'] = 'Viewing -your custom page title comes here-';
$userinfo['where'] = '-your custom page title-';
}
Save.
If you want to apply this tutorial for more than one page, just create another instance of "extra_online_users.php" and name it like "extra_online_users2.php".
Don't forget to add the lines to the plugins and make the name changes.
Demo and screenshots:
Messenger Blog (http://msn-live-messenger.msxlabs.org/)
(a wordpress blog - http://www.msxlabs.org/msxteam/NeutralizeR/msxlabsbanner.gif this image at the footer is called by iframe 'extra_online_users.php')
The viewer is displayed as:
http://dts.msxlabs.org/NeutralizeR/Snap129.png
Feel free to ask any questions realated to this tutorial.
Display Users Viewing non-vBulletin Pages in "Online Users" tutorial by NeutralizeR (http://www.msxlabs.org/forum/members/1-neutralizer.html) @ MsXLabs (http://www.msxlabs.org/)
Original thread:
Display Users Viewing non-vBulletin Pages in "Online Users" - vBulletin.org Forum (http://www.vbulletin.org/forum/showthread.php?t=157329)
(affiliate link)
http://www.vbseo.com/aff/banners/banner_vbseo_468x60_01.gif (http://www.vbseo.com/295_1_1_4/)