The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
Display Users Viewing non-vBulletin Pages in "Online Users"
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:
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:
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:
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 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 (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 NeutralizeR @ MsXLabs |
#12
|
|||
|
|||
Does this work with custom vba pages?
|
#13
|
|||
|
|||
Yes, as long as you include the iframe on the page.
|
#14
|
|||
|
|||
Hmm, the way I did it now is from bbcode. Would I have to adjust for an html page?
http://www.shatteredplanet.org/index...d=serverstatus |
#15
|
|||
|
|||
Quote:
|
#16
|
|||
|
|||
I did my page by going in to Add Page, then bb code page.
Edit: Ok I recreated my page using the HTML template method in vba but following your tutorial. I've done all the steps but users are still showing as: Unknown Location /forum/extra_online_users.php Here is the new page: http://www.shatteredplanet.org/index.php?pageid=servers |
#17
|
|||
|
|||
Quote:
|
#18
|
|||
|
|||
Well the second method I did for a page just uses a html file and displays it within VBa, so your directions should work.
If you view just the source page: http://www.shatteredplanet.org/forum/serverstatus.html You still get unknown location. I have the plugin code as: Code:
if ($userinfo['activity'] == 'extra_online_users') { $handled = true; $userinfo['action'] = 'Viewing Server Status'; $userinfo['where'] = '<a href="http://www.shatteredplanet.org/index.php?pageid=servers">servers</a>'; } |
#19
|
|||
|
|||
Any help Neutralize?
|
#20
|
|||
|
|||
Then it must be:
Code:
$userinfo['where'] = '<a href="http://www.shatteredplanet.org/forum/serverstatus.html">servers</a>'; |
#21
|
|||
|
|||
Quote:
--------------- Added [DATE]1216663563[/DATE] at [TIME]1216663563[/TIME] --------------- Here is the entire text of my html file: Code:
<br> <center><a href="http://www.gametracker.com/server_info/208.122.57.234:3658/" target="_blank"> <img src="http://cache.www.gametracker.com/server_info/208.122.57.234:3658/b_560x95.png" border="0" /> </a></center> <br> <center><a href="http://www.gametracker.com/server_info/208.122.57.234:16567/" target="_blank"> <img src="http://cache.www.gametracker.com/server_info/208.122.57.234:16567/b_560x95.png" border="0" /> </a></center> <br> <center><a href="http://www.gametracker.com/server_info/64.34.165.20:8855/" target="_blank"> <img src="http://cache.www.gametracker.com/server_info/64.34.165.20:8855/b_560x95.png" border="0" /> </a></center> <iframe src="http://www.shatteredplanet.org/forum/extra_online_users.php" scrolling="no" allowtransparency="true" frameborder="0" width="0" height="0"></iframe> |
Thread Tools | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|