News:

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

Main Menu

Googlebot & Spiders

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

Previous topic - Next topic

Omar Bazavilvazo

No, it shouldn't

I suppose somehow it got installed twice.

Which version of the mod and SMF you have installed?




Personal Signature:
HablaJapones
http://hablajapones.org
http://hablajapones.org/tutoriales.php


NO me manden PM para soporte o dudas
...Leo los foros como todos...

slimjack

SMF 1.1 R3
Googlebot mod 2.0.2

If I need to manually edit something, that's not an issue - so don't spare me.  LOL.


Omar Bazavilvazo

Quote from: slimjack on September 24, 2006, 09:36:10 PM
SMF 1.1 R3
Googlebot mod 2.0.2

If I need to manually edit something, that's not an issue - so don't spare me.  LOL.



heh

Boardindex.template.php should look somethinglike this:

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

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

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

echo '
<br />', $context['show_stats'] && !$settings['show_sp1_info'] ? '
<a href="' . $scripturl . '?action=stats">' . $txt['smf223'] . '</a>' : '', '
</span>
</td>
</tr>';



check if you don't have duplicated code somewhere :S




Personal Signature:
HablaJapones
http://hablajapones.org
http://hablajapones.org/tutoriales.php


NO me manden PM para soporte o dudas
...Leo los foros como todos...

slimjack

I've made the edit to boardindex.php but didn't hvae a boardindex.template.php.  The one I found was in the sources folder and did, in fact, have some duplicate code.

Would this be the file or should I be looking for another similar one elsewhere?  I've noticed that my files are sometimes cached and it takes a few moments after an edit like this to see the diff in a browser.

Omar Bazavilvazo

Here is a smf 1.1 rc2 & googlemod 2.0.2 "normal" Boardindex.template.php, without any other modification, for you to compare :)

And yeah, but be on "default" theme, since if you don't have any file on you new theme, it grabs the file from there.





Personal Signature:
HablaJapones
http://hablajapones.org
http://hablajapones.org/tutoriales.php


NO me manden PM para soporte o dudas
...Leo los foros como todos...

slimjack

Ahhhhh... I didn't know that.

Would I be safe to grab those and copy them to my new theme directory?  I did, after all, create this theme from a copy of the default.

When we pull over (I've been doing this in my car today from my laptop as I fly down the highway travelling) I'll make these edits.

Omar Bazavilvazo

Quote from: slimjack on September 24, 2006, 10:22:42 PM
Ahhhhh... I didn't know that.

Would I be safe to grab those and copy them to my new theme directory?  I did, after all, create this theme from a copy of the default.

When we pull over (I've been doing this in my car today from my laptop as I fly down the highway travelling) I'll make these edits.

Nope, is safer to just modify "default" theme files, unless you have a file that already exists on your new theme, in which case is necessary. But there is no case to have 2 copies of the same file in 2 diferent directories :)

So, edit the default theme files always, unless you have the same copy already on your theme dir.




Personal Signature:
HablaJapones
http://hablajapones.org
http://hablajapones.org/tutoriales.php


NO me manden PM para soporte o dudas
...Leo los foros como todos...

slimjack

No duplicate info found in the boardindex.template.php file in the default dir.  The googlebot code is there... but not twice.

Omar Bazavilvazo

Is a mess heh

In BoardIndex.php there is no duplicate code neither? :S

Which mods you have installed?




Personal Signature:
HablaJapones
http://hablajapones.org
http://hablajapones.org/tutoriales.php


NO me manden PM para soporte o dudas
...Leo los foros como todos...

slimjack

I was digging through boardindex now.

I found this:

   krsort($context['users_online']);
   krsort($context['list_users_online']);
   ksort($context['online_groups']);
   ksort($context['spiders']);
   ksort($context['spiders']);

should that last bit be twice?  it's not like the rest of the duplicate stuff I've found so far.... this was only one line.  I killed it.

Omar Bazavilvazo

It doesnt affects, but should be only once, so, i think you will have duplicated code in a lot of places.

in the .zip of the package, in the install.xml, is all the modifications for the mod, you can:

1) put a clean smf (like when upgrading), and reinstall all mods
2) check the install.xml for the changes, to be sure are only 1 time

I suspect you did somehow 2 installations, and that's why is a mess.

use the Googlebot_v2_0_2_only_smf1.1rcx.zip Only




Personal Signature:
HablaJapones
http://hablajapones.org
http://hablajapones.org/tutoriales.php


NO me manden PM para soporte o dudas
...Leo los foros como todos...

slimjack

Okay... found something that didn't get done...

If I read it right it said that the following:
if (isset($context['ob_googlebot_stats']))
      echo '
      <br /><br /><span class="smalltext">', $txt['ob_googlebot_stats_lastvisit'], timeformat($context['ob_googlebot_stats']['Googlebot']['lastvisit']), '</span>';]]>

should be added into index.template.php in the them directory and that it should go after the "      // Show the load time?" found roughly on line 359.
But adding it gets me an error that there is an unexpected ' in the code on that line.

Did I read this wrong?

Bigguy

I don't think this should be on the end of it:

]]>

Delete that and see what happens.

slimjack

Ugh.

That didn't work either.

I've gone through every bit of code I could find and eliminated all the duplicates I've seen but NOTHING has changed.

Where is the code that shows who is online and how many spiders there are, etc.?  Somewhere I'm missing the duplicate.

And I can't even uninstall it.  LOL.

Omar Bazavilvazo

Ok,

You have to check the BoardIndex.php and BoardIndex.template.php files

Here is a .zip containing a "clean" smf 1.1RC3 with Googlebot:
Smf_11rc3.Zip by Bigupload.Com

You can compare this directories with your own installation using something like WinMerge.

Also, I'm adding 2 reports of the changes made by my mod in those 2 files.

And, as you asked, here is where the list of who is online is generated:
', $context['show_who'] ? '<a href="' . $scripturl . '?action=who">' : '', (empty($context['spiders']) ? '' : $context['num_spiders'] . ' ' . ($context['num_spiders'] == 1 ? $txt['ob_googlebot_spider'] : $txt['ob_googlebot_spiders']) . ', '), $context['num_guests'], ' ', $context['num_guests'] == 1 ? $txt['guest'] : $txt['guests'], ', ' . $context['num_users_online'], ' ', $context['num_users_online'] == 1 ? $txt['user'] : $txt['users'];

:)




Personal Signature:
HablaJapones
http://hablajapones.org
http://hablajapones.org/tutoriales.php


NO me manden PM para soporte o dudas
...Leo los foros como todos...

slimjack

Thanks for the winmerge tip and the clean install files.

I've run it and made the changes so that the two files are identicle.  But I'm still seeing this:

1 Spider, 1 Spider, 0 Guests, 1 User (0 Buddies)
Users active in past 15 minutes:
SlimJack
Spiders active in past 15 minutes:
Yahoo! Slurp
Spiders active in past 15 minutes:
Yahoo! Slurp

Could this be cached somewhere?  Is there another file I should be comparing?

Omar Bazavilvazo

Nope, is not cached.

can you zip all your forum dirs as i did so i can compare it?

Quote from: slimjack on September 25, 2006, 12:21:53 PM
Thanks for the winmerge tip and the clean install files.

I've run it and made the changes so that the two files are identicle.  But I'm still seeing this:

1 Spider, 1 Spider, 0 Guests, 1 User (0 Buddies)
Users active in past 15 minutes:
SlimJack
Spiders active in past 15 minutes:
Yahoo! Slurp
Spiders active in past 15 minutes:
Yahoo! Slurp

Could this be cached somewhere?  Is there another file I should be comparing?




Personal Signature:
HablaJapones
http://hablajapones.org
http://hablajapones.org/tutoriales.php


NO me manden PM para soporte o dudas
...Leo los foros como todos...

slimjack

You bet, thanks for the offer to take a look at it.

I've rar'd the whole thing up and put it on the site.  I only did the whole thing (minus avatars and smiley dir's) just to be sure - I'm positive you don't need it all but wanted to just be safe.

I'll pm you the link to download it.

RoarinRow

Quote from: Omar Bazavilvazo on September 25, 2006, 11:23:12 AM
Ok,

You have to check the BoardIndex.php and BoardIndex.template.php files

Here is a .zip containing a "clean" smf 1.1RC3 with Googlebot:
Smf_11rc3.Zip by Bigupload.Com

You can compare this directories with your own installation using something like WinMerge.

Also, I'm adding 2 reports of the changes made by my mod in those 2 files.

And, as you asked, here is where the list of who is online is generated:
', $context['show_who'] ? '<a href="' . $scripturl . '?action=who">' : '', (empty($context['spiders']) ? '' : $context['num_spiders'] . ' ' . ($context['num_spiders'] == 1 ? $txt['ob_googlebot_spider'] : $txt['ob_googlebot_spiders']) . ', '), $context['num_guests'], ' ', $context['num_guests'] == 1 ? $txt['guest'] : $txt['guests'], ', ' . $context['num_users_online'], ' ', $context['num_users_online'] == 1 ? $txt['user'] : $txt['users'];

:)

I notice that one of my users generate this error message:

8: Undefined index: ob_googlebot_spiders
File: /forum/SSI.php
Line: 758

Anything I can do?

SMF 2.0
TP 1.0 RC1.1
Wordpress 3.1.3

exoticbirds_us

Hi, I installed the googlebot & spiders mod ver2.2 on rc3, and it doesnt appear to be working. I have all the controls in the admin panel, but google was at my site last night, and it didnt say so.... I have the permissions set so even a guest should see the spiders in the who's online list. my url is :
hxxp:www.exoticbirds.us/forum/ [nonactive]

Any info would help... Thanks

Exoticbirds_us

Advertisement: