Users Online Today Mod

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

Previous topic - Next topic

top_secret

thanks BRO!!

works GREAT!!!


Regards  8)

DemonicInfluence


WarBirD

Maybe a n00b question, but how can I use it for an other Theme than just the default ?

Wolfseye

WarBirD

#283
Quote from: beemer on April 04, 2006, 06:30:34 PM
You dont want to put it there

find

                        Most users online today: '.$modSettings['mostOnlineToday'].'       
                        Most users online ever: <b>'.$modSettings['mostOnline'].'</b> ( '.timeformat($modSettings['mostDate']).'  )

                        </span>


                </td>
        </tr>';


And replace everything below with

// Users online today
echo '
<tr>
<td class="catbg" 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 they are logged in, but SP1 style information is off... show a personal message bar.
if ($context['user']['is_logged'] && !$settings['show_sp1_info'])
{
echo '
<tr>
<td class="catbg" colspan="2">', $txt[159], '</td>
</tr><tr>
<td class="windowbg" width="20" valign="middle" align="center">
', $context['allow_pm'] ? '<a href="' . $scripturl . '?action=pm">' : '', '<img src="', $settings['images_url'], '/message_sm.gif" alt="', $txt[159], '" border="0" />', $context['allow_pm'] ? '</a>' : '', '
</td>
<td class="windowbg2" valign="top">
<b><a href="', $scripturl, '?action=pm">', $txt[159], '</a></b>
<div class="smalltext">
', $txt[660], ' ', $context['user']['messages'], ' ', $context['user']['messages'] == 1 ? $txt[471] : $txt[153], '.... ', $txt[661], ' <a href="', $scripturl, '?action=pm">', $txt[662], '</a> ', $txt[663], '
</div>
</td>
</tr>';
}

// Show the login bar. (it's only true if they are logged out anyway.)
if ($context['show_login_bar'])
{
echo '
<tr>
<td class="catbg" colspan="2">', $txt[34], ' <a href="', $scripturl, '?action=reminder" class="smalltext">(' . $txt[315] . ')</a></td>
</tr>
<tr>
<td class="windowbg" width="20" align="center">
<a href="', $scripturl, '?action=login">
<img src="', $settings['images_url'], '/icons/login.gif" alt="', $txt[34], '" border="0" /></a>
</td>
<td class="windowbg2" valign="middle">
<form action="', $scripturl, '?action=login2" method="post" style="margin: 0;">
<table border="0" cellpadding="2" cellspacing="0" width="100%"><tr>
<td valign="middle" align="left">
<label for="user"><b>', $txt[35], ':</b><br /><input type="text" name="user" id="user" size="15" /></label>
</td>
<td valign="middle" align="left">
<label for="passwrd"><b>', $txt[36], ':</b><br /><input type="password" name="passwrd" id="passwrd" size="15" /></label>
</td>
<td valign="middle" align="left">
<label for="cookielength"><b>', $txt[497], ':</b><br /><input type="text" name="cookielength" id="cookielength" size="4" maxlength="4" value="', $modSettings['cookieTime'], '" /></label>
</td>
<td valign="middle" align="left">
<label for="cookieneverexp"><b>', $txt[508], ':</b><br /><input type="checkbox" name="cookieneverexp" id="cookieneverexp" checked="checked" class="check" /></label>
</td>
<td valign="middle" align="left">
<input type="submit" value="', $txt[34], '" />
</td>
</tr></table>
</form>
</td>
</tr>';
}


        echo '
</table></div>';
echo $botbox.'</div>';

}

?>


Ok, never mind, could change it with the Info in this Post in the Theme I wanted most and it works, but for the Blue Jeans Theme, I can´t find those lines, is it different in this Theme ?

Mfg

Wolfseye

perplexed

Quote from: kcs on April 21, 2006, 12:26:11 AM
hi,
agree with you on the "bottom" stats portion, but for the "top" portion, there's also a "Users seen today" value... and this value doesnt tally with the users seen on the main index page....

any idea what went wrong?

another query is that, how can i go about "adding" the MOST Seen online Users" on the bottom portion of the stats?

thanks!


Quote from: perplexed on April 20, 2006, 08:13:45 AM
I could be wrong but I thought that this mod shows the number of members online in a 24hour period, whereas your most users online is most members online at the one time?

So you could have 35 people online in a 24 hour period but only 10 of them on at the same time, so the most online would be 10 not 35

If that's wrong, someone let me know, but that was my understanding :)


Quote from: kcs on April 18, 2006, 10:14:37 PM
hi all,
i noticed that my MOST USERS stats is not updated... even after i "RECOUNT" under Forum maintenance...

any idea what went wrong?

thanks!




hmmm I see what you mean, that would be good.

iv_nik

Just read the whole topic and still have 2 questions:

Is it (or would it be) a possibility to modify initial period of time today logged users are shown in?
I mean what should I do, if I want have only last 12-hours logged in users, not 24h.

The 2nd question is how to hide usernames and left only total number of visitors.

Juggler

A bit confused here as I recently had to shift some files round to re-install a couple of mods and when I re-loaded this one I get an odd display (See description below). Any thoughts on what's gone wrong? (Just to note this is in all themes not just the default so I assume the problem is with either the boardindex or boardindex.template file).

There's no Users Online Today Header and this is the only info displayed so it looks like it's missing something!

: 13 (: 13, : 0)
Juggler, Muttley, Twinky, Tycho, bloodfalls, Getafix, Claud the crab, Nodders, whiteknuckle, OuzoIrene, Hong Kong Fooey, Ace, fwitt
The Blue Buzzards
Flying Scooter Display Team
#69 Squadron
www.bluebuzzards.com

Vinspire^

I am using SMF 1.1 RC 2 and i've installed Online Today Version 1.4.0 Beta 2.

From what i read, I need to modify BoardIndex.template.php to get it working in Helios Theme. Is the below code is the complete codes i need to edit ?

Quote from: beemer on April 04, 2006, 06:30:34 PM
You dont want to put it there

find

                        Most users online today: '.$modSettings['mostOnlineToday'].' &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                        Most users online ever: <b>'.$modSettings['mostOnline'].'</b> ( '.timeformat($modSettings['mostDate']).'  )

                        </span>


                </td>
        </tr>';


And replace everything below with

// Users online today
echo '
<tr>
<td class="catbg" 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 they are logged in, but SP1 style information is off... show a personal message bar.
if ($context['user']['is_logged'] && !$settings['show_sp1_info'])
{
echo '
<tr>
<td class="catbg" colspan="2">', $txt[159], '</td>
</tr><tr>
<td class="windowbg" width="20" valign="middle" align="center">
', $context['allow_pm'] ? '<a href="' . $scripturl . '?action=pm">' : '', '<img src="', $settings['images_url'], '/message_sm.gif" alt="', $txt[159], '" border="0" />', $context['allow_pm'] ? '</a>' : '', '
</td>
<td class="windowbg2" valign="top">
<b><a href="', $scripturl, '?action=pm">', $txt[159], '</a></b>
<div class="smalltext">
', $txt[660], ' ', $context['user']['messages'], ' ', $context['user']['messages'] == 1 ? $txt[471] : $txt[153], '.... ', $txt[661], ' <a href="', $scripturl, '?action=pm">', $txt[662], '</a> ', $txt[663], '
</div>
</td>
</tr>';
}

// Show the login bar. (it's only true if they are logged out anyway.)
if ($context['show_login_bar'])
{
echo '
<tr>
<td class="catbg" colspan="2">', $txt[34], ' <a href="', $scripturl, '?action=reminder" class="smalltext">(' . $txt[315] . ')</a></td>
</tr>
<tr>
<td class="windowbg" width="20" align="center">
<a href="', $scripturl, '?action=login">
<img src="', $settings['images_url'], '/icons/login.gif" alt="', $txt[34], '" border="0" /></a>
</td>
<td class="windowbg2" valign="middle">
<form action="', $scripturl, '?action=login2" method="post" style="margin: 0;">
<table border="0" cellpadding="2" cellspacing="0" width="100%"><tr>
<td valign="middle" align="left">
<label for="user"><b>', $txt[35], ':</b><br /><input type="text" name="user" id="user" size="15" /></label>
</td>
<td valign="middle" align="left">
<label for="passwrd"><b>', $txt[36], ':</b><br /><input type="password" name="passwrd" id="passwrd" size="15" /></label>
</td>
<td valign="middle" align="left">
<label for="cookielength"><b>', $txt[497], ':</b><br /><input type="text" name="cookielength" id="cookielength" size="4" maxlength="4" value="', $modSettings['cookieTime'], '" /></label>
</td>
<td valign="middle" align="left">
<label for="cookieneverexp"><b>', $txt[508], ':</b><br /><input type="checkbox" name="cookieneverexp" id="cookieneverexp" checked="checked" class="check" /></label>
</td>
<td valign="middle" align="left">
<input type="submit" value="', $txt[34], '" />
</td>
</tr></table>
</form>
</td>
</tr>';
}


        echo '
</table></div>';
echo $botbox.'</div>';

}

?>


Vinspire^

Followed beemer instruction and manage to get the function working but i dont think it is the latest version of this mod. I did read the "Users_Online_Today_Mod" file and follow the instruction but after a few trial. I still couldn't get it working.

Below is the printscreen of what i've got after follow beemer instruction.


Juggler



Well it's more than what I have and this is on a clean install! Something hasn't gone into the file but I can't find what's missing.
The Blue Buzzards
Flying Scooter Display Team
#69 Squadron
www.bluebuzzards.com

Vinspire^

Juggler, which version of the Users Online Today Mod did you install ?

Juggler

The Blue Buzzards
Flying Scooter Display Team
#69 Squadron
www.bluebuzzards.com

WarBirD

In this Theme, called MERCURY, I can´t find any of this whats to replace. All that stuff is just not in there in the BoardIndex.Template.php.

What now ?

Vinspire^

Quote from: WarBirD on May 05, 2006, 06:37:59 AM
In this Theme, called MERCURY, I can´t find any of this whats to replace. All that stuff is just not in there in the BoardIndex.Template.php.

What now ?

The source code in different theme is different if i am not mistaken. I manage to get it working perfectly on my default theme & Themis but as for Helios Theme below is the result.



Did make a backup for my BoardIndex.Template but wrongly replace it already. So, i've no more backup file for my original Helios BoardIndex.Template :(

WarBirD

Well, so I don´t think I will get it to work in the MERCURY Theme, when its so different. I am not so a php / html freak, i got some things to work, but not when I can´t find any hint how to do it. In this case, it seems, i reached one of those points. :(

Vinspire^

#295
This is the screenshot of the edit i made in default theme & themis theme





As for Helios one i can't get it working by following the file instruction but manage to get it working by following beemer instruction but i guess the instruction is an earlier version coz there is no

- Total
- ( Visible , Hidden )

So, anyone here know how to fix this ?

L.G.S

Hey Vinspire, is there any chance you could should me the part where you added the whos online code under please?
FREE and LIVE World Cup + Premier League football streams:

www.gamesandgoals.com


Vinspire^

Quote from: L.G.S on May 05, 2006, 11:12:32 AM
Hey Vinspire, is there any chance you could should me the part where you added the whos online code under please?

Modify BoardIndex.template.php and follow the instruction below

Quote from: beemer on April 04, 2006, 06:30:34 PM
You dont want to put it there

find

                        Most users online today: '.$modSettings['mostOnlineToday'].' &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                        Most users online ever: <b>'.$modSettings['mostOnline'].'</b> ( '.timeformat($modSettings['mostDate']).'  )

                        </span>


                </td>
        </tr>';


And replace everything below with

// Users online today
echo '
<tr>
<td class="catbg" 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 they are logged in, but SP1 style information is off... show a personal message bar.
if ($context['user']['is_logged'] && !$settings['show_sp1_info'])
{
echo '
<tr>
<td class="catbg" colspan="2">', $txt[159], '</td>
</tr><tr>
<td class="windowbg" width="20" valign="middle" align="center">
', $context['allow_pm'] ? '<a href="' . $scripturl . '?action=pm">' : '', '<img src="', $settings['images_url'], '/message_sm.gif" alt="', $txt[159], '" border="0" />', $context['allow_pm'] ? '</a>' : '', '
</td>
<td class="windowbg2" valign="top">
<b><a href="', $scripturl, '?action=pm">', $txt[159], '</a></b>
<div class="smalltext">
', $txt[660], ' ', $context['user']['messages'], ' ', $context['user']['messages'] == 1 ? $txt[471] : $txt[153], '.... ', $txt[661], ' <a href="', $scripturl, '?action=pm">', $txt[662], '</a> ', $txt[663], '
</div>
</td>
</tr>';
}

// Show the login bar. (it's only true if they are logged out anyway.)
if ($context['show_login_bar'])
{
echo '
<tr>
<td class="catbg" colspan="2">', $txt[34], ' <a href="', $scripturl, '?action=reminder" class="smalltext">(' . $txt[315] . ')</a></td>
</tr>
<tr>
<td class="windowbg" width="20" align="center">
<a href="', $scripturl, '?action=login">
<img src="', $settings['images_url'], '/icons/login.gif" alt="', $txt[34], '" border="0" /></a>
</td>
<td class="windowbg2" valign="middle">
<form action="', $scripturl, '?action=login2" method="post" style="margin: 0;">
<table border="0" cellpadding="2" cellspacing="0" width="100%"><tr>
<td valign="middle" align="left">
<label for="user"><b>', $txt[35], ':</b><br /><input type="text" name="user" id="user" size="15" /></label>
</td>
<td valign="middle" align="left">
<label for="passwrd"><b>', $txt[36], ':</b><br /><input type="password" name="passwrd" id="passwrd" size="15" /></label>
</td>
<td valign="middle" align="left">
<label for="cookielength"><b>', $txt[497], ':</b><br /><input type="text" name="cookielength" id="cookielength" size="4" maxlength="4" value="', $modSettings['cookieTime'], '" /></label>
</td>
<td valign="middle" align="left">
<label for="cookieneverexp"><b>', $txt[508], ':</b><br /><input type="checkbox" name="cookieneverexp" id="cookieneverexp" checked="checked" class="check" /></label>
</td>
<td valign="middle" align="left">
<input type="submit" value="', $txt[34], '" />
</td>
</tr></table>
</form>
</td>
</tr>';
}


        echo '
</table></div>';
echo $botbox.'</div>';

}

?>


L.G.S

#298
Damn nevermind, I do not have that code.

I got this error

314: // Users online today
315:    echo '

THIS LINE WRONG >>316:    <tr>

317:       <td class="catbg" colspan="2">', $txt['uot_users_online_today_title'], '</td>
318:    </tr><tr>
319:       <td class="windowbg" width="20" valign="middle" align="center">
FREE and LIVE World Cup + Premier League football streams:

www.gamesandgoals.com


Vinspire^


Advertisement: