minibb®
Fight the automated spam - protect your miniBB-forums,
getting the Captcha addon! Click here to read more.
Captcha Addon for miniBB
Community Forum
 | Forums | File Bank | Sign Up | Reply | Search | Statistics | Manual |
Master Class miniBB Community Forum / Master Class /

Integration with external DB and Session management

 Page:  ««  1  2  3  4  5  »» 
Paul
CEO
#46 | Posted: 21 Jun 2006 15:45
Reply 
Addition: call this function and study $user_id after that. If it's not equal to 0 (zero), than user is logged in.
Humbeggar
Guest
#47 | Posted: 29 Jul 2006 16:37
Reply 
I reinstalled minibb to integrate with wordpress, and I think everything is working properly regarding logging in and logging out. Except for one thing, which is the "Sign in/Post message" button on a posting page.

When I leave the post message box empty and login using the button, it works fine. But When I write a message, and submit my login information at the same time, it gives me the warning of "You are not allowed to perform this action."

Can you tell me what can possibly be wrong? I don't think it's a cookie issue 'cause I already used Firefox cookie option to check. By the way, if you want to look at the forum and try it for yourself,

http://vampsub.faydot.com/wp-forums
Paul
CEO
#48 | Posted: 31 Jul 2006 07:49
Reply 
By the way, if you want to look at the forum and try it for yourself - by the way, it would be good to provide a demo login/password for that. Nobody should register on your site to check this out.
Humbeggar
Guest
#49 | Posted: 4 Aug 2006 01:03
Reply 
Sorry, Paul. Here is the demo login/password.

Username = "login"
Password = "password"

Please let me know when you are done using it, so that I can delete the demo account. Thanks.
Humbeggar
Guest
#50 | Posted: 4 Aug 2006 01:04
Reply 
You can also use the testing topic under "General" forum for testing postings.
Paul
CEO
#51 | Posted: 4 Aug 2006 07:51
Reply 
Well, so far I can see the same error on my side... but have no clues where it comes from. I've checked the code, and see this error may come, when there is something related to access to forums... but only powerful debugging may help in that case. If you could provide me a temporary FTP to your forums, I could take a look (free). You may contact me via ghappa [AT] gmail.com privately.
Paul
CEO
#52 | Posted: 5 Aug 2006 14:31 | Edited by: Paul
Reply 
Ok, thanks for the info provided, I've checked your site more closely...

When synchronizing miniBB with Wordpress - what kind of method were you using? Followed "synrhonizing miniBB" article, or just used modifed files from miniBB.com's Downloads section?

I've just taken bb_cookie.php file from that prepared solution, replaced it by what did you have, and now it works.

I've noticed there is a very small, but important difference in user_logged_in() function, provided in solution and the article. Probably that's why your login failed... I've fixed the article on this point.
Humbeggar
Guest
#53 | Posted: 5 Aug 2006 17:22
Reply 
Thanks Paul.

To answer your question: my first attempt was to use the prepared files from the Downloads section, and somehow it did not work (the whole login did not work at that point, perhaps I did something wrong...). So I figured that maybe I should install the original bb_cookie.php from the big installation package and then follow your synchronizing miniBB article instead. And after that I tweaked around to make sure that the login works.

But now that you say the prepared file works, I really don't know why it didn't work in the first place. I am glad the problem is fixed now though. Thank you again.
mattegg
Guest
#54 | Posted: 19 Sep 2006 14:16
Reply 
Thanks! I followed the instructions and suprised myself, i got it working! i integrated this into IndexU (nicecoder.com) directory software.

One thing people may need ot watch, (it confused me for ages) is that you cant have the forums outside the originating cookies folder, for example i had my cookie set from the directory here :
public_html/directory/ and i was trying to get it to work on
public_html/forum/

When i moved it to :
public_html/directory/forum/ it worked like a dream.

I wonder if anyone can tell me what i would need to do to make it work outside the directory like i had before? I dont really know how cookies work...
Paul
CEO
#55 | Posted: 19 Sep 2006 17:26
Reply 
If you have nicecoder.com URL and if you need to let cookie work both on nicecoder.com, nicecoder.com/forums, nicecoder.com/anyfolder etc., then cookie's path needs to be set as '/'. You can specify in miniBB options which $cookiepath it's using, in setup_options.php, at which $cookiedomain and with which $cookiename. So, cookie can be read from anywhere of the domain - but only if it was set with the '/' path. In most common cases, $cookiedomain can be left as '' and $cookiename can be the same your site uses.
2ramil
Forums Member
#56 | Posted: 6 Jan 2007 03:08 | Edited by: 2ramil
Reply 
Paul
In bb_functions.php we have a function called user_logged_in(). Study index.php of how it runs this function, and you can do the same in your script.
how should i call this function? i've made this code:
define ('INCLUDED776',1);

include ('./forum/setup_options.php');
include ('./forum/setup_'.$DB.'.php');
include ('./forum/bb_cookie.php');
include ('./forum/bb_functions.php');
include ('./forum/bb_specials.php');

$user_id+=0;

user_logged_in();
echo $user_id;

but when i call this script, it returns blank page!
Paul
CEO
#57 | Posted: 6 Jan 2007 06:10
Reply 
Sorry, it's a custom question and I can't help you with that free.
Meekel
Guest
#58 | Posted: 2 Jul 2007 12:59
Reply 
In what file is the content of the session generated? I'm guessing in encrypts part of the username and password of some sort but can't find the file.
Paul
CEO
#59 | Posted: 3 Jul 2007 06:14 | Edited by: Paul
Reply 
miniBB doesn't use sessions. Cookies only.

$useSessions variable will not work with the latest release and will be eliminated in the future as the unuseful one.

Login processing is done in bb_cookie.php

Read more about the cookie format.
perx
Guest
#60 | Posted: 8 Jan 2008 05:28
Reply 
hi, i know the last posting is one yr old but i have some questions.

i have read though the tutorial but not yet implement it..need to have some questions answered before i go ahead...

- my current database doesnt have a userid, only username which is a primary key. Can it still work? Do i need to add the userid field in for the sake of adding, even though i have no use for it?

- my password field is stored as clear text..not encrypted. Can it still work? i hope i do not have to modify my script to store encrypted pwd

-my regdate is defined as VARCHAR storing only the date without time. Can it still work? I hope i do not have to change the database type

will appreciate if anyone can answer those questions. THANKS in advance!
 Page:  ««  1  2  3  4  5  »» 
Your reply
Bold Style  Italic Style  Image Link  URL Link 


» Username  » Password 
You are welcome to post anonymously by entering a nickname with no password (if that nickname has not been taken by another member) or by leaving both fields empty. If you have a forums membership account, you can also sign in from this page without posting a message, or sign in and post at once.

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

 
Online now: Guests - 18
Members - 0
Most users ever online: 191 [24 Dec 2007 14:33]
Guests - 191 / Members - 0

Forums are powered by miniBB®