2010-09-09, 03:27 AM
2010-09-26, 10:21 PM
I changed the code slightly to use a variable for the forum path instead. I noticed two places which needed the forum path set, so to make it easier to modify, I personally feel a variable is appropriate.
<?php
$path = "forum";
chdir($path); // path to MyBB
define("IN_MYBB", 1);
require("./global.php");
chdir("../");
?>
<?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.";
}
else
{
// If the user is not logged in, display the login form.
echo "<form action='$path/member.php' method='post'>";
echo "<input type='hidden' name='action' value='do_login' />";
echo "<input type='hidden' name='url' value='../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>";
}
?>
2010-11-29, 04:36 AM
No matter what I do it won't show me as logged in on my main index.php but shows logged in at the forums. Is this even 1.6 compatible?
2010-12-18, 10:15 AM
i get this error
Fatal error: Cannot redeclare error() (previously declared in /home/site/public_html/includes/incglobal.php:203) in /home/site/public_html/forum/inc/functions.php on line 675
what can i do?
Fatal error: Cannot redeclare error() (previously declared in /home/site/public_html/includes/incglobal.php:203) in /home/site/public_html/forum/inc/functions.php on line 675
what can i do?
2011-02-11, 12:10 PM
(2010-11-29, 04:36 AM)DigitalMikey Wrote: [ -> ]No matter what I do it won't show me as logged in on my main index.php but shows logged in at the forums. Is this even 1.6 compatible?
Hello,
I encountered the same problem and managed to fix it by changing the cookie path setting via the Admin CP. Here's what you have to do:
1. Go to your MyBB Admin CP and navigate to Settings -> General Configuration -> Cookie Path
2. Change your cookie path one level up. This means that if your cookie path is "/folder1/folder2/", change it to "/folder1/".
I figure this is because MyBB is installed in "/folder1/folder2/" so when you log in and the cookie path is set to that, then the cookie will not be recognized by your browser when you are surfing your website in "/folder1/".
Hope this helps.

2011-03-07, 05:20 AM
Is it possible to add the HTML code as a Wordpress widget?
2011-03-07, 08:18 AM
I assume this opens a possibility of my Post2Host idea. Automatically check their statistics to see if they did what I required.
Muahaha.
Muahaha.
2011-03-13, 12:09 PM
2015-05-02, 06:26 PM
can anyone check the OP code whether it will work with 1.8
2015-05-05, 01:59 PM
(2015-05-02, 06:26 PM)Hamster24 Wrote: [ -> ]can anyone check the OP code whether it will work with 1.8
Whenever i change the cookie path from /forums/ to / , after saving it automatically changes this back to /forums/ ..
Anyone has a fix for this? using 1.8