2009-06-24, 06:55 AM
Using this code, it works but... how can i use more FIDs:
$fid = 5;
I want also the fid = 2;
How can i do?
Moreover the IMG tag isn't show in the homepage.
I used this guide
$fid = 5;
I want also the fid = 2;
How can i do?
<?php
$fid = 5;
$limit = 10;
$forumpath = 'forum/';
chdir($forumpath);
define("IN_MYBB", 1);
require('./global.php');
require_once MYBB_ROOT."inc/class_parser.php";
$parser = new postParser;
chdir('../');
?>
<?php
$query = $db->simple_select('threads', '*', "fid='{$fid}' ORDER BY tid DESC LIMIT {$limit}");
if($db->num_rows($query) > 0)
{
while($row = $db->fetch_array($query))
{
$query2 = $db->simple_select('posts', '*', "pid='{$row['firstpost']}'");
$row2 = $db->fetch_array($query2);
$date = my_date($mybb->settings['dateformat'], $row2['dateline'], "", 1);
$time = my_date($mybb->settings['timeformat'], $row2['dateline'], "", 1);
$options = array(
'allow_html' => 'no',
'filter_badwords' => 'yes',
'allow_mycode' => 'yes',
'allow_smilies' => 'yes',
'nl2br' => 'yes',
'me_username' => 'yes'
);
$message = $parser->parse_message($row2['message'], $options);
echo("<a href=\"{$forumpath}showthread.php?tid={$row['tid']}\">{$row['subject']}</a> -
<b>Inviato:</b> {$date} <b>alle</B> {$time}. <br><br>
<b>Autore:</b> <a href=\"{$forumpath}member.php?action=profile&uid={$row2['uid']}\">{$row2['username']}</a><br /><br>");
echo("<b>Messaggio:</b><br> {$message}<br /><br />");
echo("<b>Numero di risposte:</b> (<a href=\"{$forumpath}showthread.php?tid={$row['tid']}\">{$row['replies']}</a>)<br /><hr />");
}
}
else
{
echo 'Nessuna Notizia.';
}
?>
Moreover the IMG tag isn't show in the homepage.
I used this guide