MyBB Community Forums

Full Version: Include login script - Checkup
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Hey there, I found this login script with a bit of searching and a snip for user permission checking but noticed it was a bit old.
if($mybb->user['usergroup'] != "x" || $mybb->user['usergroup'] != "y" || $mybb->user['usergroup'] != "z") {
����// User has no permission to view the page, view nopermission page? nopermission();
} 
Could someone tell me if anything needs adjusting/updating of if theres any impovments I could make before I try including it in to my website?

Thanks alot,

A.
Look here, this is an updated script of the tutorial you are talking about.

You will need to change few stuff anyway.
Thanks for the link.

I've given it a go but it fills up the page with a poorly formatted include of the whole forum in a "board closed" state.
Is this what its supposed to do? Am I getting my desires and what this script actually is supposed to do very confused? hehe

I thought it was just meant to include the login funcionality, etc, of the forum, not the whole thing.
*shrug*
ajsuk Wrote:Thanks for the link.

I've given it a go but it fills up the page with a poorly formatted include of the whole forum in a "board closed" state.
Is this what its supposed to do? Am I getting my desires and what this script actually is supposed to do very confused? hehe

I thought it was just meant to include the login funcionality, etc, of the forum, not the whole thing.


This is just a sample code, you can have to format it and such.

It is basicaly a login form and also checks whether you are logged in or not. So just the core codes which you can customize their look.
But it includes the entire thing, header, search/member list/calender/help buttons, bottom links, footer, etc... And displays the forum as in closed status. It's not doing what I understood and expected.

@.o
That's because your board is closed. and as we have included global.php this might happen.
ajsuk Wrote:Hey there, I found this login script with a bit of searching and a snip for user permission checking but noticed it was a bit old.
if($mybb->user['usergroup'] != "x" || $mybb->user['usergroup'] != "y" || $mybb->user['usergroup'] != "z") {
    // User has no permission to view the page, view nopermission page? nopermission();
} 
Could someone tell me if anything needs adjusting/updating of if theres any impovments I could make before I try including it in to my website?

Thanks alot,

A.

That code snippet you posted should work with MyBB 1.2.x. What's not working about it?

Also, next time please don't PM me, just bump the thread if nobody has replied for one day.
DennisTT Wrote:That code snippet you posted should work with MyBB 1.2.x. What's not working about it?

As I understood it, it was just supposed to include the login functionality, not the entire forum in a closed state. (which it is defiantly not set to)

I'm not sure if the script doesn't work right anymore, I'm not doing it right or if it's just not what I expected.
Running 1.2.3 currently JFYI.
DennisTT Wrote:Also, next time please don't PM me, just bump the thread if nobody has replied for one day.
Sorry about that, I wasn't sure which was worse. PMing you or a bit of spam. Shy
Can you post a link to the forum?
Pages: 1 2