The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
![]()
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, |
#2
|
|||
|
|||
![]()
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.
|
#3
|
|||
|
|||
![]()
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, |
#4
|
|||
|
|||
![]()
Yes, im really interested in the same think.
|
#5
|
|||
|
|||
![]()
me too
|
#6
|
|||
|
|||
![]()
put this code before the <html> tag.
Code:
<?php include("/direct/path/to/global.php") ?> |
#7
|
|||
|
|||
![]()
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
![]() ![]() Code:
<?php require("path/to/global.php"); print("<table><tr><td colspan=\"2\">Top Posters</td></tr> <tr><td><b>Username</b></td><td><b>Posts</b></td></tr>"); $db_link = @mysql_pconnect("$dbservername", "$dbusername", "$dbpassword"); mysql_select_db ("$dbname", $db_link); $query = mysql_query("SELECT posts, username FROM user ORDER BY user.posts DESC, user.username DESC LIMIT 0, 10"); while($row = mysql_fetch_array($query)) { $username = $row["username"]; $posts = $row["posts"]; print("<tr><td>$username</td><td>$posts</td></tr>"); } print("</table>"); ?> snyx |
#8
|
|||
|
|||
![]()
<a href="http://www.vbulletin.com/forum/showthread.php?s=&threadid=8017" target="_blank">http://www.vbulletin.com/forum/showt...&threadid=8017</a>
|
![]() |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|