Display Users Viewing non-vBulletin Pages in "Online Users"
by
08 Sep 2007
Hi, I had some non-vBulletin pages integrated to the vb 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:
<?php
More information can be found here: How to create your own vBulletin-powered page! (uses vB templates) ----------------------------------------------------------------------------- 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:
<?php
Step - 2 Open your non-vbulletin page and copy these lines to the very bottom of your page: (Note: Before </body>) HTML Code:
<iframe src="http://www.yourdomain.com/extra_online_users.php" scrolling="no" allowtransparency="true" frameborder="0" width="0" height="0"></iframe> 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')
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')
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: http://msn-live-messenger.msxlabs.org/ (a wordpress blog - this image at the footer is called by iframe 'extra_online_users.php') The viewer is displayed as: Feel free to ask any questions realated to this tutorial. Display Users Viewing non-vBulletin Pages in "Online Users" tutorial by http://www.msxlabs.org/forum/members/1-neutralizer.html @ http://www.msxlabs.org |