2014-06-30, 09:22 AM
Hello everyone !
I have problems with integration my website with forum.
Link to website:
theroyalfive.com
Link to forum:
theroyalfive.com/forum
In ACP cookie source:
/forum/
...
Functions from integration class doesn't work.
I try this:
And this:
I use this code in header to login and it is work.
But function login from class integration doesn't work.
I wanna check logstatus with function isLoggedIn(). But it always return false.
I have one solution for this. Change cookies source in ACP to " ". The function isLoggedIn is work! But logout in my forum was stop work.
I dont know what i must do =/ I spend a lot time on this and cant find solution. Please help!
I have problems with integration my website with forum.
Link to website:
theroyalfive.com
Link to forum:
theroyalfive.com/forum
In ACP cookie source:
/forum/
...
Functions from integration class doesn't work.
I try this:
define('IN_MYBB', NULL);
require("forum/global.php");
require_once 'classes/MyBBIntegrator.php';
require_once MYBB_ROOT.'inc/class_parser.php';
$MyBBI = new MyBBIntegrator($mybb, $db, $cache, $plugins, $lang, $config);
And this:
$forumpath = './forum/';
chdir($forumpath);
define("IN_MYBB", 1);
require('../forum/global.php');
require_once MYBB_ROOT."inc/class_parser.php";
$parser = new postParser;
chdir('../');
include ("classes/MyBBIntegrator.php");
$MyBBI = new MyBBIntegrator($mybb, $db, $cache, $plugins, $lang, $config);
I use this code in header to login and it is work.
<?php
if($mybb->user['uid'])
{
// The user is logged in, Display Welcome Message
echo "Welcome, <a href='#'>".$mybb->user['username']."</a>.<br>
<a href='/forum/member.php?action=logout&logoutkey={$mybb->user['logoutkey']}'>
Logout</a>
<br>";
}
else {
// The user is not logged in, Display the form
echo "<form action='/forum/member.php' method='post'>
<input type=\"hidden\" name=\"my_post_key\" value=\"$mybb->post_code\" />
Username: <input type='text' name='username' size='15' maxlength='30' /><br />
Password: <input type='password' name='password' size='15' />
<input type='hidden' name='action' value='do_login'>
<input type='hidden' name='url' value='../index.php' />
<input type='submit' class='submit' name='submit' value='Login' /><br /><br />
</br></form><br>";
}
?>
But function login from class integration doesn't work.
I wanna check logstatus with function isLoggedIn(). But it always return false.
I have one solution for this. Change cookies source in ACP to " ". The function isLoggedIn is work! But logout in my forum was stop work.
I dont know what i must do =/ I spend a lot time on this and cant find solution. Please help!