It's what was posted on here, but in reality it's the third line.
<?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))
If that's all that's on the page, it won't know what $db is since you need to include the MyBB global.php first.
<?php
$fid = 2;
$limit = 5;
$forumpath = 'forum/';
chdir($forumpath);
define("IN_MYBB", 1);
require('./global.php');
require_once MYBB_ROOT."inc/class_parser.php";
$parser = new postParser;
chdir('../');
?>
It's in my Joomla! index.php already. I'm running it in an iFrame, should I have put the code in there? I'll try that.
EDIT: That solved it, but I needed to change something:
<?php
$fid = 5;
$limit = 5;
$forumpath = './';
chdir($forumpath);
define("IN_MYBB", 1);
require('./global.php');
require_once MYBB_ROOT."inc/class_parser.php";
$parser = new postParser;
chdir('../');
?>
I needed to add a "." before the slash on the seventh line.
MrDoom, you have any idea how to make a logout link? LOLs
But of course
echo("<a href=\"{$forumpath}member.php?action=logout&logoutkey={$mybb->user['logoutkey']}\">Logout</a>");
MrDoom Wrote:But of course
echo("<a href=\"{$forumpath}member.php?action=logout&logoutkey={$mybb->user['logoutkey']}\">Logout</a>");
:mad: can't get it to work...can i post my file here for you to have a look?
Line 129 - Change:
<?php echo $mybb->user["sid"]; ?>
To:
<?php echo $mybb->user['logoutkey']; ?>
Parse error: syntax error, unexpected T_VARIABLE in /home/ys/public_html/forum_loginbox.php on line 1