PDA

View Full Version : Latest 10 posts !


12-14-2000, 11:12 PM
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 ?

12-19-2000, 04:35 AM
<?
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...

12-19-2000, 05:55 AM
Thanks a lot !

12-19-2000, 08:49 AM
you might have to change this when you install version 2.0

12-19-2000, 10:21 PM
When is version 2.0 going to be released ?

12-19-2000, 10:37 PM
Sometime in January would be my guess

12-21-2000, 07:45 AM
Any improvements or new features ?

12-21-2000, 12:26 PM
I would think so...

12-24-2000, 12:35 PM
And btw, how do I exlcude private forum posts from being searched for the latest 10 posts ?

12-24-2000, 07:34 PM
How can I download Poll Hack v1.0.1 software?

12-26-2000, 10:26 AM
Anyone knows ?

12-26-2000, 01:02 PM
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

01-01-2001, 10:53 PM
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