Googlebot & Spiders

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

Previous topic - Next topic

goitalone

I put the old and the new files up.

goitalone

Also, have you been following at all my problem with IE6 not being able use the News Fader?

I have asked serveral people and they haven't gotten back with me on it yet.

I don't know if they are working on a fix for the issue er not.

It's only on a few themes that the fader will not fade or change to the next message.

It does fade on Firefox though..all the themes did..just some kinda bug with IE6 and js er something.

This is the error coming up...someone showed me in a post in a diff thread how it came up in his IE6

http://www.simplemachines.org/community/index.php?topic=138377.msg941834#msg941834 

I am currently using Moonraker theme...a saw this error in a few other themes as well.


Bigguy

Try this for your subs.php BACK UP FIRST

goitalone

Ok, after put your Subs.php in there all the pages work, but display this error at the header:

Notice: Undefined variable: modSettings in /www/110mb.com/g/o/i/t/a/l/o/n/goitaloner/htdocs/forumtest/Sources/Subs.php on line 3310
TEST FORUM

February 06, 2007, 01:20:15 AM  Hello test
Show unread posts since last visit.
Show new replies to your posts.
Total time logged in: 2 hours and 52 minutes.

And this at the footer:

Fatal error: Call to undefined function template_footer() in /www/110mb.com/g/o/i/t/a/l/o/n/goitaloner/htdocs/forumtest/Sources/Subs.php on line 2679

Then, I went in to the googlebots tab and checkmarked ALL the boxes, and then the forum crashed while going to the next page after applying the settings and displayed this error on a blank white page again:

Notice: Undefined variable: modSettings in /www/110mb.com/g/o/i/t/a/l/o/n/goitaloner/htdocs/forumtest/Sources/Subs.php on line 3310






Bigguy

You still have the mod installed right. You didn't uninstall it and then add the new Subs.php Looks like more edits have gotten in twice. Thats what the problem was with the Subs.php 1 edit was in the wrong place and the other was in twice. Can I see your modsettings.php and take off the check marks on all that might stop the error at the bottom. I am not sure about that one yet.

goitalone

Well, I may tested the googlebots on the testforum once before like a few days ago..I think I did, not for sure though what I did though.

I just realized that it is only when I click Save that it goes to the Notice: Undefined variable: modSettings in /www/110mb.com/g/o/i/t/a/l/o/n/goitaloner/htdocs/forumtest/Sources/Subs.php on line 3310

So basically, it will not save..this is how the settings are  stuck at:

Googlebot & Spiders  (check marked)
Count all instances of same spider    (check marked)
Display all instances of same spider
("Count all instances of same spider" must be selected)   
Display agent instead of name   
Display spiders in its own list   

--------------------------------------------------------------------------------

Count in "Most Online"   

--------------------------------------------------------------------------------

Redirect PHPSESSID URLs    (check marked)



Bigguy

Well, I think everything looked fine in that file. I did move a couple things around but I doubt it made a difference. Try this anyway. BACKUP first:

tinatoth

Ok for the record, I have just installed it in a test 1.1.1 forum now, and I am getting no errors at all. Can't tell for sure if it's really working or not cos there are no bots viewing that forum, but basically, no errors at all for me, so maybe it does work!

I'll see when I eventually install it in my real forum which has lots of bots in it all the time. I'll do that once I sort out its template (the BoardIndex.template.php is for the default theme and mine is based on classic, need to fiddle with that).

lordevil

If you are talking about that spider and bots thing it has been working on mine daily. I have 1.1.1 and no problems at all with installation. I get a lot of yahoo soiders, I don't think they really do much though but make people paranoid. Can they read content on hidden boards, does anyone know this?

Bigguy

I have it installed on 1.1 Final and it works to so maybe it is working but conflicting with packages people have installed.

goitalone

#1070
OK, don't forget though that was just my test forum and also I am using the Moonraker theme..which apparently is based on the  BoardIndex.template.php  

EDIT: Also, they were BOTH set up with Moonraker themes when I installed it.

goitalone

I can't remember if I checked it on default theme or any others though.

tinatoth

Quote from: goitalone on February 05, 2007, 08:44:36 PM
OK, don't forget though that was just my test forum and also I am using the Moonraker theme..which apparently is based on the  BoardIndex.template.php 
may be a dumb question, but you have copied all the affected theme files from default to moonraker, right? (Or copied the changes manually, whichever) Cos the mod won't do it automatically, it only edits the default theme. If you've done it, appologies. :)

Question to Bigguy - if there are no bots or spiders viewing the forum, will it say "0 Spiders" or will it just not mention them at all on the board index summary?


tinatoth

Quote from: lordevil on February 05, 2007, 08:43:03 PM
Can they read content on hidden boards, does anyone know this?
Shouldn't be able to. I've had some confusion today cos I closed the forum for guests yesterday, but the bots still seemed to be viewing topics today. My guess is they were just accessing their URLs cos they have them saved, but in fact couldn't see anything past the log in screen.


goitalone

No, I didn't copy anything from default to Moonraker cause I couldn't find any information about how to install it manually.

So, which files do I need to put in there?  

lordevil

I have mine in the users list and if shows spiders, guests, Users, when none are around it just shows guests and users. I have 7 on average  

goitalone

#1076
I just installed the googlebot mod on the test forum and then I replaced the Subs.php with the one it modified and it looks like everything is ok...my question is, how can I make sure, and ..is it suppose to look any different on the board from what the Who.template.php looks like? (after being added)

tinatoth

Quote from: goitalone on February 05, 2007, 08:50:29 PM
No, I didn't copy anything from default to Moonraker cause I couldn't find any information about how to install it manually.

So, which files do I need to put in there? 
Aaah! See, when you install the package it always tells you which files will be affected. I always save that list and make backups of those files before applying any mod.

These are the files it changes:

1. Execute Modification ./index.php Test successful
2. Execute Modification ./SSI.php Test successful
3. Execute Modification ./Sources/BoardIndex.php Test successful
4. Execute Modification ./Sources/ManagePermissions.php Test successful
5. Execute Modification ./Sources/ModSettings.php Test successful
6. Execute Modification ./Sources/Subs.php Test successful
7. Execute Modification ./Themes/default/languages/Modifications.english.php Test successful
8. Execute Modification ./Themes/default/languages/Modifications.spanish.php Test successful
9. Execute Modification ./Themes/default/index.template.php Test successful
10. Execute Modification ./Themes/default/BoardIndex.template.php Test successful

So basically, you need to copy your Modifications.english.php language file to your theme folder (and spanish if you need it). Also index.template.php and BoardIndex.template.php need to be done. I don't know how different those files are from default in the Moonraker theme, so perhaps the safest thing would be to find the code manually, if you just copy the files from default you could overwrite some design changes that may have been made in them. This is less likely to go wrong if Moonraker is based on default too, I don't know if it is.

Anyway, I just did this in my test forum, (which has a custom skin based on default) and I think it should do the trick, but I'm not 100% sure so absolutely keep all your backups before doing it.

In index.template.php

Find
// Show the load time?
if ($context['show_load_time'])
echo '
<span class="smalltext">', $txt['smf301'], $context['load_time'], $txt['smf302'], $context['load_queries'], $txt['smf302b'], '</span>';


and add right underneath it

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>';



in boadrindex.template.php

Find

', $context['show_who'] ? '<a href="' . $scripturl . '?action=who">' : '', $context['num_guests'], ' ', $context['num_guests'] == 1 ? $txt['guest'] : $txt['guests'], ', ' . $context['num_users_online'], ' ', $context['num_users_online'] == 1 ? $txt['user'] : $txt['users'];

and replace with


', $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'];



find
// 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']);

echo '


and right underneath it add

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']);
}


That's what I did to mine, and so far no errors. I should still put up a disclaimer though, I know nothing about php, I just worked that above out by comparing the modded default files with my skin files, and I think that's all that's been edited. May be wrong. Worth a try though if you can't get it to work otherwise! Can always undo it with your backed up files. :)

tinatoth

Quote from: lordevil on February 05, 2007, 08:58:44 PM
I have mine in the users list and if shows spiders, guests, Users, when none are around it just shows guests and users. I have 7 on average 
ok thanks, that means it might be working for me! :)

goitalone

#1079
Well, I modified the first one, but then I had a problem here on the second one:

This is what my boardindex.template.php looks like

   // "Users online" - in order of activity.
   echo '
   <tr>
      <td class="catbg" colspan="2">', $txt[158], '</td>
   </tr><tr>
      <td class="windowbg" width="20" valign="middle" align="center">
         ', $context['show_who'] ? '<a href="' . $scripturl . '?action=who">' : '', '<img src="', $settings['images_url'], '/icons/online.gif" alt="', $txt[158], '" border="0" />', $context['show_who'] ? '</a>' : '', '
      </td>
      <td class="windowbg2" width="100%">';

   if ($context['show_who'])
      echo '
         <a href="', $scripturl, '?action=who">';

   echo $context['num_guests'], ' ', $context['num_guests'] == 1 ? $txt['guest'] : $txt['guests'], ', ' . $context['num_users_online'], ' ', $context['num_users_online'] == 1 ? $txt['user'] : $txt['users'];

Advertisement: