Advertisement:

Author Topic: [SPLIT] about custom who.template.php  (Read 62331 times)

Offline Surferbird

  • Full Member
  • ***
  • Posts: 473
[SPLIT] about custom who.template.php
« Reply #180 on: May 17, 2006, 09:03:20 AM »
It worked, translations is done and all show up ok.

Thank you very much moonwolf  :)
« Last Edit: May 17, 2006, 03:49:33 PM by Surferbird »
.:: Always something to ask - always grateful for assistance ::.

Offline Niteblade

  • Full Member
  • ***
  • Posts: 662
  • Gender: Male
    • Prosperent Ads
[SPLIT] about custom who.template.php
« Reply #181 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 to the list. :)
« Last Edit: May 17, 2006, 06:17:08 PM by nite0859 »
affiliate blog

Offline moonwolf

  • Newbie
  • *
  • Posts: 8
  • Gender: Female
[SPLIT] about custom who.template.php
« Reply #182 on: May 17, 2006, 07:04:08 PM »
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
Code: [Select]
                        '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.

Code: [Select]
                        'spidername' => 'Google spider',

becomes

Code: [Select]
                        'spidername' => 'Google crawler',
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.

Offline Aslan

  • Semi-Newbie
  • *
  • Posts: 21
  • Gender: Male
  • Global Village Idiot
    • Aslan's Attic
[SPLIT] about custom who.template.php
« Reply #183 on: May 17, 2006, 11:52:51 PM »
Thank you moonwolf. Smart and kind is a great combination!
Let everyone sweep in front of his own door,
and the whole world will be clean.
Goethe

Offline Niteblade

  • Full Member
  • ***
  • Posts: 662
  • Gender: Male
    • Prosperent Ads
[SPLIT] about custom who.template.php
« Reply #184 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 ...
affiliate blog

Offline moonwolf

  • Newbie
  • *
  • Posts: 8
  • Gender: Female
[SPLIT] about custom who.template.php
« Reply #185 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.
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.

Offline Niteblade

  • Full Member
  • ***
  • Posts: 662
  • Gender: Male
    • Prosperent Ads
[SPLIT] about custom who.template.php
« Reply #186 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:  NOC@amazon.com

OrgTechHandle: ROLEA19-ARIN
OrgTechName:   Role Account
OrgTechPhone:  +1-206-266-2187
OrgTechEmail:  noc@amazon.com

# 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?
« Last Edit: May 21, 2006, 10:42:54 PM by nite0859 »
affiliate blog

Offline moonwolf

  • Newbie
  • *
  • Posts: 8
  • Gender: Female
[SPLIT] about custom who.template.php
« Reply #187 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 ...
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.

Offline Niteblade

  • Full Member
  • ***
  • Posts: 662
  • Gender: Male
    • Prosperent Ads
[SPLIT] about custom who.template.php
« Reply #188 on: May 21, 2006, 11:35:29 PM »
Good question.

Maybe some one'll come along and help out.
affiliate blog

Offline DemonicInfluence

  • Full Member
  • ***
  • Posts: 564
  • Gender: Male
    • The House Of Politics
[SPLIT] about custom who.template.php
« Reply #189 on: May 22, 2006, 08:23:17 PM »
Ever think that maybe somebody from amazon was surfing with mozilla browser?

Offline Niteblade

  • Full Member
  • ***
  • Posts: 662
  • Gender: Male
    • Prosperent Ads
[SPLIT] about custom who.template.php
« Reply #190 on: May 22, 2006, 10:50:38 PM »
Ever think that maybe somebody from amazon was surfing with mozilla browser?

Within seconds after each time a new post is created ?
affiliate blog

Offline Owdy

  • SMF Fossil
  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 15,627
  • Gender: Male
  • W00t!
    • janoloferiksson on LinkedIn
    • @@jaoler on Twitter
[SPLIT] about custom who.template.php
« Reply #191 on: May 23, 2006, 12:27:50 AM »
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.

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:
Code: [Select]
// 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.
« Last Edit: May 23, 2006, 12:37:15 AM by Owdy »
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

Offline moonwolf

  • Newbie
  • *
  • Posts: 8
  • Gender: Female
[SPLIT] about custom who.template.php
« Reply #192 on: May 23, 2006, 08:07:53 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 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.
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.

Offline Owdy

  • SMF Fossil
  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 15,627
  • Gender: Male
  • W00t!
    • janoloferiksson on LinkedIn
    • @@jaoler on Twitter
[SPLIT] about custom who.template.php
« Reply #193 on: May 23, 2006, 11:26:51 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 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.
« Last Edit: May 23, 2006, 11:29:31 AM by Owdy »
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

Offline moonwolf

  • Newbie
  • *
  • Posts: 8
  • Gender: Female
[SPLIT] about custom who.template.php
« Reply #194 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.
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.

Offline Owdy

  • SMF Fossil
  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 15,627
  • Gender: Male
  • W00t!
    • janoloferiksson on LinkedIn
    • @@jaoler on Twitter
[SPLIT] about custom who.template.php
« Reply #195 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.
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

Offline moonwolf

  • Newbie
  • *
  • Posts: 8
  • Gender: Female
[SPLIT] about custom who.template.php
« Reply #196 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.
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.

Offline Owdy

  • SMF Fossil
  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 15,627
  • Gender: Male
  • W00t!
    • janoloferiksson on LinkedIn
    • @@jaoler on Twitter
[SPLIT] about custom who.template.php
« Reply #197 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.

* Owdy starts to clean to house.

edit: topic splitted. Original: http://www.simplemachines.org/community/index.php?topic=19243.0
« Last Edit: May 23, 2006, 12:43:42 PM by Owdy »
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