[SPLIT] about custom who.template.php

Started by Ben_S, November 03, 2004, 01:19:53 PM

Previous topic - Next topic

Kindred

spiders = search engine "robots".

the search engine bots that crawl the web categorizing links, etc...
Сл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."

Vinspire^

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 ?

Kindred

yes... modify the code to remove the display of users identified as spiders...
Сл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."

Surferbird

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
.:: Always something to ask - always grateful for assistance ::.

Bigguy

It works. I have it installed on my forum plus the sitemaps mod and all the spiders are crawling the forum.

Owdy

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.
Former Lead Support Specialist

Tarvitsetko apua SMF foorumisi kanssa? Otan työtehtäviä vastaan, lue:http://www.simplemachines.org/community/index.php?topic=375918.0

Surferbird

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  ::)
.:: Always something to ask - always grateful for assistance ::.

mforum

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.

Surferbird

Okay, thanks both for explaining about spiders  :D
.:: Always something to ask - always grateful for assistance ::.

Raffaele

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).
Big thanx in advance! 8)

Kindred

I believe the text strings are aqdded to modifications.*language*.php
Сл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."


Surferbird

Can someone tell me where is it exactly, filename...because i couldn't find right place?
.:: Always something to ask - always grateful for assistance ::.

Bigguy

The Who.template.php file is attached to the first post of this thread.

Surferbird

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.
.:: Always something to ask - always grateful for assistance ::.

Niteblade

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 ?
affiliate blog

Surferbird

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
.:: Always something to ask - always grateful for assistance ::.

Aslan

#177
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):



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



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?

Let everyone sweep in front of his own door,
and the whole world will be clean.
Goethe

Kindred

#178
no....do not change like that!

you can't just change variable names....
Сл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."

moonwolf

#179
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.
hxxp:creativecommons.org/licenses/by-nc-sa/2.5/ [nonactive]
Original code, patches, and fragments by the author are  licensed under a hxxp:creativecommons.org/licenses/by-nc-sa/2.5/ [nonactive].
Just a pity that even has to be said.

Advertisement: