MyBB Community Forums

Full Version: Website Integration
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
I have a question. I used this for my website:
http://community.mybboard.net/showthread.php?tid=6190

Problem is whenever I log in, it doesn't log me in. Apparently, I have to set the correct cookie path. Sadly, each page in my website has its own directory and my forums are not on my main site. What to do to make it so that all directories of my site have the cookie path set?
Try changing the cookie to .domainName.com and see if that works.
I just realized the problem and fixed it.

Now I get this message:
Notice: Undefined index: class in /home/thepoke/public_html/forums/inc/class_error.php on line 547
Notice: Undefined index: class in /home/thepoke/public_html/forums/inc/class_error.php on line 547
Notice: Undefined index: class in /home/thepoke/public_html/forums/inc/class_error.php on line 547
Can you post line 547 of inc/class_error.php please?
Here is line 547 of class_error.php:
				if($call['class']) $call['function'] = $call['class'].$call['type'].$call['function'];
What version of MyBB are you running? Have you modified that file?
I have not modified that file. I am running MyBB 1.4.4
Hm. Quite odd. Let me check my file and see if it matches up.
Some pages it appears more times than others.
It logs me in but those messages appear on the pages of my website except for my forums pages.
Also, another problem. Where it says
if($mybb->user['uid'])
{
// The user is logged in, say Hi
echo "Hey, $mybbuser[username].<br>
Thanks for logging in.";
}

The username is not showing.
And now I cannot log out.
It probably won't be a problem with class_error.php, rather what it is being called to it.

It depends on how your website is setup - without taking a look at your site's source code, I can probably guess at some rogue scripting is to blame. Your cookie domain (across websites, anyways) should be blank. All modern browsers (except IE4/5, I think) will automatically assign a cookie to the domain that it was added on - at least, that's how I've done it in the past. Just remember to set a sort-of unique cookie prefix.

The correct variable for the username is $mybb->user['username'].

Take a look at your coding, and if possible, undo the steps you've made until you got that error. Something must be interfering with it...
Pages: 1 2