The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
![]()
Does anyone know how to do this:
www.diyaudio.com I want to show the last 20 posts like they have. They gave me this SQL syntex: ----------------------------------------------------- SELECT t.threadid, t.title, t.lastposter, t.replycount, t.views, t.forumid, f.title, t.lastpost FROM thread AS t, forum AS f WHERE t.forumid = f.forumid ORDER BY t.lastpost DESC LIMIT 30 ----------------------------------------------------- How can i implement this into my php page? So i can show the information? Thanks in advance |
#2
|
|||
|
|||
![]()
does anyone know?
|
#3
|
|||
|
|||
![]()
Crude but shows you how:
PHP Code:
|
#4
|
|||
|
|||
![]()
How do i add it so it shows it in this template which is for the index.php (http://www.myfootballforum.com)
Code:
<html> <head> <meta name="GENERATOR" content="Microsoft FrontPage 5.0"> <meta name="ProgId" content="FrontPage.Editor.Document"> <meta http-equiv="Content-Type" content="text/html; charset=windows-1252"> <title>New Page 1</title> </head> <body> {htmldoctype} <html> <head> <!-- no cache headers --> <meta http-equiv="Pragma" content="no-cache"> <meta http-equiv="no-cache"> <meta http-equiv="Expires" content="-1"> <meta http-equiv="Cache-Control" content="no-cache"> <!-- end no cache headers --> <META NAME="title" CONTENT="My Football Forum - World Wide Football Forums"> <META NAME="keywords" CONTENT="football forum soccer discussion board message"> <META NAME="description" CONTENT="Over 60 forums to talk about football with people from all over the world"> <TITLE>My Football Forum - World Wide Football Forums</TITLE> $headinclude </head> <body> $index_header </body></html> <div align="center"> <center> <table border="0" cellpadding="3" cellspacing="3" style="border-collapse: collapse" bordercolor="#111111" width="740" id="AutoNumber1"> <tr> <td width="200" valign="top">$welcometext $currentpoll $buddylist $loggedinusers $search $custom1 $custom2 $stats $calendar</td> <td valign="top"> <table cellpadding="{tableouterborderwidth}" cellspacing="0" border="0" bgcolor="{tablebordercolor}" {tableouterextra} width="100%"><tr><td> <table cellpadding="4" cellspacing="{tableinnerborderwidth}" border="0" width="100%" style="border-collapse: collapse" bordercolor="#111111"> <tr id="cat"><td bgcolor="#3D7CB6" valign="top" width="100%"> <p align="center"><b><font color="#FFFFFF" size="5" face="Arial">Welcome To My Football Forum</font></b></td> </tr> <tr id="cat"><td bgcolor="#D5E2F0" valign="top" width="100%"> <p align="justify"><font size="2" face="Arial">We have been on the internet since <b>17th March 2002</b>. We started as <b>footballboard.net</b> and we then merged with <b>football-forum.com</b> and became <b>myfootballforum.com</b>. Ever since the merger we have become one of the better forums on the internet. We are not the biggest, we don't have the most members, but what we do have is quality members who keep the discussion alive.</font></p> <p><font size="2" face="Arial"><b>You have to register to post </b>and reply but if you just want a peek, then click the link below.</font></p> <p align="center"><font size="5" face="Arial"> <a href="http://www.myfootballforum.com/discussion/forums.php">PEEK</a> - <a href="http://www.myfootballforum.com/discussion/register.php?s=&action=signup"> REGISTER</a></font></td> </tr> <tr id="cat"><td bgcolor="{tableheadbgcolor}" valign="top" width="100%"> Current LIVE discussion on myfootballforum.com<br> $threadbits</td> </tr> </table> </td></tr></table> </td> </tr> </table> </center> </div> <p> <html> <body> </body></html></p> <p>$index_footer<html><body></p> </body></html></body> </html> |
#5
|
|||
|
|||
![]()
will someone be able to help me out (give me instructions) as i want this on my forum a.s.a.p.
Thanks |
#6
|
||||
|
||||
![]()
ok create a new .php file and call it stats.php (use the code posted by filburt) then add this line.
Code:
<div align="center"> <center> <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="AutoNumber2"> <tr> <td width="100%"><?php include("http://www.whatever.com/forum/stats.php"); ?></td> </tr> </table> </center> </div> </td> Code:
$buddylist $loggedinusers $search $custom1 $custom2 $stats $calendar<br> |
#7
|
|||
|
|||
![]()
That stats.php does not work. I get this error:
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/myfootba/public_html/discussion/stats.php on line 19 try it yourself: http://www.myfootballforum.com/discussion/stats.php BELOW IS THE CODE INSDE stats.php: ========================== <?php echo "<pre>"; $result = mysql_query("SELECT t.threadid, t.title, t.lastposter, t.replycount, t.views, t.forumid, f.title, t.lastpost FROM thread AS t, forum AS f WHERE t.forumid = f.forumid ORDER BY t.lastpost DESC LIMIT 30"); while ($bits = mysql_fetch_array($result)) { print_r($bits); } ?> =============================== |
![]() |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|