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.
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48
How do you echo the user avatar?
How do you make yourself logout from the form, then make yourself redirect to another page? I mean, when you logout from the form, you go back to the form instead to the forums.
(2009-01-29, 09:26 PM)Cultred Wrote: [ -> ]How do you echo the user avatar?
Do you mean your avatar, or the user who posted a thread?
(2009-02-01, 03:50 AM)TomL Wrote: [ -> ]
(2009-01-29, 09:26 PM)Cultred Wrote: [ -> ]How do you echo the user avatar?
Do you mean your avatar, or the user who posted a thread?

Check the post in the other thread with the news.
So none of these codes work. I have mine like this.
Site (where login box is); http://mybbtuts.com/
Forums: http://mybbtuts.com/community/
Yes, my cookie settings are correct. So DON'T DARE tell me to change those.
What seems to be the problem is after I login correctly I get directed to that MyBB page that says "You've been successfully logged in. blah blah blah"
Then returned to the index page. (in this case mybbtuts.com/) and I still see the login box. Now, how do I get the cookie settings to work correctly?
(2009-02-07, 11:48 PM)Dalton Wrote: [ -> ]So none of these codes work. I have mine like this.
Site (where login box is); http://mybbtuts.com/
Forums: http://mybbtuts.com/community/
Yes, my cookie settings are correct. So DON'T DARE tell me to change those.
What seems to be the problem is after I login correctly I get directed to that MyBB page that says "You've been successfully logged in. blah blah blah"
Then returned to the index page. (in this case mybbtuts.com/) and I still see the login box. Now, how do I get the cookie settings to work correctly?
If it's not setting the cookie, your settings aren't right Wink
If you say so..
<?php
    define("IN_MYBB",1);
    chdir('community'); // path to MyBB
    require './global.php';
?>
Is before everything.

<?php

if($mybb->user['uid'] > 0) { // The user is logged in, say Hi
    echo "Hey, ". $mybb->user['username'] .".<br>Thanks for logging in.<br><br>";

} else {

     // The user is not logged in, Display the form
    echo "<form action='/community/member.php' method='post'>
    <input type=\"hidden\" name=\"my_post_key\" value=\"$mybb->post_code\" />
    Username: <input type='text' name='username' size='25' maxlength='30' /><br />
    Password: <input type='password' name='password' size='25' />
    <input type='hidden' name='action' value='do_login'>
    <input type='hidden' name='url' value='/index.php' />
    <input type='submit' class='submit' name='submit' value='Login' /></form><br>";
}

?>
Is my login box.
What are your cookie settings? Most modern browsers will automatically detect the cookie domain, so you can leave that field empty.
(2009-02-07, 11:57 PM)Dalton Wrote: [ -> ]..Is my login box...

Have you seen this yet?
Perhaps it will work much better (after the learning curve) -> MyBB Integrator
the username doesn't show up when i use $mybbuser[username] i am using mybb 1.4 help!
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48