Advertisement:

Author Topic: Users Online Today Mod  (Read 586209 times)

Offline Nibogo

  • SMF Hero
  • ******
  • Posts: 6,548
  • Gender: Male
    • smfpacks on Facebook
    • @smfpacks on Twitter
    • SMFPacks
Users Online Today Mod
« on: November 06, 2005, 01:42:31 AM »
Link to Mod


Users Online Today by SMFPacks.com

Creator:

Originally created by Carceri

Developer:

www.smfpacks.com

Important Info:

This Mod is developer by SMFPacks.com - The #1 Website for the Customziation of your SMF. SMFPacks.com Provides Other Great Packages:

- Reason for Editing Mod.
- Yet Another Global Announcements Mod.
- SMF Social Groups.
- SMF Links Directory.
- SMF Downloads Directory.
- SMF Dynamic Directory.
- Advanced Topic Prefix Mod.
- Advanced Invitations System.
- Move Topic Notification.
- PM to New Members.
- Permissions Info.
- Next Post Level.
- Karma Buttons.
- SMF Multi Quote.
- Attachments in Topics.
- and much more visit us on SMFPacks.com

Description:

Adds a list of all users that were online on the current day to the 'Info Center'. This is a simple mod that does the job and not a whole lot more. I like to keep it simple.

Features:
- By hovering the cursor over the username, it will display when the user was last logged in
- The time period that the user list shows can be the current day, last 24 hours or last week
- The list can be sorted in various ways
- Viewing of the list can be restricted

It modifies files in the default theme, so if you are using any other theme you need to make changes to your theme files. I offer no support for this.

Upgrading:

Just uninstall whatever version you've installed and install the latest one.

Languages:

- Croatian.
- Danish.
- Dutch.
- English.
- Finnish.
- German.
- Hungarian.
- Persian.
- Portuguese.
- Russian.
- Serbian.
- Spanish.
- Turkish.

Offline Teknomancer

  • Jr. Member
  • **
  • Posts: 117
  • Gender: Male
    • Toons & Comics
Re: Users Online Today Mod
« Reply #1 on: November 06, 2005, 09:46:40 AM »
This doesn't seem to work for me. Just installed it on SMF 1.1. RC1... nothing has changed in the Info Center.

Is there any setting that needs to be enabled?
My SMF Forum:

Offline xenovanis

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 12,988
  • Gender: Female
    • Taxibalk
Re: Users Online Today Mod
« Reply #2 on: November 06, 2005, 11:13:54 AM »
If you are using a custom theme, you probably need to make some changes to your themefiles.

How to make mods work with themes?
"An idiot could find that code. The cancellation code. And he'd keep on typing, keep on fighting. Anything to save his friends."

Offline snork13

  • SMF Friend
  • Sophist Member
  • *
  • Posts: 1,305
  • Gender: Male
  • so little time
    • simplemachines.org
Re: Users Online Today Mod
« Reply #3 on: November 06, 2005, 05:54:53 PM »
works great in 1.1rc1, thanks for sharing


-snork
Mods
Please DO NOT PM me with requests for individual support, but post your questions and concerns in the appropriate section of the forum where other users can benefit from them as well. Thank you.
I have been super busy as of late. Working on updates to all my modifications for 2.0.1

Offline xenovanis

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 12,988
  • Gender: Female
    • Taxibalk
Re: Users Online Today Mod
« Reply #4 on: November 06, 2005, 06:24:01 PM »
Actually, I got this errormessage:

8: Undefined index: num_buddies
File: .../forum/Sources/BoardIndex.php
Regel: 298

This is how I fixed it. BoardIndex.php

Code: (find) [Select]
        $context['users_online_today'] = array();
$context['list_users_online_today'] = array();

Code: (add after) [Select]
$context['num_buddies'] = array();

Probably a dirty fix  :P
"An idiot could find that code. The cancellation code. And he'd keep on typing, keep on fighting. Anything to save his friends."

Offline Carceri

  • Jr. Member
  • **
  • Posts: 169
  • Gender: Male
Re: Users Online Today Mod
« Reply #5 on: November 06, 2005, 07:33:16 PM »
You are right that this is a bug, and the correct fix is not adding the line that uses $context['num_buddies'] which is:

$context['num_buddies']++;

Your fix works as well, but should be

$context['num_buddies'] = 0;

:)

Thanks for reporting it. It has been fixed in the latest version.
« Last Edit: November 06, 2005, 07:48:44 PM by Carceri »

Offline thetzfreak

  • Semi-Newbie
  • *
  • Posts: 99
Re: Users Online Today Mod
« Reply #6 on: November 06, 2005, 09:55:34 PM »
Do I have to do the custom editing thing for my theme even after you updated it now?

Offline Carceri

  • Jr. Member
  • **
  • Posts: 169
  • Gender: Male
Re: Users Online Today Mod
« Reply #7 on: November 07, 2005, 01:34:47 AM »
Do I have to do the custom editing thing for my theme even after you updated it now?
If you have a file called 'BoardIndex.template.php' in your theme dir, then you need to edit it manually. This mod only edits it for the default theme.

Offline jerm

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 7,245
Re: Users Online Today Mod
« Reply #8 on: November 07, 2005, 04:01:11 PM »
lol, just realized it
with the other online users mod it wasn't a huge deal, but with this one it can be a bigger deal i guess
but for those users who like to remain hidden, they hide in the "users online", but they arn't hidden on the "users online today" section.. and now you can just hover over their nickname to see when they were last active.
think theres a fix for this?

Offline Carceri

  • Jr. Member
  • **
  • Posts: 169
  • Gender: Male
Re: Users Online Today Mod
« Reply #9 on: November 07, 2005, 04:23:03 PM »
It's easy to make a fix. The question is what the right fix is :)

Just a question: What happens if you go to a profile of a user who does not want to be shown on the today list. Can you still see when that user was last logged in? If yes, then I think this mod does not reveal any more information that what could already be found elsewhere and I think it should be left as it is.

If that information is not shown in the users profile, then we should probably do something. The easy fix is to simply remove the user from the list and add some additional text like:

13 users online today (3 hidden):
<<13 usernames of non-hidden users>>

Suggestions?

Offline xenovanis

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 12,988
  • Gender: Female
    • Taxibalk
Re: Users Online Today Mod
« Reply #10 on: November 07, 2005, 04:26:28 PM »
I think it's okay to show them in the list, but not in an italic font. Now, you can see all hidden users easily.
"An idiot could find that code. The cancellation code. And he'd keep on typing, keep on fighting. Anything to save his friends."

Offline Carceri

  • Jr. Member
  • **
  • Posts: 169
  • Gender: Male
Re: Users Online Today Mod
« Reply #11 on: November 07, 2005, 04:32:08 PM »
Are the hidden users shown with an italic font? I have never noticed that, but perhaps it's because I'm an administrator on the board?

Offline xenovanis

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 12,988
  • Gender: Female
    • Taxibalk
Re: Users Online Today Mod
« Reply #12 on: November 07, 2005, 04:38:36 PM »
Yes, in the online list their names are shown in italic font to administrators. Normal users can't see they are online.

In your mod, their names also appear in a italic font, but they are now also visible like this to other users. It's like drawing extra attention to them IMO. I found this in BoardIndex.php
Code: [Select]
$context['list_users_online_today'][$row['lastLogin'] . $row['memberName']] = empty($row['showOnline']) ? ' <i>' . $link . ' </i>' : $link; and removed the <i> tags to normalize the font.
"An idiot could find that code. The cancellation code. And he'd keep on typing, keep on fighting. Anything to save his friends."

Offline Carceri

  • Jr. Member
  • **
  • Posts: 169
  • Gender: Male
Re: Users Online Today Mod
« Reply #13 on: November 07, 2005, 04:41:30 PM »
Yes, but it is the same code that apparently hides them from regular users in the users online list. I will have to investigate why the same code hides the users from the online list, but not the online today list.

Then I will make the correct fix.

Offline xenovanis

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 12,988
  • Gender: Female
    • Taxibalk
Re: Users Online Today Mod
« Reply #14 on: November 07, 2005, 04:42:06 PM »
No, it doesn't. I tested it. This works correct  ;)
"An idiot could find that code. The cancellation code. And he'd keep on typing, keep on fighting. Anything to save his friends."

Offline Carceri

  • Jr. Member
  • **
  • Posts: 169
  • Gender: Male
Re: Users Online Today Mod
« Reply #15 on: November 07, 2005, 04:47:11 PM »
Sorry, what works correct?

Offline xenovanis

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 12,988
  • Gender: Female
    • Taxibalk
Re: Users Online Today Mod
« Reply #16 on: November 07, 2005, 04:49:41 PM »
Removing the <i> tags keeps the users hidden (or italic to admins) in the current online list, and shows hidden users in a normal font in the online today list.
"An idiot could find that code. The cancellation code. And he'd keep on typing, keep on fighting. Anything to save his friends."

Offline Carceri

  • Jr. Member
  • **
  • Posts: 169
  • Gender: Male
Re: Users Online Today Mod
« Reply #17 on: November 07, 2005, 04:55:04 PM »
I don't quite understand this. Are you saying that this mod modifies the behaviour of the current online list?

Offline xenovanis

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 12,988
  • Gender: Female
    • Taxibalk
Re: Users Online Today Mod
« Reply #18 on: November 07, 2005, 05:01:11 PM »
No, it doesn't affect the current online list. Sorry for the confusion.  :-\

But it does show to ordinary members whether a member has choosen to be hidden, by displaying it's username in an italic font in the "users online today" list. I think you should get rid of that, because it's drawing extra attention to this profile. People start wondering why this name is italicized and their own name isn't.
"An idiot could find that code. The cancellation code. And he'd keep on typing, keep on fighting. Anything to save his friends."

Offline Carceri

  • Jr. Member
  • **
  • Posts: 169
  • Gender: Male
Re: Users Online Today Mod
« Reply #19 on: November 07, 2005, 05:04:30 PM »
My confusion comes from your answer to my comment where I said that I needed to investigate this, because from looking at the code my first impression is that everything works as it should, and I understood that you said that I should't look at the code because everything works ok. Now I understand again :)

While removing the <i> might work, I don't think this is the correct fix. Something else is wrong here, and I am hesistant to make a fix before I really understand what I am fixing :)