Simple Machines Community Forum

Customizing SMF => Modifications and Packages => Topic started by: Doug Heffernan on April 19, 2022, 05:57:48 PM

Title: Members Online Today
Post by: Doug Heffernan on April 19, 2022, 05:57:48 PM
Link to the mod (https://custom.simplemachines.org/index.php?mod=4322)

This is a simple mod that will list all members who logged in at your forum for the past 24 hours on board index at the Info Center area.

There are no settings for this mod. After you install the mod, go to the group(s) that you want to view the list of today visitors, click the modify button, tick the View Today 's Visitors checkbox and save the changes.
Title: Re: Members Online Today
Post by: Speed King on April 20, 2022, 12:57:54 AM
Just installed on my test forum, then on my live forum.
The mod is working as expected, no error messages found in the server log.

Thanks for this mod :)
Title: Re: Members Online Today
Post by: Doug Heffernan on April 20, 2022, 08:06:05 AM
Quote from: Speed King on April 20, 2022, 12:57:54 AMJust installed on my test forum, then on my live forum.
The mod is working as expected, no error messages found in the server log.

Thanks for this mod :)

You are welcome :)

And thank you too for your feedback :)
Title: Re: Members Online Today
Post by: JessyKa on April 20, 2022, 10:03:50 AM
Also thanks for this mod, @Doug Heffernan
Find attached the first german translation
Title: Re: Members Online Today
Post by: Doug Heffernan on April 20, 2022, 10:12:59 AM
Quote from: JessyKa on April 20, 2022, 10:03:50 AMAlso thanks for this mod, @Doug Heffernan
Find attached the first german translation

German language has been included in the mod. Thank you @JessyKa :)
Title: Re: Members Online Today
Post by: JasonSGN on April 20, 2022, 11:48:24 AM
Thanks for the mod. I have it installed and it seems to be working fine, but when I logged into my admin area these two error logs appeared:


Hook call: function "UsersOnlineToday_settings" in file /home/xxxxxx/public_html/websitename.com/forum could not be called.

and

The callable UsersOnlineToday_settings could not be called.
I can post the Backtrace information is necessary.
Title: Re: Members Online Today
Post by: Doug Heffernan on April 20, 2022, 11:56:36 AM
Quote from: JasonSGN on April 20, 2022, 11:48:24 AMThanks for the mod. I have it installed and it seems to be working fine, but when I logged into my admin area these two error logs appeared:


Hook call: function "UsersOnlineToday_settings" in file /home/xxxxxx/public_html/websitename.com/forum could not be called.

and

The callable UsersOnlineToday_settings could not be called.
I can post the Backtrace information is necessary.

Are you sure that you installed my mod? There is no UsersOnlineToday_settings function in it.
Title: Re: Members Online Today
Post by: JasonSGN on April 20, 2022, 12:31:20 PM
I do have yours installed, but maybe it's leftover from an older version I had converted to 2.1. Thanks for clarifying.
Title: Re: Members Online Today
Post by: Doug Heffernan on April 20, 2022, 12:35:38 PM
Quote from: JasonSGN on April 20, 2022, 12:31:20 PMI do have yours installed, but maybe it's leftover from an older version I had converted to 2.1. Thanks for clarifying.

No problem.

I think that it comes from Users Online Today mod btw, the one compatible with 2.0.x, as that mod has the aforementioned function by looking at its code.
Title: Re: Members Online Today
Post by: pikeman on April 20, 2022, 02:35:47 PM
Great mode! (https://vukovisadunava.com/Smileys/mojismajliji/thumbup.gif)

Could be added the option of "members present today" instead of "members present in the last 24 hours"?
Title: Re: Members Online Today
Post by: Doug Heffernan on April 20, 2022, 04:51:36 PM
Quote from: pikeman on April 20, 2022, 02:35:47 PMGreat mode! (https://vukovisadunava.com/Smileys/mojismajliji/thumbup.gif)

Could be added the option of "members present today" instead of "members present in the last 24 hours"?

You can change wording at the mod 's language file which is called: MembersOnlineToday.english.php
Title: Re: Members Online Today
Post by: pikeman on April 20, 2022, 05:11:27 PM
I didn't mean the text. I would like to see a list of members logged in today, not logged in in the last 24 hours.
Title: Re: Members Online Today
Post by: Doug Heffernan on April 20, 2022, 05:18:54 PM
Quote from: pikeman on April 20, 2022, 05:11:27 PMI didn't mean the text. I would like to see a list of members logged in today, not logged in in the last 24 hours.

Can you please tell me what criteria is that today, that you want, based on, from midnight to midnight?
Title: Re: Members Online Today
Post by: FrizzleFried on April 20, 2022, 05:31:00 PM
12:00:01AM (00;00:01) on = Today.

;)

The problem would be that it's different at any particular moment for each time zone.  Not sure if that's much of a problem though...
Title: Re: Members Online Today
Post by: Doug Heffernan on April 20, 2022, 05:33:55 PM
I see. That is not possible in the current version of the mod.
Title: Re: Members Online Today
Post by: Matthias on April 20, 2022, 05:42:37 PM
@Doug Heffernan
I'm thrilled with how you're putting out one good mod after another here.
Title: Re: Members Online Today
Post by: Doug Heffernan on April 20, 2022, 05:46:23 PM
Quote from: Matthias on April 20, 2022, 05:42:37 PM@Doug Heffernan
I'm thrilled with how you're putting out one good mod after another here.

Thank you @Matthias :)
Title: Re: Members Online Today
Post by: Steve on April 21, 2022, 09:12:18 AM
As I've told you privately Doug, great mod and thanks!
Title: Re: Members Online Today
Post by: FrizzleFried on April 21, 2022, 09:35:41 AM
May I ask... how does this mod differ from the "Users Online Today 2.1.1" mod?

EDIT:  I answered my own question.  There is no Users Online Today 2.1.1 mod here.   Now I wonder just where in the heck I managed to get the one installed in my forum?!? (That is NOT the 2.0.x version installed via emulation)?!?   

Hmmm....

Title: Re: Members Online Today
Post by: @rjen on April 21, 2022, 09:44:38 AM
I think you got that from me...
Title: Re: Members Online Today
Post by: FrizzleFried on April 21, 2022, 10:29:45 AM
Mystery solved!  I really aught to document these things (as I have started to do with all the little tweaks I implement so I don't have to come back here and re-look them up over and over as I did for more time than I care to admit).

;)

Title: Re: Members Online Today
Post by: Michael Vail on April 24, 2022, 11:29:55 PM
Love this mod, now if I can just figure out to how to make it a Tiny Portal Block.  Wink Wink @rjen :-)

Great Work Doug! Thank you!
Title: Re: Members Online Today
Post by: Dave J on April 27, 2022, 08:34:48 AM
Hi Doug,

Thanks for creating this mod.

One thing which is an issue for me is the sub_bar text colour, see attached.

It's OK and matches everything in the default curve theme but in a couple of the other themes the colour is different.

Is there a way to fix this please?
Title: Re: Members Online Today
Post by: Doug Heffernan on April 27, 2022, 08:40:57 AM
Quote from: Dave J on April 27, 2022, 08:34:48 AMHi Doug,

Thanks for creating this mod.

One thing which is an issue for me is the sub_bar text colour, see attached.

It's OK and matches everything in the default curve theme but in a couple of the other themes the colour is different.

Is there a way to fix this please?

I use only the default theme. What themes are those? Looking at the screesnhot it looks like they have altered the default method for the info center. You can check their code and make the adjustment in this mod accordingly. You will have to edit the MembersOnlineToday.template.php file for that.
Title: Re: Members Online Today
Post by: Arantor on April 27, 2022, 08:42:33 AM
Actually I don't think that's the case here.

The other item headers are links to thinks, the default theme just restyles the links to the same colour but Dave's theme doesn't.

If the mod emitted a link header rather than text (maybe linking to who's online?) it would look like the others.
Title: Re: Members Online Today
Post by: Doug Heffernan on April 27, 2022, 09:09:10 AM
@Dave J, please redownload the newly attached package and let me know how it will go.
Title: Re: Members Online Today
Post by: Dave J on April 27, 2022, 09:34:53 AM
Quote from: Doug Heffernan on April 27, 2022, 09:09:10 AM
Quote from: Arantor on April 27, 2022, 08:42:33 AMActually I don't think that's the case here.

The other item headers are links to thinks, the default theme just restyles the links to the same colour but Dave's theme doesn't.

If the mod emitted a link header rather than text (maybe linking to who's online?) it would look like the others.

You are right. I had changed the <span class="main_icons people"></span> code to use the img src, because for some reason that did not work on the forum of a client of mine. And I forgot to change it back in the mod here. Thank you for your post as that reminded me of that.

@Dave J, please redownload the newly attached package and let me know how it will go.

Doug,

Do you mean redownload from here https://custom.simplemachines.org/index.php?mod=4322 or did you mean to attach a new file to the post?
Title: Re: Members Online Today
Post by: Doug Heffernan on April 27, 2022, 10:25:56 AM
Quote from: Dave J on April 27, 2022, 09:34:53 AM
Quote from: Doug Heffernan on April 27, 2022, 09:09:10 AM
Quote from: Arantor on April 27, 2022, 08:42:33 AMActually I don't think that's the case here.

The other item headers are links to thinks, the default theme just restyles the links to the same colour but Dave's theme doesn't.

If the mod emitted a link header rather than text (maybe linking to who's online?) it would look like the others.

You are right. I had changed the <span class="main_icons people"></span> code to use the img src, because for some reason that did not work on the forum of a client of mine. And I forgot to change it back in the mod here. Thank you for your post as that reminded me of that.

@Dave J, please redownload the newly attached package and let me know how it will go.

Doug,

Do you mean redownload from here https://custom.simplemachines.org/index.php?mod=4322 or did you mean to attach a new file to the post?

Yes, I meant to redownload the mod from there.
Title: Re: Members Online Today
Post by: Dave J on April 27, 2022, 10:44:50 AM
Quote from: Doug Heffernan on April 27, 2022, 10:25:56 AMYes, I meant to redownload the mod from there.

I've done that Doug, and it makes no difference, the text is still hardly seen, and although the other themes are affected it's just the colouring in those.

If it helps I did an inspect of the block and the images attached are what is shown. The name in front of the screenshot is the name of the theme.

I've also attached the other themes affected.

This is not a deal breaker Doug, as it's for admin only, but it would be nice to have it all looking the same colour in the themes.
Title: Re: Members Online Today
Post by: Doug Heffernan on April 27, 2022, 10:46:37 AM
Quote from: Dave J on April 27, 2022, 10:44:50 AMI've done that Doug, and it makes no difference, the text is still hardly seen, and although the other themes are affected it's just the colouring in those.

Can you please post the download link to one of those themes?

The text displays fine to the dark themes from what I see at the screenshots above.
Title: Re: Members Online Today
Post by: Arantor on April 27, 2022, 10:58:26 AM
If you've only changed the icon to be a reference back to the sprite this won't solve the problem.

Again, each of the headers in the info centre are links to other pages - except for your mod. Thus your mod doesn't get the right styling.

See the elements in Dave's screenshots, the Users Online item is a link, Stats is a link, Members Online Today is not a link, so it gets a different style.
Title: Re: Members Online Today
Post by: Dave J on April 27, 2022, 11:02:19 AM
Quote from: Arantor on April 27, 2022, 10:58:26 AMIf you've only changed the icon to be a reference back to the sprite this won't solve the problem.

Again, each of the headers in the info centre are links to other pages - except for your mod. Thus your mod doesn't get the right styling.

See the elements in Dave's screenshots, the Users Online item is a link, Stats is a link, Members Online Today is not a link, so it gets a different style.

I was going to mention that myself, but as I'm not a coder, I though you guys might think I'm being stupid...it wouldn't be the first time, it's also the reason I deliberately expanded the inspect code lines
Title: Re: Members Online Today
Post by: Doug Heffernan on April 27, 2022, 11:12:40 AM
Quote from: Dave J on April 27, 2022, 11:02:19 AMI was going to mention that myself, but as I'm not a coder, I though you guys might think I'm being stupid...it wouldn't be the first time, it's also the reason I deliberately expanded the inspect code lines

Try to change this code:

<span class="main_icons people"></span> ', $txt['members_logged_today'], '
to the following at the MembersOnlineToday.template.php file.

<a href="' . $scripturl . '?action=who"><span class="main_icons people"></span> ', $txt['members_logged_today'], '</a>
And add $scripturl to the list of the global variables.

After you make the edits, save the changes. That will link it to the who is online page. You can change the url to link to wherever you want.

Quote from: Dave J on April 27, 2022, 11:02:19 AMI though you guys might think I'm being stupid

No one is going to think that. Do not let that kind of thinking to stop you from asking questions. We have all been there and still learn new things all the time as we go along.
Title: Re: Members Online Today
Post by: Dave J on April 27, 2022, 01:05:22 PM
Great thanks Doug, that works fine for all the themes.

Much appreciate the help

Title: Re: Members Online Today
Post by: Doug Heffernan on April 27, 2022, 01:06:20 PM
Quote from: Dave J on April 27, 2022, 01:05:22 PMGreat thanks Doug, that works fine for all the themes.

Much appreciate the help


No problem :)
Title: Re: Members Online Today
Post by: Costa on June 02, 2022, 08:12:24 AM
Portuguese_pt translation.
Title: Re: Members Online Today
Post by: Doug Heffernan on June 02, 2022, 08:22:50 AM
Quote from: Costa on June 02, 2022, 08:12:24 AMPortuguese_pt translation.

Thank you for the translation. It has been included in the mod.
Title: Re: Members Online Today
Post by: Costa on June 02, 2022, 08:24:11 AM
You're welcome. :)
Title: Re: Members Online Today
Post by: Greyhound on December 01, 2022, 10:55:05 PM
Just installed 2.1.3.  Does this mod work with this version or should I wait for the newest update? 
Title: Re: Members Online Today
Post by: Speed King on December 01, 2022, 11:01:33 PM
Quote from: Greyhound on December 01, 2022, 10:55:05 PMJust installed 2.1.3.  Does this mod work with this version or should I wait for the newest update?

I have this mod installed on my SMF 2.1.3 forum, the mod is working properly.
Title: Re: Members Online Today
Post by: Doug Heffernan on December 02, 2022, 07:25:22 AM
Quote from: Greyhound on December 01, 2022, 10:55:05 PMJust installed 2.1.3.  Does this mod work with this version or should I wait for the newest update?

Yes, it works with 2.1.3. as well.
Title: Re: Members Online Today
Post by: Greyhound on December 02, 2022, 11:30:12 AM
Quick question.  How do I make it so others can see who was online?  Right now only I can see the users, it seems like everyone else just sees a number of who was online.  

I've looked and I'm  just not seeing where to adjust this.  I'm sure I'm overlooking it. 

Thanks. 
Title: Re: Members Online Today
Post by: Doug Heffernan on December 02, 2022, 01:32:01 PM
Quote from: Greyhound on December 02, 2022, 11:30:12 AMQuick question.  How do I make it so others can see who was online?  Right now only I can see the users, it seems like everyone else just sees a number of who was online. 

I've looked and I'm  just not seeing where to adjust this.  I'm sure I'm overlooking it.

Thanks.

It is a group permission. Go to the group(s) that you want to view the list of today visitors, click the modify button, tick the View Today 's Visitors checkbox and save the changes.
Title: Re: Members Online Today
Post by: Greyhound on December 02, 2022, 02:03:19 PM
See attached for what I'm seeing.  I'm not seeing a box for members online.  Is it somewhere else? 
Title: Re: Members Online Today
Post by: Doug Heffernan on December 02, 2022, 02:13:53 PM
Quote from: Greyhound on December 02, 2022, 02:03:19 PMSee attached for what I'm seeing.  I'm not seeing a box for members online.  Is it somewhere else?

You are looking in the wrong place. Please have a look the mod download page. Everything is explained there in details, and with a screenshot too.
Title: Re: Members Online Today
Post by: Steve on December 02, 2022, 02:45:06 PM
Admin -> Members section, click Permissions -> Click 'Modify' for whatever group you want to allow -> Look for the Today's Visitors permission -> check the box
Title: Re: Members Online Today
Post by: Greyhound on December 02, 2022, 05:21:55 PM
Got it, thank you. 
Title: Re: Members Online Today
Post by: Steve on December 03, 2022, 09:24:17 AM
My pleasure.
Title: Re: Members Online Today
Post by: [chrisB] on January 16, 2023, 01:51:44 PM
@Doug Heffernan I have two questions if you don't mind.

1] Can the code be tweaked to show who's been online to guests? If so, could you please tell me the edit(s). 😊

2] Is it possible to use this as a block in TinyPortal?

Thanks in advance.
Title: Re: Members Online Today
Post by: Doug Heffernan on January 16, 2023, 04:14:31 PM
Quote from: [chrisB] on January 16, 2023, 01:51:44 PM1] Can the code be tweaked to show who's been online to guests? If so, could you please tell me the edit(s). 😊

No code tewaks are necessary for this. Viewing the list is a group permission. All you have to to is tick the View Today 's Visitors checkbox for guests and save the changes.

Quote from: [chrisB] on January 16, 2023, 01:51:44 PM2] Is it possible to use this as a block in TinyPortal?

Yes, it is. However I don't use that mod myself and therefore I can't tell you how to achieve that. It is better if you asked at the Tiny Portal 's support topic/forum about this.
Title: Re: Members Online Today
Post by: [chrisB] on February 01, 2023, 04:42:33 PM
Hi Doug,

I am hitting some erros, although nothing breaks.

Hook call: function "UsersOnlineToday_boardindex" in file /home/poetryar/public_html could not be called.
Quote
  • #0: call_integration_hook()
    Called from /home/poetryar/public_html/Sources/BoardIndex.php on line 137 (https://poetryartonline.com/admin/?area=logs;sa=errorlog;file=L2hvbWUvcG9ldHJ5YXIvcHVibGljX2h0bWwvU291cmNlcy9Cb2FyZEluZGV4LnBocA;line=137)
  • #1: BoardIndex()
    Called from /home/poetryar/public_html/index.php on line 203 (https://poetryartonline.com/admin/?area=logs;sa=errorlog;file=L2hvbWUvcG9ldHJ5YXIvcHVibGljX2h0bWwvaW5kZXgucGhw;line=203)

The callable UsersOnlineToday_boardindex could not be called.
Quote#0: call_helper()
Called from /home/poetryar/public_html/Sources/Subs.php on line 5801
#1: call_integration_hook()
Called from /home/poetryar/public_html/Sources/BoardIndex.php on line 137
#2: BoardIndex()
Called from /home/poetryar/public_html/index.php on line 203