View Full Version : Latest 10 posts !
Anyone knows how to something so that I could check out the latest 10 posts in the Vbulletin forum and have a link to them automatically updated on the index page of my domain ?
Any generic ones ?
<?
require("admin/config.php");
$num_active = 10;
$db=mysql_connect($servername,$dbusername,$dbpassw ord);
mysql_select_db($dbname);
$twentyfourhours= 24*60*60;
$date1 = time() - $twentyfourhours * 1;
$myselect = "select * FROM thread ORDER BY lastpost DESC LIMIT 10";
$result = mysql_query($myselect);
if ($row = mysql_fetch_array($result)) {
do {
printf("<li><a href=\"http://64.177.89.7/boards/showthread.php?threadid=%d\">%s</a><br>%d views - %d replies</li>", $row[threadid], $row[title], $row[views], $row[replycount]);
} while ($row = mysql_fetch_array($result));
}
?>
that's it...
change this number if you want to change the number of topics displayed
$num_active = 10;
peace...
you might have to change this when you install version 2.0
When is version 2.0 going to be released ?
Sometime in January would be my guess
Any improvements or new features ?
And btw, how do I exlcude private forum posts from being searched for the latest 10 posts ?
How can I download Poll Hack v1.0.1 software?
Read this thread - it gives a different script that you can use to specify which forums that you want listed. The ones you dont want listed you just do not specify.
http://vbulletin.com/forum/showthread.php?threadid=2658
Originally posted by Mental Stamina
<?
require("admin/config.php");
$num_active = 10;
$db=mysql_connect($servername,$dbusername,$dbpassw ord);
mysql_select_db($dbname);
$twentyfourhours= 24*60*60;
$date1 = time() - $twentyfourhours * 1;
$myselect = "select * FROM thread ORDER BY lastpost DESC LIMIT 10";
$result = mysql_query($myselect);
if ($row = mysql_fetch_array($result)) {
do {
printf("<li><a href=\"http://64.177.89.7/boards/showthread.php?threadid=%d\">%s</a><br>%d views - %d replies</li>", $row[threadid], $row[title], $row[views], $row[replycount]);
} while ($row = mysql_fetch_array($result));
}
?>
that's it...
change this number if you want to change the number of topics displayed
$num_active = 10;
peace...
Hi Mental Stamina,
I am trying to do what you wrote but I am getting a message telling me I have a Parse error: parse error, expecting `T_VARIABLE' or `'$''
Do I have to change something at
$date1 = time() - $twentyfourhours * 1; ?
Thanks for any help!
Olly
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.