Advertisement:

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

Offline Caracal

  • Semi-Newbie
  • *
  • Posts: 16
Re: Users Online Today Mod
« Reply #1940 on: February 14, 2017, 11:05:36 AM »

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.


So are you using the default theme, or a different theme?
SMF Default Theme - Curve is the one yes.

Offline Caracal

  • Semi-Newbie
  • *
  • Posts: 16
Re: Users Online Today Mod
« Reply #1941 on: February 15, 2017, 11:34:23 AM »
For some strange reason i did nothing i tried installing again and it works now. I also noticed that from the admin panal and go to Configuration>Modification Settings>Miscellaneous. You can adjust the settings also. :)

Offline Dylert

  • Jr. Member
  • **
  • Posts: 266
  • Gender: Male
    • Hellasforum
Re: Users Online Today Mod
« Reply #1942 on: August 27, 2019, 05:14:15 PM »
Is it possible to use this mod on SMF 2.1?

Online d3vcho();

  • Sempiterno
  • Lead Localizer
  • SMF Hero
  • *
  • Posts: 3,947
  • Gender: Male
    • frandominguez03 on GitHub
Re: Users Online Today Mod
« Reply #1943 on: August 27, 2019, 05:23:18 PM »
Not this particular one. It hasn't been updated for 2.1 yet. I don't really know if it'll be eventually and I don't know if there are any similar options available for 2.1 now.

"Greeting Death as an old friend, they departed this life as equals."

Offline Hatshepsut

  • Semi-Newbie
  • *
  • Posts: 61
  • Gender: Male
    • bgnacionalisti.org/ on Facebook
    • Bulgarian Nationalist Forum
Re: Users Online Today Mod
« Reply #1944 on: August 27, 2019, 11:38:21 PM »
Is it possible to use this mod on SMF 2.1?

Yes, this mod can run on SMF 2.1, you can see it in my forum:

https://bg-nacionalisti.org/BNF/index.php?action=forum

After mod installation, look in BoardIndex.template.php (for SMF 2.1 default theme)

Find:
Code: [Select]
// Showing membergroups?
if (!empty($settings['show_group_key']) && !empty($context['membergroups']))
echo '
<span class="membergroups">' . implode(', ', $context['membergroups']) . '</span>';
}

Add after:
Code: [Select]
// Users Online Today
echo '
<div class="title_barIC">
<h4 class="titlebg">
<span class="ie6_header floatleft">
<img class="icon" src="', $settings['images_url'], '/icons/online.gif', '" alt="', $txt['online_users'], '" />', $txt['uot_users_online_'.$modSettings['uot_setting_period']], '
</span>
</h4>
</div>
<p class="inline smalltext">';
echo
$txt['uot_total'], ': <b>', $context['num_users_online_today'], '</b>';

if ($context['viewing_allowed'])
echo
' (', $txt['uot_visible'], ': ', ($context['num_users_online_today'] - $context['num_users_hidden_today']), ', ', $txt['uot_hidden'], ': ', $context['num_users_hidden_today'], ')';

// Assuming there ARE users online... each user in users_online has an id, username, name, group, href, and link.
if (!empty($context['users_online_today']) && $context['viewing_allowed'])
{
echo
'<br />', implode(', ', $context['list_users_online_today']);
}
echo '
</p>';

And you need to add some online.gif file to .../Themes/default/images/icons/
You can grab this image from my forum:



...or from any forum running SMF 1.x or 2.0.x, see it in Board index, section "Users online"
For example, that's default online.gif image, from this forum:



If you use another theme, you may need to perform these operations and for your current theme too.
« Last Edit: August 28, 2019, 12:15:35 AM by Hatshepsut »

Offline Dylert

  • Jr. Member
  • **
  • Posts: 266
  • Gender: Male
    • Hellasforum
Re: Users Online Today Mod
« Reply #1945 on: August 28, 2019, 04:35:13 PM »
Thank you, Hatshepsut!