2011-08-11, 02:52 PM
OK, so, I don't know if anyone can help me with this problem. I am trying to use the MyBB Integrator found here: http://phpdave.com/MyBBIntegrator/.
I am having a small problem thou.
I am using this:
That is right off PHPDave's site. But it doesn't work. I get a 404 error every time I try to login. I am using a free webhost called http://www.000webhost.com/
I am using the newest version of MyBB. I am trying to use this to integrate the MyBB Login to my website.
Am I missing something or doing something wrong? I have even cleared my cache and tried it again but still nothing. I would post this problem on PHPDave's forum, but I am waiting for a moderator to activate me still.
I would appreciate any help you could give me.
Thanks,
Legobear154
I am having a small problem thou.
I am using this:
<?php
define('IN_MYBB', NULL);
require_once 'forum/global.php';
require_once 'class.MyBBIntegrator.php';
$MyBBI = new MyBBIntegrator($mybb, $db, $cache, $plugins, $lang, $config);
// Auth check when login form is sent (Note: This would also work with Array)
if (isset($MBI->mybb->input['user']) && isset($MBI->mybb->input['pass']))
{
// Captcha Login
if (isset($MBI->mybb->input['captcha_hash']))
{
// So we have the correct captcha hash from the form
$login = $MBI->login($MBI->mybb->input['user'], $MBI->mybb->input['pass'], $MBI->mybb->input['captcha_hash'], $MBI->mybb->input['captcha']);
if (is_array($login))
{
// So we have the correct captcha hash in the form
$captcha_hash = $login['imagehash'];
echo 'Captcha required<br />';
}
}
// Non-Captcha Login
else
{
$login = $MyBBI->login($MyBBI->mybb->input['user'], $MyBBI->mybb->input['pass']);
if (is_array($login))
{
// So we have the correct captcha hash in the form
$captcha_hash = $login['imagehash'];
echo 'Captcha required<br />';
}
}
if ($login === true)
{
echo 'Login successful';
}
else if ($login === false)
{
echo 'Login failed';
}
}
// Let's set up the initial form
echo '<form action="test.php" method="post">';
echo 'Username <input type="text" name="user" value="admin" /><br />';
echo 'Password <input type="password" name="pass" value="Pass" /><br />';
// If the login returns the captcha array, show the captcha in the form
if (is_array($login))
{
echo '<input type="hidden" name="captcha_hash" value="'.$captcha_hash.'" />';
echo $login['captcha'].'<br />';
echo 'Captcha <input type="text" name="captcha" /><br />';
}
echo '<input type="submit" name="login" value="Login" />';
echo '</form>';
?>
That is right off PHPDave's site. But it doesn't work. I get a 404 error every time I try to login. I am using a free webhost called http://www.000webhost.com/
I am using the newest version of MyBB. I am trying to use this to integrate the MyBB Login to my website.
Am I missing something or doing something wrong? I have even cleared my cache and tried it again but still nothing. I would post this problem on PHPDave's forum, but I am waiting for a moderator to activate me still.
I would appreciate any help you could give me.
Thanks,
Legobear154