Register Members List Search Today's Posts Mark Forums Read

Reply
 
Article Options
Display Users Viewing non-vBulletin Pages in "Online Users"
NeutralizeR
Join Date: Aug 2005
Posts: 355

by NeutralizeR NeutralizeR is offline 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:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View 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 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:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

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 </body>)


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View 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:
Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

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:
Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

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
(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

Last edited by NeutralizeR; 08 Sep 2007 at 17:12..
Views: 16235
Reply With Quote
Comments
  #2  
Old 13 Sep 2007, 12:01
foxfirediego foxfirediego is offline
 
Join Date: Aug 2005
very nice... thanks for sharing!
Reply With Quote
  #3  
Old 13 Sep 2007, 21:59
TigerWare TigerWare is offline
 
Join Date: Feb 2007
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:-

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Could you do this:-

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

etc...

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.

Reply With Quote
  #4  
Old 13 Sep 2007, 22:41
NeutralizeR NeutralizeR is offline
 
Join Date: Aug 2005
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
__________________
MsXLabs Forum
Reply With Quote
  #5  
Old 31 Dec 2007, 15:24
Jase2 Jase2 is offline
 
Join Date: Dec 2007
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
Reply With Quote
  #6  
Old 31 Dec 2007, 15:36
NeutralizeR NeutralizeR is offline
 
Join Date: Aug 2005
Originally Posted by Jase2 View Post
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
How did you test it? Open the custom page with another account (a guest account maybe) and check his location at the online users list. Mouse over the question mark icon, it'll tell you the full path.
__________________
MsXLabs Forum
Reply With Quote
  #7  
Old 31 Dec 2007, 16:41
Jase2 Jase2 is offline
 
Join Date: Dec 2007
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

Last edited by Jase2; 01 Jan 2008 at 20:25.
Reply With Quote
  #8  
Old 25 Jun 2008, 18:55
CrashPush's Avatar
CrashPush CrashPush is offline
 
Join Date: Feb 2007
Real name: Harry
I will give this a go.
Reply With Quote
  #9  
Old 16 Jul 2008, 02:53
Alfa1's Avatar
Alfa1 Alfa1 is offline
 
Join Date: Dec 2005
Many thanks for this article!
Originally Posted by NeutralizeR View Post
Let's say you have a page nothing to do with vBulletin & vBulletin database
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?
Reply With Quote
  #10  
Old 16 Jul 2008, 10:32
NeutralizeR NeutralizeR is offline
 
Join Date: Aug 2005
Originally Posted by Alfa1 View Post
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?
Any page you can call extra_online_users.php via iframe is okay. (Wordpress, Mediawiki... etc)
__________________
MsXLabs Forum
Reply With Quote
  #11  
Old 16 Jul 2008, 13:37
Stryker412 Stryker412 is offline
 
Join Date: May 2005
Does this work with custom vba pages?
Reply With Quote
  #12  
Old 16 Jul 2008, 15:35
NeutralizeR NeutralizeR is offline
 
Join Date: Aug 2005
Originally Posted by Stryker412 View Post
Does this work with custom vba pages?
Yes, as long as you include the iframe on the page.
__________________
MsXLabs Forum
Reply With Quote
  #13  
Old 16 Jul 2008, 16:35
Stryker412 Stryker412 is offline
 
Join Date: May 2005
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
Reply With Quote
  #14  
Old 16 Jul 2008, 18:33
NeutralizeR NeutralizeR is offline
 
Join Date: Aug 2005
Originally Posted by Stryker412 View Post
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
Not sure how you did it. It should be ok if the php contents are being executed.
__________________
MsXLabs Forum
Reply With Quote
  #15  
Old 16 Jul 2008, 19:21
Stryker412 Stryker412 is offline
 
Join Date: May 2005
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

Last edited by Stryker412; 16 Jul 2008 at 20:06.
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Article Options

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


New To Site? Need Help?

All times are GMT. The time now is 09:22.

Layout Options | Width: Wide Color: