MyBB Community Forums

Full Version: login timeout; thread locks; registration errors
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I got most of my site working... however I have a few thinks I am confused about.

1. After registering, I get a webpage that says "Thank you for registering on %1$s, %2$s." What fields are not populated correctly?

2. My announcements are not appearing on the home page as I thought I had configured. I basically want a greeting message to guests. Is there a way to configure "header_welcomeblock_guest"?

3. My logins don't appear to timeout. My browser cache is turned OFF yet an hour later I went to my MyBB site and found I was still logged in...

4. How do I lock a thread?

Thanks guys. I love your product!

hstitan Wrote:1. After registering, I get a webpage that says "Thank you for registering on %1$s, %2$s." What fields are not populated correctly?
This is a bug that came about when a security hole in myBB was fixed. To fix, use this file: http://www.mybboard.com/community/attach...hp?aid=524

hstitan Wrote:2. My announcements are not appearing on the home page as I thought I had configured. I basically want a greeting message to guests. Is there a way to configure "header_welcomeblock_guest"?
Hmm, have you setup the right coding in global.php to use header_welcomeblock_guest, and have you made the header_welcomeblock_guest template?? If you would like this, I'll make it into a mod for you??

hstitan Wrote:3. My logins don't appear to timeout. My browser cache is turned OFF yet an hour later I went to my MyBB site and found I was still logged in...
From what I can tell, its not supposed to. It stays logged in till you logout. The only thing that does timeout if you presence on the board. If you not active on the board for 15mins, you name gets taken off the "Who's Online" list, and it re-appears again when you come back. If you would like them to time out, I could make another mod for you to do this!!

hstitan Wrote:4. How do I lock a thread?
Two ways I know of. Ticking the box then clicking Close Thread(s) on the "Forum Options" on forumdisplay.php, or going to a thread, and using the admin options nearly at the bottom, click Close Thread.

(I would like to make the mods if hstitan would like them, so please
dont go ahead and make them yourself, thats just cruel Toungue)
Thanks for the help K776 and the offers to make more mods.

1. The updated file fixed the problem.
2. I learned how to create a custom template for this.
3. Thanks for the info. If you want fun with this, be my guest. I'm sure some others might want extra login security.
4. Thanks for the info.

You're a good person K776!

Take care.
2. Got this working now? Still happy to write up a small tutorial for you!

3. I have not yet tested this, but it should work!

Open member.php and find
mysetcookie("mybb[uid]", $user['uid']);
mysetcookie("mybb[password]", $user['password']);
and replace with
$expires = time() + (60*15);
mysetcookie("mybb[uid]", $user['uid'], $expires);
mysetcookie("mybb[password]", $user['password'], $expires);

Then in member.php find:
mysetcookie("mybb[uid]", "");
mysetcookie("mybb[password]", "");
and replace with
$expires = time() - (60*1);
mysetcookie ("mybb[uid]", "", $expires);
mysetcookie ("mybb[password]", "", $expires);

Anyway, that basic script should timout every 15 minutes. To change the time, all you have to do is change 60*15 in the first bit you replaced, leave everything else. For eg, if you wanted a cookie to time out after an hour, you would use 60*60, or one day would be 60*60*24. If you would help getting the right number for the time, then let me know.


Take care also Smile
2. A small tutorial sounds good. Thanks again.

3. I looked at the cookie manager in my browser to see that cookies normally expire at the end of the session (i.e. when you close the window). When I swapped in your code modification, the expiration of my new cookies were also until the end of the session. Not sure what happened. I'll keep looking into it.

2. Its actually already in place, but for some reason, the template is not there. To make, go to Admin CP > Templates > Add > Title: header_welcomeblock_guest, Template: Welcome to board name. Feel free to join, and become a part of our online community. > Template Set: Global - All template sets > Add Template

Then, once you logout, it should show correctly. It does for mine! I guess this is something Chris did or plans to do sometime.


3. Hmm, very odd. I will add the code to mine and test it out. Maybe its your browser!
Did you sign out and then sign in after making the cookie modification? If not try that and see what happens.