The problem with bridging is that Joomla and SMF use different sessions, and the bridge does not change this, so a user can get logged out of smf and still be logged into Joomla, which I'm sure we would rather avoid. The reason being is that SMF has a 15 minute session. I would rather not merely extend the session, because it doesn't really resolve the issue. The solution is simple, ensure that users tick the "remember me" box when logging in.
I would rather not have to put a message up declaring to members that there is a fault and they have to click it, I would rather change the code in loggin so that it by defualt remembers them. Unfortunately, my knowledge of php is limited.
I believe that this is changed in SMF by changing the LogInOut.php, around line 77 :
I assume by setting the never_expire to true, it becomes defualt to remember the user? If not where can I change this.
Also, I would rather not display the option, so that users are forced to stay logged in. I am unsure where to remove the option. I am fairly sure it is just a case of changing an <input type:checkbox...> <input type:hidden...>, I just don't know where to do it.
Lastly, this should solve the problem in SMF stand alone, but will it transfer accross to the bridge version, or do I need to mod the bridged logins instead.
Has anyone thought of doing this? Or is it not even possible? Any help / advice would be much appreciated.
Hm, the last days I spent wondering how to make the session not to expire after 15 minutes. Mike you are wrong. It is not SMF, but joomla that set the sesseion to 15 minutes(global config - 900sec by defaut). (perhaps it is also made from SMF)
I got a lot of user saying that the site is logging them out, when they log in through the forum and set the time to 1 hour. Yes I tried it today and really the site log you out after 15 minutes. I believe this box with 1hour, 1 day and forever must go off and there must stay forever (I'm not sure if it is helping).
the problem is this. Joomla uses a more advanced form of session that actually will retain your session for longer than 15 minutes if you are still active. SMF does not check if you are active, it will immediately log you out after 15 minutes.
So here is the problem, in order to sync sessions we take whichever you logged in from and then sync it to the other. So a login from Joomla would give you exactly 15 minutes in SMF. Once SMF logs out the bridge detects any time Joomla is logged in but SMF isn't(and vice versa) and logs you out of both.
My suggestion is a longer login session for joomla and make the corrresponding session length in SMF. Or you can modify the login module to always remember me. To do this it is better to find the login form in the template and find the remember me <input> tag. Add checked="checked" to it and then it will always be chekmarked. so it would look something like
Is there a way to set smf to "always login" automatically, but not for joomla? so that joomla's session will be the one controlling smf's session entirely through the bridge.
To explain a little more: since joomla's session affect smf's session and vice versa, we can make smf's session a constant and just allow joomla's session to be the variable, so that smf is completely dependant on joomla; if joomla's session ends, so does smf. If user logout from joomla, so does smf. but smf itself, without the interference from joomla, will never logout.
I understand this will only truly work if and only logging in is disabled in SMF. This is what i did, and i believe most people do this too.
Rgds, Mike
Logged
----- Owner of http://mike.simbunch.com Creator of ParaInvite, AJAX Sandbox, AJAX SMF Polls, Profile URL etc..
Sounds interesting. So you advice us to disable the login through SMF?
Yeap. I editted my smf theme to not show the login and register button on the forums, and disable showing a login box on every forum page. So basically every session handling, login and logout features are done via joomla using joomla's better session handling. At the moment, what i do is set the default smf session timeout (this default cannot be changed by users since they have no control over smf login functions) to a very high number, but i think that's not good enough.
Logged
----- Owner of http://mike.simbunch.com Creator of ParaInvite, AJAX Sandbox, AJAX SMF Polls, Profile URL etc..
Joomla Hacks is a Joomla Components, Joomla Modules, Joomla Templates, & Joomla Mambots resource portal. None of the text or images in this public website may be copied without the expressed written consent of the authors. Copyright 2005 by JoomlaHacks.com. Powered by Joomla. All rights reserved. Terms of Use