MyBB Community Forums

Full Version: [Tutorial] Integrating MyBB's Login System With Your Website
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5
(2010-04-06, 10:36 AM)Prentice Wrote: [ -> ]Hi,
Thanks for your reply... Didn't work though

Just displays then broken image icon and when I go to look at the URL it is directed towards my homepage?

What is the path to your forums? I do not need your domain or what have you. EG: http://www.mydomain.com/mysite/forums/
I've tested it and it works. Try this (make sure you replace the domain with your own):

$dimensions = explode('|', $mybb->user['avatardimensions']);

if ($mybb->user['avatartype'] == "upload") {
	echo "<img src=\"http://www.domain.co.uk/forums/".substr($mybb->user['avatar'], 2)."\" alt=\"".$mybb->user['username']."'s Avatar\" style=\"width: ".$dimensions[0]."px; height: ".$dimensions[1]."px;\" />";
} else {
	echo "<img src=\"".$mybb->user['avatar']."\" alt=\"".$mybb->user['username']."'s Avatar\" style=\"width: ".$dimensions[0]."px; height: ".$dimensions[1]."px;\" />";
}
Works thanks mate Big Grin
Is there a way to only show certain bits of the homepage if people are or aren't logged in? For example, on my homepage I have a 'registration block' with a link to the registration form and what benefits you get for registering etc. and I don't want to show that to members who are logged in.
Hi

I have written a small function for my phpfox which gets the logged in username, id and password. i dont want to use the login form but just post this credentials to mybb. How do i go about that?
doesn't seem to work on 1.6, can someone update this?
(2010-08-07, 11:32 PM)Cody574 Wrote: [ -> ]doesn't seem to work on 1.6, can someone update this?

Hello Cody,

If I have some time after work, I will look into it this week. Thanks for the heads up.

-Ben
1.6 has been out for almost a month now and there still doesn't seem to be a working guide
Hi i have tryed this but with no luck .will that code work for an arcade site like mine ?
i would love something like this as i have an arcade site and mybb forum and i would like to see when u login to the arcade your also logging in to the forum at the same time.
Pages: 1 2 3 4 5