Simple Machines Community Forum

SMF Support => SMF 1.1.x Support => Aiheen aloitti: Fanta - helmikuu 14, 2005, 07:02:31 AP

Otsikko: Users Online Today [solved]
Kirjoitti: Fanta - helmikuu 14, 2005, 07:02:31 AP
What is the code I put into my Boardindex.template to get this in my Info. centre?

(I am not using the default theme so it doesn't automatically show)
Otsikko: Re: Users Online Today
Kirjoitti: Oldiesmann - helmikuu 14, 2005, 10:27:59 AP
http://mods.simplemachines.org/index.php?mod=33
Otsikko: Re: Users Online Today
Kirjoitti: Fanta - helmikuu 14, 2005, 10:37:40 AP
Lainaus käyttäjältä: Oldiesmann - helmikuu 14, 2005, 10:27:59 AP
http://mods.simplemachines.org/index.php?mod=33

I have the mod installed but it only shows on default theme so I need the code to make it show on my custom theme.
Otsikko: Re: Users Online Today
Kirjoitti: Oldiesmann - helmikuu 14, 2005, 10:43:17 AP
Sorry... Didn't realize that.

Lainaa<edit file>
Themes/default/BoardIndex.template.php
</edit file>

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

<replace>
   // "Users online Today"
   echo '
   <tr>
      <td class="catbg" colspan="2">', $txt['158bis'], ' ( ', $context['num_users_today'], ' ', $context['num_users_today'] == 1 ? $txt['user'] : $txt['users'], ' )</td>
   </tr><tr>
      <td class="windowbg" width="20" valign="middle" align="center"><img src="', $settings['images_url'], '/icons/online.gif" alt="', $txt['158bis'], '" border="0" /></td>
      <td class="windowbg2" width="100%"><span class="smalltext">', $context['user_today'], '</span></td>
   </tr>';

   // If they are logged in, but SP1 style information is off... show a personal message bar.
</replace>
Otsikko: Re: Users Online Today
Kirjoitti: Fanta - helmikuu 14, 2005, 10:53:40 AP
Cheers!