MyBB Community Forums
Integrating MyBB into your website. (Login Form) - Printable Version

+- MyBB Community Forums (http://community.mybb.com)
+-- Forum: Resources (http://community.mybb.com/forum-8.html)
+--- Forum: Third Party Integration (http://community.mybb.com/forum-132.html)
+--- Thread: Integrating MyBB into your website. (Login Form) (/thread-6190.html)

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


RE: Integrating MyBB into your website. (Login Form) - TStarGermany - 10-23-2008

ahm, how do you manage to get the required logoutkey to your login/logout box?


RE: Integrating MyBB into your website. (Login Form) - Lokki - 10-23-2008

PHP Code:
<form action='forum/member.php?action=logout&logoutkey=".$mybb->user['logoutkey']."' method='post'>
<
input type='hidden' name='action' value='logout'> </form



RE: Integrating MyBB into your website. (Login Form) - TStarGermany - 10-23-2008

you may try
-> clean up your form url to only member.php and transfer all variables with input type hidden. the POST method might destroy the additional parameters you have implemented in your form URL...
PHP Code:
<form action='forum/member.php' method='post'>
<
input type='hidden' name='action' value='logout'
<
input type='hidden' name='logoutkey' value=$mybb->user['logoutkey'] >
</
form



RE: Integrating MyBB into your website. (Login Form) - Lokki - 10-23-2008

still don't work
i forget to tell the my forum is under a subdomain forum.mysite.com
maybe this is the main problem...i don't know...


RE: Integrating MyBB into your website. (Login Form) - TStarGermany - 10-23-2008

well then, lets have a look, can you provide some testaccount?


RE: Integrating MyBB into your website. (Login Form) - Infernolized - 10-23-2008

You should still be able to use mysite.com/forum when doing this. As for the code, instead of:

$mybb->user['logoutkey']

Try:

{$mybb->user['logoutkey']}

I had the same problem with forms and other HTML coding until I used the {} around the variable. If that still doesn't work then.. well then I really don't know xD


RE: Integrating MyBB into your website. (Login Form) - Lokki - 10-23-2008

@ TStarGermany
yes i can provide a test acoun i will send you on pm a username and password
@Infernolized
thanks it works but...
I logout form my website, i'm redirected to forum index from there I go back to website index, and from website index I go to forum and I'm logged in

thanks for help


RE: Integrating MyBB into your website. (Login Form) - TStarGermany - 10-23-2008

well, there are a few unclean things, but basically it works for me... i can login/logout at the website and in the forum...

nevertheless:
forum.rohubs.com and rohubs.com/forum/ are wildly mixed in your scripts/redirects.. therefor cookies for both domains are installed...you should change this.


RE: Integrating MyBB into your website. (Login Form) - Lokki - 10-23-2008

TStarGermany Wrote:well, there are a few unclean things, but basically it works for me... i can login/logout at the website and in the forum...

nevertheless:
forum.rohubs.com and rohubs.com/forum/ are wildly mixed in your scripts/redirects.. therefor cookies for both domains are installed...you should change this.
if you can login/logout at the website and forum it means that the problem is with my browser or something else from me. I will try to login/logout from another pc to see if is the same problem.

if I change the cookies domain the script will not work at all.
maybe I should move the forum from forum.mysite.com to mysite.com/forum

thanks for help


RE: Integrating MyBB into your website. (Login Form) - TStarGermany - 10-23-2008

i tried both with MSIE and FF, worked fine so far.

first,delete all cookies, then retry the whole procedure..maybe there is still some remains of an old cookie on your harddisk,ruining your attempts.