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,061
  • Total Topics: 21,338
  • Online today: 234
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 1
  • Guests: 135
  • Total: 136
  • lurkalot

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.

crappyday

I give up on all this, I have an admin that really wants this mod and I have to admit I do as well and I've found so many different ideas that DON'T work and fingers pointing in a million directions.  I think I'm leaning toward not even using a theme anymore because SMF doesn't make this easy at all and as happy as I am with the TP I can't justify it with the the theme and not being able to easily mod them.

bloc

If you simply use a theme that DO NOT use its own BoardIndex.template, the mod will show up. If it does have its own, you can either 1) delete the BoardInde.template from there or 2) apply the modding code already in default theme.

Anytime a theme do not supply a specific template, the default theme is used  and that of course is fully modded by your installed mods.

crappyday

I'm sorry for sounding a bit harsh in my earlier statement and your post helped clear up a few things I guess.  I'm currently using amber but with 1.0.6 and my head admin is after me to install a new board with new functions asap and I'm a bit over my head and I don't have a problem admitting that.

If I were to just delete the BoardIndex.template, won't that affect the overall theme I've chosen?  I also don't want my users to have the option of choosing themes, I want them to use the one that everyone else sees so that it's more seamless and I know that they see what I see.

I'm going to try to find someone to help me with this new board because of many reasons, the biggest reason is my lack of database knowlege.  I appreciate your time and your explanation. :)

Al

capitalpyro

Quote from: crappyday on April 23, 2006, 09:13:43 AM
I give up on all this, I have an admin that really wants this mod and I have to admit I do as well and I've found so many different ideas that DON'T work and fingers pointing in a million directions.  I think I'm leaning toward not even using a theme anymore because SMF doesn't make this easy at all and as happy as I am with the TP I can't justify it with the the theme and not being able to easily mod them.

I understand your frustrations Al. I am also very happy with TP using helios theme but find it very discouraging when I am not able to add simply mods because I lack the experience and knowledge to modify databases on my own. I have read and read everything I can find related to adding the Users Online Today mod to my current setup without any success. "Fingers pointing in a million directions" as you put it is exactly what I have found as well. I had this mod working on my site before I updated to 1.1RC2 and TP and I found it very usefull. I sure wish I could get it back without doing away with TP.

I did find an example of a website using the exact same versions of smf (1.1RC2 with TP and Helios TP) that I use and it has a working Users Online Today but a request to the person advertising this site has not replied to my questions. Here is the site  http://www.wheelingadventures.com/Forum/index.php?action=forum

If anyone could give me exact instructions on how to add this mod to produce a working version similar to the one at wheelingadventures, I would greatly appreciate their efforts.

Thanks,
Troy

SMF 1.1RC2
Helios / TinyPortal v0.8.6


stormlrd



echo '
<tr>
<td class="catbg" colspan="2" style="padding-left: 20px;">', $txt['158bis'], ' ( ', $context['num_users_today'], ' ', $context['num_users_today'] == 1 ? $txt['user'] : $txt['users'], ' )</td>
</tr><tr>
<td class="windowbg" width="35" 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>';
// Show the login bar. (it's only true if they are logged out anyway.)




but im running 1.0.7 and 0.75 TP and dont remember what other files are edited without going back and looking at the actual package. but I place the block right above the 

//show the login bar

on the boardindex.template.php page right after users online

WebMasterZ

#15
Quote from: capitalpyro on April 24, 2006, 03:48:42 AM
Quote from: crappyday on April 23, 2006, 09:13:43 AM
I give up on all this, I have an admin that really wants this mod and I have to admit I do as well and I've found so many different ideas that DON'T work and fingers pointing in a million directions.  I think I'm leaning toward not even using a theme anymore because SMF doesn't make this easy at all and as happy as I am with the TP I can't justify it with the the theme and not being able to easily mod them.

I understand your frustrations Al. I am also very happy with TP using helios theme but find it very discouraging when I am not able to add simply mods because I lack the experience and knowledge to modify databases on my own. I have read and read everything I can find related to adding the Users Online Today mod to my current setup without any success. "Fingers pointing in a million directions" as you put it is exactly what I have found as well. I had this mod working on my site before I updated to 1.1RC2 and TP and I found it very usefull. I sure wish I could get it back without doing away with TP.

I did find an example of a website using the exact same versions of smf (1.1RC2 with TP and Helios TP) that I use and it has a working Users Online Today but a request to the person advertising this site has not replied to my questions. Here is the site  http://www.wheelingadventures.com/Forum/index.php?action=forum

If anyone could give me exact instructions on how to add this mod to produce a working version similar to the one at wheelingadventures, I would greatly appreciate their efforts.

Thanks,
Troy

SMF 1.1RC2
Helios / TinyPortal v0.8.6



I have RC2 & 0.8.6 working with Helios let me know if you need a hand

Open Themes/helios TP RC2 Folder/ boardindex.template
find around line 448 

                        </span>


                </td>
        </tr>';


And paste after

    // Users online today
preg_match('/<b>([^<]+)<\/b>/', $txt['smf10'], $matches);
$todaytxt = ($matches[1] != '' ? $matches[1] : 'Today');
echo '
<tr>
<td class="catbg" colspan="2">', $txt[158], ' ', $todaytxt, '</td>
</tr><tr>
<td class="windowbg" width="20" valign="middle" align="center">
<img src="', $settings['images_url'], '/icons/online.gif" alt="', $txt[158], ' ', $todaytxt, '" border="0" />
</td>
<td class="windowbg2" width="100%">';

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

echo $context['num_users_online_today'], ' ', $context['num_users_online_today'] == 1 ? strtolower($txt['user']) : strtolower($txt['users']);

// 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 '
', 'online today', ':<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>';


capitalpyro

Beemer,
  Thank you for the straight forward directions without all the unneccasary, confusing information. I did exactly what you said and the mod now appears to work perfectly. Thanks again, I appreciate your help.  :up:

Troy   

WebMasterZ

Quote from: capitalpyro on April 24, 2006, 01:10:58 PM
Beemer,
  Thank you for the straight forward directions without all the unneccasary, confusing information. I did exactly what you said and the mod now appears to work perfectly. Thanks again, I appreciate your help.  :up:

Troy   

Troy your welcome glad to be of assistance  ;)

bloc

Glad it worked out.

I like to add that this is something of a problem for theme designers. On one hand they want to change many templates to create a truly new and impressive theme - on the other hand: most mods will simply not work with them then. And since the amount of popular mods are increasing sky-high, its impossible to support all of them in the theme.

So until SMF can apply mods to more themes than just default, it will be a fiddling-with-code game for sure. And even on that day: if the template is just slightly changed from default the mod will fail - which will make it just as hard.

capitalpyro

Hello,
  I recently changed my theme to Leviathan TP. Everything seems to be working just fine. When I try to modify the boardindex template in order to get the "User Online Today" feature to work - Nothing happens. I have used the instructions in this topic many times to add this mod to other TP themes in the past and have never had any problems. I followed the instructions exactly as written again this time but nothing.

I recently updated from v0.8.6 to 0.9.5.   

Any straight forward help or suggestions would be appreciated.

Thanks,
Troy




SMF 1.1 RC2 |
TinyPortal v0.9.5 ÂÃ,© Bloc
Leviathan design by Bloc

This website is proudly hosted on Crocweb Cloud Website Hosting.