Jump to content
TNG Community

How to disable the Google Search Page completly?


legsbln

Recommended Posts

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

Link to comment
Share on other sites

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.

 

 

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

 

 

 

 

Link to comment
Share on other sites

  • 2 weeks later...

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

  • 2 months later...
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

Link to comment
Share on other sites

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

 

 

 

 

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

  • 2 years later...
Michel KIRSCH

I know it's an old post, but I read all your comments about google search.

The best way is to let the buttos on their place and modify the sitesearch.php file to NOT search when called.

This is a little Mod (not official) to do that :

Michel

2_disable_google_search_v12.3.0.1.cfg

Link to comment
Share on other sites

Hello Michel !

That's a mod I have being waiting for.

But it does not work as it should  on my family site. The Search button is still displayed on when one clicks on it , one is redirected to an error page : "La page n’est pas redirigée correctement".

I have the Research Tools mod installed, that might be the reason why, but Google search is disabled on it.

https://clan.chauvigne.info/

Same thing with the village site, still with the Research tools mod installed, but with Google search enabled on it.

https://genealogie.revestou.fr/

On my test TNG, same issue without the Research Tools mod being installed.

 

 

Link to comment
Share on other sites

On 7/2/2017 at 9:38 PM, legsbln said:

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

It is not because you don't like it, that it is "unnecessary". The search is very handy for many. If you want to block it out, that's your full right. I have blocked out many options in TNG I don't use. But don't put it forward as a fact that it is "useless" or "unnecessary". It is not.

It is also striking how this comes up a couple of hours after I told someone else the exact same thing about the exact same subject...

Link to comment
Share on other sites

That's the great thing about TNG: because the source code is available, it can be adapted to everyone's needs. The coders, and Darrin first and foremost, are always ready to help and open-minded. The least we can do, as simple users of their services, is to be respectful and grateful. We will certainly strive to do that, each and every one of us.

Link to comment
Share on other sites

Michel KIRSCH
3 hours ago, Katryne said:

Hello Michel !

That's a mod I have being waiting for.

But it does not work as it should  on my family site. The Search button is still displayed on when one clicks on it , one is redirected to an error page : "La page n’est pas redirigée correctement".

I have the Research Tools mod installed, that might be the reason why, but Google search is disabled on it.

https://clan.chauvigne.info/

Same thing with the village site, still with the Research tools mod installed, but with Google search enabled on it.

https://genealogie.revestou.fr/

On my test TNG, same issue without the Research Tools mod being installed.

 

 

Hi Katryne.

I think it's a problem of web browser.

I test the Mod on both clan.chauvigne.info AND  genealogie.revestou.fr and it works fine for me !
I use Firefox 79.0 64 bits

Michel

En relisant les posts ci-dessus, j'ai un peu l'impression d'être au parc, devant le bac à sable.. Non?

Link to comment
Share on other sites

Michel's 2-liner mod to disable the 'search site' function tested OK for me on Chrome, FF, and Edge, with or without the Research Tool mod installed. Just a reminder, though....it only disables/deactivates, but does not remove the page links. I do a similar thing with some of my other buttons for visitors, along with a message that they must be registered for the function to be active.

Link to comment
Share on other sites

Michel KIRSCH

Yes, but i see that Lübbe has wrote the same here above (Plus the search button in template 1...)

Michel

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...