Simple Machines Community Forum

Customizing SMF => Modifications and Packages => Topic started by: Kays on September 22, 2009, 11:19:12 PM

Title: Select Online Status When Logging In
Post by: Kays on September 22, 2009, 11:19:12 PM
Link to Mod (http://custom.simplemachines.org/mods/index.php?mod=2165)

Adds the option to select one's online status when logging in.

V1.0 - Initial release
V1.1 - Fixed problem with the "Always stay logged in:" checkbox disappearing in SMF 1.1
V1.2 - Fixed several bare strings on both versions
V1.3 Updated for SMF 2.0 RC2
V1.4 Updated for SMF 2.0 RC3
V1.5 Added the checkboxes to the KickGuests template
Title: Re: Select Online Status When Logging In
Post by: shadow82x on September 22, 2009, 11:34:51 PM
Cool and useful mod. :D
Title: Re: Select Online Status When Logging In
Post by: digit on September 23, 2009, 01:52:29 AM
Yeah....  very cool, thanks...   but why do you replace the text "Stay logged in" with "Show online status" in the Login.template.php file?

It seems to me that should be an "add after" not a replace.  Thanks.

Title: Re: Select Online Status When Logging In
Post by: Kays on September 23, 2009, 05:16:49 PM
Thanks digt. It actually should be an "add before" and it only affected SMF 1.1.

This has been corrected and a new version uploaded.

This caused the "Always stay logged in" checkbox to dissapear. So anyone wishes it to re-appear, please uninstall the old version and install the revised version.



Title: Re: Select Online Status When Logging In
Post by: Kays on September 23, 2009, 06:39:41 PM
This only places the option in the login forum at the bottom of the board index and on the page which appears when you click on the logn link.
Title: Re: Select Online Status When Logging In
Post by: vicram10 on September 23, 2009, 06:45:49 PM
very nice mod.. ;)
Title: Re: Select Online Status When Logging In
Post by: Bass_Chaz on September 23, 2009, 06:57:40 PM
It isn't showing up on my site at all.

I think its a great idea though.
Title: Re: Select Online Status When Logging In
Post by: Kays on September 23, 2009, 07:17:21 PM
Are you using the default theme? Were there any errors when installing the mod?

Also do you have any other mods installed which have anything to do with loging in?

Can you please attach Login.template.php from the theme you are using or from the default theme if not there to a post. So I can have a look at it.

Please don't delete your posts. It makes it hard for somone to follow the conversation.

Title: Re: Select Online Status When Logging In
Post by: Bass_Chaz on September 23, 2009, 07:32:01 PM
Quote from: Kays on September 23, 2009, 07:17:21 PM
Are you using the default theme?
Yes..

Were there any errors when installing the mod?
No..

Also do you have any other mods installed which have anything to do with loging in?
Mod List:
   Mod Name     Version     
1.    User Email System    1.3    
2.    All Topics Unsubscriber    1.1    
3.    New Topic Button    1.0    
4.    Links Managment    1.0    
5.    Strike Out Locked Topics    1.0    
6.    Reg Bar    1.0.2    
7.    Quote Clear Line    1.0    
8.    last login in post    1.0    
9.    Go up post button    1.0    
10.    Google Video BBC Tag (XHTML Compliant)    1.3    
11.    RSS Feed Icon    1.1    
12.    Aeva ~ Auto-Embed Video & Audio    6.9.99    
13.    Irritate lurkers with 0 posts    0.1    
14.    Downloads System    1.0.4    
15.    Custom Profile Field Mod    3.19    
16.    Chatroom Button    1.01
17.    Contact Page    1.1    
18.    BK-SMF Sub-Board    1.5
19.    Welcome Topic Mod    1.1    
20.    Admin member list registration date    1.0    
21.    Users Online Today Mod    1.4.0    
22.    Hide Info Center From Guests    1.0
23.    User Control Panel By Alan S    2.0
24.    Twitter Field    1.0    
25.    Trim Url    1.0.2    
26.    TinyPortal    0.983    
27.    Admin Ban Button in Post    1.1    
28.    Set forum width from Acp    0.1    
29.    SMF Links    1.6.7
30.    RemovePM    1.1.4    
31.    Colored_Calendar_Frame    1.1.1    
32.    Referrals Mod    2.0.1    
33.    Signature Area BBCode Buttons    1.5    
34.    Redirect on Login and/or Logout mod    0.2
35.    Previous and Next Links for Page Index    1.0    
36.    User Post Limit Options    1.0.1    
37.    Poll Option in Post    1.0
38.    PM Popup - Uses Active Window    1.3    
39.    Reply Button in All Posts    1.0
40.    Hide "Logged" and IP Image    1.0    
41.    Notify of posts and replys by default    1.0    
42.    Most Popular Topic Today    2.0    
43.    Monthly Statistics on Profile    1.0    
44.    MCLegendII.2    2.0
45.    Limit A Guests Daily PageViews Mod    1.0    
46.    Karma Buttons    1.0    
47.    Invite    1.14    
48.    Header Rotator    1.1.0    
49.    Group on Registration    1.1.1    
50.    FavIcon    1.1    
51.    Enhance Recent Post    1.0    
52.    EmailValidator    1.0    
53.    Edit_Display_Name_Permission    1.0
54.    Date_Registerd on post    1.0
55.    Copy Topics    1.4    
56.    Color And BgColor BBCode Bar    3.3.1    
57.    Clickable Avatars    1.0.1    
58.    Attachment Icon File    1.0
59.    Enhanced Calendar    1.1    
60.    AvatarOnBoard    2.0    [
61.    Add PM Info To Header (v1.1)    1.0    
62.    Last Topics of Person    1.0    
63.    Auto Email Inactive Ordinary Users    1.6
64.    AjaxChat Integration    1.0    
65.    Auto Merge Double Post    1.2    
66.    No Quote BBCode    1.0    
67.    NewsTextChanger    1.2    
68.    Activate account redirection    0.1
69.    Todays Birthday    1.2    
70.    ROT13 BBcode    1.0    
71.    Ignore Another User    1.0    
72.    Post_and_Change_as_Alternate_User    1.0
73.    Attachment Icon File    1.0    
74.    CountDown BBC    1.0    
75.    Anti-Bot Registration Puzzles    1.2    
76.    Change Account Status From Profile    1.0    
77.    Password Protect Boards    0.2    
78.    Reflection Avatar    1.1
79.    Space Between Posts    1.0    
80.    BBC [you]    1.2    
81.    Moderator and Administrator Comment Tags    1.3    
82.    Enhanced PM Warning Message    1.0    
83.    PDF Tag    1.1    
84.    Random_Quote    1.1
85.    Logout pop up    0.1    
86.    Caps_Lock_Detection_on_Login    1.1

Wanted to POST and not quick reply. That was the reason for the deletion. Sorry 'bout that here ya go.
I know LOTS of Mods.
BUT VERY few errors the way I have it right now.
There were no errors on Install.. Thats why I went ahead with the install.
(I learned QUICK NOT to install if there are errors!!)
Ok so I should have just included the Log In Mods.. But ya never know..
BTW its Version 1.1.10 ..
Title: Re: Select Online Status When Logging In
Post by: Kays on September 23, 2009, 08:08:53 PM
That is quite a number of mods.

I don't see a reason for it not installing on that file. The only thing I can suggests is to install the mod and the check using the package parser to see if any of it did install.

I'm curious as to what's happening.
Title: Re: Select Online Status When Logging In
Post by: Arantor on September 24, 2009, 09:12:09 AM
By the way, this will on some setups throw an error on login due to $txt[show_online] which should be $txt['show_online'].
Title: Re: Select Online Status When Logging In
Post by: Bass_Chaz on September 24, 2009, 06:22:23 PM
Im going to try it on a fresh install and work from there.
Title: Re: Select Online Status When Logging In
Post by: Kays on September 24, 2009, 09:33:59 PM
Thanks Arantor, that's been corrected.

Let us know how it goes Bass_Chaz.
Title: Re: Select Online Status When Logging In
Post by: Sabre™ on September 25, 2009, 07:32:09 PM
Nice mod mate, congrats!
And thanks :)
Title: Re: Select Online Status When Logging In
Post by: Sudhakar Arjunan on September 26, 2009, 02:42:08 PM
Hi Kays,

Thanks for this good work.
Title: Re: Select Online Status When Logging In
Post by: digit on September 26, 2009, 03:00:12 PM
FYI - I uninstalled this - because people who had already deselected "show online status" in their profile were wondering why they had to check "hide online status" AGAIN.

SIGH.
Title: Re: Select Online Status When Logging In
Post by: Kays on September 26, 2009, 03:39:57 PM
Unfortunately there's no way easy around that. Since when you're logging in and still considered a guest, SMF doesn't know what your previous choice was.

The top login box is unaffected by the mod. They can use it normally.

Thanks Sabre™ and A. SK :)
Title: Re: Select Online Status When Logging In
Post by: Xerendipity on September 26, 2009, 03:51:48 PM
GREAT mod, but how do I uninstall it please? 

I thought it was only to allow the admin (ME  :D) to choose this, but now I see a couple of little hidden people on my site and don't like it!   ;D

Thank you!
Title: Re: Select Online Status When Logging In
Post by: Kays on September 26, 2009, 06:19:35 PM
To uninstall it, just go into the package manager and click on the uninstall link next to the mod's name.

Agan, because you are considered a guest until you are logged in SMF has no way of knowing that you're an admin.

Title: Re: Select Online Status When Logging In
Post by: Bass_Chaz on September 26, 2009, 07:17:46 PM
Works GREAT on the New Install!!
Great work..
NOW what was it that was causing it NOT to work on my working Board...
Im going to apply ALL of the current Mods onto the new site and keep this one and then back up and reinstall onto the current site IF all goes well..
Title: Re: Select Online Status When Logging In
Post by: Kays on September 26, 2009, 07:32:47 PM
I'm glad to hear that. :)

I wonder if the package manager has a limit on the number of mods it can handle.
Title: Re: Select Online Status When Logging In
Post by: Arantor on September 26, 2009, 07:34:20 PM
There are users with 100+ mods installed, so I don't think it's that.
Title: Re: Select Online Status When Logging In
Post by: Kays on September 26, 2009, 08:13:28 PM
Hmm, so it's not that then. Strange.
Title: Re: Select Online Status When Logging In
Post by: Sabre™ on September 27, 2009, 05:22:21 PM
Quote from: Arantor on September 26, 2009, 07:34:20 PM
There are users with 100+ mods installed, so I don't think it's that.

One of mine has over 130 if I recall correct.
Title: Re: Select Online Status When Logging In
Post by: babjusi on September 29, 2009, 10:46:19 AM
This is a handy mod. Nice work :)
Title: Re: Select Online Status When Logging In
Post by: SoLoGHoST on October 01, 2009, 10:44:33 PM
Agreed, excellent mod Kays, and congrats on Septembers, Mod of the Month :)
Title: Re: Select Online Status When Logging In
Post by: Kays on October 02, 2009, 08:32:18 AM
Thanks all. :)

I didn't think that this mod would be so popular.
Title: Re: Select Online Status When Logging In
Post by: Arantor on October 02, 2009, 08:33:46 AM
It's a good mod :)
Title: Re: Select Online Status When Logging In
Post by: TheListener on October 06, 2009, 06:32:36 PM
Are the admins still able to see all users online?

Title: Re: Select Online Status When Logging In
Post by: Arantor on October 06, 2009, 06:37:11 PM
Yes, they always would be.

It just sets whether the user appears as online in the regular online list or 'hidden' to regular users, just as if they could set that by default themselves.
Title: Re: Select Online Status When Logging In
Post by: Eclipse16V on January 13, 2010, 04:15:48 AM
Nice Mod

Thanks
Title: Re: Select Online Status When Logging In
Post by: Eclipse16V on March 15, 2010, 01:35:28 AM
Nice Mod

Please update it for SMF 2.0RC3  ;)

Thanks
Title: Re: Select Online Status When Logging In
Post by: Kays on March 15, 2010, 02:32:25 PM
It's been updated. :)

No changes were required.
Title: Re: Select Online Status When Logging In
Post by: ~DS~ on March 15, 2010, 03:12:45 PM
Looks awesome and another "this should have be default in SMF" quote from me.  :P
Title: Re: Select Online Status When Logging In
Post by: Cobra_JK on March 17, 2010, 01:25:56 PM
Hi,

nice mod, but i have a little problem:

I deactivated the "Allow guests to browse the forum" feature to disallow guests to see my forum. So a log in page is the first thing a user sees as Overview but in this page the mod doesn't work. If i manually select the 'normal'  log in page (click on the Login-Tab) as if i could see the forum as guest, the mod works.
Seems there is one more place, where the check-box should be added.

PS: I use SMF 1.1.11
Title: Re: Select Online Status When Logging In
Post by: Kays on March 18, 2010, 02:42:50 PM
Thanks for that  Cobra_JK. :)

I've added it there also and updated the mod.

Quote from: Dismal Shadow on March 15, 2010, 03:12:45 PM
Looks awesome and another "this should have be default in SMF" quote from me.  :P

Thanks. Maybe so, but it's not a mod that I use.
Title: Re: Select Online Status When Logging In
Post by: TheListener on March 20, 2010, 10:16:06 PM
Installed ok except all I see when using the test account is a box which is ticked and no text.

Am using the curvemavi theme on rc2

Had this error.

50:
<dl>
51:
<dt>', $txt['mins_logged_in'], ':</dt>
52:    
<dd><input type="text" name="cookielength" size="4" maxlength="4" value="', $modSettings['cookieTime'], '"', $context['never_expire'] ? ' disabled="disabled"' : '', ' class="input_text" /></dd>
53:    
<dt>', $txt['always_logged_in'], ':</dt>
54:    
<dd><input type="checkbox" name="cookieneverexp"', $context['never_expire'] ? ' checked="checked"' : '', ' class="input_check" onclick="this.form.cookielength.disabled = this.checked;" /></dd>
==>55:    
<dt>', $txt['show_online'], ':</dt>
56:    
<dd><input type="hidden" name="show_online" /><input type="checkbox" name="show_online" class="input_check"', isset($_POST['show_online']) && empty($_POST['show_online']) ? '' : ' checked="checked"', ' /></dd>';
57:    
// If they have deleted their account, give them a chance to change their mind.
Title: Re: Select Online Status When Logging In
Post by: Kays on March 20, 2010, 11:16:29 PM
For which version of the mod and which of the login boxes is affected? The default one?
Title: Re: Select Online Status When Logging In
Post by: TheListener on March 20, 2010, 11:27:10 PM
Oops made a booboo meant RC3 not RC2.


Total time logged in doesn't show when registering or below the forums main banner
Title: Re: Select Online Status When Logging In
Post by: ~DS~ on March 20, 2010, 11:28:17 PM
Look like it got conflit with enotify
http://forum.com/index.php?action=enotify
8: Undefined index: show_online
File: /home/user/public_html/forum.com/Themes/default/Login.template.php
Line: 132


I got many of this in the error logs.
Title: Re: Select Online Status When Logging In
Post by: TheListener on March 20, 2010, 11:30:43 PM
I don't use e notify myself.

E Notify isn't on my list of mods for the forum ( sorry mod author).
Title: Re: Select Online Status When Logging In
Post by: Kays on March 21, 2010, 01:40:30 AM
I can't seem to reproduce either error.

@Dismal Shadow, I don't think the eNotify mod is conflicting with this one. I do have a check in place which should prevent this error. Can you post  the offending line so I can see it.

@ Brack1 Parse the mod and check if changes were made in Login.php to load the profile language strings.
Title: Re: Select Online Status When Logging In
Post by: TheListener on March 21, 2010, 01:41:37 AM
Will do and will let ya know.
Title: Re: Select Online Status When Logging In
Post by: ~DS~ on March 21, 2010, 01:51:06 AM
Keep it in mind, this only happen when guests viewing the forum.

Error on line 132 (with mod installed)
http://pastebin.com/t0WU916N

Without error (with mod uninstalled)
http://pastebin.com/iXj7X6F5
Title: Re: Select Online Status When Logging In
Post by: Kays on March 21, 2010, 02:10:34 AM
It looks like your problem is similar to Brack1's. Could you check to see if the change was made in index.php to load the profile language strings.
Title: Re: Select Online Status When Logging In
Post by: TheListener on March 21, 2010, 02:12:08 AM
Kays

Just checked all files and had no missing files according to the parser.
Title: Re: Select Online Status When Logging In
Post by: Kays on March 21, 2010, 02:16:19 AM
So all the changes where properly made to login.php?

Have you got a link?
Title: Re: Select Online Status When Logging In
Post by: ~DS~ on March 21, 2010, 02:18:22 AM
Quote from: Brack1 on March 21, 2010, 02:12:08 AM
Kays

Just checked all files and had no missing files according to the parser.
What he said.
Title: Re: Select Online Status When Logging In
Post by: TheListener on March 21, 2010, 02:18:41 AM
www.mkaware.co.uk

Title: Re: Select Online Status When Logging In
Post by: ~DS~ on March 21, 2010, 02:20:44 AM
http://thetwoworldsforum.com
Title: Re: Select Online Status When Logging In
Post by: Kays on March 21, 2010, 02:31:08 AM
Brack1 your site look fine to me. ::)

Try clearing your cache. Both browser and forum cache.

Dismal Shadow, you shouldn't be getting that error since it is in the kickguest template which is only displayed when guest can't view the forum. Try clearing your cache also.
Title: Re: Select Online Status When Logging In
Post by: TheListener on March 21, 2010, 02:32:49 AM
If it is that then I will shoot myself in the foot.

:)
Title: Re: Select Online Status When Logging In
Post by: ~DS~ on March 21, 2010, 02:39:29 AM
Kays, I cleared both the browser and the forum's cache. Nothing, it keep generating those errors.
Title: Re: Select Online Status When Logging In
Post by: Kays on March 21, 2010, 02:47:17 AM
Quote from: Dismal Shadow on March 21, 2010, 02:39:29 AM
Kays, I cleared both the browser and the forum's cache. Nothing, it keep generating those errors.

Can you attach index.php to a post please.
Title: Re: Select Online Status When Logging In
Post by: ~DS~ on March 21, 2010, 02:51:07 AM
Here and I will also try this on a test site to see if it also get errors.
Title: Re: Select Online Status When Logging In
Post by: ~DS~ on March 21, 2010, 02:56:15 AM
Weird...it looks fine on my test site. no errors when viewing as a guest.
Title: Re: Select Online Status When Logging In
Post by: Kays on March 21, 2010, 03:40:50 AM
Index.php looks fine. The thing is that the error shouldn't be happening unless you have guest viewing disabled. As that is the only time in which the template the error is occurring in is used..
Title: Re: Select Online Status When Logging In
Post by: ~DS~ on March 21, 2010, 03:47:57 AM
It's not disable to guests, you have seen it, I gave the link. It must be in conflit with another mod somehow as it work fine on my test site with no mods.
Title: Re: Select Online Status When Logging In
Post by: Kays on March 21, 2010, 03:55:07 AM
It could be a conflict with a mod. But why? Especially if that template isn't used.

Why not just remove that line or the code for the mod there.
Title: Re: Select Online Status When Logging In
Post by: ~DS~ on March 21, 2010, 04:14:51 AM
The mod is conflicting with Enotify allright. Just tested it on test site. Thought you may want to know and test Enotify.
Title: Re: Select Online Status When Logging In
Post by: Kays on March 21, 2010, 04:20:13 AM
I did have eNotify installed when I tested it. Both with guest viewing enabled and disabled.

I'll take another look at it in the morning. I really should be off to bed.
Title: Re: Select Online Status When Logging In
Post by: TheListener on March 21, 2010, 08:56:58 PM
Any news Kays?

Title: Re: Select Online Status When Logging In
Post by: Kays on March 21, 2010, 09:34:43 PM
I'm not seeing what your problem is as I can see all the text where it belongs.

I did fix the error with eNotify and the mod has been updated.

If you wish to make the change manually. Change the offending line to:


<dt>', @$txt['show_online'], ':</dt>

Title: Re: Select Online Status When Logging In
Post by: ~DS~ on March 21, 2010, 10:07:45 PM
Uhhh...the issue went away. Seem to solve the error issues.
Title: Re: Select Online Status When Logging In
Post by: TheListener on March 21, 2010, 10:16:04 PM
Just asked a member by name of test  ::)

The missing text is not missing now.

Title: Re: Select Online Status When Logging In
Post by: Kays on March 22, 2010, 01:13:58 AM
OK. I think I found your problem Brack1. :)

I've updated the mod again.
Title: Re: Select Online Status When Logging In
Post by: ~DS~ on March 22, 2010, 01:27:16 AM
You did? Because i take it back that the error is still there...
Title: Re: Select Online Status When Logging In
Post by: Kays on March 22, 2010, 01:45:54 AM
This should clear your error also. I moved the loadLanguage call into the template file.
Title: Re: Select Online Status When Logging In
Post by: ~DS~ on March 22, 2010, 12:59:28 PM
It seem to be working this time. Hope everyone is happy this time.  :P
Title: Re: Select Online Status When Logging In
Post by: Kays on March 22, 2010, 01:41:27 PM
Cool, I hope. :D
Title: Re: Select Online Status When Logging In
Post by: ~DS~ on May 19, 2010, 06:26:12 AM
It still shows up from time to time.
8: Undefined index: show_online
File: /home/******/public_html/forum.com/Themes/default/Login.template.php
Line: 55