TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

Members
  • Total Members: 3,970
  • Latest: bynw
Stats
  • Total Posts: 196,054
  • Total Topics: 21,337
  • Online today: 531
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 524
  • Total: 524

Online Users Today

Started by Cybertoad, November 01, 2005, 05:02:08 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

akulion

this is the simplest way to add users online today to any and all themes

Step 1: Install the mod - remember if you didnt install the mod adding codes wont help - so first install the mod to the default theme.

Step 2:

boardindex.template.php file is to simply look for this line:

// If they are logged in, but SP1 style information is off... show a personal message bar.

it occurs in all the themes --- just place the code above it





// Users online today
echo '
<tr>
<td class="titlebg" colspan="2">', $txt['uot_users_online_today_title'], '</td>
</tr><tr>
<td class="windowbg" width="20" valign="middle" align="center">
<img src="', $settings['images_url'], '/icons/online.gif" alt="', $txt[158], ' ', $txt['uot_users_online_today_title'], '" border="0" />
</td>
<td class="windowbg2" width="100%">';

echo '
<div class="smalltext">';

echo $context['num_users_online_today'], ' ', $context['num_users_online_today'] == 1 ? $txt['uot_user_online_today'] : $txt['uot_users_online_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']))
echo ':<br />', implode(', ', $context['list_users_online_today']);

echo '
<br />', $context['show_stats'] && !$settings['show_sp1_info'] ? '
<a href="' . $scripturl . '?action=stats">' . $txt['smf223'] . '</a>' : '', '
</div>
</td>
</tr>';




IF required then in /Themes/theme_name/Languages/Modifications.english.php right before the ?> place this code:



$txt['uot_users_online_today_title']='Users Seen Today';
$txt['uot_user_online_today']='user seen today';
$txt['uot_users_online_today']='users seen today';
$txt['uot_total_users_online_today']='Users Seen Today';
$txt['uot_yesterday']='Yesterday at ';


capitalpyro

Success! A big Thank you AKU. Your time spent on this matter is appreciated.  :up:

Troy

akulion

oh i didnt have to spend any time on it at all

here is a tip

Create a board for urself as Admin and hide it from ALL users

in there add all modification codes...so that way whenever u need them all u have to do is go there and have a look.

I have a whole collection lol

This website is proudly hosted on Crocweb Cloud Website Hosting.