• Welcome to Simple Machines Community Forum. Please login or sign up.
January 25, 2022, 06:19:29 AM

News:

Want to get involved in developing SMF, then why not lend a hand on our github!


Users Online Today Mod

Started by Nibogo, November 06, 2005, 01:42:31 AM

Previous topic - Next topic

Nibogo

November 06, 2005, 01:42:31 AM Last Edit: April 07, 2014, 06:07:49 PM by Nibogo
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.

Teknomancer

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:

xenovanis

If you are using a custom theme, you probably need to make some changes to your themefiles.

How to make mods work with themes?
"Insanity: doing the same thing over and over again and expecting different results."

snork13

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

xenovanis

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
"Insanity: doing the same thing over and over again and expecting different results."

Carceri

November 06, 2005, 07:33:16 PM #5 Last Edit: November 06, 2005, 07:48:44 PM by Carceri
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.

thetzfreak

Do I have to do the custom editing thing for my theme even after you updated it now?

Carceri

Quote from: thetzfreak 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?
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.

jerm

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?

Carceri

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?

xenovanis

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.
"Insanity: doing the same thing over and over again and expecting different results."

Carceri

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?

xenovanis

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

$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.
"Insanity: doing the same thing over and over again and expecting different results."

Carceri

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.

xenovanis

No, it doesn't. I tested it. This works correct  ;)
"Insanity: doing the same thing over and over again and expecting different results."

Carceri


xenovanis

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.
"Insanity: doing the same thing over and over again and expecting different results."

Carceri

I don't quite understand this. Are you saying that this mod modifies the behaviour of the current online list?

xenovanis

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.
"Insanity: doing the same thing over and over again and expecting different results."

Carceri

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 :)

Advertisement: