News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

Googlebot & Spiders

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

Previous topic - Next topic

JimM

Quote from: Bugpac ™ on September 19, 2008, 01:35:10 PM
Next dumb question, were do i edit the code from, smf? or using another prog and doing the file edit localy?

Click on the link that Omar left, scroll down to ./Sources/ModSettings.php edits.

Use a program like Notepad++ or Notepad2 or another php editor.  After you complete the edits, FTP the file too your Sources directory.
Jim "JimM" Moore
Former Support Specialist

Bugpac ™

I figured it out, In my control panel i can edit the files without uploading or downloading etc, I did down load a version of the file before i edited it, I still have a problem tho, the config button is not showing, Says i have an error on line 152 but everything looks like it is written like the previous lines etc...Going back to look now...

Omar Bazavilvazo

Quote from: Bugpac ™ on September 19, 2008, 02:45:21 PM
I figured it out, In my control panel i can edit the files without uploading or downloading etc, I did down load a version of the file before i edited it, I still have a problem tho, the config button is not showing, Says i have an error on line 152 but everything looks like it is written like the previous lines etc...Going back to look now...

u can always apply the mod EVEN with that error, and make the changes by yourself :p




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


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

istup

Hi Omar

I had installed google spider successfully in my smf but i am not able to locate the below



Where will be available this thing.. I can found as google adsense spider in home page near to current users. But I am not able to locate the above image..



JimM

Admin > Features and Options > Googlebot & Spiders

It's on a new tab that is added in the admin control panel. 
Jim "JimM" Moore
Former Support Specialist

istup

Hi JimM

There is no option like that...

Pls find attached screenshot for yourref..

I am currently using custom theme 2008 & version is 1.1.6

Awaiting your reply.

Thanks


JimM

#1566
You will need to do the edits manually if you are using something other than the default theme.  Here is a link to the mod parser for this mod and your version:

http://custom.simplemachines.org/mods/index.php?action=parse;mod=143;attach=31743;smf_version=1.1.6

Make sure that the additions in /Sources/ModSettings.php are there.
Jim "JimM" Moore
Former Support Specialist

pinoypetfinder

hi. how do i hide this bots from my members on the "who;s online list"?  on their permission, the google spiders are already disable, but when i tried logging in using a regular member account, i can still see this bots on the online list.

thanks in advance,

Sudhakar Arjunan

Use the parser to edit the mod with theme removal.

http://custom.simplemachines.org/mods/index.php?action=parse;mod=143;attach=31743;smf_version=1.1.6

In your theme, remove the codes on the recent line.

so you could see on the default theme only.
Working on New Mods & Themes for SMF... Will update soon... My Blog page
My Smf forum : Discuss ITAcumens :: My SMF Forum

pinoypetfinder

thanks, i am using smf's default theme (or should i say default theme files because i replaced the images of the default theme so i can have one a customized theme look), anyways, will that hide the spiders from my regular member's online list? really appreciate your help. :)

Omar Bazavilvazo

Hi!

I just updated 2.0.4. For existing users no change is needed. Is just a minor fix to make it more friendly when more mods are already installed, and a missing string.

Only for smf 1.1.x 'p







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


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

Soms

Thanks Omar. I think I messed up these flies (Subs.php, ModSettings.php, ManagePermissions.php and BoardIndex.php) during an earlier installation. Is it possible for you to help fix them. If yes, I will upload them asap. Thanks in advance!

Soms

I guess the answer is no then.

Sabre™

Probably...
Everyone needs a little time to reply ;)

Did you backup those files before you edited them?
If so, then delete them off your server and reinstall the backups.
If not.....  then a valuable lesson learnt.  ALWAYS backup any template before you modify them!

SMF has a little failsafe installed either way.
Go to your Packages folder, and enter the backups directory.
There you will see a file by the name of "before googlebot & spiders".  Or something similar.
Download it, and reupload to your root directory. That is your main folder SMF is in, where your SSI.php and packages folder is stored.

Allow it to overwrite the files, and continue.
After that, any edits to your templates after this mod was added will be removed.

Or...  lol  ;D
You can do the manual edits yourself by using a Package Parser.  Either the one on the page where you download this mod, or [HERE]
Good Luck
Do NOT give admin and/or ftp details to just anybody, see if they are trust worthy first!!  Do your homework ;)


Soms

Quote from: Sabre™ on October 07, 2008, 08:24:06 PM
Or...  lol  ;D
You can do the manual edits yourself by using a Package Parser.  Either the one on the page where you download this mod, or [HERE]
Good Luck

I have used the parser to manually do the installation. Everything seemed to go well.  However I keep getting this error message
QuoteUndefined variable: total_users
/mnt/web4/21/50/51458650/htdocs/Sources/BoardIndex.php

Did I miss something?

JimM

Make sure this edit in ./Sources/BoardIndex.php is correct:

Find:
$total_users = $context['num_guests'] +

Add after:
($modSettings['ob_googlebot_count_most_online'] ? $context['num_spiders'] : 0) +

It's possible that you replaced that line which would possibly report that error.

Was the ./Sources/BoardIndex.php file one that reported the error?  When I manually install a mod, I install the mod and then manually edit the files that failed and FTP the edited file to complete the installation.
Jim "JimM" Moore
Former Support Specialist

Soms

Quote$total_users = $context['num_guests'] + ($modSettings['ob_googlebot_count_most_online'] ? $context['num_spiders'] : 0) + max($total_users, $modSettings['mostOnlineToday']);

Thanks for your reply. I just checked. I have the above in the /Sources/BoardIndex.php which is the one that is still reporting the error.

Dirtbike


JimM

@Soms

That doesn't match my ./Sources/BoardIndex.php for that line as modified.  Here is what mine looks like:

$total_users = $context['num_guests'] + ($modSettings['ob_googlebot_count_most_online'] ? $context['num_spiders'] : 0) + $context['num_users_online'];

This line appears around line 465.  The additional statements that you have at the end appear around line 498.  It appears that you added the mod to the wrong line of code.
Jim "JimM" Moore
Former Support Specialist

glennk

High there. I am getting these errors. Can anyone help please ??



8: Undefined index: ob_googlebot_stats_lastvisit
File: /home/glennk/public_html/forum/Themes/default/Display.template.php (main_below sub template - eval?)

8: Undefined index: ob_googlebot_spiders
File: /home/glennk/public_html/forum/Themes/default/BoardIndex.template.php (main sub template - eval?)
Line: 399

Advertisement: