Users Online Today - why do I have different totals in different places

Started by HighlanderICT, June 20, 2006, 11:27:44 AM

Previous topic - Next topic

HighlanderICT

I apologise in advance if this query has been asked and answered elsewhere, but after searching, I could not find anything that matched ..... This problem is not a 'show-stopper' on our site, but one of those little quirks that kind of irritates people .... The total number of users online on a particular day showing on our 'BoardIndex' differs from the same figure shown on the stats page .....

here is our stats page .....

As you can see it shows 15 users online now, 33 as the highest total for the day so far but 0 total online today ??? That in itself is strange but I know from observing this over a few days that the online today total WILL increase as the day goes on but never seems to match the total on the BoardIndex page which is shown below (and which we believe to be more accurate).

Here is our 'BoardIndex' page with the 'Users Online Today' mod added

As you can see, the online 'now' and most online today numbers are comparable, but the total users online today shows 100+ which is more in line with what we would expect.

I have looked at the BoardIndex.template.php file which is one of the files we have in our custom theme directory and the relevant piece of code to display this number seems to be as follows


// 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 $txt['uot_total'], ': <b>', $context['num_users_online_today'], '</b>';
  if (!$context['user']['is_guest'])
  echo ' (', $txt['uot_visible'], ': ', ($context['num_users_online_today'] - $context['num_hidden_users_online_today']), ', ', $txt['uot_hidden'], ': ', $context['num_hidden_users_online_today'], ')';


The displayed number seems to be generated by the $context['num_users_online_today'] entry ???


When I look at my Stats.template.php which is located in the default theme directory the number it displays seems to be generated by this code

<td nowrap="nowrap">', $txt['uot_total_users_online_today'], ':</td>
<td align="right">', $context['total_users_online_today'], '</td>';


with the displayed number being generated by the $context['total_users_online_today'] entry.


I have tried replacing the 'total_users_online_today' with 'num_users_online_today' but this just ends up with the page showing nothing for that stat at all .....

Does anyone know why this is happening and what I can do to fix it ?

What we are running:

  • Joomla 1.0.8
  • SMF 1.1 RC2
  • Joomla-SMF component v1.1.02
  • Custom Theme (our own design) which uses template files from the default directory with the exception of these ones -  BoardIndex, Display, Index, MessageIndex, Recent - and our own CSS file.

Installed packages are as follows:

  • SMF 1.0.7 / 1.1 RC2 Update v1.0
  • CAPTCHA (code verification) v0.1
  • Enchanced post template v1.0
  • Google Member Map v0.55
  • Custom Profile Field Mod v3.11
  • Users Online Today Mod v1.4.0 Beta 2
  • Search Topic v1.0
  • VisualWarning v1.3



www.CaleyThistleOnline.com [nofollow]
The Red and Blue are coming for You

HighlanderICT


www.CaleyThistleOnline.com [nofollow]
The Red and Blue are coming for You

Advertisement: