MyBB Community Forums

Full Version: Login Box on site's index.php page
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Dear guys, please help.

I used version 1.2.12 before and setup on my web site's index page login box looking like this:

Welcome back, Eligrowleo. You last visited: Taday, 13:00. (Private Messages — New 2, Unread 0 )

User Control Panel | View New Posts | View Today´s Posts Log Out




Now after installing version 1.4 it has stoped working.

Please help me, how to export settings from ./global.php and enter them to my site's home page.

I would like to have the same things imported to my site's index page like presented above.


Before is used these settings in my site's index.php:

before the header:
<!--<?php
chdir('forum');
define("IN_MYBB", 1);
require './global.php';
?>-->

later in the body:
<?PHP 
if($mybb->user['uid'] > 0){
echo '<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 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 '<a href=/forum/usercp.php>User Control Panel</a>'; echo " | "; echo '<a href=/forum/search.php?action=getnew>View New Posts</a>'; echo " | "; echo '<a href=/forum/search.php?action=getdaily>View Today&acute;s Posts</a><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>';

} ?>

Thank you for the best Forum Software ever,

Sincerely,
Ilia