Googlebot & Spiders

Started by Omar Bazavilvazo, June 06, 2005, 06:17:35 PM

Previous topic - Next topic

david_meyer24

Shame he is not SMF 2.0 RC5.

HunterP

Quote from: MoreBloodWine on August 28, 2010, 06:55:45 PM
Found it thx, but I really prefer the way this mod shows them compared to

6 Guests, 1 User (1 Spider)

With this mod spiders were in their own list and removed from the guest count so instead of the above we'd expect to see something like this...

5 Guests, 1 User, 1 Spider

I've just modded this myself. No separate lists, but a different way of counting and showing.

In BoardIndex.php

Code (Find) Select
// "Users online" - in order of activity.
echo '
<div class="infocenter_section">
<h4 class="titlebg">', $txt['online_users'], '</h4>
<div class="windowbg">
<p class="section">
', $context['show_who'] ? '<a href="' . $scripturl . '?action=who' . '">' : '', '<img src="', $settings['images_url'], '/icons/online.gif', '" alt="', $txt['online_users'], '" />', $context['show_who'] ? '</a>' : '', '
</p>
<div class="windowbg2 sectionbody">
', $context['show_who'] ? '<a href="' . $scripturl . '?action=who">' : '', comma_format($context['num_guests']), ' ', $context['num_guests'] == 1 ? $txt['guest'] : $txt['guests'], ', ' . comma_format($context['num_users_online']), ' ', $context['num_users_online'] == 1 ? $txt['user'] : $txt['users'];

// Handle hidden users and buddies.
$bracketList = array();
if ($context['show_buddies'])
$bracketList[] = comma_format($context['num_buddies']) . ' ' . ($context['num_buddies'] == 1 ? $txt['buddy'] : $txt['buddies']);
if (!empty($context['num_spiders']))
$bracketList[] = comma_format($context['num_spiders']) . ' ' . ($context['num_spiders'] == 1 ? $txt['spider'] : $txt['spiders']);
if (!empty($context['num_users_hidden']))
$bracketList[] = comma_format($context['num_users_hidden']) . ' ' . $txt['hidden'];

if (!empty($bracketList))
echo ' (' . implode(', ', $bracketList) . ')';

Code (Replace By) Select
// "Users online" - in order of activity.
echo '
<div class="infocenter_section">
<h4 class="titlebg">', $txt['online_users'], '</h4>
<div class="windowbg">
<p class="section">
', $context['show_who'] ? '<a href="' . $scripturl . '?action=who' . '">' : '', '<img src="', $settings['images_url'], '/icons/online.gif', '" alt="', $txt['online_users'], '" />', $context['show_who'] ? '</a>' : '', '
</p>
<div class="windowbg2 sectionbody">
', $context['show_who'] ? '<a href="' . $scripturl . '?action=who">' : '', comma_format($context['num_users_online']), ' ', $context['num_users_online'] == 1 ? $txt['user'] : $txt['users'];

// Handle hidden users and buddies.
$bracketList = array();
if ($context['show_buddies'])
$bracketList[] = comma_format($context['num_buddies']) . ' ' . ($context['num_buddies'] == 1 ? $txt['buddy'] : $txt['buddies']);
if (!empty($context['num_users_hidden']))
$bracketList[] = comma_format($context['num_users_hidden']) . ' ' . $txt['hidden'];

if (!empty($bracketList))
echo ' (' . implode(', ', $bracketList) . ')';

echo ' - ', comma_format($context['num_guests']), ' ', $context['num_guests'] == 1 ? $txt['guest'] : $txt['guests'];

// Handle spiders
if (!empty($context['num_spiders']))
echo ' - ', comma_format($context['num_spiders']) . ' ' . ($context['num_spiders'] == 1 ? $txt['spider'] : $txt['spiders']);


6 Guests, 3 Users (1 Buddy, 1 Spider, 1 Hidden)

will be shown as

3 Users (1 Buddy, 1 Hidden) - 5 Guests - 1 Spider

mitk0o0o0

Hello, I am trying to install Googlebot on my forum but there seems to be a problem with the BoardIndex.template.php file. Others shows Test successful but only that one says Test failed

Running SMF 1.1.13

Has anyone else gotten this? Is there a way getting around? I'm scared to click Install cause it may ruin the forum.

FragaCampos

You must do the changes manually.
Consult the parser on the download page to see what you have to do.

Don't forget: always make backups before installing new mods.

ë®â§e®


karlbenson

smf 2.0 has spider detection build in.

ë®â§e®


Kat9119

This hasn't been updated in awhile..and I've had it installed for a long long time....but am now having a little issue, and I don't know who's fault it is lol. Let me explain.

I installed this, and also installed the custom Who.template.php (http://www.simplemachines.org/community/index.php?topic=19243.320 which has since been closed, and I'm guessing my problem is with that, but could be this I'm not sure. Getting to that).

So lately I've been noticing like 30+ guests on my forum, took a look at who was online, and noticed most of them were bots, like Bing Bots and whatnot. So, I added the "agent" to the custom who.template.php and when you then go to the /forum/index.php?action=who on my site, I see BingBot listed as a spider, but on the main index of the board, it won't show that those new spiders are on. . . and they'll still be in the guest count on board index...

Any suggestions on how to fix this?

Coon

^^^^

I'm seeing a similar issue.

I'm using 1.1.16 and I'm seeing this:

1 Spider, 48 Guests, 3 Users
Users active in past 30 minutes:
Adi, Knnthh, Karcio, Google spider

When I click on more info, I see tons of bots in there with IP 180.XXX.

It seems a lot of bots are getting past the detection system.  What do I need to do to pickup more of the spiders so they don't fall under the Guest count?

FragaCampos

You have to add them manually to your Subs.php, Display.php and Who.template.php files.

Jade Elizabeth

If you're on 2.0 there's an admin interface. Just add the useragent to the list of spiders.
Once proud Documentation Writer and Help Squad Leader | Check out my new adult coloring career: Color With Jade/Patreon.

Impsat-1

Mmm... hey Guys, someone can UpGrade the MOD for SMF 2.0.7?... is a great MOD, Please... considered..., Thanks & Regards 8).-

MOD Googlebot & Spiders
Vive Cáda Momento De Tu Vida Como Si Fueras a Irte Mañana, Más Planificala Cómo Si Jamás Fueras a Irte ;).-

Kindred

something similar is already a standard feature in SMF 2.0.x
Сл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."

diegolyanky

Hi:

A question for developer:

I need to clear my db ... ob_googlebot_stats table is too big now ... ( 8 years working = 2,755,858 rows ) ...

Any way to clear the google bot activity log ?

Can I clear that table ?

Thanks !!
SMF ... SimpleMachines ... Simple, but complete if you want it ;)

Advertisement: