Search Alternate Spelling or Married Name Mod
Purpose of the Mod
At some time or another most of us have wished we could search for someone by their married name or some other spelling of their surname, or that we could get more information in our search report. Here is what I've done: Replaced the simple SEARCH function on the home page to:
- Allow you to search by married name
- Allow you to search by an alternate spelling of the birth or married name
- Also search the Alias field each time you search for a first name
- Allow you to include stored alternate spellings of the surname or married name in your search (the stored alternates are in an Excel spreadsheet, any webmaster can make one appropriate to the names on his site... I just copied my unique surnames into column 1 and identified alternates into column 3 thru whatever.) The user just clicks a checkbox on the index page to take advantage of the stored alternates.
- Display more information in the search results: like birthplace, spouse name, birth name For searches by birth surname: Individual, PersonID, Last Name, First Name, Birthdate, Birthplace, Spouse First Name For searches by married name First Maiden, PersonID, Married Name, Spouse First Name, Birthdate, Birthplace
Advantages
This enhanced capability should make it a lot easier to find Sawdys who sometimes are called Soddys or Sawdeys or Leehans who are sometimes Lehans or Carberrys who are Corbreys or... you get the picture.
It should also allow you to find women when you do not know their married names. The search results will include all the alternatives and will be ordered by first name then by birth date. If you need to search for Uncle Zeke and don't remember whether he was a Hatfield or a McCoy, just enter Hatfield in the surname field and McCoy in the alternate surname field. I have stored a list of common alternates in a table. If you check the "Use Stored Alternates" box these alternates will be included as alternate Surnames in a normal Surname search or as Alternate Married Names if there is an entry in the Married name box. The names actually used in the search are displayed at the top of the results page. For those of you who worry about such things, the page is protected against hacker attempts to enter malicious information. Search times are a bit longer, but seem acceptable on my machine... let me know if you find otherwise. (I have about 7500 unique surnames and over 50,000 individuals in the northwesternpa database.)
I have used the newfound search capablities to locate and merge several individuals who were redundantly enterred under multiple spellings or maiden and married surnames. I hope someday to replace administrative FIND function with this functionality for the part of the function that finds people.
The mod is structured to work on sites using multiple languages. To install a different or additional language, translate the custom_text.php modifications below and include them in the custom_text.php file in the appropriate language folder on your site. A rudimentary french translation is included with the files in the modification package.
Developer
This mod was developed by Gerald Leehan.
TNG modules Involved
This mod modifies the index.php, cust_text.php, getperson.php, and log.php scripts and introduces a new script, alternatespell.php, a new file xlspell.xls, and a new folder Excel Folder containing two or three files.
Getting the File
Installation instructions: Download the alternatespell.zip folder and Extract its contents (alternatespell.php, xlspell.xls and the excel folder) into the folder that contains your getperson.php script.
http://tng.lythgoes.net/wiki/index.php?title=Image:Alternatespellingmod.zip
Modifying the existing scripts
-
Inset the following lines into your custom_text.php file (found in your language folder, e.g. your English folder)------------------------------------------------
note: this mod is designed to handle multiple languages, just translate the following array entries and put them in the custom_text file of the appropriate language
//custom text for alternate spelling mod index page $titletext[surname] ="Enter the surname of the Individual you are seaking if you know it... For women enter maiden name if you know it or leave it blank if only married name is known... you can enter just a few letters if you choose"; $text[surnameatbirth] ="Surname at Birth"; $name[mylastname] ="mylastname"; $titletext[firstname] ="Enter the first name if you know it"; $text[firstname] ="myfirstname"; $titletext[marriedname] ="If you know the married name of the woman you are seeking, enter it here instead of in the surname field... if you enter Jones in the Birth surname box and Smith in the Married Surname box, you will get only the women born Jones who married Smiths"; $text[marriedsurname] ="Married Surname"; $Titletext[alternatespellingsurname] ="Enter possible alternate spellings for the people you seek... Make entries here only if you have made entries in the correstponding boxes above... eg only enter an Alternate Married Surname if you have enterred a Married Surname above"; $text[alternatespellingsurname] = "Alternate Spellings:"; $text[alternatespellingbirthsurname] = "Birth Surname"; $text[alternatespellingmarriedsurname] ="Married Surname"; $titletext[storedalternatecheckbox] ="Check this box to include common alternate spellings that have been stored by the Webmaster... These alternates will be used as birth surnames unless only married surnames have been enterred, in which case they will be used as alternate married surnames...Always enter a Birth Surname or Married surname before selecting this box"; $labeltext[storedalternatecheckbox] ="Include Stored Alternate ?"; $titletext[clickheretoactivate] ="Click here to activate your search"; //end index page custom text for alternate spell //custom text for actual alternatespell page $text[tngaltspellhead]="Search Alternate Spellings"; $text[altspellsearchhead] ="Search Results for Multiple Spellings"; $text[altspellviewliving] ="To view <b>LIVING</b> individuals you must be registered and logged in<br><br>"; $text[altmarspellincl] ="<font color=\"39692A\">Alternate Married Spellings include<b> "; $text[altsurnspellincl] ="<font color=\"39692A\">Alternate Surname Spellings include<b> "; $text[givennamesp] ="<font color=\"39692A\">Given Name or Nickname Spellings include<b> "; $text[SearchResults] ="Search Results"; $text[FirstMaiden] ="First Maiden"; $text[PersonID] ="PersonID"; $text[Nickname] ="Nickname"; $text[MarriedName] ="Married Name"; $text[SpouseFirstName] ="Spouse First Name"; $text[Birthdate] ="Birthdate"; $text[Birthplace] ="Birthplace"; $text[searchresults] ="<h2><font color=\"#39692A\">Search Results for Multiple Spellings</font></h2>"; $text[Individual] ="Individual"; $text[FirstName] ="First Name"; $text[Spouse] ="Spouse";
-
Inset the following lines into your index.php file (since the additional choices require a bit of additional space, you may wish to make some cosmetic changes to your index page as well)---------
<!--lines below added with alternate spelling mod --> <td valign="top"> <h2><font color="#39692A"><?php echo $text[mnusearchfornames]; ?></font></h2> <!-- Do not change the form action or field names! --> <form action="AlternateSpelling.php" method="POST" name="form1"> <table border="0" cellspacing="5" cellpadding="0"> <!-- <tr><td><span class="normal"><?php echo $text[mnulastname]; ?>: </span><br><input type="text" name="mylastname" size="14"></td></tr> --> <tr><td><a Title=$titletext[surname]><span class="normal"><?php echo $text[surnameatbirth]; ?>: </span><br><input type="text" name="mylastname" size="14"></a></td></tr> <tr><td><a Title=$titletext[firstname]><span class="normal"><?php echo $text[mnufirstname]; ?>:</span><br><input type="text" name="myfirstname" size="14"></a></td></tr> <tr><td><a Title=$titletext[marriedname]><span class="normal"><?php echo $text[alternatespellingmarriedsurname]; ?>: <br><input type="text" name="mysplname" style="width: 140px; height: 16px; font-size: 11px;" size="14"></span></a></td></tr> <tr><td><a Title=$Titletext[alternatespellingsurname]><span class="fieldname"><?php echo "Alternate Spellings:"; ?> </span><br></a></td></tr> <tr><td><span class="normal"><?php echo $text[alternatespellingbirthsurname]; ?>: <br><input type="text" name="altspell" style="width: 140px; height: 16px; font-size: 11px;" size="14"></span></td></tr> <tr><td><span class="normal"><?php echo $text[alternatespellingmarriedsurname]; ?>: <br><input type="text" name="altspellm" style="width: 140px; height: 16px; font-size: 11px;" size="14"></span></td></tr> <?php if (file_exists("xlspell.xls")){ echo "<tr><td><a Title=$titletext[storedalternatecheckbox]><span class=\"normal\"><input type=\"checkbox\" name=\"toon\" value=\"Goofy\">$labeltext[storedalternatecheckbox]</span></a></td></tr>"; } ?> <tr><td><a Title=$titletext[clickheretoactivate]><input type="hidden" name="mybool" value="AND"><input type="hidden" name="offset" value="0"><input type="submit" name="search" value="<?php echo $text[mnusearchfornames]; ?>"></a></td></tr> </table> </form> <!-- lines above added with alternate spelling mod -->
- This mod is designed to operate with or without an excel file of prespecified alternate spellings. If you do not want to use this feature, just delete the xlspell.xls file... the 'Used stored Alternates' checkbox will then not be displayed on the home page. If you wish to use the alternate spellings included with this package, do nothing. If you wish to add or delete alternate spellings, edit the xlspell.xls file. The xlspell.xls file can be edited in excel. Column A should contain an alphabetic list of all surnames you want the mod to consider for alternates. Column B should be blank. Columns C and after should include alternate spellings of the name in column A.
Ok, now you're done, Go back to your Snapple and the let your users enjoy themselves.
This code has been tested on 6.2 and 7.02. It does not noticably slow searches in my 50,000+ database.
Visual of mod
Coming soon.
Sites using this mod
- Please add TNG site that you have found that utilize this modification…However, since this mod only presents messages to registered users who are present in the database of the visited, you will probably notice nothing unless you are registered there… therefore, see the mod on my site by doing the following:
- You can see the mod in a action at NorthwesternPa.net- Try searching for surname 'Lehan', first name 'Mat' Try searching for married name 'Leehan' Try searching for first name 'Bebe' Try a few of your own
Site List
NorthwesternPa.net
A site dedicated to the folks whose relatives settled in the townships and boroughs that roughly now comprise the Northwestern School District of Erie County, Pennsylvania.