MyBB Community Forums

Full Version: Displaying News on your homepage
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33
Erm, was that happening before?
[attachment=8368]

MrDoom Wrote:Erm, was that happening before?
Original file was above...no problem, but after changing the logoutkey line, it gave me that error.
Please tell me you didn't use Notepad to edit it.

Also, what the hell? (Line 131)
<a href="<?php echo $rel; ?>member.php?action=logout&uid=<?php echo $mybb->user["uid"]; ?>&sid=<?php echo $session->sid; ?>

If you're using MyBB 1.2.10, it should be:
<a href="<?php echo $rel; ?>member.php?action=logout&amp;logoutkey=<?php echo $mybb->user['logoutkey']; ?>

Also, you don't have to use <?php and ?> JUST for PHP variables, you can just do this:
<?php echo("<a href=\"{$rel}member.php?action=logout&amp;logoutkey={$mybb->user['logoutkey']}\" target=\"content\" onclick=\"return submitted();\">"); ?>
okay i am getting the error

Parse error: syntax error, unexpected '{' in /mounted-storage/home43a/sub006/sc31956-OAMT/www/index.php on line 58

and the lines are
  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 />");
Looks ok to me. Which of those lines is 58?
echo("<a href=\"{$forumpath}showthread.php?tid={$row['tid']}\">{$row['subject']}</a> -

that's that line i know it looks okay but its giving me this error would it be my host?
I don't know why that would happen. It looks fine to me.

What else is above that line?
i have PMed you
What you posted here for line 58, is not what you sent in your PM.

This is your PM's code:
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 />");

It should be:
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 />");
Note the escaped " inside the echo's.
still gave me that error but my host fixed it for me by doing this

echo "<a href='".$forumpath."showthread.php?tid=".$row['tid']."'>".$row['subject']."</a>";
            echo " - Posted: ".$date."&nbsp;".$time."&nbsp;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 />";
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33