View Full Version : how to show VB posts on my homepage?
ztsky
Wed 11th Apr '01, 3:30pm
how to show VB posts on my homepage?
Just as a postslist??
Someone have a good idea?
Plz...:)
Wayne Luke
Wed 11th Apr '01, 7:51pm
Search in the hacking forum for "active topics"
tubedogg
Thu 12th Apr '01, 9:38am
Or take a look at my sig. ;)
ztsky
Sun 15th Apr '01, 7:15pm
I found a code like this,someone give me an advise?
:
<?
#file:bbstop.php
require("c:/apache/htdocs/666/admin/config.php");
$dblink = mysql_connect($servername,$dbusername,$dbpassword) ;
mysql_select_db($dbname);
if($num == "") $num = 5;
if($id == "")
$query = "select * from thread order by lastpost desc limit $num";
else
$query = "select * from thread where forumid=$id order by lastpost desc limit $num";
$tempresult = mysql_query($query);
$rows = mysql_num_rows($tempresult);
for($i=0;$i<$rows;$i++){
$array = mysql_fetch_array($tempresult);
$string .= "<li>";
if($array[iconid] != 0){
$string .= "<img border=0 width=15 height=15 src=/666/images/icons/icon".$array[iconid].".gif>";
}
$string .= "<a href=/666/showthread.php?threadid=$array[threadid] target=_blank>$array[title]</a>(<font style=\"font-size:8pt;\">last post:$array[lastposter]</font><br>";
}
mysql_close();
print "document.write('$string')
document.write('<br><a href=http://localhost/666/ target=_blank>login in!-->></a>')";
?>
Powered by vBulletin™ Version 4.0.0 Beta 4 Copyright © 2009 vBulletin Solutions, Inc. All rights