PDA

View Full Version : Including VB elements into external page, best way to do it ?


Sharg
07 Feb 2001, 21:13
I will include these vb elements into my site's main page:

-Number of users
-Currently online (just number, not the name)
-Guests currently online
-Total messages
-Last registered member.

How do you do this ? Do you create separate php file for each of these elements and then include them in your php page ?

Of do you set a global value for them all and them include the all the codes right in your page ?

Do you know good threads here that will tell me how to include all these elements ?

Even if all these existing integration 1.x codes will work with 2.0 (as stated) will there be different more efficient way to do it with 2.0 ?

Thanks,

07 Feb 2001, 22:01
i just put each of the codes in a .php.inc file and then included them on the page. but included global.php on the page i wanted the info to appear so it wouldnt need to be included in all the .php.inc files.

07 Feb 2001, 22:07
Ok thanks.
Can you tell me here exactly the line you put in your main file to call the global php that will be used for all the little files to include ?

Thanks,

07 Feb 2001, 23:54
Yes, im really interested in the same think.

08 Feb 2001, 01:25
me too

08 Feb 2001, 22:39
put this code before the <html> tag.


Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------

08 Feb 2001, 23:43
Here is the hack for showing the top posters on a page, im positive it can be edtited to show other things, I'll do that later :D , but for now its only top 10 posters: :p



Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------



You need to rename the page from .HTML (or whatever you have it as) to .PHP or this wont work! If you have SSI elements they may not work in .PHP pages (depending on how you have them set up) so you will need the script im posting later here to fix that.

snyx

09 Feb 2001, 00:03
http://www.vbulletin.com/forum/showthread.php?s=&threadid=8017