06-01-2008, 08:59 PM
06-01-2008, 09:56 PM
MrDoom Wrote:Is your forums database in UTF8 and do you have the UTF8 meta information in the page you are loading this news into's header section of HTML?
Whoops.....
yes that was the problem. ThanksBut I have another problem. The fid is set to 2, but it draws post from another forum.
Also, is it possible to display posts from a particular topic, not a forum?
Thanks
06-01-2008, 09:58 PM
Erm weird. Could you either post or PM me a link to your forum and a link to your news page?
06-01-2008, 10:02 PM
It's on localhost
06-02-2008, 06:04 PM
Hmmm ..... now it works fine. 
But I still have this question:
Is it possible to display posts from a particular topic, not a forum?

But I still have this question:
Is it possible to display posts from a particular topic, not a forum?
06-02-2008, 06:16 PM
This should work but I haven't tested it:
PHP Code:
<?php
$tid = 2;
$forumpath = 'forum/';
chdir($forumpath);
define("IN_MYBB", 1);
require('./global.php');
require_once MYBB_ROOT."inc/class_parser.php";
$parser = new postParser;
chdir('../');
?>PHP Code:
<?php
$query = $db->simple_select(TABLE_PREFIX.'posts', '*', "tid='{$tid}'");
if($db->num_rows($query) > 0)
{
while($row = $db->fetch_array($query))
{
$date = my_date($mybb->settings['dateformat'], $row['dateline'], "", 1);
$time = my_date($mybb->settings['timeformat'], $row['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($row['message'], $options);
echo("<a href=\"{$forumpath}showthread.php?tid={$tid}&&pid={$row['pid']}#pid{$row['pid']}\">{$row['subject']}</a> -
Posted: {$date} {$time} by <a href=\"{$forumpath}member.php?action=profile&uid={$row['uid']}\">{$row['username']}</a><br />");
echo("{$message}<br /><br /><hr />");
}
}
else
{
echo ('Nothing to display.');
}
?>06-08-2008, 10:43 AM
When i post stuff on my board it says "nothing to display" on my home page.How can i get it to display what i am posting on my forum board?
06-08-2008, 04:50 PM
Have you set it up with a valid forum ID (fid)?
06-09-2008, 05:01 AM
i have it set to 1 is that correct
Sorry about that.i found the forum ID.You were right i had the wrong number.Thanks so much for your help.
[/align]
Sorry about that.i found the forum ID.You were right i had the wrong number.Thanks so much for your help.
[/align]06-10-2008, 03:03 AM
Anyone tried this for 1.4?