News:

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

Main Menu

Users Online Today Mod

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

Previous topic - Next topic

1MileCrash

since the problem is that their names are italicised, then removeing <i></i> will work..it's like the only fix.
The only thing php can't do is tell you how much milk is left in the fridge.



xenovanis

Quote from: Carceri 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 :)

Okay, glad that was cleared  :)

I agree it's probably not the best way to fix it, it's more like a quick fix for lazy people  ;)
"Insanity: doing the same thing over and over again and expecting different results."

Carceri

Quote from: Tippmaster on November 07, 2005, 05:06:07 PM
since the problem is that their names are italicised, then removeing <i></i> will work..it's like the only fix.
Not really, because the usernames should be in italic to the administrators and hidden from everyone else. Also the same code hides the users from non-administrators in the current online list, but shows them to everyone in the online today list.

Carceri

#23
I think I have a fix, could somebody please try it and see if it works?

What should you expect:

As an administrator:
Hidden users are shown in italic
Hovering the mouse over their name shows when they were last online

As a regular user:
Hidden users are show as non-italic like all other users
Hovering the mouse over their name will not show when they were last online

Edit: Link removed. The latest version can be found in the first post in this thread.

xenovanis

"Insanity: doing the same thing over and over again and expecting different results."

DemonicInfluence

I have a question. All the last on times are the normal forum time. COuld you make it so it adjusts to each person's local time?

1948Pal

This is a nice mod, but isn't this exactly the same mod made by FaSan, I think, who's mod was removed from SMF for some reason?
"No matter how long the river, the river will reach the sea".
Eugene Fitch Ware

jerm

wow, wasn't expecting it to be fixed so fast lol.. well done. i like it like this :)

Carceri

#28
Quote from: Libo on November 07, 2005, 07:19:30 PM
I have a question. All the last on times are the normal forum time. COuld you make it so it adjusts to each person's local time?
It's on my TODO list :)

Carceri

Quote from: 1948Pal on November 07, 2005, 10:39:11 PM
This is a nice mod, but isn't this exactly the same mod made by FaSan, I think, who's mod was removed from SMF for some reason?
I wouldn't know. I just converted my forum from phpBB and was missing this feature, and since I couldn't find a mod like this I made one myself.

Carceri

New version 1.2.0 RC1 can be downloaded here:

http://www.bytopia.dk/Users_Online_Today_1.2.0_RC1.zip

This version should handle timezones properly depending on the user's time offset. All times are displayed as local times, and also "users online today" means today in the timezone the user is in, not the forum time. Also last login times are displayed according to the user's preferences (12/24 hrs. am/pm).

Since I can only do limited testing (I don't have a forum with users in different timezones) I leave it here for you to test. Please report any problems.

DemonicInfluence

There is a problem. You see. It doesn't use the forum time. even the original version doesn't use the forum time...


It is 3 hours behind my forum time..

You can test by going to profile and changing your default time to something and see if it works.

Hachi

#32
Could someone please help  :'(, i have just installed this mod but its not working, i keep getting the following error:

2: in_array(): Wrong datatype for second argument
File: /home/fearncou/public_html/forum/Sources/BoardIndex.php
Line: 271

I am using a template but i have put it back to the default template and had no joy, any help would be great..

Thanks

Hachi

Carceri

Quote from: Libo on November 08, 2005, 11:38:38 AM
There is a problem. You see. It doesn't use the forum time. even the original version doesn't use the forum time...

It is 3 hours behind my forum time..

You can test by going to profile and changing your default time to something and see if it works.
The original didn't that's true, but with the new version, when I change my timeoffset from 0 to, say -1, then the online times are all shown as being one hour earlier than forum time. So to answer your last line, yes I did it and it does work :)

But seriously, any information you can provide will help me identify the problem. It's hard to correct when it works for me. If you hover the mouse over a user and it displays his last online time and you then click on the same user and checks the last online field there. What is the difference between those two?

Carceri

Quote from: Hachi on November 08, 2005, 03:27:58 PM
2: in_array(): Wrong datatype for second argument
File: /home/fearncou/public_html/forum/Sources/BoardIndex.php
Line: 271
I'm sorry I can't help you there, since your BoardIndex.php is apparently not the same as a patched one from the original version of SMF 1.1 RC1. Line 271 in BoardIndex.php should be a comment added by my mod, and nothing related to in_array(). Are you sure you are patching an unmodified version of BoardIndex.php?

jerm

Quote from: 1948Pal on November 07, 2005, 10:39:11 PM
This is a nice mod, but isn't this exactly the same mod made by FaSan, I think, who's mod was removed from SMF for some reason?
fasan took his mod off the list

Menni

Can someone pleae specify for me how and what should I modify to make this mod work in some other theme?

DemonicInfluence

Just follow the instructions inside the package. It is the .xml file. Then edit Boardindex.template.php with its edits...

galgoz

After installing the mod I get this error

2: in_array(): Wrong datatype for second argument
File: /home/content/M/R/e/MReimann/html/smf/Sources/BoardIndex.php
Line: 271

Line 271 and the following lines read as follows.

$is_buddy = in_array($row['ID_MEMBER'], $user_info['buddies']);
      if ($is_buddy)
      {
         $link = '<b>' . $link . '</b>';
      }

Any ideas?

Carceri

Quote from: galgoz on November 09, 2005, 06:14:54 PM
$is_buddy = in_array($row['ID_MEMBER'], $user_info['buddies']);
Could you sent me your entire BoardIndex.php file? Line 271 in my patched file is not this line, so I need to check what the differences between our files are in order to see what is wrong.

Are you using SMF 1.1 RC1 ?

Advertisement: