MyBB Community Forums

Full Version: Does 1.4 has new code interpritation? How to solve following?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Good day,

Lightbulb
When I used 12.12 I simply loaded required information about the board by simply doing this in index.php file:

<?php
chdir('forum');
define("IN_MYBB", 1);
require './global.php';
?>
<html>
<head>
</head>
<body>
<?РHP 
if($mybb->user['uid'] > 0){
echo "<strong>Welcome back, {$mybb->user['username']}. </strong>"; echo " (";   echo '<a href=/forum/private.php>Private Messages</a> —'; echo " New <em>{$mybb->user['pms_new']}</em>, "; echo "Unread <em> {$mybb->user['pms_unread']}</em>";  echo ")<br /><br />";
echo "<div style='margin:-13px 0px 0 0px'><form class='logout' id='signout' action='/forum/member.php?action=logout&logoutkey={$mybb->user['logoutkey']}' method='post'>
<input type='hidden' name='action' value='logout'>
<input type='hidden' name='url' value='/index.php' />
<a href='javascript:;' class='logout' onClick=document.getElementById('signout').submit() />Log Out</a>
</form></div>";
}
else
{
echo '<div style="margin:0px 0px -18 0px"><a href=/forum/><img src="images/0_title_forum.gif" style="margin-left:-5px; margin-top:4px; margin-bottom:8px"></a><br />';
echo "<strong>Welcome, Guest! </strong><br /><br />"; echo "("; echo '<a href=/forum/member.php?action=login id="login" rel="subcontent">Login</a> '; echo "— <strong><a href=/forum/member.php?action=register>Register</a></strong> — <a href=/forum/misc.php?action=help>Help</a>)</div>"; 
echo '<script type="text/javascript">dropdowncontent.init("login", "right-bottom", 600) </script>';

} 
?>
</body>
</html>

After installing 1.4 version the commands above extract absolutely no information at all?

It is not the bug, right? How to "ECHO" for example {$mybb->user['username']}, {$mybb->user['pms_unread']} and other settings?

What should be changed in the code above, that worked perfectly in version 12.12 to make it function with 1.4?

Huh

Thanks Wink
Link to this page, and your forum?
(2008-08-07, 07:08 AM)DennisTT Wrote: [ -> ]Link to this page, and your forum?



Thanks,
Ilia
Where's the _index.php for the 1.4 version?
(2008-08-07, 08:16 AM)DennisTT Wrote: [ -> ]Where's the _index.php for the 1.4 version?

Dennis, _index.php for 1.4 is not working correctly. I changed _index.php from 12.12 version for 1.4 virsion but it didn't work. here is the index from 12.12.. It works fine with 12.12
Can you upload the 1.4 version to your server, and link it here? I'd like to see how it doesn't work.
(2008-08-07, 09:22 AM)DennisTT Wrote: [ -> ]Can you upload the 1.4 version to your server, and link it here? I'd like to see how it doesn't work.
(2008-08-07, 09:22 AM)DennisTT Wrote: [ -> ]Can you upload the 1.4 version to your server, and link it here? I'd like to see how it doesn't work.

Dennis, where was the mistake there? Could you tell please?
(2008-08-08, 10:05 AM)eligrowleo Wrote: [ -> ]
(2008-08-07, 09:22 AM)DennisTT Wrote: [ -> ]Can you upload the 1.4 version to your server, and link it here? I'd like to see how it doesn't work.

Dennis, where was the mistake there? Could you tell please?

Now I know! I just needed to set cookie to /.

Anyway thanks to everybody.