Simple Machines Community Forum

Customizing SMF => SMF Coding Discussion => Topic started by: Ben_S on November 03, 2004, 01:19:53 PM

Title: [SPLIT] about custom who.template.php
Post by: Ben_S on November 03, 2004, 01:19:53 PM
Only shows one page so no good if you have more than 50 online.
Title: [SPLIT] about custom who.template.php
Post by: Owdy on November 03, 2004, 01:32:45 PM
Fixed
Title: [SPLIT] about custom who.template.php
Post by: Ben_S on November 03, 2004, 01:50:36 PM
:).

Might use it myself :).
Title: [SPLIT] about custom who.template.php
Post by: Oldiesmann on November 03, 2004, 02:12:28 PM
Speaking of UserAgents...

http://www.garykeith.com/browsers/downloads.asp - ZIP file containing 28,592 user agent strings (ok, a ZIP file with a text file containing 28,592 user agent strings).
Title: [SPLIT] about custom who.template.php
Post by: Owdy on November 03, 2004, 02:13:58 PM
If you really need 28,592 user agents, you can ad them :D
Title: [SPLIT] about custom who.template.php
Post by: Oldiesmann on November 03, 2004, 03:34:55 PM
I'm not saying that he should add them all to that list. I was just pointing out that if anyone wanted a good list of user agents they could get them there.
Title: [SPLIT] about custom who.template.php
Post by: [Unknown] on November 03, 2004, 07:33:58 PM
Some of them are just variants; for example, my IE has my .NET CLR version number... which could be one of several numbers.  It could also have multiple CLR numbers, or just one.

And then, there's at least four for every day of the year; nightly builds of Mozilla browsers.

-[Unknown]
Title: [SPLIT] about custom who.template.php
Post by: Oldiesmann on November 04, 2004, 11:45:36 AM
I know.
Title: [SPLIT] about custom who.template.php
Post by: edi67 on November 15, 2004, 02:50:32 AM
excellent work owdy thx

sorry one question when appear ? ? ? what means?
Title: [SPLIT] about custom who.template.php
Post by: Owdy on November 15, 2004, 11:59:54 AM
Unknown browser
Title: [SPLIT] about custom who.template.php
Post by: JRSofty on February 09, 2005, 01:59:23 AM
Why is the $known_agents line in there twice? It is scoped in the same function and should be able to be used throughout. Anyone?
Title: [SPLIT] about custom who.template.php
Post by: Owdy on February 09, 2005, 02:00:48 AM
Because there are 2 lists; users and guests. Code works, so why this is broblem to you?
Title: [SPLIT] about custom who.template.php
Post by: JRSofty on February 09, 2005, 02:57:02 AM
Sorry about. I like to keep things simple. And you are right the code works fine.

BTW you can remove the second $known_agents line (I did) and it will work fine as well ;)

Thanks
Title: [SPLIT] about custom who.template.php
Post by: Owdy on February 09, 2005, 03:54:38 AM
Cool, i'll do that. Thanks. :)
Title: [SPLIT] about custom who.template.php
Post by: Owdy on April 16, 2005, 10:35:27 AM
I need some coding help. I would like my moderators to see those agents and ip's also.

This what i tryed:

if ($context['user']['is_admin'])
{
$user_agent = isset($member['query']['USER_AGENT']) ? $member['query']['USER_AGENT'] : '';
$agent = '';


to


if (in_array(2, $user_info['groups']) || $context['user']['is_admin'])
{
$user_agent = isset($member['query']['USER_AGENT']) ? $member['query']['USER_AGENT'] : '';
$agent = '';
That isnt working. Any suggestions?
Title: [SPLIT] about custom who.template.php
Post by: [Unknown] on April 16, 2005, 10:45:41 AM
You'll have to create your own group for moderators and use that id.  When viewing the "who's online" page, no one will ever be in group 3.  Group 2 is global moderators only.

-[Unknown]
Title: [SPLIT] about custom who.template.php
Post by: Owdy on April 16, 2005, 10:50:30 AM
I dont get it, why group id 2 wont do? Group 3 is that undeletable moderator group in my forum. I dont have any members in it.
Title: [SPLIT] about custom who.template.php
Post by: Owdy on April 16, 2005, 11:00:01 AM
Ok, did that, didnt work.
Title: [SPLIT] about custom who.template.php
Post by: ShadowStriker on May 27, 2005, 06:49:03 PM
i read the do not post questions sticky thing but when i posts it in support unknown sais it was ok to to reply but not to make topics that has to do with questions... ok... where do i put the code? and what are user agents?
Title: [SPLIT] about custom who.template.php
Post by: ShadowStriker on May 28, 2005, 11:03:00 AM
i tried putting this below the other things in the who.template.php and look what happened....  http://wwp.x10hosting.com/general/index.php?action=who
Title: [SPLIT] about custom who.template.php
Post by: Owdy on May 28, 2005, 02:41:51 PM
QuoteSorry - you don't have the proper permissions to view the Who's Online list.
Please login below or register an account with World Wide Programming.

Anyway, i dont know what you have done, but just put that Who.template.php (from first post in this topic) in your theme folder.
Title: [SPLIT] about custom who.template.php
Post by: nokonium on May 29, 2005, 03:03:00 AM
Not specifically what this was designed for, but.... IIUC this is Admin/Moderator only view

Could it be modified to enable easy identification of regular lurkers? By that I mean Admin adds the IP and their ID for it to the template, not an IP lookup as such.
Title: [SPLIT] about custom who.template.php
Post by: nokonium on May 29, 2005, 06:41:41 AM
My co-admin has raised a concern about security and malformed browser strings, is there a possible problem?
Title: [SPLIT] about custom who.template.php
Post by: Owdy on May 29, 2005, 08:03:31 AM
Only admins see ip's and browsers. No security issues there.

Quote from: nokonium on May 29, 2005, 03:03:00 AM
Could it be modified to enable easy identification of regular lurkers?
I dont understand your request.
Title: [SPLIT] about custom who.template.php
Post by: nokonium on May 29, 2005, 12:55:48 PM
What I mean is, could who.template.php be modified to lookup the IP of Guests in an array and if it finds a match, it would add some custom text, according to the entries in the lookup.

For example:

Guest
(###.###.##.###, MSIE 6.0)

Could read

Guest - Rival Forum Admin
(###.###.##.###, MSIE 6.0)
Title: [SPLIT] about custom who.template.php
Post by: Owdy on May 29, 2005, 12:59:32 PM
That ip could match several members.  In my forum for example, tens of users come via same IP because they surf via school pc's or similar. No use IMO.

it could read:
Guest - Owdy, caddis, nokonium, I R Richy, agridoc, WhoIsShe, Orstio, Søren Bjerg, morloc, -CM-, d®ÊåDLo®d, John Slater, Shahzad,
(###.###.##.###, MSIE 6.0)

That doesnt look very nice, and information it gives is useless.:)
Title: [SPLIT] about custom who.template.php
Post by: [Unknown] on May 29, 2005, 01:00:12 PM
If you have "rival forum admins" you've got political problems to work out, not anything else.

-[Unknown]
Title: [SPLIT] about custom who.template.php
Post by: nokonium on May 29, 2005, 01:25:09 PM
Quote from: Owdy on May 29, 2005, 12:59:32 PM
That ip could match several members.  In my forum for example, tens of users come via same IP because they surf via school pc's or similar. No use IMO.

it could read:
Guest - Owdy, caddis, nokonium, I R Richy, agridoc, WhoIsShe, Orstio, Søren Bjerg, morloc, -CM-, d®ÊåDLo®d, John Slater, Shahzad,
(###.###.##.###, MSIE 6.0)

That doesnt look very nice, and information it gives is useless.:)


I can see your point but I would assume that you would only return one lookup value, so that would read Guest - School PC or somesuch.

[UNKNOWN] - That was just an example, maybe it would have been a better example to use "Banned member" or "Known Troll". I have suggested it so that Admins do not have to remember the IP's of all regular non members, to know who is lurking. If they are a true guest it should just return the 'else' of "Guest"
Title: [SPLIT] about custom who.template.php
Post by: Owdy on May 29, 2005, 01:26:09 PM
Yeah, well, i dont know how to do that.

Quoteso that would read Guest - School PC or somesuch.
How SMF gets this info? There is no way.
Title: [SPLIT] about custom who.template.php
Post by: nokonium on May 29, 2005, 01:28:51 PM
It is always worth asking though, because someone may be able to.

If you don't ask, you can't get.  :)
Title: [SPLIT] about custom who.template.php
Post by: ShadowStriker on May 29, 2005, 02:01:58 PM
how do i get this working?
Title: [SPLIT] about custom who.template.php
Post by: Owdy on May 29, 2005, 02:25:43 PM
Quote from: ShadowStriker on May 29, 2005, 02:01:58 PM
how do i get this working?
Read what i posted to you. Thats a good start.

Quote from: Owdy on May 28, 2005, 02:41:51 PM
just put that Who.template.php (from first post in this topic) in your theme folder.
Title: [SPLIT] about custom who.template.php
Post by: ShadowStriker on May 29, 2005, 03:54:01 PM
i tried adding it ti the other who.template.php but it wouldnt work... do i have to delete the exisitng one?
Title: [SPLIT] about custom who.template.php
Post by: Owdy on May 29, 2005, 03:54:51 PM
Yes, just upload it and overwrite. No need editing any files.
Title: [SPLIT] about custom who.template.php
Post by: Thantos on May 29, 2005, 04:35:56 PM
Heres a version I've been working on.  It seperates into three catagories:
Users
Guests
Spiders

It will rename spiders so it doesn't say Guest.

It should be really easy to add more spiders or user agents if you so wished.

I've done limited testing on it but there might be a few problems.  I mainly reused Owdy's code so a big thanks to him ;)

Edit:  Added the page numbers in
Title: [SPLIT] about custom who.template.php
Post by: Ben_S on May 30, 2005, 02:25:59 PM
I like it Mike, unfortunatly though it's missing the page numbers.
Title: [SPLIT] about custom who.template.php
Post by: Thantos on May 30, 2005, 03:33:32 PM
Fixed, thanks Ben
Title: [SPLIT] about custom who.template.php
Post by: Owdy on May 30, 2005, 04:24:54 PM
Awesome Mike! Ill attach that in first post.
Title: [SPLIT] about custom who.template.php
Post by: Owdy on May 30, 2005, 04:51:46 PM
Question Mike. Why isnt all spiders have that 'spider' => true, ? Like Inktomi Slurp?
Title: [SPLIT] about custom who.template.php
Post by: Thantos on May 30, 2005, 04:55:38 PM
Because I wasn't sure if it was a spider :)

If I missed any feel free to correct and let me know :)
Title: [SPLIT] about custom who.template.php
Post by: Owdy on May 30, 2005, 05:02:53 PM
Changed these

$known_agents = array (
array (
'agent' => 'WISENutbot',
'name' => 'Looksmart Spider',
                        'spider' => true,
),
array (
'agent' => 'MSNBot',
'name' => 'MSN Spider',
'spider' => true,
),
array (
'agent' => 'W3C_Validator',
'name' => 'W3C Validator',
        'spider' => true,
),
array (
'agent' => 'Googlebot-Image',
'name' => 'Google Image-Spider',
'spider' => true,
),
array (
'agent' => 'Googlebot',
'name' => 'Google Spider',
'spider' => true,
),
array (
'agent' => 'Mediapartners-Google',
'spider' => true,
                 ),
array (
'agent' => 'Scooter',
'name' => 'Altavista Spider',
'spider' => true,
),
array (
'agent' => 'Ask Jeeves',
'spider' => true,
),
                 
               array (
'agent' => 'GigaBot',
'spider' => true,
),

                array (
'agent' => 'ia_archiver',
'spider' => true,
),
array (
'agent' => 'FAST-WebCrawler',
'spider' => true,
),
array (
'agent' => 'Yahoo! Slurp',
'spider' => true,
),
array (
'agent' => 'Inktomi Slurp',
                        'spider' => true,
),

array (
'agent' => 'Opera',
),
array (
'agent' => 'Firefox',
),
array (
'agent' => 'Firebird',
),
array (
'agent' => 'Safari',
),

array (
'agent' => 'Netscape',
),
array (
'agent' => 'MyIE2',
),
array (
'agent' => 'Konqueror',
),
array (
'agent' => 'Galeon',
),

array (
'agent' => 'NG/2.0',
),
array (
'agent' => 'MSIE',
                ),
);





Q: can we change this:
QuoteGoogle Spider
(66.249.71.28, Google Spider)
to
QuoteGoogle Spider
(66.249.71.28, Googlebot)
?
Like guest and users have. (name + agent)




Quote from: [Unknown] on April 16, 2005, 10:45:41 AM
You'll have to create your own group for moderators and use that id.  When viewing the "who's online" page, no one will ever be in group 3.  Group 2 is global moderators only.

-[Unknown]
No, i need to use Mikes script. It does this by default. Thank you M! :)
Title: [SPLIT] about custom who.template.php
Post by: Owdy on May 30, 2005, 06:58:24 PM
+

array (
'agent' => 'Gecko',
'name' => 'Mozilla',
                ),
Title: [SPLIT] about custom who.template.php
Post by: edi67 on May 30, 2005, 07:18:33 PM
work perfectly thanx MiKes and Owdy

(http://img164.echo.cx/img164/1580/us5hv.jpg)
Title: [SPLIT] about custom who.template.php
Post by: Thantos on May 30, 2005, 07:45:41 PM
Quote from: Owdy on May 30, 2005, 05:02:53 PM
Q: can we change this:
QuoteGoogle Spider
(66.249.71.28, Google Spider)
to
QuoteGoogle Spider
(66.249.71.28, Googlebot)
?
Like guest and users have. (name + agent)
change
$result = isset($poss['name']) ? $poss['name'] : $poss['agent'];
To
$result = $poss['agent'];
Title: [SPLIT] about custom who.template.php
Post by: Owdy on May 31, 2005, 04:03:01 AM
Perfect mike!

Edi67, how did you ad those flags?
Title: [SPLIT] about custom who.template.php
Post by: Owdy on May 31, 2005, 06:55:10 AM
Quote from: MikeMill on May 30, 2005, 07:45:41 PM

change
$result = isset($poss['name']) ? $poss['name'] : $poss['agent'];
To
$result = $poss['agent'];

Hmmm, that kills this also:

array (
'agent' => 'Gecko',
'name' => 'Mozilla',
                ),


All Mozillas appears Cecko.

Could it be done something like in orginal script:


if ($agent == '')
{
if (strpos($user_agent, 'Mozilla/4.') !== false)
$agent = 'Netscrape 4';
if (strpos($user_agent, 'Gecko') !== false)
$agent = 'Mozilla';
elseif (preg_match('~(MSIE\s+[^;)]+)~', $user_agent, $match) == 1)

$agent = $match[1];
elseif ($user_agent != '')
$agent = 'MSIE';
else
$agent = '???';
}
Title: [SPLIT] about custom who.template.php
Post by: edi67 on May 31, 2005, 09:14:35 AM
Quote from: Owdy on May 31, 2005, 04:03:01 AM
Edi67, how did you ad those flags?

i have location MOD and i only add this part in bold to these line blue for have the directly the flags of the users i think is very useful:

<img src="' . $settings['default_images_url'] . '/flags/' . strtolower($member['flag'][0]) . '.png" alt="' . $member['flag'][1] . '" title="' . $member['flag'][1] . '" />     <span', $member['is_hidden'] ? ' style="font-style: italic;"' : '', '>', $member['is_guest'] ? $member['name'] : '<a href="' . $member['href'] . '" title="' . $txt[92] . ' ' . $member['name'] . '"' . (empty($member['color']) ? '' : ' style="color: ' . $member['color'] . '"') . '>' . $member['name'] . '</a>', '</span>';
Title: [SPLIT] about custom who.template.php
Post by: Thantos on May 31, 2005, 11:27:37 AM
use this:
foreach( $known_agents AS $poss )
if (strpos(strtolower($user_agent), strtolower($poss['agent'])) !== false)
{
if ( $guest && isset($poss['spider']) && $poss['spider'] )
$user_name = isset($poss['spidername']) ? $poss['spidername'] : (isset($poss['name']) ? $poss['name'] : $poss['agent']);
$result = isset($poss['name']) ? $poss['name'] : $poss['agent'];
return isset($poss['spider']) && $poss['spider'];
}


now you can have as much flexibility as you want.
'spidername' =>
will tell you what to rename 'guest' to
'name' =>
will tell you what to name the agent as.
Title: [SPLIT] about custom who.template.php
Post by: Owdy on May 31, 2005, 11:49:00 AM
Now it works. Thanks again!  :D :D

Title: [SPLIT] about custom who.template.php
Post by: edi67 on May 31, 2005, 05:21:53 PM
Quote from: MikeMill on May 31, 2005, 11:27:37 AM
use this:
foreach( $known_agents AS $poss )
if (strpos(strtolower($user_agent), strtolower($poss['agent'])) !== false)
{
if ( $guest && isset($poss['spider']) && $poss['spider'] )
$user_name = isset($poss['spidername']) ? $poss['spidername'] : (isset($poss['name']) ? $poss['name'] : $poss['agent']);
$result = isset($poss['name']) ? $poss['name'] : $poss['agent'];
return isset($poss['spider']) && $poss['spider'];
}


now you can have as much flexibility as you want.
'spidername' =>
will tell you what to rename 'guest' to
'name' =>
will tell you what to name the agent as.

please tell me mike where insert this code? and for which purpose ?
Title: [SPLIT] about custom who.template.php
Post by: Owdy on May 31, 2005, 11:13:11 PM
Download file from first post.
Title: [SPLIT] about custom who.template.php
Post by: nokonium on June 02, 2005, 03:56:57 PM
Quote from: nokonium on May 29, 2005, 12:55:48 PM
What I mean is, could who.template.php be modified to lookup the IP of Guests in an array and if it finds a match, it would add some custom text, according to the entries in the lookup.

Slightly different context, the forum software has to match the IP of logged in guests to a user name, would it be possible to give admins the ability to use the same code to lookup guests, because quite often they are members who haven't logged in?
Title: [SPLIT] about custom who.template.php
Post by: JayBachatero on June 02, 2005, 04:33:45 PM
wow good job.  i like how its diveided bet users guests and spiders.
Title: [SPLIT] about custom who.template.php
Post by: sensovision on June 07, 2005, 07:18:21 AM
Gret mod, Owdy! I was looking for something like this long ago, thanks!
Title: [SPLIT] about custom who.template.php
Post by: Owdy on June 07, 2005, 11:22:48 AM
You might like this MOD also: http://mods.simplemachines.org/index.php?mod=143 ;)
Title: [SPLIT] about custom who.template.php
Post by: sensovision on June 07, 2005, 12:07:06 PM
ups, Owdy, I've just realized that I've just post in the test related to other mod :P I was referring to GoogleBot and Spiders which I've installed, but I'll look now to this mod to see how it's work and whenver I need it :)
Title: [SPLIT] about custom who.template.php
Post by: Harro on June 09, 2005, 03:40:09 PM
Got a question about this.
I installed this, and it works great.
But google is crawling the forum, but it just appears as guest.
I have the ip (looked if up and saw that it was google), so can I add this to the who.template.php somewhere, so when googlebot is crawling with that ip, it will appear as googlebot and not as a guest?
Title: [SPLIT] about custom who.template.php
Post by: Owdy on June 09, 2005, 03:48:39 PM
Im afraid not. You can ad UserAgents, not IP's.If you point your mouse over that users agent (example MSIE), what it says about agent?
Title: [SPLIT] about custom who.template.php
Post by: Harro on June 09, 2005, 04:30:51 PM
It says
Mediapartners-Google/2.1

It's a google adsense spider.
Title: [SPLIT] about custom who.template.php
Post by: Owdy on June 09, 2005, 04:33:11 PM
Weird, it is in that file.
/me goes to check.
Title: [SPLIT] about custom who.template.php
Post by: Owdy on June 09, 2005, 04:35:55 PM
Do you see other spiders?
url, test account?
Title: [SPLIT] about custom who.template.php
Post by: Harro on June 09, 2005, 04:36:57 PM
yes, normaly it all works fine.
Haven seen google, msnbot,...
It's just this one it seems.
Title: [SPLIT] about custom who.template.php
Post by: Owdy on June 09, 2005, 04:40:41 PM
I dont get this. Mediapartnerst-google is in bot list and it works in my forums.

   'agent' => 'Mediapartners-Google',
         'spidername' => 'Google AdSense spider',
         'spider' => true,
Title: [SPLIT] about custom who.template.php
Post by: Thantos on June 09, 2005, 04:41:06 PM
Mediapartners is handled correctly for me...
Title: [SPLIT] about custom who.template.php
Post by: Harro on June 09, 2005, 04:56:35 PM
Ow, sorry, didn't look properly.
Seems Like I was using an older verion of it.
Thought I had the latest though.
Sorry  ::)
Works flawless now ;)
But thanks for your quick response!! Realy appreciate it.
Title: [SPLIT] about custom who.template.php
Post by: jerm on June 13, 2005, 02:00:30 AM
this is awsome..
now my users wont be complaing "why is this guest printing our topics!!". kept on explaing that its a bot, but they just kept complaing
anyways.. to the point its 2 in the morning, and its getting blurry, and hard to concentrate
to be its display 'spiders, guests, users' ... i'd rather it display 'guests, users, spiders'
where can i search for this code? thanks :)
Title: [SPLIT] about custom who.template.php
Post by: Boomhower on June 16, 2005, 12:48:06 AM
Tried to install this with the package manager and got the following when I hit apply

The package you are trying to download or install is either corrupt or not compatible with this version of SMF.

??
Title: [SPLIT] about custom who.template.php
Post by: Owdy on June 16, 2005, 12:53:04 AM
Because this isnt package manager mod. Its theme file. Just upload that file to your theme dir. Ther are installation instructions in first post you know ;)
Title: [SPLIT] about custom who.template.php
Post by: Boomhower on June 16, 2005, 11:50:44 AM
Thanks for the reply.....

I uploaded that file last night but didn't see any change so I thought I needed to use the package manager to make it work (I'm very new to this)

Where would I find the new functions in my admin panel?  The file is there but I don't seem to be able to use it.

Title: [SPLIT] about custom who.template.php
Post by: Owdy on June 16, 2005, 12:14:13 PM
This is just minor theme change. No admin panel addons.

See your site http://yoursite.com/smf/index.php?action=who
Upload Who.template.php from default theme to your theme an see that url. After that, upload my file and see it again ;)
Title: [SPLIT] about custom who.template.php
Post by: Boomhower on June 16, 2005, 12:19:21 PM
AH HA!!!  Now I have it.... :D

Many thanks for your patience!
Title: [SPLIT] about custom who.template.php
Post by: Owdy on June 16, 2005, 12:22:15 PM
No problemo!
Title: [SPLIT] about custom who.template.php
Post by: jerm on July 02, 2005, 04:10:27 PM
before re-uploading this file, can i know if it works fully with SMF 1.1 Beta 3
may be a stupid question.. but better safe the sorry
Title: [SPLIT] about custom who.template.php
Post by: Owdy on July 02, 2005, 04:24:22 PM
Why dont you just test this? :D
Title: [SPLIT] about custom who.template.php
Post by: jerm on July 02, 2005, 04:32:31 PM
lol, well, i screwed up my test boards, and didn't get around to install a new one.. and usually on my main board theres always 10 uses surfing about
but i guess with an answer like that, its fully compatible  :P
Title: [SPLIT] about custom who.template.php
Post by: jerm on July 03, 2005, 03:38:18 PM
ya.. works fine lol
Title: [SPLIT] about custom who.template.php
Post by: aiz on July 06, 2005, 01:04:08 AM
I tried the version for 1.1 Beta 3 Public and when trying to apply it outputs thay SSI.PHP cannot be found  :'(
Of course SSI.PHP is there, and with the right permissions (I assume).

Any ideas?

Thanks,
AiZ
Title: [SPLIT] about custom who.template.php
Post by: Owdy on July 06, 2005, 02:56:39 AM
This has nothing to do with ssi.php. Can you give me details what have you done? Just upload file from first post to your theme and enjoy.
Title: [SPLIT] about custom who.template.php
Post by: aiz on July 06, 2005, 04:08:39 AM
Oops, my mistake, wrong thread :-[ ... I wanted to ask about googlebot.
AiZ
Title: [SPLIT] about custom who.template.php
Post by: rojamaia on August 02, 2005, 10:15:11 AM
thanks for this!
Title: [SPLIT] about custom who.template.php
Post by: Owdy on August 03, 2005, 11:18:08 AM
Splitted:http://www.simplemachines.org/community/index.php?topic=44391.0
Title: [SPLIT] about custom who.template.php
Post by: 1948Pal on August 09, 2005, 07:00:17 PM
Would this file still work for 1.1b3p?
Scratch that, I just read the previous page.
Title: [SPLIT] about custom who.template.php
Post by: Anakin_holland on August 27, 2005, 09:03:32 AM
Just here to pay tribute... Works like a charm! Thnx!

Anakin
Title: [SPLIT] about custom who.template.php
Post by: Dinagyang on September 23, 2005, 05:53:35 PM
Great hack. Thanks!
Title: [SPLIT] about custom who.template.php
Post by: kat on October 07, 2005, 04:42:26 PM
NooB alert!!!

I have the Googlebot mod, but I can't find this one, which the author recommends I install with it...

Can you give me a clue, pretty-please?
Title: [SPLIT] about custom who.template.php
Post by: beemer on October 07, 2005, 05:12:51 PM
its the who.template.php  attached to the bottom of the first post  ;D
Title: [SPLIT] about custom who.template.php
Post by: kat on October 07, 2005, 05:16:03 PM
I didn't see the attachment... :-[

Cheers, Beemer!
Title: [SPLIT] about custom who.template.php
Post by: kat on October 09, 2005, 04:37:10 PM
I found that the SSI file wouldn't access, because it was in a different case to the one it was looking for. It wanted SSI and the file was Ssi. I just renamed it and it went through that bit, fine.

It did, however, tell me that accessing "ManagePermission.php". The file's there and it's permissions are set to write.

Any clues as to what it's trying to do? I know squat about php, sadly, even though I've successfully edited a few indextemplate...

Is there anything I can do, to find-out what's going wrong?
Title: [SPLIT] about custom who.template.php
Post by: Owdy on October 10, 2005, 05:28:14 AM
I dont understand your issue?. This is just modifyed Who.template.php .
Title: [SPLIT] about custom who.template.php
Post by: kat on October 10, 2005, 08:06:19 AM
THAT was the issue. As I said, I know squat about php. Hence, I didn't know that Who.template.php needed changing.

Now, I'll have to try and figure-out what the modification should be!

At least I, now, have a clue.

Ta!
Title: [SPLIT] about custom who.template.php
Post by: Owdy on October 10, 2005, 08:16:03 AM
This topic is about just custom theme file (Who.template.php). Just take it from first post un upload to your theme folder. Thats it. 

http://www.simplemachines.org/community/index.php?topic=19243.0

If you got some other issue, start new topic about it to support forums. Thanks!
Title: [SPLIT] about custom who.template.php
Post by: kat on October 10, 2005, 08:48:20 AM
That's just confused me even more. I thought it was relevant to this topic.

Oh, well. We'll do without the mod.

Ho-hum.
Title: [SPLIT] about custom who.template.php
Post by: Owdy on October 10, 2005, 08:50:31 AM
No, this topic is about one custom theme file. Thats all. Start new topic about your broblem in there http://www.simplemachines.org/community/index.php?board=9.0
Title: [SPLIT] about custom who.template.php
Post by: kat on October 10, 2005, 08:53:08 AM
I just followed a link in the googlebot mod page, so thought it was relevant to it.

I'll forget it and try and muddle through. Less likely to offend, then.
Title: [SPLIT] about custom who.template.php
Post by: menkaura on October 15, 2005, 10:56:02 AM
Ok ... this installation i'm sure is easy for you guys but us SMF newbies need a bit of additional help.

I've installed "Googlebot & Spiders Mod" via Package Manager within my SMF forum.

I read ... "STRONGLY recommended to install this mod also (for a detailed view of what is being crawled):
http://www.simplemachines.org/community/index.php?topic=19243.0" .... which got me here ... this is a Mod right which in turn can be installed?

So I uploaded the file 'Who[1][1].template.php' it into my 'themes/apollo' folder (apollo being the theme I use).

So what now?  What do I see that is different? Nothing has change from my Forum admin point of view evrthing looks the same.

HELP .....
Title: [SPLIT] about custom who.template.php
Post by: kat on October 15, 2005, 11:12:04 AM
You can see where I struggled. Thanks.

It does seem to be a problem, here. If you're a NooB, you seem to be looked down upon. Because of this, I use SMF, myself, but won't recommend it, sadly.

I found someone who knows more about it and they sorted it, for me. If I can find out what they did, I'll get back to you, you Egyptian God(dess). ;)

I THINK that who.php has to be in the "sources" directory, not in the individual theme directory. Mine isn't in any of the themes, anyway.

I was going to attach a copy of it to this. Reading through it might've given you a clue. But, I don't seem to have the option of attaching it, sadly. Can I PM it to you?
Title: [SPLIT] about custom who.template.php
Post by: xenovanis on October 15, 2005, 11:26:41 AM
Quote from: menkaura on October 15, 2005, 10:56:02 AM
Ok ... this installation i'm sure is easy for you guys but us SMF newbies need a bit of additional help.

I've installed "Googlebot & Spiders Mod" via Package Manager within my SMF forum.

I read ... "STRONGLY recommended to install this mod also (for a detailed view of what is being crawled):
http://www.simplemachines.org/community/index.php?topic=19243.0" .... which got me here ... this is a Mod right which in turn can be installed?

So I uploaded the file 'Who[1][1].template.php' it into my 'themes/apollo' folder (apollo being the theme I use).

So what now?  What do I see that is different? Nothing has change from my Forum admin point of view evrthing looks the same.

HELP .....

Did you rename it to Who.template.php? Usually, if you watch who's online, you get an unsorted list with guests, spiders/bots and members. This template divides that list; so you have a row for members, a row for guests and a row for spiders. If you don't see any difference, you might want to try to clear your cache, pressing ctrl-F5.

Quote from: kat on October 15, 2005, 11:12:04 AM
You can see where I struggled. Thanks.

It does seem to be a problem, here. If you're a NooB, you seem to be looked down upon. Because of this, I use SMF, myself, but won't recommend it, sadly.

I found someone who knows more about it and they sorted it, for me. If I can find out what they did, I'll get back to you, you Egyptian God(dess). ;)

???

Quote from: kat on October 15, 2005, 11:12:04 AM
I THINK that who.php has to be in the "sources" directory, not in the individual theme directory. Mine isn't in any of the themes, anyway.

I was going to attach a copy of it to this. Reading through it might've given you a clue. But, I don't seem to have the option of attaching it, sadly. Can I PM it to you?

That is correct. Who.php is located in the /Sources directory, as where Who.template.php is, being a templatefile thus part of a theme, is located in the Themes/theme* directory, as where theme* is the theme you are using.
In this case, the file Who.template.php, attached to the first post of this topic, need to be in the Themes/theme* directory.
Title: [SPLIT] about custom who.template.php
Post by: kat on October 15, 2005, 12:29:15 PM
Odd, that.  Who.template.php is in my "Themes/Default" directory, but none of the other themes. Yet, it works on all themes.

Most odd. Maybe the lady that helped me did it a different way, ay?
Title: [SPLIT] about custom who.template.php
Post by: Webrunner on October 15, 2005, 12:35:34 PM
All themes use settings and files of the default theme.
That is why it is called default theme ;)
Title: [SPLIT] about custom who.template.php
Post by: kat on October 15, 2005, 12:41:32 PM
To a point, I have to agree. Pity they can't all use the same indextemplate, too, innit? ;)
Title: [SPLIT] about custom who.template.php
Post by: menkaura on October 22, 2005, 04:03:18 PM
Ok ... I've placed the Who.template in my Themes/Apollo directory ( ... and as it happens in the /Themes/default directory) as stated in a previous post. Still don't see anything different though ... should I????

When I login with an Administrator account I do see in the bottom left hand corner of the screen the 'Guests' and 'Users' online.

My questions is should I see another heading say 'Spiders/Bots' albeit with '0' against it. Or does the title not appear until it has something to report?

Many thanks
Title: [SPLIT] about custom who.template.php
Post by: menkaura on October 22, 2005, 04:10:45 PM
Cracked it!!!!! Thanks for baring with me ....

Click on the "0 Guest, 0 User" heading.

Thanks.
Title: [SPLIT] about custom who.template.php
Post by: xtremecruiser on October 22, 2005, 06:07:46 PM
Tried it on my test site on 1.05 and it only shows myself and no one else ?  Logged on with 2 admin accounts and only shows me?
I used the file from the first post.
Title: [SPLIT] about custom who.template.php
Post by: Owdy on October 22, 2005, 07:39:08 PM
Its shows all who are logged in. Put it in your production site and try.
Title: [SPLIT] about custom who.template.php
Post by: xtremecruiser on October 22, 2005, 07:44:18 PM
Quote from: Owdy on October 22, 2005, 07:39:08 PM
Its shows all who are logged in. Put it in your production site and try.
I did I have a mirror of my site for testing.
I will look at it later tonight and try again.
Title: [SPLIT] about custom who.template.php
Post by: Gargoyle on October 22, 2005, 08:59:25 PM
Very very cool and simple addition...

Thank-you.. :D
Title: [SPLIT] about custom who.template.php
Post by: carbonize on November 04, 2005, 06:34:58 AM
Excellent file but I changed the agent text from being acronym to a span because the title text gets cut short in the pop up when using acronym and technically it's not really an acronym. title attribute works fine with span and you get the full string.
Title: [SPLIT] about custom who.template.php
Post by: maobe on November 13, 2005, 09:54:36 AM
yeah, cool, this who.template really ROOOOXXX!! 8) nice work, both, googlebot-mod and this who.template should become standardfeatures for futureversions of SMF!
Title: [SPLIT] about custom who.template.php
Post by: RoarinRow on November 20, 2005, 12:49:05 AM
Just installed the Googlebot and Spider mod and this one.  Very very cool, thanks!  Love the new look of the who.template.php.  Sweet!
Title: [SPLIT] about custom who.template.php
Post by: nokonium on January 01, 2006, 07:04:16 AM
An updated Who.template for RC2 would be greatly appreciated please.
Title: [SPLIT] about custom who.template.php
Post by: Owdy on January 01, 2006, 08:47:19 AM
It works with all versions...
Title: [SPLIT] about custom who.template.php
Post by: nokonium on January 01, 2006, 01:54:10 PM
Thanks, I'll give it a tick.
Title: [SPLIT] about custom who.template.php
Post by: Slack on January 12, 2006, 03:32:46 PM
Does this Mod work with RC2?
Title: [SPLIT] about custom who.template.php
Post by: Owdy on January 12, 2006, 03:40:30 PM
Quote from: Slack on January 12, 2006, 03:32:46 PM
Does this Mod work with RC2?
::)  :P

(http://koti.mbnet.fi/oskunoma/blah.jpg)
Title: [SPLIT] about custom who.template.php
Post by: Deaks on January 12, 2006, 05:07:36 PM
how about updating it for the package manager then as I get its either corrupted or not designed for the current version of smf (im using RC2)
Title: [SPLIT] about custom who.template.php
Post by: Slack on January 12, 2006, 05:37:20 PM
QuoteAn updated Who.template for RC2 would be greatly appreciated please.

Big arrow is not necessary. I saw your reply - I thought you were referrring to the WHO template.  See above.

so in order to get it to work in RC2 - we just change the XML version parameter, yes?
Title: [SPLIT] about custom who.template.php
Post by: Owdy on January 13, 2006, 09:35:54 AM
Quote from: Slack on January 12, 2006, 05:37:20 PM
Big arrow is not necessary. I saw your reply - I thought you were referrring to the WHO template.  See above.
I am referring to that, because this topic is about custom Who.template.php (http://www.simplemachines.org/community/index.php?topic=19243.msg156339#msg156339). Thats it, nothing more, nothing less. ;)

Quote from: sloopz on January 12, 2006, 05:07:36 PM
how about updating it for the package manager then as I get its either corrupted or not designed for the current version of smf (im using RC2)
You dont need to update this via package manager. It works all versions. Just upload it to your theme folder. Thats it.
Title: [SPLIT] about custom who.template.php
Post by: Slack on January 13, 2006, 09:51:15 AM
OK Owdy, will do.  Thanks.  :)
Title: [SPLIT] about custom who.template.php
Post by: Bigguy on January 14, 2006, 04:09:50 PM
Works like a charm, thanks alot. :)
Title: [SPLIT] about custom who.template.php
Post by: KaaNoGLu on February 03, 2006, 04:08:15 AM
very good addon  :D
thanks you!
Title: [SPLIT] about custom who.template.php
Post by: tadei on February 05, 2006, 10:17:44 AM
One question ...

How to "add" spiders, so that this addon can detect them? There is constant number of 2 guests which I assume are spiders (ips the same, only one digit differs, track_ip finds local search company(www.najdi.si)).

This addon does not detect them ... help?

Thanks, Tadej
Title: [SPLIT] about custom who.template.php
Post by: Owdy on February 05, 2006, 10:24:02 AM
You have to manually ad them, look  for  //Search Spiders in that script.
Title: [SPLIT] about custom who.template.php
Post by: tadei on February 05, 2006, 10:32:12 AM
Yea, found that already before ... the problem is that I dont really know the agent name ... any idea where to find that?

So only agent name triggers the recognition of spiders?

Thanks, Tadej
Title: [SPLIT] about custom who.template.php
Post by: Owdy on February 05, 2006, 10:34:34 AM
Its impossible me to know that spider name, sorry.
Title: [SPLIT] about custom who.template.php
Post by: tadei on February 05, 2006, 10:39:30 AM
It worked, thanks for tips.

Tadej
Title: [SPLIT] about custom who.template.php
Post by: rancidgrowl on February 05, 2006, 11:31:12 PM
 :D
haha thanx this is a mod ive been trying to get for ages but my package manager doesnt work server wont allow the chmod thingy   :'( so finding this was a real winner for i rate this ***** COOL thanx again for the hard work.
Title: [SPLIT] about custom who.template.php
Post by: dtm.exe on February 06, 2006, 12:02:32 AM
Quote from: rancidgrowl on February 05, 2006, 11:31:12 PM
:D
haha thanx this is a mod ive been trying to get for ages but my package manager doesnt work server wont allow the chmod thingy   :'( so finding this was a real winner for i rate this ***** COOL thanx again for the hard work.

Any reason to curse about it?
Title: [SPLIT] about custom who.template.php
Post by: Gooleb.com on February 08, 2006, 06:31:41 PM
Hello,
When I upload the file from package manager it says that is corrupted or not support version. I read that you said that we upload it manually but how and where? (sorry I'm new)
Title: [SPLIT] about custom who.template.php
Post by: Kindred on February 09, 2006, 07:27:48 AM
bigguy...   the upload feature in the package manager is for uploading packages!   It uploads and tries to parse the package (and does not keep it if it is an invalid package)

Gooleb...  you do not want to load it to the package directory...  you want to load the who.template.php file into your actual theme directory.

Use an FTP program like FileZilla or FTP Voyager...
Title: [SPLIT] about custom who.template.php
Post by: Owdy on February 09, 2006, 12:14:40 PM
Quote from: Owdy on January 13, 2006, 09:35:54 AM
this topic is about custom Who.template.php (http://www.simplemachines.org/community/index.php?topic=19243.msg156339#msg156339). Thats it, nothing more, nothing less. ;)

Quote from: sloopz on January 12, 2006, 05:07:36 PM
how about updating it for the package manager then as I get its either corrupted or not designed for the current version of smf (im using RC2)
You dont need to update this via package manager. It works all versions. Just upload it to your theme folder. Thats it.
Title: [SPLIT] about custom who.template.php
Post by: rancidgrowl on February 09, 2006, 03:40:24 PM
Quote from: dtm.exe on February 06, 2006, 12:02:32 AM
Quote from: rancidgrowl on February 05, 2006, 11:31:12 PM
:D
haha thanx this is a mod ive been trying to get for ages but my package manager doesnt work server wont allow the chmod thingy   :'( so finding this was a real winner for i rate this ***** COOL thanx again for the hard work.

Any reason to curse about it?

Sorry dtm.exe that was a five star rating not a curse, (but any help with the chmod would be very worth while. Ive tried the help, already sugested in the relevant topics and emailed my server with no response)
Title: [SPLIT] about custom who.template.php
Post by: Owdy on February 09, 2006, 11:06:21 PM
This isnt package. Please read this topic.  (http://www.simplemachines.org/community/index.php?topic=19243.msg156339#msg156339)Its just one theme file. You have to upload it to your theme folder. Thats it.
Title: [SPLIT] about custom who.template.php
Post by: woden on March 11, 2006, 01:41:27 PM
Excellent. And so easy to install!  :D
Title: [SPLIT] about custom who.template.php
Post by: dantol on March 12, 2006, 09:56:51 PM
I just installed this Googlebot script. How come I don't see these screenshots?
http://mods.simplemachines.org/index.php?mod=143
Why not?
Title: [SPLIT] about custom who.template.php
Post by: mforum on March 16, 2006, 06:43:22 AM
How can i add on users list a link to something like tracker.php  ???
of couse to be visible only to admin or groups have the permision to see ip`s  :)
Title: [SPLIT] about custom who.template.php
Post by: kezayah on March 21, 2006, 01:49:20 PM
Séparation en 3 groupes : Membres, Invités et Robots avec en prime visu du navigateur utilisé par le membre même pour les invités !!!  8)

ICI (http://ze-forum.org/who.template.rar)
Title: [SPLIT] about custom who.template.php
Post by: willi1 on April 09, 2006, 03:43:41 AM
Hello,

sorry for my bad english, i have a question also
i have installed the mod for vers. 1.1 RC2 the install was ok,but where can i find the properties in my admin panel i don´t find it

i used the Theme 247portal 

please help me

best regards

willi1
Title: [SPLIT] about custom who.template.php
Post by: willi1 on April 09, 2006, 08:07:23 AM
now i have find the link i must schwitch the language from german to english. How can i show the link
i my german language?
and the second problem is i can´t see the who is online button on the home site.
i have copy the who.template.php in my theme folder but i can´t see anything

can you help me?

best regards

André
Title: [SPLIT] about custom who.template.php
Post by: Kindred on April 09, 2006, 08:18:00 AM
1- this does not create a who is online button
2- there is no admin function to this
3- any text that is not normally defined by the board langauge will be defnied in the .php file itself.  so any changes you want to make into german will be done in who.template.php
Title: [SPLIT] about custom who.template.php
Post by: willi1 on April 09, 2006, 08:22:30 AM
thank you for the answer

my english is not good what i must do now.schould i go in my FTP Program and change the chmod on 777
i don´t know can you help me again?

best regards
Title: [SPLIT] about custom who.template.php
Post by: Kindred on April 09, 2006, 08:28:22 AM
why do you care at this pint about chmod?   that has nothing at all to do with the display of the who template.

IN your joomla menu, add a menu item (url-link) pointing to index.php?option=com_smf&Itemid=##&action=who
(where ## is the actual item ID of your bridge installation)
Title: [SPLIT] about custom who.template.php
Post by: willi1 on April 09, 2006, 08:38:17 AM
sorry i don´t understand you because i´m a joomla newbie. do you speak german  ;)

best regards

Title: [SPLIT] about custom who.template.php
Post by: Kindred on April 09, 2006, 12:49:10 PM
Ich spreche nur deutsches wenig... jedoch kann ich babelfish benutzen...

Fügen Sie ein Einzelteil dem joomla Menü hinzu. Das Einzelteil sollte die LINK-URL Art Punkt es zu index.php?option=com_smf&Itemid=##&action=who benutzen (das ## sollte das tatsächliche Einzelteil Identifikation Ihrer Brücke Installation sein)
Title: [SPLIT] about custom who.template.php
Post by: DemonicInfluence on April 09, 2006, 12:55:25 PM
1 question... Umm.. This kills my load times in action=who.. Is there a way to reduce the insane load (1-2 sec compared to .01-.02 in everywhere else)
Title: [SPLIT] about custom who.template.php
Post by: Owdy on April 09, 2006, 05:18:29 PM
This topic is about custom template file. Thats it. Please read first post in this topic.
Title: [SPLIT] about custom who.template.php
Post by: DemonicInfluence on April 09, 2006, 06:12:47 PM
Yes, I'm using the custom template and I get those times...
Title: [SPLIT] about custom who.template.php
Post by: Owdy on April 10, 2006, 05:22:09 AM
Didnt mean you D ;)
Title: [SPLIT] about custom who.template.php
Post by: DemonicInfluence on April 10, 2006, 03:29:26 PM
lol.
Title: [SPLIT] about custom who.template.php
Post by: sbarnes on April 12, 2006, 02:42:42 PM
Hi there,
Just noticed I'm getting this error on what seems like every action involving the index file.

http://www.pick-your-brains.co.uk/index.php  - this line alters
8: Use of undefined constant Spiders - assumed 'Spiders' - this line is constant
File: /home/####/public_html/Themes/dark_blue/languages/Ignore.english.php (eval?) - this line alters
Line: 983 - this line is constant

I have gone through all files that the mod changes and cannot find any problems.

I was given this advise on another forum:
QuoteLine 983 of one of your files has something like $txt[Spiders]
Change it to $txt['Spiders']
But this does not seem to be the case.

Any help very much appreciated
Title: [SPLIT] about custom who.template.php
Post by: DemonicInfluence on April 12, 2006, 03:03:02 PM
should $txt['Spiders'] be lower case? because the variables in this mod  i think are lowercase..
Title: [SPLIT] about custom who.template.php
Post by: Owdy on April 12, 2006, 03:05:58 PM
Quote from: sbarnes on April 12, 2006, 02:42:42 PM

I have gone through all files that the mod changes


Quote from: DemonicInfluence on April 12, 2006, 03:03:02 PM
because the variables in this mod

This isnt a MOD. This doesnt change any files. This is just custom theme file. Again, please read first post of this topic.
Title: [SPLIT] about custom who.template.php
Post by: DemonicInfluence on April 12, 2006, 03:20:13 PM
Okay. That is true. But then you must have spiders capitalized somewhere to cause that error..
Title: [SPLIT] about custom who.template.php
Post by: sbarnes on April 12, 2006, 04:10:05 PM
I think I have got a bit confused.
I do have this who.template but also the googlebot and spiders MOD which is what I was refering to.

I will try and find the topic for the mod and post the problem there.

Title: [SPLIT] about custom who.template.php
Post by: Owdy on April 13, 2006, 02:02:05 AM
Quote from: sbarnes on April 12, 2006, 04:10:05 PM

I will try and find the topic for the mod and post the problem there.


There you go ;)
Title: [SPLIT] about custom who.template.php
Post by: Vinspire^ on May 03, 2006, 01:21:44 AM
Any preview for this mod ?
Title: [SPLIT] about custom who.template.php
Post by: sbarnes on May 03, 2006, 02:16:55 AM
You can see it in action here: http://www.pick-your-brains.co.uk/index.php?action=who

If you need to log in you can use test, test
Title: [SPLIT] about custom who.template.php
Post by: Vinspire^ on May 03, 2006, 03:04:45 AM
Quote from: sbarnes on May 03, 2006, 02:16:55 AM
You can see it in action here: http://www.pick-your-brains.co.uk/index.php?action=who

If you need to log in you can use test, test

I c ... saw that. Not bad ... but how to do so ? code or ?
Title: [SPLIT] about custom who.template.php
Post by: sbarnes on May 03, 2006, 05:19:51 AM
No simply go here:
http://www.simplemachines.org/community/index.php?topic=19243.msg156339#msg156339

Download the file and replace the copy you already have. should be job done as far as I can remember.
Title: [SPLIT] about custom who.template.php
Post by: Vinspire^ on May 03, 2006, 05:40:07 AM
Quote from: sbarnes on May 03, 2006, 05:19:51 AM
No simply go here:
http://www.simplemachines.org/community/index.php?topic=19243.msg156339#msg156339

Download the file and replace the copy you already have. should be job done as far as I can remember.

Hmmm ... Downloaded & replace it on my default theme Who.template

My default theme file : 2.99 KB

Replace with this who's online file : 7.27 KB

Everything is working well. I didnt do anything wrong right ? It also work on other themes after i replace the file.

And ... I could see which forummers using what browser to browse the site. Is it possible to change the words like MSIE, Firefox to an icon ?
Title: [SPLIT] about custom who.template.php
Post by: Vinspire^ on May 03, 2006, 07:45:32 AM
My forummers ask me what is "spiders" and i dont know what to answer  >:( >:( >:( ???
Title: [SPLIT] about custom who.template.php
Post by: Kindred on May 03, 2006, 10:14:13 AM
spiders = search engine "robots".

the search engine bots that crawl the web categorizing links, etc...
Title: [SPLIT] about custom who.template.php
Post by: Vinspire^ on May 03, 2006, 10:21:09 AM
Quote from: Kindred on May 03, 2006, 10:14:13 AM
spiders = search engine "robots".

the search engine bots that crawl the web categorizing links, etc...

Is there any way to hide the spiders from whois online list ?
Title: [SPLIT] about custom who.template.php
Post by: Kindred on May 03, 2006, 10:22:50 AM
yes... modify the code to remove the display of users identified as spiders...
Title: [SPLIT] about custom who.template.php
Post by: Surferbird on May 08, 2006, 09:13:49 AM
And i haven't seen a single spider in few weeks, in fact never  ;D
Wonder time in time if this work at all but maybe it work when observe my self online  :P
Title: [SPLIT] about custom who.template.php
Post by: Bigguy on May 08, 2006, 09:16:15 AM
It works. I have it installed on my forum plus the sitemaps mod and all the spiders are crawling the forum.
Title: [SPLIT] about custom who.template.php
Post by: Owdy on May 08, 2006, 11:44:36 AM
Quote from: Surferbird on May 08, 2006, 09:13:49 AM
Wonder time in time if this work at all
Then  don't use it. Simple as that. Spiders don't crawl 24/7 in every site in this planet. Especially if you have small/new forum it takes time to spiders to find it. Weeks, months even.
Title: [SPLIT] about custom who.template.php
Post by: Surferbird on May 08, 2006, 04:05:56 PM
Can it be the CAPTCHA (code verification) that prevent spiders and robots from visiting site?
I read somewhere that spiders not like code verifications?

Why should i not use it, i'm only curious of why none have been observed  ::)
Title: [SPLIT] about custom who.template.php
Post by: mforum on May 09, 2006, 02:54:31 AM
I think CAPTCHA prevents bots of register or make a post, does not prevent them of visiting forum....They will come inventually, works just like Owdy said .  ;)
Quote from: Owdy on May 08, 2006, 11:44:36 AM
Quote from: Surferbird on May 08, 2006, 09:13:49 AM
Wonder time in time if this work at all
Then  don't use it. Simple as that. Spiders don't crawl 24/7 in every site in this planet. Especially if you have small/new forum it takes time to spiders to find it. Weeks, months even.
Title: [SPLIT] about custom who.template.php
Post by: Surferbird on May 09, 2006, 05:10:33 AM
Okay, thanks both for explaining about spiders  :D
Title: [SPLIT] about custom who.template.php
Post by: Raffaele on May 13, 2006, 01:02:25 PM
Quote from: Owdy on November 03, 2004, 01:15:56 PM
separated list for users, guests and spiders
Simply awesome! Thanx for sharing it! :D
Have a simple question: due to my (very very) poor knowledge on PHP, I need help to know what I must change to simply show other words than Members, Guests and Spiders, i.e. Membri, Ospiti and Ragni (translations in my language).(http://www.leishmania.it/tmp/whotemplate.jpg)
Big thanx in advance! 8)
Title: [SPLIT] about custom who.template.php
Post by: Kindred on May 13, 2006, 01:09:20 PM
I believe the text strings are aqdded to modifications.*language*.php
Title: [SPLIT] about custom who.template.php
Post by: Raffaele on May 14, 2006, 07:41:51 PM
Quote from: Kindred on May 13, 2006, 01:09:20 PM
I believe...
Thanx for your advice :)
Title: [SPLIT] about custom who.template.php
Post by: Surferbird on May 15, 2006, 05:30:40 AM
Can someone tell me where is it exactly, filename...because i couldn't find right place?
Title: [SPLIT] about custom who.template.php
Post by: Bigguy on May 15, 2006, 08:21:38 AM
The Who.template.php file is attached to the first post of this thread.
Title: [SPLIT] about custom who.template.php
Post by: Surferbird on May 15, 2006, 09:42:39 AM
Not looking for the who.template.php file, looking for the file in where the changes should be made for different language for Guests, Members and Spiders  ;)

Quote from: Bigguy on May 15, 2006, 08:21:38 AM
The Who.template.php file is attached to the first post of this thread.
Title: [SPLIT] about custom who.template.php
Post by: Niteblade on May 16, 2006, 10:17:26 PM
I put an amazon affiliate link on my site since the purpose is financial education.

207.171.165.38 is the spider or bot that's always on my site, and a whois reveals that it is amazon. Any possible way to add it (and the rest of the ip range) to the file in the first post ?
Title: [SPLIT] about custom who.template.php
Post by: Surferbird on May 17, 2006, 04:22:49 AM
Can someone clever SMF person or the author of this Who thing tell us where to change this 3 words to other language? Here is many clever persons in this forum, please someone who understand php, help us with this!
Where, in what file should this 3 words be translated/changed to own language?

Guests
Members
Spiders
Title: [SPLIT] about custom who.template.php
Post by: Aslan on May 17, 2006, 07:32:44 AM
Quote from: Surferbird on May 17, 2006, 04:22:49 AM
Can someone clever SMF person or the author of this Who thing tell us where to change this 3 words to other language? Here is many clever persons in this forum, please someone who understand php, help us with this!
Where, in what file should this 3 words be translated/changed to own language?

Guests
Members
Spiders

I actually have members with arachnaphobia. I too would like to change the word spiders. I did a search for any file on my machine that had the word Spider in it. I confined my search to today's date (I just downloaded and installed it):

(http://i7.photobucket.com/albums/y264/xynxy/Aslan/spiderbot01.jpg)

I right clicked on the file named Who[1].template.php.txt, went to open with and chose Wordpad.

(http://i7.photobucket.com/albums/y264/xynxy/Aslan/spiderbot02.jpg)

When the file opens in WordPad, I see stuff like this: ( I edited a COPY of the file to pull this together)

'Members' => array(),
'Guests' => array(),
'Spiders' => array(),
foreach($context['members'] AS $key => $member)
$spider = getAgent($member['query']['USER_AGENT'], $context['members'][$key]['name'], $agent, $member['id'] == 0);
$context['members'][$key]['agent'] = $agent;
$member['query']['USER_AGENT'] = isset($member['query']['USER_AGENT']) ? $member['query']['USER_AGENT'] : '';
if ( $member['id'] != 0 )
$brokendown['Members'][] = &$context['members'][$key];
else if ( $spider )
$brokendown['Spiders'][] = &$context['members'][$key];
else
$brokendown['Guests'][] = &$context['members'][$key];

$brokendown['Guests'][] = &$context['members'][$key];

Would I be safe if I consistently change the names in single quotes, like ['Members'] ['members']['Spiders']['Guests']

and do not touch stuff like: $member $spider $guest

or

do I also need to coordinate the $ names with the 'names'?

If I do have the right file, and can change it, do I have to uninstall the package then reinstall?

OR

Am I the most dangerous user of all - a semi-literate Idiot?

Title: [SPLIT] about custom who.template.php
Post by: Kindred on May 17, 2006, 07:57:02 AM
no....do not change like that!

you can't just change variable names....
Title: [SPLIT] about custom who.template.php
Post by: moonwolf on May 17, 2006, 08:24:42 AM
Quote from: nite0859 on May 16, 2006, 10:17:26 PM
I put an amazon affiliate link on my site since the purpose is financial education.

207.171.165.38 is the spider or bot that's always on my site, and a whois reveals that it is amazon. Any possible way to add it (and the rest of the ip range) to the file in the first post ?

in Sources/Subs.php

Find:

                array (
                        'agent' => 'Googlebot',
                        'spidername' => 'Google spider',
                        'spider' => true,
                ),


Add after that:

                array (
                        'agent' => 'amzn_assoc',
                        'spidername' => 'Amazon Affiliates',
                        'spider' => true,
                ),
                array (
                        'agent' => 'aranhabot',
                        'spidername' => 'Amazon Affiliates',
                        'spider' => true,
                ),


in Themes/<themename>/Who.template.php

Find:

                array (
                        'agent' => 'Googlebot',
                        'spidername' => 'Google spider',
                        'spider' => true,
                ),


Add after that:

                array (
                        'agent' => 'amzn_assoc',
                        'spidername' => 'Amazon Affiliates',
                        'spider' => true,
                ),
                array (
                        'agent' => 'aranhabot',
                        'spidername' => 'Amazon Affiliates',
                        'spider' => true,
                ),


Quote from: Surferbird on May 17, 2006, 04:22:49 AM
Can someone clever SMF person or the author of this Who thing tell us where to change this 3 words to other language? Here is many clever persons in this forum, please someone who understand php, help us with this!
Where, in what file should this 3 words be translated/changed to own language?

Guests
Members
Spiders

In Themes/<themename>/Who.template.php

Find:

        $brokendown = array (
                'Members' => array(),
                'Guests' => array(),
                'Spiders' => array(),
        );


Replace with:

        $brokendown = array (
                'Word for Members' => array(),
                'Word for Guests' => array(),
                'Word for Spiders' => array(),
        );


Find:

                if ( $member['id'] != 0 )
                        $brokendown['Members'][] = &$context['members'][$key];
                else if ( $spider ) 
                        $brokendown['Spiders'][] = &$context['members'][$key];
                else
                        $brokendown['Guests'][] = &$context['members'][$key];


Replace with:

                if ( $member['id'] != 0 )
                        $brokendown['Word for Members'][] = &$context['members'][$key];
                else if ( $spider ) 
                        $brokendown['Word for Spiders'][] = &$context['members'][$key];
                else
                        $brokendown['Word for Guests'][] = &$context['members'][$key];


You can use whatever word you like, but it has to be the same in both sections.
Title: [SPLIT] about custom who.template.php
Post by: Surferbird on May 17, 2006, 09:03:20 AM
It worked, translations is done and all show up ok.

Thank you very much moonwolf  :)
Title: [SPLIT] about custom who.template.php
Post by: Niteblade on May 17, 2006, 06:09:04 PM
I love smart people.

I'll try this when I get home.

Here's a nice little challenge.  :P Add all of these (http://www.psychedelix.com/agents/index.shtml) to the list. :)
Title: [SPLIT] about custom who.template.php
Post by: moonwolf on May 17, 2006, 07:04:08 PM
Quote from: Aslan on May 17, 2006, 07:32:44 AM
I actually have members with arachnaphobia. I too would like to change the word spiders. I did a search for any file on my machine that had the word Spider in it. I confined my search to today's date (I just downloaded and installed it):

To do this you probably want to change the individual spider's names as well.

In Sources/Subs.php

Find every line that starts with

                        'spidername' => '

If the name after that includes the word "Spider", replace Spider in that line with Crawler or whatever you want.

You need to do the same to Themes/<themename>/Who.template.php ... change every line that is the "spidername" variable to remove the word "Spider" from the crawler's name.  i.e.


                        'spidername' => 'Google spider',


becomes


                        'spidername' => 'Google crawler',
Title: [SPLIT] about custom who.template.php
Post by: Aslan on May 17, 2006, 11:52:51 PM
Thank you moonwolf. Smart and kind is a great combination!
Title: [SPLIT] about custom who.template.php
Post by: Niteblade on May 21, 2006, 10:24:09 PM
I'm sorry to report that this did not work. The Amazon bot still shows up as a guest. As soon as I make a new post on my forum, this bot (as well as Google's spider) shows up to spider the page ...
Title: [SPLIT] about custom who.template.php
Post by: moonwolf on May 21, 2006, 10:27:09 PM
if it's still showing up as guest, make a note of the useragent that shows up after the IP address, and add that as a block to the files, the same way you added amzn_assoc and aranhabot.
Title: [SPLIT] about custom who.template.php
Post by: Niteblade on May 21, 2006, 10:40:52 PM
All I see is this ...

Guest
(207.171.165.38, Mozilla)

When I track the IP, I see this...

OrgName:    Amazon.com, Inc.
OrgID:      AMAZON-4
Address:    605 5th Ave S
City:       SEATTLE
StateProv:  WA
PostalCode: 98104
Country:    US

NetRange:   207.171.160.0 - 207.171.191.255
CIDR:       207.171.160.0/19
NetName:    AMAZON-01
NetHandle:  NET-207-171-160-0-1
Parent:     NET-207-0-0-0-0
NetType:    Direct Assignment
NameServer: NS-1.AMAZON.COM
NameServer: NS-2.AMAZON.COM
NameServer: NS-3.AMAZON.COM
NameServer: AUTH00.NS.UU.NET
Comment:   
RegDate:    1999-09-23
Updated:    2002-03-19

RTechHandle: AC6-ORG-ARIN
RTechName:   Amazon.com, Inc.
RTechPhone:  +1-206-266-2187
RTechEmail:  [email protected]

OrgTechHandle: ROLEA19-ARIN
OrgTechName:   Role Account
OrgTechPhone:  +1-206-266-2187
OrgTechEmail:  [email protected]

# ARIN WHOIS database, last updated 2006-05-21 19:10
# Enter ? for additional hints on searching ARIN's WHOIS database.

PS : I enjoy your signature. Dune, eh?
Title: [SPLIT] about custom who.template.php
Post by: moonwolf on May 21, 2006, 11:01:17 PM
Why would Amazon's spider be showing its useragent as Mozilla?

just because the IP is Amazon's, it doesn't mean that this is coming from Amazon's spidering ...
Title: [SPLIT] about custom who.template.php
Post by: Niteblade on May 21, 2006, 11:35:29 PM
Good question.

Maybe some one'll come along and help out.
Title: [SPLIT] about custom who.template.php
Post by: DemonicInfluence on May 22, 2006, 08:23:17 PM
Ever think that maybe somebody from amazon was surfing with mozilla browser?
Title: [SPLIT] about custom who.template.php
Post by: Niteblade on May 22, 2006, 10:50:38 PM
Quote from: DemonicInfluence on May 22, 2006, 08:23:17 PM
Ever think that maybe somebody from amazon was surfing with mozilla browser?

Within seconds after each time a new post is created ?
Title: [SPLIT] about custom who.template.php
Post by: Owdy on May 23, 2006, 12:27:50 AM
Quote from: moonwolf on May 17, 2006, 08:24:42 AM
Quote from: nite0859 on May 16, 2006, 10:17:26 PM
I put an amazon affiliate link on my site since the purpose is financial education.

207.171.165.38 is the spider or bot that's always on my site, and a whois reveals that it is amazon. Any possible way to add it (and the rest of the ip range) to the file in the first post ?

in Sources/Subs.php

Find:

There is no need to edit Subs.php if you wanna ad spiders to this action. Just ad them to this file, Who.template.php.

Quote from: Surferbird on May 17, 2006, 04:22:49 AM
Can someone clever SMF person or the author of this Who thing tell us where to change this 3 words to other language? Here is many clever persons in this forum, please someone who understand php, help us with this!
Where, in what file should this 3 words be translated/changed to own language?

Guests
Members
Spiders

This is how i translated this to finnish:
// The only template in the file.
function template_main()
{
  global $context, $settings, $options, $scripturl, $txt;
  // Display the table header and linktree.
  echo '
  <div style="padding: 3px;">', theme_linktree(), '</div>';
  $brokendown = array (
'Jäsenet' => array(),
'Vieraat' => array(),
'Hakurobotit' => array(),
  );
 
  foreach($context['members'] AS $key => $member)
  {
$spider = getAgent($member['query']['USER_AGENT'], $context['members'][$key]['name'], $agent, $member['id'] == 0);
$context['members'][$key]['agent'] = $agent;
$member['query']['USER_AGENT'] = isset($member['query']['USER_AGENT']) ? $member['query']['USER_AGENT'] : '';
if ( $member['id'] != 0 )
$brokendown['Jäsenet'][] = &$context['members'][$key];
else if ( $spider )
$brokendown['Hakurobotit'][] = &$context['members'][$key];
else
$brokendown['Vieraat'][] = &$context['members'][$key];
  }


Again, just edit this file, nothing else.
Title: [SPLIT] about custom who.template.php
Post by: moonwolf on May 23, 2006, 08:07:53 AM
Quote from: Owdy on May 23, 2006, 12:27:50 AM
There is no need to edit Subs.php if you wanna ad spiders to this action. Just ad them to this file, Who.template.php.

the patch covers if you have the Googlebot & Spiders (http://mods.simplemachines.org/index.php?mod=143) mod installed as well, hence the Subs.php changes.  it makes sense if the people who wanted the changes in the improved Who mod to give them the same options for the User Info Center block.
Title: [SPLIT] about custom who.template.php
Post by: Owdy on May 23, 2006, 11:26:51 AM
Quote from: moonwolf on May 23, 2006, 08:07:53 AM
Quote from: Owdy on May 23, 2006, 12:27:50 AM
There is no need to edit Subs.php if you wanna ad spiders to this action. Just ad them to this file, Who.template.php.

the patch covers if you have the Googlebot & Spiders (http://mods.simplemachines.org/index.php?mod=143) mod installed as well, hence the Subs.php changes.  it makes sense if the people who wanted the changes in the improved Who mod to give them the same options for the User Info Center block.
I understand that, but this topic isn't about Googlebot & Spiders mod. If your code is for some other MOD, at least say it when you post your code. Even better, post your code to Googlebot & Spiders mod topic where it belongs.

If user just wanna use this file/action, your modifications are totally unnecessary.

Thanks.
Title: [SPLIT] about custom who.template.php
Post by: moonwolf on May 23, 2006, 11:30:03 AM
Actually, I was posting the mod for both, but your gratitude is appreciated.  next time you come up with the answers instead?  it was your mod to begin with after all.

and people wonder why no-one bothers to answer questions for weeks.
Title: [SPLIT] about custom who.template.php
Post by: Owdy on May 23, 2006, 11:34:44 AM
No need to get angry here. I just say at least tell people that your code is for some other mod, not for this file. People allways get mixed up with thise 2 mods and you arent helping clearing that up.
Title: [SPLIT] about custom who.template.php
Post by: moonwolf on May 23, 2006, 11:46:14 AM
I don't get angry - just bored.

the confusion over the two mods might be because those using your Who mod might also want the Googlebot & Spiders mod so they have consistency between who's online and the Who page itself.  maybe you should consider merging the two.  either way, I'm not going to assume they have one and not the other, since the changes apply to both, so I post code to change both.  When it gets confusing, I clarified.

I'm not all that interested in boosting my post count by posting redundancies to two separate threads, and unlikely to consider it very efficient to have people who ask for help have to go look at 2 separate threads to read the exact same thing with just filenames and line numbers changed.

If that offends your sensibilities - *shrugs*

the fix is posted, people can see where it goes.  arguing over where the fix got posted is fairly boring.
Title: [SPLIT] about custom who.template.php
Post by: Owdy on May 23, 2006, 11:52:25 AM
Sorry to get you bored but i have right to keep my topic clean and understandable. If you find that boring, move on.

/me starts to clean to house.

edit: topic splitted. Original: http://www.simplemachines.org/community/index.php?topic=19243.0