News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Custom Who.template.php - separated list for users, guests and spiders

Started by Owdy, November 03, 2004, 01:15:56 PM

Previous topic - Next topic

chep

One more thing. Since I have the googlebots and spiders mod I also add this code into sources/subs.php
           array (
            'agent' => 'MSRBOT',
            'spidername' => 'MSRBOT',
        ), 

nax

We are on ver 1.1.3 and I've uses the code posted in the second version of Who.template.php in this thread, this all works fine except it takes ages to run, often times out and is almost impossible for dial up users to use - any ideas?
I'm getting too old for this!

Jade Elizabeth

on my page, the text is missing a space

Crazy People Online       1 Guest, 3 Users2 Groupies

should look like this;

Crazy People Online       1 Guest, 3 Users and 2 Groupies
(groupies=buddies, and it was messed up like that before i changed the text)

http://www.imgfree.net/images/1636.jpg

i think this is the right topic lol
Once proud Documentation Writer and Help Squad Leader | Check out my new adult coloring career: Color With Jade/Patreon.

Kindred

This is not the right topic. This topic is specifically for discussion on a modified who.template.php that separates users, guests and spiders... not that displays a count.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Jade Elizabeth

well what on earth was i looking for :S?
doesnt this mod modify the users online to have guests users and spiders?

cause i have just changed the text references thats it. so buddies is groupies, and users online is crazy people online...lol
Once proud Documentation Writer and Help Squad Leader | Check out my new adult coloring career: Color With Jade/Patreon.

Kindred

what does the buddies and text strings have to do with separating the who's online list display?
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Jade Elizabeth

:| ....the way its split, from guests and users and spiders and buddies....

it says "4 users2 buddies"
instead of "4 users 2 buddies"
or "4 users, 2 buddies"
or "4 users (2 buddies)"


i want some space in it lol
Once proud Documentation Writer and Help Squad Leader | Check out my new adult coloring career: Color With Jade/Patreon.

chep

Alundra, I could be wrong but I think the mod which does that is called Googlebot and Spiders

Jade Elizabeth

Once proud Documentation Writer and Help Squad Leader | Check out my new adult coloring career: Color With Jade/Patreon.

Tidea

I'm getting a lot of undefined parameters with this who file.  Any help?

8: Undefined index: who_action
File: /home/findmysa/public_html/project-tideas.com/forum/Themes/scribbles2_112/Who.template.php (main sub template - eval?)
Line: 119

Bigguy

What mods do you have installed. Maybe it is due to one of them not playing nice with this template. Just something to check. :)

Jade Elizabeth

just this and the google bot and spiders...they were it. it was like that upon instillation, no other mods edited that file
Once proud Documentation Writer and Help Squad Leader | Check out my new adult coloring career: Color With Jade/Patreon.

Bigguy


Jade Elizabeth

Once proud Documentation Writer and Help Squad Leader | Check out my new adult coloring career: Color With Jade/Patreon.

Bigguy

Put it in your custom theme folder and clear your error logs and see what happens.

Jade Elizabeth

nope.

no change still "0 Strangers, 3 Users2 Groupies" instead of "0 Strangers, 3 Users 2 Groupies"

it was still like that BEFORE i changed the text for guests and buddies
Once proud Documentation Writer and Help Squad Leader | Check out my new adult coloring career: Color With Jade/Patreon.

chep

Quote from: Alundra on October 24, 2007, 05:37:04 PM
on my page, the text is missing a space

Crazy People Online       1 Guest, 3 Users2 Groupies

should look like this;

Crazy People Online       1 Guest, 3 Users and 2 Groupies
(groupies=buddies, and it was messed up like that before i changed the text)

http://www.imgfree.net/images/1636.jpg

i think this is the right topic lol


You need to update BoardIndex.template.php which is not who.template.php but is a part of the googlebot and spiders mod.


Jade Elizabeth

// "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%">';

echo '
', $context['show_who'] ? '<a href="' . $scripturl . '?action=who">' : '', (empty($context['spiders']) ? '' : $context['num_spiders'] . ' ' . ($context['num_spiders'] == 1 ? $txt['ob_googlebot_spider'] : $txt['ob_googlebot_spiders']) . ', '), $context['num_guests'], ' ', $context['num_guests'] == 1 ? $txt['guest'] : $txt['guests'], ', ' . $context['num_users_online'], ' ', $context['num_users_online'] == 1 ? $txt['user'] : $txt['users'];

// Handle hidden users and buddies.
if (!empty($context['num_users_hidden']) || ($context['show_buddies'] && !empty($context['show_buddies'])))
{

// Show the number of buddies online?
if ($context['show_buddies'])
echo $context['num_buddies'], ' ', $context['num_buddies'] == 1 ? $txt['buddy'] : $txt['buddies'];

}

echo $context['show_who'] ? '</a>' : '', '
<div class="smalltext">';

// Assuming there ARE users online... each user in users_online has an id, username, name, group, href, and link.
if (!empty($context['users_online']))
echo '
', $txt[140], ':<br />', implode(', ', $context['list_users_online']);

if (!empty($context['spiders']))
{
if ($modSettings['ob_googlebot_display_own_list'])
echo '
<br />
', $txt['ob_googlebot_spiders_last_active'], ':<br />';
else
{
if (empty($context['users_online']))
echo '
', $txt[140], ':<br />';
else
echo ', ';
}

echo implode(', ', $context['spiders']);
}

echo '
<br />
', $context['show_stats'] && !$settings['show_sp1_info'] ? '<a href="' . $scripturl . '?action=stats">' . $txt['smf223'] . '</a>' : '', '
</div>
</td>
</tr>
<tr>
<td class="windowbg2" width="100%">
<span class="middletext">
', $txt['most_online_today'], ': <b>', $modSettings['mostOnlineToday'], '</b>.
', $txt['most_online_ever'], ': ', $modSettings['mostOnline'], ' (' , timeformat($modSettings['mostDate']), ')
</span>
</td>
</tr>';


dunno what to fix...i appreciate you helping though :)
Once proud Documentation Writer and Help Squad Leader | Check out my new adult coloring career: Color With Jade/Patreon.


Jade Elizabeth

yup :) it was doing it before i changed buddy to groupie just so you know
Once proud Documentation Writer and Help Squad Leader | Check out my new adult coloring career: Color With Jade/Patreon.

Advertisement: