miniBB Support Forums | 16 years on The Web
miniBB ® 


 | Begin | Register | Reply | Search | Statistics | File Bank | Manual |
Specific miniBB Support Forums / Specific /   

Another implementation of login system and layout

Author dougwo
#1 | Posted: 10 Jun 2007 00:29 | Edited by: dougwo 
I have successfully installed minibb with single sign on. If you are a registered member of my site, then you are automatically logged in to minibb. The code logic is that in index.php, I check to see if the current logged in user (denoted by session variable or cookie) in my system is also in the mini users database. If not, I add them. Then I set the minibb cookie and wham! They're logged in.

I also run minibb in a self-resizing iframe so that my sites UI wraps minibb. Now, you advanced users are saying, "but search engine links won't link to your UI, but rather to the minibb directly. Simple...

I patched the header template to check to see if the current frame name matches my iframe and if not, then I jump to my page, passing all the url query string and then on into the iframe that way. Works like a charm!

If anyone would like help implementing this, feel free to email me through my site,

You can also see the forum in action!

Author Paul
Lead Developer
#2 | Posted: 11 Jun 2007 04:05 
I didn't understand in full what have you done, but if it works for you, that is good :-)

Besides miniBB supports external authorization module which could be implementing without destroying the core files like index.php, which naturally affects the easy upgrade. Read this article:

Synchronizing miniBB with external users database and authorization

Author dougwo
#3 | Posted: 11 Jun 2007 09:03 
Thanks Paul. Of course that would be preferable to keep things upgradable. I searched before and couldn't see any results for this topic. Thanks for the link!

Author dougwo
#4 | Posted: 11 Jun 2007 09:09 
I just had a look and it looks like the same principle. This tutorial does in fact require modification of several templates. Mine does as well. But I hadn't seen some of the newer configuration options in setup_options. Those will make some things easier.

I actually use two databases, mine and the minibb one an keep them in synch with the little snipped of code that I mentioned before. The only reason I have to modify index.php is that I have to set the cookie AFTER I get in the iframe. Otherwise, my method doesn't require any code module modifications.

Thanks again!

Author Paul
Lead Developer
#5 | Posted: 12 Jun 2007 01:49 | Edited by: Paul 
In setup_options.php you just need to modify $dbUserShema array so it fits your users table structure. Other changes need to be applied in bb_cookie.php (where you need to rewrite authorization functions).

Templates are not affected at all. In user_dataform.html you just should remove link to the password restoration, or replace it with your own, so miniBB should not handle any of the standard routines for your users table, like registration, profile update, password restoration etc.

Using 2 databases is obviously not the best idea...

Also if you have modified index.php - that means you already did destroy the core file. index.php is the main core file! In manual, we describe what is called core file and what is not and could be modified.

Specific miniBB Support Forums / Specific /
 Another implementation of login system and layout
 Share Topic's Link

Your Reply Click this icon to move up to the quoted message

Post as a Guest, leaving the Password field blank. You could also enter a Guest name, if it's not taken by a member yet. Sign-in and post at once, or just sign-in, bypassing the message's text.

Before posting, make sure your message is compliant with our forum posting rules. If not, it may be locked or deleted with no explanation.


miniBB Support Forums Powered by Forum Software miniBB ® Home  Features  Requirements  Demo  Download  Showcase  Gallery of Arts
Compiler  Premium Extensions  Premium Support  License  Contact Us
Proceed with the Captcha add-on: protect your miniBB-forums from the automated spam and flood.