MyBB Community Forums

Full Version: Integrating MyBB into your website. (Login Form)
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Thanks everyone, i got it working.

how do i check the level of the user? is there some shortcut? or do I just run it through mysql?

thanks.
Anyone got a sample code?
Hay hay, i likes this, theres a bunch of unanswered questions on this thread..
This is a great way to piss about with the scripts, is there any updated threads with examples of code / ideas hanging about? like intergrateing the skinning system, and shoutbox etc..
=D cant wait to use this code properly Big Grin THANKS!

its all workign so far.. Toungue
Hm, the form submits and says that you were logged in, but when you get redirected to the main page the login form stays. If I go to the forums though, I'm logged in. I think it has something todo with my cookie settings on the board. Although it was working at one point, I'm not sure why it would just stop lol.

I think the cookie settings are right:
Board url: forum.v-gfx.net
Cookie domain: .forum.v-gfx.net
Cookie path: /

I'm pretty sure that if I could get the cookies to show up on .v-gfx.net and still work with the forums, it would be fine. But with a domain thats not .forum.v-gfx.net, you can't login or out lol.

Sorry for the trouble.

Edit:
Board url: forum.v-gfx.net
Cookie domain: .v-gfx.net
Cookie path: /

Works, I just had to clear my other cookies first -_-;
since upgrading to 1.2 the following error is occuring

Direct initialization of this file is not allowed.

Please make sure IN_MYBB is defined.
Please make sure you have defined IN_MYBB over your include of global.php.
Something like:
define("IN_MYBB", 1);
include "./global.php";
CraKteR Wrote:Please make sure you have defined IN_MYBB over your include of global.php.
Something like:
define("IN_MYBB", 1);
include "./global.php";

cheers but new problem

when you login it does not log u in and your redirected to the forum and when you log into your forum leave with out signing out and goto my forum accress page you get

Quote:Hey, .
Thanks for logging in.

no user name Confused
Change:
echo "Hey, $mybbuser[username].<br>
Thanks for logging in.";
to:
echo "Hey, ".$mybb->user['username'].".<br>
Thanks for logging in.";
Cheers works a treat
i have a problem... i am using the forum news thing also so they both are interfeering, could you help me so that it will work without changine the directory?