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 |
#2
|
|||
|
|||
very nice... thanks for sharing!
|
#3
|
|||
|
|||
This is quite interesting, thanks for this.
I was wondering whether you could modify this technique to only use a single page (the one that is loaded into the IFRAME in the non-vB pages). The url to the page can have a parameter... So instead of loading this:- HTML Code:
src="http://www.yourdomain.com/extra_online_users.php" HTML Code:
src="http://www.yourdomain.com/extra_online_users.php?id=mypage1" src="http://www.yourdomain.com/extra_online_users.php?id=mypage2" Is it then possible to identify the parameter (query string) in the URL from within the plugin and save replicating the 'extra_online_users.php' page over and over? No idea if this could work, just thinking out loud. :up: |
#4
|
|||
|
|||
It needs a little programming. Why don't you simply use the main site title of the external pages? For example "Viewing Blog Pages, Viewing XXX Website Pages..." or you can use "Viewing a custom page of -yourforumtile-". Sorry, that's all i can suggest at the moment
|
#5
|
|||
|
|||
Hi,
Thanks for this tutorial. However i have tried it and it doesnt work for me. Have have done what you have said and i have actived the plugins |
#6
|
|||
|
|||
Quote:
|
#7
|
|||
|
|||
Thats what iv done.
This is the full location http://www.thecomputerforumz.com/vbtest/donation.php which is right. I have changed the url and the name that i want it to show up with as well |
#8
|
||||
|
||||
I will give this a go.
|
#9
|
||||
|
||||
Many thanks for this article!
What if the pages are generated by a non-vb program that is installed in the same database as vbulletin? Would the same approach apply? |
#10
|
|||
|
|||
Any page you can call extra_online_users.php via iframe is okay. (Wordpress, Mediawiki... etc)
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|