MyBB Community Forums

Full Version: Intergration Issues
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hey Guys, im fairly new to Mybb, and im not the best coders, i used to be a Vbulletin user but as my licence expired i couldn't afford to renew, so here i am now.
With Vbulletin i had my login system intergrated to my site, it ran pretty much fine. Ive tried this with Mybb now.
Ive changed the Cookie path from /forums to / on my site.
After woulds ive used this code on the site in a content box.
The site would be example.com/v2
and the forums are
example.com/forums
<?php

if($mybb->user['uid'])
{
    // If the user if logged in, display a welcoming message.
    echo "Welcome back ".$mybb->user['username']."!<br />";
    echo "Thanks for logging in.";
    echo "<input type='hidden' name='url' value='../v2/index.php' />";
    echo "<form action='../forums//member.php?action=logout&amp;logoutkey={$mybb->user['logoutkey']}' method='post'>";
    echo "<input type='submit' name='Logout' value='Logout' />";
  
}
else
{
    echo "<form action='../forums/member.php' method='post'>";
    echo "<input type='hidden' name='action' value='do_login' />";
    echo "<input type='hidden' name='url' value='../v2/index.php' />";
    echo "Username: <input type='text' name='username' maxlength='30' /><br />";
    echo "Password: <input type='password' name='password' /><br />";
    echo "<input type='submit' name='submit' value='Login' />";
    echo "</form>";
}

?>
A friend gave me that code, and ive been trying to get it to log out correctly, when you log in it go's to the sites index.php like i want it to, however when i log out it go's into /forums/index.php instead of the main site.
How can i fix this?
Also if you need more information please ask Smile
You will need to make a core edit to member.php file

Around Line 1193:

Find
redirect("index.php", $lang->redirect_loggedout);

Replace with
redirect("../v2/index.php", $lang->redirect_loggedout);