Jump to content
TNG Community
legsbln

How to disable the Google Search Page completly?

Recommended Posts

legsbln

Hi folks,
Darrin introduced with TNG 11 a new search through the TNG-genealogy via Google (searchsite.php). Whenever you search for individuals or families, its also possible to search via Google. That's of course helpful when the genealogy is open for everyone. But our implementation is closed and only accessible for family members, and the robots.txt is also configured, so Google won't find anything. For this reason I would like to disable this new "Google Search" completly in our implementation (for example hide all those buttons, which direct to searchsite.php).
I haven't found any configuration-possibility to disable this Google Search - and I neither haven't found any MODs to make this possible.
Am I right and do I have to make my own MOD-file, or does somebody already built a MOD or is there on some hidden place an appropriate configuration-option???
Any hint would be appreciated.
Greetings from Berlin, Lübbe
 

Button Search Site.PNG

Share this post


Link to post
Share on other sites
tngrlkrz

At (in my TNG 11.1.1 searchform,php, possibly modified) at line 645:

        <a href="<?php echo $cms['tngpath']; ?>searchsite.php" class="snlink">&raquo; <?php echo $text['searchsitemenu']; ?></a>

If you comment out or remove this line, the 'search site' button will not appear.

 

 

Share this post


Link to post
Share on other sites
legsbln

Thx, tngrlkrz, so it seems to be as I thought: no configuration-option, I have to make my own MOD. 

Just to inform other members: There are several other places in TNG (not only the mentioned place) to access this unnecessary Google-Search, for example also in the menus. But with the open source of TNG it's easy to find them all :)

Lübbe

Share this post


Link to post
Share on other sites
tngrlkrz

Yes, as you likely found out, you may need to disable the search site reference in these php files to remove google site wide.

  • famsearchform
  • genlib
  • searchsite
  • searchform

Ron

 

 

 

 

Share this post


Link to post
Share on other sites
legsbln

Hi Folks,

thx again, Ron. I found with a Notepad++-Search in the TNG-Files more or less the same files.

Because nobody else answered, I assume that there still is no MOD available. So I made now my own one, which works fine for me. If there is somebody out there, who needs in his/her own genealogy such a MOD file: Just look to the attached file ... 8)

Greetings from Berlin, Lübbe

HidingGoogleSearch_v11.1.1.1.cfg

Share this post


Link to post
Share on other sites
manofmull

Lübbe

Many thanks for pointing this out and to Ron for the code to remove.

You referred to this as "unnecessary" but I'd like to say it's d****d scandalous !!

How dare this googlegarbage be imposed upon us without the right to remove it.

Is a robots.txt file needed when your site requires login ?.

Ron

I trust that searchsite.php is required for other things ? i.e. I can't just delete it.

I removed the code plus two references to google.

Share this post


Link to post
Share on other sites
legsbln

Hi Ron (manofmull),

in our genealogy I give only registered users an access - and additionally I let Google outside with the robots.txt, so it wouldn't crawl through the whole pages. For more details see here and also here (special robots.txt from Darrin). Google itself explains the robots.txt here.

I won't damn Google. For open genealogies I think its a nice new feature from Darrin to search through such a genealogy via Google - but I really missed an easy using configuring detail to switch this off. And because I don't want my users to ask me, why there is a "Google Search Button" in our access-restricted genealogy, I wanted to make this search-buttons unvisible for everybody. - Well, data protection is in the US not such a big theme as here in Germany ... ;)

And I wouldn't recommend to delete the searchsite.php. Of course the Google Search is called with this page, but what happens, if you forget for example after a TNG-update to look again for ALL php-files, which calls this searchsite.php. And if then there is a new menuitem or a new page WITH call of searchsite.php, then the user would get (after deleting this page) an 404-Error, which is less nice for the users than the offer of a Google Search (which in our case wouldn't give any result...).

Lübbe

Share this post


Link to post
Share on other sites
manofmull

I put all of this to Darrin via email, saying that "searchsite" is misleading, but he explained it's an index of "your" site using Google. This is something I don't want, and as you pointed out, useless for sites that require login. He added that it's safe to delete searchsite.php as it won't break anything, but I'll leave mine (minus some code) due to your forward-thinking comments above. I was a tad angry because any outbound links on my site have to be created/sanctioned by me, and this wasn't. I've since cooled down !!.

Share this post


Link to post
Share on other sites
tngrlkrz
1 hour ago, legsbln said:

Hi Ron (manofmull),

in our genealogy I give only registered users an access - and additionally I let Google outside with the robots.txt, so it wouldn't crawl through the whole pages. For more details see here and also here (special robots.txt from Darrin). Google itself explains the robots.txt here.

I won't damn Google. For open genealogies I think its a nice new feature from Darrin to search through such a genealogy via Google - but I really missed an easy using configuring detail to switch this off. And because I don't want my users to ask me, why there is a "Google Search Button" in our access-restricted genealogy, I wanted to make this search-buttons unvisible for everybody. - Well, data protection is in the US not such a big theme as here in Germany ... ;)

And I wouldn't recommend to delete the searchsite.php. Of course the Google Search is called with this page, but what happens, if you forget for example after a TNG-update to look again for ALL php-files, which calls this searchsite.php. And if then there is a new menuitem or a new page WITH call of searchsite.php, then the user would get (after deleting this page) an 404-Error, which is less nice for the users than the offer of a Google Search (which in our case wouldn't give any result...).

Lübbe

I think Manofmull was asking me (I'm Ron = Tngrlkrz, not manofmull) the question, ...I don't know manofmull's first name (anonymous?).  Question was answered already, that searchsite.php can be deleted, but then you get errors, so better to remove code, which is easy in a personal mod, not a big deal, but I agree, would be nice to have a setting off/on for it.

Share this post


Link to post
Share on other sites
manofmull

Ron

I upgraded to latest version of TNG today and this Google**** has come back. I cannot believe Darrin is not allowing the removal/disabling of this nuisance. Do you have a mod to remove this site search ?

Oops, I see a link above that I'll try

Cannot install this mod = can you help please ?

 

 

Michael

 

Share this post


Link to post
Share on other sites
manofmull
On 02/07/2017 at 8:24 PM, tngrlkrz said:

     <a href="<?php echo $cms['tngpath']; ?>searchsite.php" class="snlink">&raquo; <?php echo $text['searchsitemenu']; ?></a>

Ron

I've removed this code from the searchform.php file, but I can't remember what I did to the other three of this list

  • famsearchform
  • genlib
  • searchsite
  • searchform

Please advise as to what code should be removed. I'm so angry that I cannot think

 

Share this post


Link to post
Share on other sites
manofmull

After cooling down a bit (again), with genlib I removed the following

664:$menu .= tngddrow(getURL( "searchsite", 0 ), "searchsite-icon", "", "searchsitemenu");

975:$searchsite_url = getURL( "searchsite", 0 );

979:$fullmenu .= "<span class=\"subhead\"><strong>{$text['search']}</strong> | <a href=\"$searchform_url\">{$text['mnuadvancedsearch']}</a> | <a href=\"$famsearch_url\">{$text['searchfams']}</a> | <a href=\"$searchsite_url\">{$text['searchsitemenu']}</a></span><br/><br/>";

Not sure what to remove from famsearchform & searchsite files.

If this "feature" (menace) is not removable when TNG 12 comes along, I won't be buying it Darrin

 

Michael

Share this post


Link to post
Share on other sites
tngrlkrz
1 hour ago, manofmull said:

After cooling down a bit (again), with genlib I removed the following

664:$menu .= tngddrow(getURL( "searchsite", 0 ), "searchsite-icon", "", "searchsitemenu");

975:$searchsite_url = getURL( "searchsite", 0 );

979:$fullmenu .= "<span class=\"subhead\"><strong>{$text['search']}</strong> | <a href=\"$searchform_url\">{$text['mnuadvancedsearch']}</a> | <a href=\"$famsearch_url\">{$text['searchfams']}</a> | <a href=\"$searchsite_url\">{$text['searchsitemenu']}</a></span><br/><br/>";

Not sure what to remove from famsearchform & searchsite files.

If this "feature" (menace) is not removable when TNG 12 comes along, I won't be buying it Darrin

 

Michael

Michael,  I don't recommend modifying genlib.php outside of a mod, since harder to remember your changes when TNG is updated.  Did you try Lubbe's mod posted earlier for 11.1.1?  I tried and it installs and works fine on TNG 11.1.2 (if no other mods). Or did you try that and have issues with 11.1.1 earlier?  https://tng.community/applications/core/interface/file/attachment.php?id=4631

One further note; with a bit of change, Lubbe's mod could be changed to only hide google site search from anonymous users, and let those who have logged in use this feature.  It really is a useful way to find something across the website that might take more steps with TNG itself. I may do this myself since I do require login and google search is available to all right now. However, as with all other pages, if a user isn't logged on, that person cannot see any media, and no living detail, except the initials of the living person (no forename or surname).  Hiding google to those users would restrict them a bit more.

Ron

Share this post


Link to post
Share on other sites
manofmull

Ron

Yes, I tried to install Lubbe's mod but got a "cannot install" error. With the code removal from two of the files (searchform and genlib), everything is good and works fine. Not sure why familysearchform and sitesearch were listed for code removal. I don't want Googlesearch on my site at all, a useless feature as site requires login (Google cannot read when login is required).

 

Share this post


Link to post
Share on other sites
tngrlkrz

The reason familysearchform is listed, that, if you click on the 'tube' Search, you are given the option to go to Search Families, and on that form, you will see again the search site link besides the Search People link. That is, unless you disable the Search link altogether in Admin:Setup:Design.  

As to sitesearch, it is the actual google form, and it can, on the clean TNG 11.1.2 site, be accessed from the one of the inner 'tube' menu dropdowns, if you've permitted those dropdowns in Admin. The can be disable in Admin:Setup:Design also. If you have disabled them, then that one is not a problem for you either.

So if you've disable both the Search and the Menu Display (in Admin:Setup) from the 'tube' menu, then you're all good as you say.  But since you've had to disable Searchform, it is likely you do have Search enabled.

If this is so, and you wish to install the hide google mod,  the 'cannot install' can be fixed also, but one needs to know what the MOD conflict is, and you can determine that from looking at the detail of the error, which will show the specific reason, e.g. 'bad target', that caused the error.  You can also use the 'analyze tab then to further determine what other MOD is causing the conflict.  It could be the 'broad search' mod, if you are using it.  That can be fixed as well.

I had this conflict, but fixed it, but adjusted the Mod so it only hides the google site search to people who are anonymous accessors.

NOTE: I looked at your genlib code, and I see you've removed the Advanced search altogether, from the search popup, as well as search site, etc.  That works, but you've taken away the detailed search capability. Unless perhaps you didn't remove the line completely.

:$fullmenu .= "<span class=\"subhead\"><strong>{$text['search']}</strong> | <a href=\"$searchform_url\">{$text['mnuadvancedsearch']}</a> | <a href=\"$famsearch_url\">{$text['searchfams']}</a> | <a href=\"$searchsite_url\">{$text['searchsitemenu']}</a></span><br/><br/>";

Ron

 

 

 

 

Share this post


Link to post
Share on other sites
manofmull

Ron

Most of what you say above I just don't understand.

I don't have broad search mod installed. Here's the error I get for Lubbe's mod

Mod Develop: Lübbe GERDES.


line 11: %target:searchform.php
line 12: %location:% Bad target
line 22: %target:famsearchform.php
line 23: %location:% Bad target
line 33: %target:templates/template1/index.php
line 34: %location:% not installed
line 44: %target:genlib.php
line 45: %location:% Bad target
line 51: %location:% Bad target

"tube search" ? Do you mean the Find drop-down menu ?

Please advise as to the exact code to remove from the two files and the excessive code already removed from genlib.

Like I say, search for names/families appears to be fine and the dreaded Google sitesearch is no more

In admin Show Search Link:  is set to yes. If set to no, would that have hidden the sitesearch (Google) or what ?

Michael

Share this post


Link to post
Share on other sites
tngrlkrz

Michael,

Sorry, didn't mean to confuse you. And without actual access to your site, I'm only speculating on possible issues.

Lubbe's mod installs fine on a 'clean' system', so you obviously have several mods which have changed much of the code his cfg file is looking for.  Not worth fixing with that many bad targets.

Yes, 'tube' is the upper colored band with home/login/etc on the left and find/media/info/etc on the right.  If, as you say, you can still get to the search family form/screen and the search site doesn't appear and you're good with that, than you need do nothing more than the code you removed, and I don't need to  explain the rest.  I just thought maybe you missed or dropped the family search ability altogether. Just remember, to undo your changes before the next TNG update to avoid a headache.

Ron

Share this post


Link to post
Share on other sites
manofmull

Ron

I'll take this onboard, thanks.

In admin Show Search Link:  is set to yes. If set to no, would that have hidden the sitesearch (Google) or what ?

I've always had this set to yes, no idea what happens if set to no

Share this post


Link to post
Share on other sites
manofmull

p.s.

I changed the Find menu order, as I prefer search people/families at the bottom.

I also switched code around to show Surname box first  (the way it used to be)

Share this post


Link to post
Share on other sites
tngrlkrz
27 minutes ago, manofmull said:

In admin Show Search Link:  is set to yes. If set to no, would that have hidden the sitesearch (Google) or what ?

No, it would merely remove the 'search' link next to home/login on the 'tube' or also called 'ribbon' row.  The search links would remain in the Find menu, if you have 'show menu links' set on.

Ron

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×