News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

Users Online Today Mod

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

Previous topic - Next topic

DemonicInfluence

Umm... In the install.xml there is a section for boardindex.template.php... Then just do the edits..

L.G.S

Hey, I'm trying to add this mod to Dilber MC theme, but I'm having this problem.

<file name="$themedir/BoardIndex.template.php">
<operation>
<search position="replace"><![CDATA[
<td class="windowbg2">
<b><a href="', $board['href'], '" name="b', $board['id'], '">', $board['name'], '</a></b><br />
]]></search>
<add><![CDATA[
<td class="windowbg2"', $board['is_redirect'] && $modSettings['redirect_hide_columns'] ? ' colspan="2"' : '' , '>
<b><a href="', $board['href'], '" name="b', $board['id'], '"', ($board['is_redirect'] && $board['redirect_target'] != '') ? ' target="' . $board['redirect_target'] . '"' : '' , '>', $board['name'], '</a></b><br />
]]></add>


Except I have a problem..

This is the code in Dilber MC:

<td class="windowbg2" style="padding-top:12px; padding-bottom:12px;">

So what would I need to do to change this part so it works without template errors?
FREE and LIVE World Cup + Premier League football streams:

www.gamesandgoals.com


DemonicInfluence

no. Just add the part below.

AbsolutelyFreeWeb

So there are two versions:

1.3.1 that shows online users to guests
1.4.0 beta that does not

but both work on 1.1 rc2 ?
:hearts:
I use finexe web for
domain registration and hosting.

Bigguy

Yes thats correct. I don`t think I would use the beta on a live site though.

L.G.S

Oops sorry I posted my problem in the wrong forum
FREE and LIVE World Cup + Premier League football streams:

www.gamesandgoals.com


Carceri

The beta version was meant to test out new features, and hence it should not be used for production systems. However, lack of time on my side has meant that I have not added new features to it in a long time, only fixed bugs as they appeared. This means that the current beta is actually the most bug-free version of this mod so far :)

PacificWx

I was told to post here with my query:

SMF Version: SMF 1.1 RC2
Not really causing any problems - just showing up a lot in my error log.

Undefined index: uot_users_online_today_title
File: /home/pacificw/public_html/forum/Themes/default/BoardIndex.template.php (eval?)
Line: 484

Any particular fix to this?

SpyDie

That would be caused by whatever user created that error, whatever theme he is using doesn't have the following strings in Modifications.english.php:

Quote// Users Online Today Mod
$txt['uot_users_online_today_title']='Users Logged In Today';
$txt['uot_total_users_online_today']='Users Logged In Today';
$txt['uot_yesterday']='Yesterday at ';
$txt['uot_total']='Total';
$txt['uot_visible']='Visible';
$txt['uot_hidden']='Hidden';

Make sure in each of your themes you have this in the Themes/*themename*/languages/Modifications.english.php file.
Beta. Software undergoes beta testing shortly before it's released. Beta is Latin for 'still doesn't work.'

PacificWx

#409
ok, I will look at that - thank you :)

Edited to add - fixed it up good and proper - thanks for that!

fiver

#410
Hi Carceri,

1. The alt="Users Online Users Logged In Today" is still there when installed with 1.40beta2.
<img src="', $settings['images_url'], '/icons/online.gif" alt="', $txt[158], ' ', $txt['uot_users_online_today_title'], '" border="0" />

I've changed mine to alt="Users Logged In Today"
<img src="', $settings['images_url'], '/icons/online.gif" alt="', $txt['uot_users_online_today_title'], '" border="0" />

2. Since the Title and the Alt are using the same words "Users Logged In Today", there is no need to have 2 variables in Modifications.english.php
$txt['uot_users_online_today_title']='Users Logged In Today';
$txt['uot_total_users_online_today']='Users Logged In Today';


Maybe a $txt['uot_ulit'] will do?
$txt['uot_ulit']='Users Logged In Today';

SMF does it that way too for "Users Online", by using the same variable $txt[158] for Title and Alt.
// "Users online" - in order of activity.
echo '
<tr>
<td class="titlebg" colspan="2">', $txt[158], '</td>
</tr><tr>
<td rowspan="2" class="windowbg" width="20" valign="middle" align="center">
', $context['show_who'] ? '<a href="' . $scripturl . '?action=who">' : '', '<img src="', $settings['images_url'], '/icons/online.gif" alt="', $txt[158], '" />', $context['show_who'] ? '</a>' : '', '
</td>
<td class="windowbg2" width="100%">';


;)

BMRMorph

*gruml*
seems that i'm some kind of stupid...
i c<nt get it to work with the babylon theme. i did a few code changes to support german
language and in default it works but in babylon...
so this is a request to Carceri:
maybe you could include the required changes to the babylon script in your next release?
(it seems a good idea in two ways for me 1. it solves my problem *g* 2. the babylon theme
is also like the default theme shiped with the smf download :) )

Carceri

Quote from: fivearts on July 21, 2006, 03:59:24 AM
1. The alt="Users Online Users Logged In Today" is still there when installed with 1.40beta2.

2. Since the Title and the Alt are using the same words "Users Logged In Today", there is no need to have 2 variables in Modifications.english.php

Yes, I know these two. I thought I fixed them ages ago, but apparently I only did it for the version here on my harddisk :)

Carceri

Quote from: BMRMorph on July 21, 2006, 12:01:43 PM
maybe you could include the required changes to the babylon script in your next release?

For the time being, I only make the required changes for the default theme, sorry. It's simply due to lack of time.

xxx

Is there a version who works with 1.0.7 ???
http://www.xxxforum.be: 18+ forum!!!

BMRMorph

Quote from: Carceri on July 21, 2006, 04:01:18 PM
For the time being, I only make the required changes for the default theme, sorry. It's simply due to lack of time.
Mhh, i can understand that, in some cases nothing other than me *g*
but in that case could someone post which changes exactly have to made to the babylon theme.
I know, there are some sugestions which should work to all themes
I paste that code above the "// If they are logged in, but SP1..." line but that does just an output like in that post (and below).

BeoR

Is there a way to make it work at the "statistics center" instead of at the board index? I can't seem to make it "list" the users who logged in for the day.

http://www.istorya.net/forums/index.php?action=stats - I placed it just above the "Forum History"

Carceri

Quote from: BeoR on July 24, 2006, 03:54:45 PM
Is there a way to make it work at the "statistics center" instead of at the board index? I can't seem to make it "list" the users who logged in for the day.

That's because that list is only built in BoardIndex.php whereas Stats.php is loaded for the stats center. Stats.php only counts the total number of users logged in that day and does not build the list.

If you want to change this, take a look at the changes made in BoardIndex.php and apply them to Stats.php also.

BeoR

I did everything the mod does to BoardIndex.php to stats.template.php. It already displays the static texts but it doesn't display the dynamic data.

Joshsux

can anybody please explain what code i need to find and where i need to put it in my custom theme file? i'm lost and i keep getting board errors because im doing it wrong please help me do it
If you can't hear it before you see it, then it ain't a harley

Advertisement: