The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
![]()
Im trying to create a nice little piece of code that will pull threads from my forums no matter where I put the page. (I dont want clientside javascript). Currently, this code isn't working, can someone give it a quick look and see where it might be wrong?
Code:
<?php $db_host = "localhost"; $db_name = "databasename"; $db_user = "username"; $db_pw = "dbpassword"; $forum_url = "http://www.mysite.com"; $limit = "5"; $postedcolor = "#404040"; $fontface = "arial,verdana,geneva"; $txtlimit = "50"; $num = "0"; mysql_connect($db_host, $db_user, $db_pw) OR die ("Cannot connect to your database"); mysql_select_db($db_name) OR die("Cannot connect to your database"); $tsql = mysql_query("SELECT threadid,title,postusername FROM thread ORDER BY threadid DESC LIMIT $limit"); while($tget=mysql_fetch_array($tsql)) { $num = $num+1; $title = $tget['title']; $tid = $tget['threadid']; $poster = $tget['postusername']; echo "<strong>$num.</strong> <a href=\"$forum_url/showthread.php?t=$tid\">$title</a><br /><font color=\"$postedcolor\" face=\"$fontface\" size='1'><i>posted by $poster</i></font><br /><br />"; } ?> |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|