i tried add this to onlinetv.php
but i got this : Parse error: parse error, expecting T_STRING' or
T_VARIABLE' or `T_NUM_STRING' in C:\xampp\htdocs\onlinetv.php(8) : eval()'d code on line 33
any help?
could you paste your code?
<?php
$fid = 9;
$limit = 5;
$forumpath = '/';
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(TABLE_PREFIX.'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(TABLE_PREFIX.'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> -
Posted: {$date} {$time} by <a href=\"{$forumpath}member.php?action=profile&uid={$row2['uid']}\">{$row2['username']}</a><br />");
echo("{$message}<br /><br />");
echo("Replies (<a href=\"{$forumpath}showthread.php?tid={$row['tid']}\">{$row['replies']}</a>)<br /><hr />");
}
}
else
{
echo 'Nothing to display.';
}
?>
still not work,
Parse error: parse error, expecting
T_STRING' or
T_VARIABLE' or `T_NUM_STRING' in C:\xampp\htdocs\youtube.php(8) : eval()'d code on line 60
line 8 :
define("IN_MYBB", 1);
and line 60 is :
$query2 = $db->simple_select(TABLE_PREFIX.'posts', '*', "pid='{$row['firstpost']}'");
help please
do you use mybb 1.4? if so:
$query2 = $db->simple_select('posts', '*', "pid='{$row['firstpost']}'");
and:
$query = $db->simple_select('threads', '*', "fid='{$fid}' ORDER BY tid DESC LIMIT {$limit}");
If you upload class_parser file in .inc/ forlder .... It should worked ..... Please check again
Do attachments work or even img tags im wanting to use this as a mini gallery
Anyone knows what I should change in the code in order to display only one specific post (id)?
change:
$query = $db->simple_select(TABLE_PREFIX.'threads', '*', "fid='{$fid}' ORDER BY tid DESC LIMIT {$limit}");
into:
$query = $db->simple_select(TABLE_PREFIX.'threads', '*', "fid='{$fid}' AND tid='your treadid' ORDER BY tid DESC LIMIT {$limit}");