#518 4.2 R.A. improved functionality for Autosearch on Ancestry

closed-accepted
Greg Roach
5
2009-02-14
2009-02-08
Stew Stronski
No

See https://sourceforge.net/forum/forum.php?thread_id=2966876&forum_id=185165

Provides 3 new functions that return "full names" of father, mother and spouse. Developed specifically to cater to the Ancestry.xxx websites but the functions can be used with plugins developed for any search facility with similar functionality. For sites that require given and surnames to be in separate fields the previous functions should still be used. Built on autosearch_base.php version 4864 as released in PGV 4.2. Added fields in Ancestry.xxx plugins: location of birth, location of death, father's full name, mother's full name and spouse's full name.

Caveats: To gain the full benefit of this patch you need to use the "new search experience" on Ancestry sites. If you use the "old search experience" the search will still work but some fields are ignored by Ancestry.

THIS PATCH DOES NOT SUPPORT VERSIONS OF PGV PRIOR TO 4.2

Files included in zip archive:
/modules/research_assistant/plugin/autosearch_base.php
/modules/research_assistant/plugin/ancestry.php
/modules/research_assistant/plugin/ancestrycouk.php
/modules/research_assistant/languages/lang.en.php

autosearch_base.php and lang.en.php are commented to show additions.

Instructions for Installation
-------------------------------
Copy the included files over your existing files.
If you use a version of svn in which the autosearch_base.php is later than 4864 you should use a file compare utility to make changes to that file.

Further Work Needed
------------------------
3 new variables in lang.en.php need to be translated for the appropriate lang.xx.php files.

Discussion

  • Stew Stronski
    Stew Stronski
    2009-02-08

    • summary: 4.2 R.A. improevde functionality for Autosearch on Ancestry --> 4.2 R.A. improved functionality for Autosearch on Ancestry
     
  • Stew Stronski
    Stew Stronski
    2009-02-11

    Updated archive uploaded.

    base_autosearch has been updated to fix a reported fatal error. You can download and install the patched files as below or, if you have previously downloaded and installed, you can make changes to 2 lines in base_autosearch.php.

    Find line 164 and change:
    if ($parents && $parents->getHusband()->getFullName()) {
    Replacing it wth:
    if ($parents && $parents->getHusband()) {

    Next find line and change:
    if ($parents && $parents->getWife()->getFullName()) {
    Replacing it with:
    if ($parents && $parents->getWife()) {

    If you have NOT previously downloaded and installed please follow the instructions below.

     
  • Greg Roach
    Greg Roach
    2009-02-13

    Stew, thanks for this.

    I've made a few amendments - particularly to deal with selecting from different names where a parent/spouse has more than one.

    I can't persuade ancestry to show me these names when I refine the search, so it is hard to be sure if it is actually working, but they definitely appear in the URL that is sent to it.

    I've also escpaed the " characters, rather than strip them. AFACT, Ancestry seems to be happy with this. If this causes problems with the seach, then it can be removed later. I believe that hebrew users often use an ascii quote instead of a gershayim character, and this is part of the name.

    It may turn out to be better to use "given"+"surname" instead of full-name, as this will exclude "Professor" and "junior". This can be easily changed, based on user feedback.

    Greg

     
  • Greg Roach
    Greg Roach
    2009-02-13

    • assigned_to: nobody --> fisharebest
    • status: open --> pending-accepted
     
  • Stew Stronski
    Stew Stronski
    2009-02-14

    I've tried the new version and it doesn't seem to be working when there are nicknames. They show in the form but nothing is getting to the page at Ancestry.

    Seems to be the same behaviour as when I tried using url_encode() instead of stripping the quotes. The variables are present in the url shown in the address bar but they are empty.

    I tried checking the source of the indi's page but the research asst. tab source isn't showing correctly for me.

    As before the full names with no nickname, and thus no quotes, work as expected.

    Maybe you're right about using given + surname instead of fullname.

     
  • Stew Stronski
    Stew Stronski
    2009-02-14

    • status: pending-accepted --> open-accepted
     
  • Stew Stronski
    Stew Stronski
    2009-02-14

    For ancestry to show most of the new variables you need to have "new search experience" turned on.

     
  • Stew Stronski
    Stew Stronski
    2009-02-14

    Getting the following error for some indi's:
    Call to a member function getWife() on a non-object in /home/pervothecl/domains/stronski.org/public_html/pgv/modules/research_assistant/search_plugin/base_autosearch.php on line 212

    Triggered by a missing mother.

    line 212:
    if ($parents->getWife()) {

    line should be:
    if ($parents && $parents->getWife()) {

     
  • Greg Roach
    Greg Roach
    2009-02-14

    Change added to SVN - also NPFX/NSFX/NICK/etc. excluded from "full name"

     
  • Greg Roach
    Greg Roach
    2009-02-14

    • status: open-accepted --> pending-accepted
     
  • Stew Stronski
    Stew Stronski
    2009-02-14

    • status: pending-accepted --> closed-accepted
     
  • Stew Stronski
    Stew Stronski
    2009-02-14

    It's working flawlessly now. Thanks Greg!

    For those using 4.2 you can continue to use the patch. It is included, with some extra functionality, in the svn versions and will be in 4.2.1, etc. releases.