MyBB Community Forums

Full Version: Check MyBB Login info from external page.
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I'm in the process of making a form.

Somewhere in that form, I'd like to make sure that the person filling out the form is actually registered on our forums. I want to have a section that asks them to login with their forum account.

At this point I have two options:

Option A: I could use cookies so that if they've logged in on the forums, they will see "You are Logged in as <username>", and if they're not: a link to register + login OR link to register + login form OR link to register and login button leading to a lightbox.

Option B: Just make forum user/pass part of the form, and have it check those entires before submitting the rest of the data in the form.

I think Option A is a better way to go as it'll make the pages feel more integrated. I looked up some previous threads regarding this integration, but all the ones I found lead to dead links/plugins. I'm looking for a plugin-free solution since the external page is hand-written.
Here is what I use and it works great http://phpdave.com/MyBBIntegrator/.
(2013-05-02, 07:23 PM)vbmark Wrote: [ -> ]Here is what I use and it works great http://phpdave.com/MyBBIntegrator/.

Ah, I saw references to this before but the links were broken. I'm so new to programming, the only PHP I've done so far is create a form that saves stuff to mysql and then a page to display that data.

How would I go about making a div with Option A (mentioned above), and then putting forth a global variable or something to disallow submission of the rest of the form if the person isn't logged in?
(2013-05-02, 07:44 PM).m. Wrote: [ -> ]^ may be this is simple method http://community.mybb.com/thread-39313-p...#pid264712

Hey m, thanks for the reply.

I looked into that thread, but what vbmark linked to seems most ideal for my current situation.

Regarding cookies, I've the following settings:

Cookie Domain: mydomain.com
Cookie Path: /forum/

My script is going to be located @ mydomain.com/scriptfolder. Are my cookie settings okay for MyBBIntegrator? Because atm, I've tested the function that tells you if you're online or not, and it says I'm offline.

I figured out the cookie stuff, but ran into another issue. Put it into another thread.

I'll mess around a bit with the MyBBIntegrator then.

Thanks for the help.