{"id":1359,"date":"1996-01-01T16:51:57","date_gmt":"1996-01-01T16:51:57","guid":{"rendered":"http:\/\/shrule.com\/?page_id=1359"},"modified":"2018-08-24T19:23:10","modified_gmt":"2018-08-24T19:23:10","slug":"placename-search","status":"publish","type":"page","link":"http:\/\/www.shrule.com\/?page_id=1359","title":{"rendered":"Placenames"},"content":{"rendered":"<p><?php\nglobal $wpdb;\n$pid    = $_REQUEST['page_id'];  \/\/ current page id in wordpress\n$submit =  $_REQUEST['submit'];    $pnnm   =  $_REQUEST['pnnm'];   \n$maps       = 1563 ;                   \/\/ page id for the map page \n$tlnm   =  $_REQUEST['tlnm'];      $cpnm   =  $_REQUEST['cpnm'];\n$conm   =  $_REQUEST['conm'];      $unnm   =  $_REQUEST['unnm'];  \n$bynm   =  $_REQUEST['bynm'];      $pn_id  =  $_REQUEST['pn_id']; \n\/\/===================================== FUNCTIONS ==========================\n\/\/--------------------------------------------------------  COUNTY    ------\nfunction show_county($pid ,  $coid )\n{ \nglobal $wpdb;\n$query = $wpdb->prepare(<br \/>\n         &#8216;select * from _grp_placenames<br \/>\n                 WHERE _grp_placenames.PNid = %s&#8217; , $coid );<br \/>\n$row = $wpdb->get_row($query , ARRAY_A,0);<br \/>\n$tncomap =  &#8216;history\/placenames\/&#8217;.$row[PNplacename].&#8217;\/&#8217;.$row[PNplacename].&#8217;_index_tn.png&#8217; ;<br \/>\n$tncomap =   strtolower($tncomap);<br \/>\n$comap =     &#8216;history\/placenames\/&#8217;.$row[PNplacename].&#8217;\/&#8217;.$row[PNplacename].&#8217;_index.png&#8217; ;<br \/>\n$comap =     strtolower($comap);<br \/>\nprintf(&#8221; <\/p>\n<h1>County $row[PNplacename] <\/h1>\n<p> &#8220;);<br \/>\nif(  file_exists( $comap ) )<br \/>\n   { printf(&#8220;<a href=\\\"$comap\\\"  target=\\\"_blank\\\"  title=\\\"county \\\">&#8220;);<br \/>\n     printf(&#8220;<img src=\\\"$tncomap\\\"  alt=\\\"Click for more detail\\\"  \");\n     printf(\"title=\\\"Click for more detail\\\"><\/a><br \/> &#8220;);<br \/>\n    }<br \/>\nif( $row[PNalias]  <> &#8221; ){  printf(&#8220;Other spellings : $row[PNalias]<br \/>&#8220;);  }<br \/>\nif( $row[PNirishname]  <> &#8221; ){  printf(&#8220;Irish name : $row[PNirishname]<br \/>&#8220;);  }<br \/>\nif( $row[PNmeaning]  <> &#8221; ){  printf(&#8220;County town  : $row[PNmeaning]<br \/>&#8220;);  }<br \/>\nif( $row[PNtextfile1]  <> &#8221; ){  printf(&#8220;Main towns  : $row[PNtextfile1]<br \/>&#8220;);  }<br \/>\nif( $row[PN_co_plu_cpar]  <> &#8221; )<br \/>\n    {  printf(&#8220;Province of $row[PN_co_plu_cpar] , Republic of Ireland .<br \/>&#8220;);  }<br \/>\nprintf(&#8220;<\/p>\n<hr>\n<p>&#8220;);<br \/>\nif( $row[PNlatitude]  <> &#8221; )<br \/>\n     {  printf(&#8220;<!-- Google Maps Element Code -->&#8220;);<br \/>\n        printf(&#8220;<br \/><iframe frameborder=0 marginwidth=0 marginheight=0 border=0 style=\\\"border:0;margin:5;width:400px;height:400px;\\\"\");  \n        printf(\"src=\\\"http:\/\/www.google.com\/uds\/modules\/elements\/mapselement\/iframe.html?maptype=terrain&#038;\");  \/\/ hybrid roadmap terrain satellite\n        printf(\"latlng=$row[PNlatitude],$row[PNlongitude]&#038;zoom=9&#038;element=true\\\" scrolling=\\\"no\\\" allowtransparency=\\\"true\\\"><\/iframe><br \/>&#8220;);<br \/>\n        printf(&#8220;<\/p>\n<hr>\n<p>&#8220;);<br \/>\n      }<br \/>\nif( $row[PN_co_plu_cpar]  <> &#8221; )<br \/>\n    {  printf(&#8221; County $row[PNplacename] : $row[PN_co_plu_cpar] , Republic of Ireland .<br \/>&#8220;);  }<\/p>\n<p>$uquery = $wpdb->prepare( &#8216;select * from _grp_placenames  where PNstatus = %s AND PN_co_plu_cpar = %s&#8217;  ,<br \/>\n                          &#8216;UN&#8217; ,  $row[PNplacename] );<br \/>\n$uresults = $wpdb->get_results($uquery , ARRAY_A);<br \/>\nif( $wpdb->num_rows > 0)<br \/>\n      {  printf(&#8220;<H3>Poor Law Unions details available<\/H3>&#8220;);<br \/>\n         foreach ( $uresults as $row )<br \/>\n                 {    printf(&#8221; <a href=\\\"?page_id=$pid&#038;unnm=$row[PNid]\\\">$row[PNplacename]<\/a> &nbsp;, &nbsp;&#8220;);     }<br \/>\n      }<br \/>\n}\/\/end func<\/p>\n<p>\/\/&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211; UNION &#8212;&#8212;&#8212;<br \/>\nfunction show_union($pid ,  $unid )<br \/>\n{<br \/>\nglobal $wpdb;<br \/>\n$query = $wpdb->prepare(<br \/>\n         &#8216;select * from _grp_placenames<br \/>\n           WHERE _grp_placenames.PNid =  %s&#8217; , $unid );<br \/>\n\t\t\t\t \/\/ coid is passed by caller func<br \/>\n$row = $wpdb->get_row($query , ARRAY_A,0);<br \/>\n$tnunionmap =  &#8216;history\/placenames\/&#8217;.$row[PN_co_plu_cpar].&#8217;\/union\/&#8217;.$row[PNplacename].&#8217;_index_tn.png&#8217; ;<br \/>\n$tnunionmap =   strtolower($tnunionmap);<br \/>\n$unionmap =    &#8216;history\/placenames\/&#8217;.$row[PN_co_plu_cpar].&#8217;\/union\/&#8217;.$row[PNplacename].&#8217;_index.png&#8217; ;<br \/>\n$unionmap =     strtolower($unionmap);<br \/>\nPRINTF(&#8220;<\/p>\n<h1>Poor Law Union $row[PNplacename] <\/h1>\n<p>&#8220;);<br \/>\nprintf(&#8220;<\/p>\n<table>\n<tr>\n<td width=\\\"300\\\">&#8220;);<br \/>\n if(  file_exists($unionmap ) )<br \/>\n   { printf(&#8220;<a href=\\\"$unionmap\\\"  target=\\\"_blank\\\"  title=\\\"Union parish index \\\">&#8220;);<br \/>\n     printf(&#8220;<img src=\\\"$tnunionmap\\\"  width=\\\"240\\\"  alt=\\\"Click for more detail\\\"  \");\n     printf(\"title=\\\"Click for more detail\\\"><\/a> &#8220;);<br \/>\n    }<br \/>\nprintf(&#8220;<\/td>\n<td>&#8220;);<br \/>\nif( $row[2]  <> &#8221; ){  printf(&#8220;Other spellings : $row[2]<br \/>&#8220;);  }<br \/>\nif( $row[3]  <> &#8221; ){  printf(&#8220;Irish name : $row[3]<br \/>&#8220;);  }<br \/>\nif( $row[4]  <> &#8221; ){  printf(&#8220;Meaning : $row[4]<br \/>&#8220;);  }<br \/>\nif( $row[PN_co_plu_cpar]  <> &#8221; )<br \/>\n    {  printf(&#8220;County  $row[PN_co_plu_cpar] <br \/>&#8220;);  }<br \/>\nprintf(&#8220;<\/td>\n<\/tr>\n<\/table>\n<p>&#8220;);<\/p>\n<p> if( $row[PNlatitude]  <> &#8221; )<br \/>\n     {  printf(&#8220;<\/p>\n<hr>\n<p>&#8220;);<br \/>\n        printf(&#8220;<!-- Google Maps Element Code -->&#8220;);<br \/>\n        printf(&#8220;<br \/><iframe frameborder=0 marginwidth=0 marginheight=0 border=0 style=\\\"border:0;margin:5;width:600px;height:480px;\\\"\");  \n        printf(\"src=\\\"http:\/\/www.google.com\/uds\/modules\/elements\/mapselement\/iframe.html?maptype=roadmap&#038;\");  \/\/ hybrid roadmap terrain satellite\n        printf(\"latlng=$row[PNlatitude],$row[PNlongitude]&#038;zoom=12&#038;element=true\\\" scrolling=\\\"no\\\" allowtransparency=\\\"true\\\"><\/iframe><br \/>&#8220;);<br \/>\n     }<br \/>\nprintf(&#8220;<\/p>\n<hr>\n<p>&#8220;);<\/p>\n<p>if( $row[PN_co_plu_cpar]  <> &#8221; )<br \/>\n      {  printf(&#8220;<a href=\\\" history\/griffiths.php?county=$row[PN_co_plu_cpar]&#038;\");\n         printf(\"plu=$row[PNplacename]&#038;page=abstract\\\" target=\\\"_blank\\\" title=\\\" \\\"><img src=\\\" history\/griffith.png\\\"\");\n         printf(\" alt=\\\"click for more detail\\\" title=\\\"click for more detail\\\" width=\\\"280\\\"><\/a>&#8220;);<br \/>\n          }<br \/>\nprintf(&#8220;<br \/>&#8220;);<br \/>\nprintf(&#8220;Abstract from Griffiths Valuation $row[PNplacename] union &#8211; Click for large version.<br \/> &#8220;);<br \/>\n$seek =   $row[PNplacename]  ;<br \/>\n$pquery = $wpdb->prepare(<br \/>\n         &#8216;select * from _grp_civilparish where plu like %s&#8217;  , $seek );<br \/>\n$presults = $wpdb->get_results($pquery , ARRAY_A);<br \/>\nif( $wpdb->num_rows > 0)<br \/>\n  {  printf(&#8220;<H3>Civil Parishes in this Poor Law Union with records available on this site<\/H3>&#8220;);<br \/>\n     foreach ( $presults as $prow )<br \/>\n            {  printf(&#8221; <a href=\\\"?page_id=$pid&#038;cpnm=$prow[cpid]\\\"> $prow[civilparish]<\/a> &nbsp;, &nbsp;&#8220;);     }<br \/>\n      }<\/p>\n<p>}<\/p>\n<p>\/\/&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211; BARONY &#8212;&#8212;&#8212;<br \/>\nfunction show_barony($pid ,  $byid )<br \/>\n{<br \/>\nglobal $wpdb;<br \/>\n$query = $wpdb->prepare(<br \/>\n         &#8216;select * from _grp_placenames<br \/>\n                        WHERE _grp_placenames.PNid =  %s&#8217; , $byid );<br \/>\n\t\t\t\t \/\/ coid is passed by caller func<br \/>\n$row = $wpdb->get_row($query , ARRAY_A,0);  <\/p>\n<p>$tnbarmap =  &#8216;history\/placenames\/&#8217;.$row[PN_co_plu_cpar].&#8217;\/barony\/&#8217;.$row[PNplacename].&#8217;_index_tn.png&#8217; ;<br \/>\n$tnbarmap =   strtolower($tnbarmap);<br \/>\n$barmap =    &#8216;history\/placenames\/&#8217;.$row[PN_co_plu_cpar].&#8217;\/barony\/&#8217;.$row[PNplacename].&#8217;_index.png&#8217; ;<br \/>\n$barmap =     strtolower($barmap);<br \/>\nprintf(&#8220;<\/p>\n<h1>Barony of $row[PNplacename]<\/h1>\n<p>&#8220;);<br \/>\nprintf(&#8220;<\/p>\n<table>\n<tr>\n<td width=\\\"240\\\">&#8220;);<br \/>\nif(  file_exists($barmap ) )<br \/>\n  {   printf(&#8220;<a href=\\\"$barmap\\\"  target=\\\"_blank\\\"  title=\\\"Barony parish index \\\">&#8220;);<br \/>\n      printf(&#8220;<img src=\\\"$tnbarmap\\\"   width=\\\"210\\\"   alt=\\\"click for more detail\\\"  title=\\\"click for more detail\\\"><\/a> &#8220;);<br \/>\n      printf(&#8220;<br \/> Barony index map showing Civil Parishes &#8220;);<br \/>\n   }<br \/>\nprintf(&#8220;<\/td>\n<td>&#8220;);<br \/>\nif( $row[PNalias]  <> &#8221; ){  printf(&#8220;Other spellings : $row[PNalias]<br \/>&#8220;);  }<br \/>\nif( $row[PNirishname]  <> &#8221; ){  printf(&#8220;Irish name : $row[PNirishname]<br \/>&#8220;);  }<br \/>\nif( $row[PNfieldnames]  <> &#8221; ){  printf(&#8220;Size in acres : $row[PNfieldnames]<br \/>&#8220;);  }<br \/>\nif( $row[PNfeatures]  <> &#8221; ){  printf(&#8220;Poor Law Union : $row[PNfeatures]<br \/>&#8220;);  }<br \/>\nif( $row[PNtextfile1]  <> &#8221; ){  printf(&#8220;County : $row[PNtextfile1]<br \/>&#8220;);  }<br \/>\nif( $row[PNmeaning]  <> &#8221; ){  printf(&#8221; $row[PNmeaning]<br \/>&#8220;);  }<br \/>\nif( $row[PNarcheological]  <> &#8221; ){  printf(&#8220;Ancient origins : $row[PNarcheological]<br \/>&#8220;);  }<br \/>\nprintf(&#8220;<\/td>\n<\/tr>\n<table>&#8220;);<br \/>\nprintf(&#8221; <br \/><i>Click on images to see larger versions &#8230;. <\/i> &#8220;);<br \/>\nprintf(&#8220;<\/p>\n<hr>\n<p>&#8220;);<\/p>\n<p>if( $row[PNlatitude]  <> &#8221; )<br \/>\n  {   printf(&#8220;<!-- Google Maps Element Code -->&#8220;);<br \/>\n        printf(&#8220;<br \/><iframe frameborder=0 marginwidth=0 marginheight=0 border=0 style=\\\"border:0;margin:5;width:400px;height:400px;\\\"\");  \n        printf(\"src=\\\"http:\/\/www.google.com\/uds\/modules\/elements\/mapselement\/iframe.html?maptype=roadmap&#038;\");  \/\/ hybrid roadmap terrain satellite\n        printf(\"latlng=$row[PNlatitude],$row[PNlongitude]&#038;zoom=12&#038;element=true\\\" scrolling=\\\"no\\\" allowtransparency=\\\"true\\\"><\/iframe><br \/>&#8220;);<br \/>\n   }<\/p>\n<p>$query = $wpdb->prepare(<br \/>\n         &#8216; select * from _grp_civilparish where barony = %s &#8216;  , $row[PNplacename]);<\/p>\n<p>$cpresults = $wpdb->get_results($query , ARRAY_A);<br \/>\nif( $wpdb->num_rows > 0)<br \/>\n      {  printf(&#8220;<H3>Civil Parishes in this Barony with records available on this site<\/H3>&#8220;);<br \/>\n         foreach ( $cpresults as $row )<br \/>\n                 {  printf(&#8221; <a href=\\\"?page_id=$pid&#038;cpnm=$row[cpid]\\\">$row[civilparish]<\/a> &nbsp;, &nbsp;&#8220;);     }<br \/>\n      }<br \/>\n   printf(&#8220;<\/p>\n<hr>\n<p>&#8220;);<br \/>\n}<\/p>\n<p>\/\/&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211; CIVIL PARISH  &#8212;&#8212;<\/p>\n<p>function show_civilparish( $pid , $pn_id )<br \/>\n{<br \/>\nglobal $wpdb;<\/p>\n<p>$query = $wpdb->prepare(<br \/>\n         &#8216;select * from _grp_placenames<br \/>\n\t\t\tleft join _grp_civilparish<br \/>\n            on LEFT(_grp_placenames.PNid,5) = _grp_civilparish.cpid<br \/>\n            WHERE _grp_placenames.PNid =  %s&#8217; , $pn_id ); \t\t \/\/ coid is passed by caller func<br \/>\n$row = $wpdb->get_row($query , ARRAY_A,0);    <\/p>\n<p>printf(&#8220;<\/p>\n<h1>$row[civilparish]    Civil Parish<\/h1>\n<p>&#8220;);<br \/>\nprintf(&#8220;<TABLE><TR><TD width=\\\"300\\\">&#8220;);<br \/>\n\/\/============================\/\/ history\/placenames\/galway\/civilparish\/civilparish_index_tn.png =========================<br \/>\n$civilparish  =  $row[civilparish] ;<br \/>\n$county      = $row[county] ;<br \/>\n$mapfile = &#8216;history\/placenames\/&#8217;.$county.&#8217;\/&#8217;.$civilparish.&#8217;\/&#8217;.$civilparish.&#8217;_index.png&#8217;  ;<br \/>\n$mapfile = strtolower($mapfile );<br \/>\n$tnmapfile = &#8216;history\/placenames\/&#8217;.$county.&#8217;\/&#8217;.$civilparish.&#8217;\/&#8217;.$civilparish.&#8217;_index_tn.png&#8217;  ;<br \/>\n$tnmapfile = strtolower($tnmapfile );<br \/>\n$map = 0; \/\/ set var to 0 for check later<br \/>\nif(file_exists($tnmapfile ))<br \/>\n   { if(file_exists($mapfile ))<br \/>\n       { $map = 1;<br \/>\n         printf(&#8220;<a href=\\\"$mapfile\\\" target=\\\"_blank\\\" title=\\\"$civilparish :: click for detailed map...\\\">&#8220;);<br \/>\n         printf(&#8220;<img src=\\\"$tnmapfile\\\" width=\\\"270\\\" alt=\\\"$civilparish :: click for more detail\\\"><\/a> <br \/>&#8220;);<br \/>\n         printf(&#8220;<i>Civil Parish Map.<\/i>&#8220;);<br \/>\n        }<br \/>\n     else{ printf(&#8220;<img src=\\\"$tnmapfile\\\" alt=\\\"$civilparish\\\"> <br \/>&#8220;);<br \/>\n           printf( $civilparish.&#8217; :: Townland index map not available yet<br \/>&#8216;);<br \/>\n          }<br \/>\n    }<br \/>\nelse{ printf( $civilparish.&#8217; :: Map not yet available <br \/>&#8216;);<br \/>\n     }<br \/>\nprintf(&#8220;<\/td>\n<p><TD>&#8220;);<br \/>\nif( $row[county] <> &#8221; ){  printf(&#8220;County : $row[county]<br \/>&#8220;);  }<br \/>\nif( $row[plu] <> &#8221; ){  printf(&#8220;Poor Law Union : $row[plu]<br \/>&#8220;);  }<br \/>\nif( $row[barony] <> &#8221; ){  printf(&#8220;Barony : $row[barony]<br \/>&#8220;);  }<br \/>\nif( $row[osmapno] <> &#8221; ){  printf(&#8220;O.S. Maps : $row[county] &#8211; $row[osmapno]<br \/>&#8220;);  }<br \/>\nif( $row[rcparish] <> &#8221; ){  printf(&#8220;R.C. Parish : $row[rcparish]<br \/>&#8220;);  }<br \/>\nif( $row[rcdiocese] <> &#8221; ){  printf(&#8220;R.C. Diocese : $row[rcdiocese]<br \/>&#8220;);  }<br \/>\nif( $row[rcchurch] <> &#8221; ){  printf(&#8220;R.C. Church : $row[rcchurch]<br \/>&#8220;);  }<br \/>\nif( $row[rcrecord_m] <> &#8221; ){  printf(&#8220;Marriage Records : $row[rcrecord_m]<br \/>&#8220;);  }<br \/>\nif( $row[rcrecord_b] <> &#8221; ){  printf(&#8220;Baptism records : $row[rcrecord_b]<br \/>&#8220;);  }<br \/>\nprintf(&#8220;<\/table>\n<p>&#8220;);<\/p>\n<p>if( $map == 1 )<br \/>\n   { printf(&#8220;<br \/>&#8220;);<br \/>\n     printf( &#8216;Click on map for a detailed townland index map . . . . <\/p>\n<hr>\n<p>&#8216;); }<br \/>\n  else{ printf(&#8221; <\/p>\n<hr>\n<p>&#8220;);  }<\/p>\n<p>if( $row[county]  == &#8216;Galway&#8217; )<br \/>\n   { printf(&#8220;Galway Library<A HREF=\\\"http:\/\/places.galwaylibrary.ie\/\\\" target=\\\"_blank\\\"> Field name book records<\/a><\/p>\n<hr>\n<p> &#8220;);<br \/>\n    }<br \/>\n\/\/=====================================================<br \/>\n if( $row[PNlatitude]  <> &#8221; )<br \/>\n   { printf(&#8220;<TR><TD COLSPAN=\\\"2\\\">&#8220;);<br \/>\n     printf(&#8220;<!-- Google Maps Element Code -->&#8220;);<br \/>\n     printf(&#8220;<br \/><iframe frameborder=0 marginwidth=0 marginheight=0 border=0 style=\\\"border:0;margin:5;width:400px;height:400px;\\\"\");  \n     printf(\"src=\\\"http:\/\/www.google.com\/uds\/modules\/elements\/mapselement\/iframe.html?maptype=roadmap&#038;\");  \/\/ hybrid roadmap terrain satellite\n     printf(\"latlng=$row[PNlatitude],$row[PNlongitude]&#038;zoom=15&#038;element=true\\\" scrolling=\\\"no\\\" allowtransparency=\\\"true\\\"><\/iframe><br \/>&#8220;);<br \/>\n     printf(&#8220;<\/TD><\/TR>&#8220;);<br \/>\n    }<br \/>\nprintf(&#8220;<\/table>\n<p>&#8220;);<\/p>\n<p>\/\/ BEGIN &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;- TOWNLAND LIST !<\/p>\n<p>$tlquery = $wpdb->prepare(<br \/>\n         &#8216;select * from _grp_placenames<br \/>\n           where LEFT(PNid,5) = %s AND PNstatus = %s<br \/>\n            order by PNid &#8216;  , $pn_id ,&#8217;TL&#8217; );<br \/>\n$tlresults = $wpdb->get_results($tlquery , ARRAY_A); <\/p>\n<p>if( $wpdb->num_rows > 0)<br \/>\n    { printf(&#8220;<\/p>\n<hr>\n<table>\n<tr>\n<td colspan=2><H3>Official O.S. townland names in this parish are<\/H3><\/td>\n<\/tr>\n<p>&#8220;);<br \/>\n      printf(&#8220;<\/p>\n<tr>\n<td colspan=2><\/td>\n<\/tr>\n<p>&#8220;);<br \/>\n      $cell = 1;<br \/>\n      foreach ( $tlresults as $tlrow )<br \/>\n         { if( ($cell%2) > 0) \/\/ an odd number<br \/>\n             { printf(&#8221; <\/p>\n<tr>\n<td><a href=\\\"?page_id=$pid&#038;tlnm=$tlrow[PNid]\\\">$tlrow[PNplacename]<\/a> &nbsp; <\/td>\n<p>&#8220;); }<br \/>\n            else<br \/>\n              { printf(&#8220;<\/p>\n<td><a href=\\\"?page_id=$pid&#038;tlnm=$tlrow[PNid]\\\">$tlrow[PNplacename]<\/a> &nbsp;<\/td>\n<\/tr>\n<p>&#8220;); }<br \/>\n         $cell++ ;<br \/>\n         }<br \/>\n      printf(&#8220;<\/td>\n<\/tr>\n<\/table>\n<hr>\n<p>&#8220;);<br \/>\n     }<br \/>\n\/\/ END &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212; TOWNLAND LIST !<\/p>\n<p>\/\/ begin &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212; placename known LIST !<br \/>\n$prquery = $wpdb->prepare(<br \/>\n         &#8216; select * from _grp_placenames<br \/>\n             where LEFT(PNid,5) = %s AND PNstatus = %s ORDER BY PNplacename&#8217;  , $pn_id , &#8216;PN&#8217;  );<br \/>\n$presults = $wpdb->get_results($prquery , ARRAY_A);<\/p>\n<p>if( $wpdb->num_rows > 0)<br \/>\n    {  printf(&#8220;<\/p>\n<table>\n<tr>\n<td colspan=\\\"2\\\"><H3>Placenames in this parish other than official townlands <\/H3> Known locations other than official townlands where the geographical location is known.<\/td>\n<\/tr>\n<p>&#8220;);<br \/>\n       printf(&#8220;<\/p>\n<tr>\n<td>&#8220;);<br \/>\n       $cell = 1;<br \/>\n       foreach ( $presults as $prrow )<br \/>\n         { if( ($cell%2) > 0) \/\/ an odd number<br \/>\n             { printf(&#8221; <\/p>\n<tr>\n<td><a href=\\\"?page_id=$pid&#038;pnnm=$prrow[PNid]\\\">$prrow[PNplacename]<\/a> &nbsp; <\/td>\n<p>&#8220;); }<br \/>\n            else<br \/>\n              { printf(&#8220;<\/p>\n<td><a href=\\\"?page_id=$pid&#038;pnnm=$prrow[PNid]\\\">$prrow[PNplacename]<\/a> &nbsp;<\/td>\n<\/tr>\n<p>&#8220;); }<br \/>\n           $cell++ ;<br \/>\n          }<br \/>\n       printf(&#8220;<\/table>\n<p>&#8220;);<br \/>\n     }<br \/>\n\/\/ end&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212; placename known LIST !<\/p>\n<p>\/\/begin ======================================= PR === Places unknown in Parish Recs ======<\/p>\n<p>$query = $wpdb->prepare(<br \/>\n         &#8216; select * from _grp_placenames<br \/>\n             where LEFT(PNid,5) = %s AND PNstatus = %s ORDER BY PNplacename&#8217;  , $pn_id, &#8216;PR&#8217; );<\/p>\n<p>$results = $wpdb->get_results($query , ARRAY_A);<\/p>\n<p>if( $wpdb->num_rows > 0)<br \/>\n  { printf(&#8221; <\/p>\n<table>\n<tr>\n<td colspan=\\\"2\\\">\n<h3>Placenames whose locations are unknown <\/h3>\n<p><i>Mentioned in the parish baptism and marriage records but locations unknown.<\/i><\/td>\n<\/tr>\n<p>&#8220;);<br \/>\n    printf(&#8220;<\/p>\n<tr>\n<td>&#8220;);<br \/>\n    $cell = 1;<br \/>\n    foreach ( $results as $row )<br \/>\n       { if( ($cell%2) > 0) \/\/ an odd number<br \/>\n            { printf(&#8221; <\/p>\n<tr>\n<td><a href=\\\"?page_id=$pid&#038;pnnm=$row[PNid]\\\">$row[PNplacename]<\/a> &nbsp; <\/td>\n<p>&#8220;); }<br \/>\n           else<br \/>\n              { printf(&#8220;<\/p>\n<td><a href=\\\"?page_id=$pid&#038;pnnm=$row[PNid]\\\">$row[PNplacename]<\/a> &nbsp;<\/td>\n<\/tr>\n<p>&#8220;); }<br \/>\n         $cell++ ;<br \/>\n        }<br \/>\n    printf(&#8220;<\/td>\n<\/tr>\n<\/table>\n<p> &#8220;);<br \/>\n   } <\/p>\n<p>\/\/end======================================= PR === Places unknown in Parish Recs ======<\/p>\n<p>\/\/====================================== SD === Survey and Distribution ======<br \/>\n$query = $wpdb->prepare(<br \/>\n         &#8216; select * from _grp_placenames where left(PNid,5) = %s AND PNstatus = %s ORDER BY PNplacename&#8217;  , $pn_id , &#8216;SD&#8217; );<br \/>\n$results = $wpdb->get_results($query , ARRAY_A);<br \/>\nif( $wpdb->num_rows > 0)<br \/>\n  { printf(&#8220;<\/p>\n<hr>\n<table>\n<tr>\n<td colspan=\\\"2\\\">\n<h4>Places mentioned in The Survey and Distribution book and Petty&#8217;s Atlas(1641..1703).<\/h4>\n<p> <\/td>\n<\/tr>\n<p>&#8220;);<br \/>\n    printf(&#8220;<\/p>\n<tr>\n<td>&#8220;);<br \/>\n    $cell = 1;<br \/>\n    foreach ( $results as $row )<br \/>\n       { if( ($cell%2) > 0) \/\/ an odd number<br \/>\n            { printf(&#8221; <\/p>\n<tr>\n<td><a href=\\\"?page_id=$pid&#038;pnnm=$row[PNid]\\\">$row[PNplacename]<\/a> &nbsp; <\/td>\n<p>&#8220;); }<br \/>\n           else<br \/>\n              { printf(&#8220;<\/p>\n<td><a href=\\\"?page_id=$pid&#038;pnnm=$row[PNid]\\\">$row[PNplacename]<\/a> &nbsp;<\/td>\n<\/tr>\n<p>&#8220;); }<br \/>\n         $cell++ ;<br \/>\n        }<br \/>\n    printf(&#8220;<\/td>\n<\/tr>\n<\/table>\n<p>&#8220;);<br \/>\n   }<br \/>\n\/\/====================================== SD === Survey and Distribution ======<\/p>\n<p>\/\/===================================== TA === Tithe Applotment======<\/p>\n<p>$query = $wpdb->prepare(<br \/>\n         &#8216; select * from _grp_placenames<br \/>\n             where left(PNid,5) = %s AND PNstatus = %s<br \/>\n                 ORDER BY PNplacename&#8217;  , $pn_id ,&#8217;TA&#8217; );<br \/>\n$xresults = $wpdb->get_results($query , ARRAY_A);<br \/>\nif( $wpdb->num_rows > 0)<br \/>\n   {  printf(&#8220;<\/p>\n<hr>\n<table>\n<tr>\n<td colspan=\\\"2\\\">\n<h4>Places mentioned in The Tithe Applotment book (1825-35). <\/h4>\n<p><\/td>\n<\/tr>\n<p>&#8220;);<br \/>\n      printf(&#8220;<\/p>\n<tr>\n<td>&#8220;);<br \/>\n      $cell = 1;<br \/>\n      foreach ( $xresults as $xrow )<br \/>\n         { if( ($cell%2) > 0) \/\/ an odd number<br \/>\n            { printf(&#8221; <\/p>\n<tr>\n<td><a href=\\\"?page_id=$pid&#038;pnnm=$xrow[PNid]\\\">$xrow[PNplacename]<\/a> &nbsp; <\/td>\n<p>&#8220;); }<br \/>\n            else<br \/>\n              { printf(&#8220;<\/p>\n<td><a href=\\\"?page_id=$pid&#038;pnnm=$xrow[PNid]\\\">$xrow[PNplacename]<\/a> &nbsp;<\/td>\n<\/tr>\n<p>&#8220;); }<br \/>\n           $cell++ ;<br \/>\n         }<br \/>\n      printf(&#8220;<\/td>\n<\/tr>\n<\/table>\n<p>&#8220;);<br \/>\n     }<\/p>\n<p>\/\/ end list and begin &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212; Tithe Applotments !<br \/>\nprintf(&#8220;<\/p>\n<h3> Tithe Applotments (1823-38) Exact Locations unknown but in this parish.<\/h3>\n<p>&#8220;); <\/p>\n<p>$taquery = $wpdb->prepare(<br \/>\n         &#8216;select * from _gr_titheapps<br \/>\n                 left join _grp_townlands<br \/>\n                      on LEFT(_gr_titheapps.tl_id,8) = _grp_townlands.TLid<br \/>\n                 left join _grp_civilparish<br \/>\n                      on LEFT(_gr_titheapps.tl_id,5)  = _grp_civilparish.cpid<br \/>\n                   WHERE LEFT(_gr_titheapps.tl_id,5) = %s<br \/>\n                    AND   RIGHT(LEFT(_gr_titheapps.tl_id,8),2) = %s<br \/>\n                   ORDER by _gr_titheapps.tl_id&#8217;  , $pn_id , &#8217;00&#8217; );<\/p>\n<p>$taresults = $wpdb->get_results($taquery , ARRAY_N);<\/p>\n<p>if( $wpdb->num_rows > 0) \/\/ is there a good result<br \/>\n  {  printf(&#8220;<TABLE class=\\\"resulttable\\\"><TR><TD>&#8220;);<br \/>\n     printf(&#8220;Tenants Name<\/td>\n<td>&#8220;);<br \/>\n     printf(&#8220;Placename<\/TD><\/p>\n<td>Miscellanious Notes . . . .&#8221;);<br \/>\n     printf(&#8220;<\/TD><\/TR>&#8220;);<br \/>\n     foreach ( $taresults as $tarow )<br \/>\n              {  printf(&#8220;<TR><TD>&#8220;);<br \/>\n                 printf(&#8220;<b>$rowta[2] $tarow[3]<\/b> <\/td>\n<td> $tarow[10] &#8220;);<br \/>\n                 printf(&#8220;<\/TD><\/p>\n<td>$tarow[11] <\/TD><\/TR>&#8220;);<br \/>\n                }<br \/>\n             printf(&#8220;<\/TD><\/TR>&#8220;);<br \/>\n             printf(&#8220;<\/TABLE>&#8220;);<br \/>\n    }<br \/>\n\/\/ END &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212; Tithe Applotments !<\/p>\n<p>\/\/======================================== AS === Archaeological Sites ==============<\/p>\n<p>$query = $wpdb->prepare(<br \/>\n         &#8216;select * from _grp_placenames<br \/>\n             where left(PNid,5) = %s AND PNstatus = %s<br \/>\n                 ORDER BY PNplacename&#8217;  , $pn_id , &#8216;AS&#8217;  ); \/\/ %s<br \/>\n$results = $wpdb->get_results($query , ARRAY_A);<br \/>\nif( $wpdb->num_rows > 0)<br \/>\n   {  printf(&#8220;<\/p>\n<hr>\n<table>\n<tr>\n<td colspan=\\\"2\\\">\n<h3>Archealogical places of interest in this parish. <\/h3>\n<\/td>\n<\/tr>\n<p>&#8220;);<br \/>\n      printf(&#8220;<\/p>\n<tr>\n<td>&#8220;);<br \/>\n      $cell = 1;<br \/>\n      foreach ( $results as $row )<br \/>\n         {<br \/>\n         if( ($cell%2) > 0) \/\/ an odd number<br \/>\n            { printf(&#8221; <\/p>\n<tr>\n<td><a href=\\\"?page_id=$pid&#038;pnnm=$row[PNid]\\\">$row[PNplacename]<\/a> &nbsp; <\/td>\n<p>&#8220;); }<br \/>\n           else<br \/>\n              { printf(&#8220;<\/p>\n<td><a href=\\\"?page_id=$pid&#038;pnnm=$row[PNid]\\\">$row[PNplacename]<\/a> &nbsp;<\/td>\n<\/tr>\n<p>&#8220;); }<br \/>\n         $cell++ ;<br \/>\n         }<br \/>\n      printf(&#8220;<\/td>\n<\/tr>\n<\/table>\n<p>&#8220;);<br \/>\n     }<\/p>\n<p>\/\/========= IS === Islands ==========================<\/p>\n<p>$query = $wpdb->prepare(<br \/>\n         &#8216;select * from _grp_placenames<br \/>\n             where left(PNid,5) = %s AND PNstatus = %s<br \/>\n                 ORDER BY PNplacename&#8217;  , $pn_id , &#8216;IS&#8217;  ); \/\/ %s<br \/>\n$results = $wpdb->get_results($query , ARRAY_A);<br \/>\nif( $wpdb->num_rows > 0)<br \/>\n    {<br \/>\n      printf(&#8220;<\/p>\n<table>\n<tr>\n<td colspan=\\\"2\\\">\n<h3>Islands associated with this parish.<\/h3>\n<\/td>\n<\/tr>\n<p>&#8220;);<br \/>\n      printf(&#8220;<\/p>\n<tr>\n<td>&#8220;);<br \/>\n      $cell = 1;<br \/>\n      foreach ( $results as $row )<br \/>\n         {<br \/>\n         if( ($cell%2) > 0) \/\/ an odd number<br \/>\n            { printf(&#8221; <\/p>\n<tr>\n<td><a href=\\\"?page_id=$pid&#038;pnnm=$row[PNid]\\\">$row[PNplacename]<\/a> &nbsp; <\/td>\n<p>&#8220;); }<br \/>\n           else<br \/>\n              { printf(&#8220;<\/p>\n<td><a href=\\\"?page_id=$pid&#038;pnnm=$row[PNid]\\\">$row[PNplacename]<\/a> &nbsp;<\/td>\n<\/tr>\n<p>&#8220;); }<br \/>\n         $cell++ ;<br \/>\n         }<br \/>\n      printf(&#8220;<\/td>\n<\/tr>\n<\/table>\n<p>&#8220;);<br \/>\n     }<\/p>\n<p>\/\/=========================================== GF === Geographical Features ============<\/p>\n<p>$query = $wpdb->prepare(<br \/>\n         &#8216;select * from _grp_placenames<br \/>\n             where left(PNid,5) = %s AND PNstatus = %s<br \/>\n                 ORDER BY PNplacename&#8217;  , $pn_id , &#8216;GF&#8217; ); \/\/ %s<br \/>\n$results = $wpdb->get_results($query , ARRAY_A);<br \/>\nif( $wpdb->num_rows > 0)<br \/>\n    { printf(&#8220;<\/p>\n<table>\n<tr>\n<td colspan=\\\"2\\\">\n<h3>Geographical features named in this parish.<\/h3>\n<\/td>\n<\/tr>\n<p>&#8220;);<br \/>\n      printf(&#8220;<\/p>\n<tr>\n<td>&#8220;);<br \/>\n      $cell = 1;<br \/>\n      foreach ( $results as $row )<br \/>\n         {<br \/>\n         if( ($cell%2) > 0) \/\/ an odd number<br \/>\n            { printf(&#8221; <\/p>\n<tr>\n<td><a href=\\\"?page_id=$pid&#038;pnnm=$row[PNid]\\\">$row[PNplacename]<\/a> &nbsp; <\/td>\n<p>&#8220;); }<br \/>\n           else<br \/>\n              { printf(&#8220;<\/p>\n<td><a href=\\\"?page_id=$pid&#038;pnnm=$row[PNid]\\\">$row[PNplacename]<\/a> &nbsp;<\/td>\n<\/tr>\n<p>&#8220;); }<br \/>\n         $cell++ ;<br \/>\n         }<br \/>\n      printf(&#8220;<\/td>\n<\/tr>\n<\/table>\n<p>&#8220;);<br \/>\n     }<\/p>\n<p>\/\/====================================================================<\/p>\n<p>  printf(&#8220;<\/p>\n<h2>Lewis&#8217;s Topographical Dictionary 1837.<\/h2>\n<p>&#8220;);<\/p>\n<p>  $file2include = &#8216;history\/placenames\/&#8217;.$county.&#8217;\/&#8217;.$civilparish.&#8217;\/&#8217;.$civilparish.&#8217;_lewis.txt&#8217; ;<br \/>\n  $file2include = strtolower($file2include);<br \/>\n  if(file_exists($file2include))<br \/>\n    {   printf(&#8221; The $civilparish entry in Lewis Topographical Dictionary of 1837 <br \/>&#8220;);<br \/>\n        include($file2include);<br \/>\n        printf(&#8220;<\/p>\n<hr>\n<p>&#8220;);<br \/>\n      }<\/p>\n<p>\/\/==================================================================<\/p>\n<p>  printf(&#8220;<\/p>\n<h2>Field Name books from 1840&#8217;s<\/h2>\n<p>&#8220;);<\/p>\n<p>  $file2include = &#8216;history\/placenames\/&#8217;.$county.&#8217;\/&#8217;.$civilparish.&#8217;\/&#8217;.$civilparish.&#8217;_field.txt&#8217; ;<br \/>\n  $file2include = strtolower($file2include);<br \/>\n  if(file_exists($file2include))<br \/>\n\t {<br \/>\n        printf(&#8220;<a href=\\\"\\\">Field Name Book<\/a>&#8220;);<br \/>\n        printf(&#8221; description from 1838\/1839 noted by the surveyors who produced the O.S maps originally.&#8221;);<br \/>\n        printf(&#8220;<br \/>&#8220;);<br \/>\n        echo file_get_contents($file2include);<br \/>\n        \/\/ include($file2include);<br \/>\n        printf(&#8220;<\/p>\n<hr \/>\n<p>&#8220;);<br \/>\n       }<br \/>\n}\/\/ end civ parish<\/p>\n<p>\/\/&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;   TOWNLAND &#8212;&#8212;&#8211;<\/p>\n<p>function show_townland($pid , $tlnm )<br \/>\n{<br \/>\nglobal $wpdb;<\/p>\n<p>$query = $wpdb->prepare(<br \/>\n         &#8216;select * from _grp_placenames<br \/>\n\t\t\t\t\tleft join _grp_townlands<br \/>\n                           on LEFT(_grp_placenames.PNid,8) = _grp_townlands.TLid<br \/>\n\t\t\t\t\tleft join _grp_civilparish<br \/>\n                           on LEFT(_grp_placenames.PNid,5) = _grp_civilparish.cpid<br \/>\n                 WHERE _grp_placenames.PNid = %s   GROUP by _grp_townlands.TLid&#8217; , $tlnm );<br \/>\n\t\t\t\t \/\/ coid is passed by caller func<br \/>\n$rowTL = $wpdb->get_row($query , ARRAY_A,0);  <\/p>\n<p>  $cp_code = substr($rowTL[TLid] , 0,5);<br \/>\n  printf(&#8220;<TABLE><TR><TD width=\\\"200\\\"><b><\/p>\n<h1>$rowTL[TLtownland]<\/h1>\n<p><\/b><\/TD><TD><\/p>\n<h3>Official Townland name<\/h3>\n<p><\/TD><\/TR>&#8220;);<br \/>\n  if( $rowTL[TLalias] <> &#8221; ){  printf(&#8220;<TR><TD><\/TD><TD> ( $rowTL[TLalias] )<\/TD><\/TR>&#8220;);  }<\/p>\n<p>  if( $rowTL[TLcivil_parish] <> &#8221; )<br \/>\n   {  printf(&#8220;<TR><TD>Civil Parish <\/TD><TD> <A HREF=\\\"?page_id=$pid&#038;cpnm=$cp_code\\\">$rowTL[TLcivil_parish]<\/a><\/TD><\/TR>&#8220;);  }<br \/>\n  if( $rowTL[TLbarony] <> &#8221; ){  printf(&#8220;<TR><TD>Barony <\/TD><TD> $rowTL[TLbarony]<\/TD><\/TR>&#8220;);  }<br \/>\n  if( $rowTL[TLpoorlawunion] <> &#8221; ){  printf(&#8220;<TR><TD>Poor Law Union <\/TD><TD> $rowTL[TLpoorlawunion]<\/TD><\/TR>&#8220;);  }<br \/>\n  if( $rowTL[TLcounty] <> &#8221; ){  printf(&#8220;<TR><TD>County <\/TD><TD> $rowTL[TLcounty]<\/TD><\/TR>&#8220;);  }<br \/>\n  if( $rowTL[TLrcparish] <> &#8221; ){  printf(&#8220;<TR><TD>R.C. parish <\/TD><TD> $rowTL[TLrcparish]<\/TD><\/TR>&#8220;);  }<br \/>\n  if( $rowTL[TLreg_dist] <> &#8221; ){  printf(&#8220;<TR><TD> Registrars District <\/TD><TD> $rowTL[TLreg_dist]<\/TD><\/TR>&#8220;);  }<br \/>\n  if( $rowTL[TLded] <> &#8221; ){  printf(&#8220;<TR><TD> D.E.D. <\/TD><TD> $rowTL[TLded]<\/TD><\/TR>&#8220;);  }<br \/>\n  if( $rowTL[TLacre] <> &#8221; ){  printf(&#8221; <TR><TD><a href=\\\"?page_id=$maps\\\">Area<\/a> <\/TD><TD> $rowTL[TLacre] A. $rowTL[TLrood] R. $rowTL[TLperch] P.<\/TD><\/TR>&#8220;);  }<br \/>\n  if( $rowTL[TLos_sheet] <> &#8221; ){  printf(&#8220;<TR><TD> O.S. 6\\&#8221; sheet(s) <\/TD><TD> $rowTL[TLcounty] $rowTL[TLos_sheet]<\/TD><\/TR>&#8220;);  }<br \/>\n  if( $row[TLcounty]  == &#8216;Galway&#8217; )<br \/>\n         {  printf(&#8220;<TR><TD colspan=\\\"2\\\">Galway Library<A HREF=\\\"http:\/\/places.galwaylibrary.ie\/\\\" target=\\\"_blank\\\"> Field name book records<\/a><\/TD><\/TR>&#8220;); }<br \/>\n  if( $rowTL[TLgv_page]  <> &#8221; )<br \/>\n     {  printf(&#8220;<TR><TD> Griffiths Valuation <\/TD><TD> Poor Law Union of $rowTL[TLpoorlawunion] &#8211;<a href=\\\"history\/griffiths.php?county=$rowTL[TLcounty]&#038;plu=$rowTL[TLpoorlawunion]&#038;page=$rowTL[TLgv_page]\\\" target=\\\"_blank\\\"> Page # $rowTL[TLgv_page] <\/a><\/TD><\/TR>&#8220;);       }<\/p>\n<p>  printf(&#8220;<\/TABLE>&#8220;);<\/p>\n<p>\/\/ &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;- Census details !<\/p>\n<p>$query = $wpdb->prepare(<br \/>\n         &#8216;select * from _gr_census_1901hoh<br \/>\n            left join _grp_townlands<br \/>\n            on _gr_census_1901hoh.tl_id  = _grp_townlands.TLid<br \/>\n                 WHERE  _gr_census_1901hoh.tl_id = %s&#8217;  , $tlnm  ); \/\/ %s<br \/>\n$cresults = $wpdb->get_results($query , ARRAY_A);<br \/>\nif( $wpdb->num_rows > 0)<br \/>\n  {<br \/>\n     printf(&#8220;<\/p>\n<h2>Census of Ireland 1901 Head of Household (B1).<\/h2>\n<p>&#8220;);<br \/>\n     printf(&#8220;<\/p>\n<table class=\\\"resulttable\\\">\n<thead><TR><TD>&#8220;);<br \/>\n     printf(&#8220;Head of Household&#8217;s  :: Name<\/td>\n<td>Land Holder  (Landlord)&#8221;);<br \/>\n     printf(&#8220;<\/td>\n<td>Building type&#8221;);<br \/>\n     printf(&#8220;<\/TD><\/TR><\/thead>\n<tbody>&#8220;);<br \/>\n     foreach ( $cresults as $row )<br \/>\n            { printf(&#8220;<TR><TD>&#8220;);<br \/>\n              printf(&#8220;<b>$row[hoh_firstname] $row[hoh_surname]<\/b> <\/td>\n<td> &#8220;);<br \/>\n              printf(&#8221; $row[landlord]<\/td>\n<td> $row[bldg_type]&#8221;);<br \/>\n              if($row[rooms] <> &#8221;)<br \/>\n                 {  printf(&#8221; with $row[rooms] rooms.&#8221;);  }<br \/>\n              printf(&#8220;<\/TD><\/TR>&#8220;);      }<br \/>\n     printf(&#8220;<\/TD><\/TR><\/p>\n<tbody><\/TABLE>&#8220;);<br \/>\n    }      <\/p>\n<p>\/\/==================== TOWN PLAN ? ========.&#8217;\/&#8217;.$civilparish.&#8217;\/town_civilparish.png&#8217; =========================<br \/>\n  $civilparish  =  $rowTL[TLcivil_parish] ;<br \/>\n  $county      = $rowTL[TLcounty] ;<\/p>\n<p>  $tlnum = substr($rowTL[TLid], 6,2);  \/\/ bcdstrtolower(strtok($rowTL[TLid],&#8221; &#8221; ));  \/\/ substr(&#8216;abcdef&#8217;, 1, 3);  \/\/ bcd<br \/>\n  $townstring = strtolower(strtok($rowTL[TLtownland],&#8221; &#8221; )); \/\/ takes all before space<br \/>\n  $town = $tlnum.&#8217;.&#8217;.$townstring ;<\/p>\n<p>  $tpfile = &#8216;history\/placenames\/&#8217;.$county.&#8217;\/&#8217;.$civilparish.&#8217;\/&#8217;.$town.&#8217;_town.png&#8217;  ;<br \/>\n  $planfile = &#8216;history\/placenames\/&#8217;.$county.&#8217;\/&#8217;.$civilparish.&#8217;\/&#8217;.$town.&#8217;_townplan.png&#8217;  ;<br \/>\n  $tpfile = strtolower($tpfile );<br \/>\n  $planfile = strtolower($planfile );<\/p>\n<p>  $tlg =   $town ;              \/\/ later for gv map of townland<br \/>\n  $tlg_file = &#8216;history\/placenames\/&#8217;.$county.&#8217;\/&#8217;.$civilparish.&#8217;\/&#8217;.$tlg.&#8217;.png&#8217;  ;<br \/>\n  $tlg_file= strtolower($tlg_file);<\/p>\n<p> \/\/printf(&#8220;$planfile  &#8211; $tpfile&#8221;);<\/p>\n<p>   if(file_exists($tpfile ))<br \/>\n     {<br \/>\n         if(file_exists($planfile ))<br \/>\n           {<br \/>\n              printf(&#8220;<a href=\\\"$planfile\\\" target=\\\"_blank\\\" title=\\\"TOWN PLAN :: click for detailed map...\\\"><img src=\\\"$tpfile\\\" alt=\\\"ucfirst($townstring) :: click for more detail\\\"><\/a> <br \/>&#8220;);<br \/>\n               printf( ucfirst($townstring).&#8217; :: Click on map for a detailed town plan (Griffiths Valuation)<br \/>&#8216;);<br \/>\n               printf(&#8220;<i>Click on the Griffiths Valuation <\/i>&#8220;);<br \/>\n               printf(&#8220;<a href=\\\"history\/griffiths.php?county=$rowTL[TLcounty]&#038;plu=$rowTL[TLpoorlawunion]\"); \n                printf(\"&#038;page=$rowTL[TLgv_page]\\\" target=\\\"_blank\\\"> Page # $rowTL[TLgv_page] <\/a>&#8220;);<br \/>\n               printf(&#8220;<i> to see a list of tenants with plot numbers to match the Griffith map.<\/i>&#8220;);<br \/>\n            }<br \/>\n          else{<br \/>\n                  printf(&#8220;<img src=\\\"$tpfile\\\" alt=\\\"$townstring\\\" caption=\\\"$townstring\\\"> <br \/>&#8220;);<br \/>\n                  printf( ucfirst($townstring).&#8217; :: Town plan not available yet<br \/>&#8216;);<br \/>\n                }<br \/>\n      }<br \/>\nelse {<br \/>\n        \/\/printf( ucfirst($townstring).&#8217; :: Plan not yet available <br \/>&#8216;);<br \/>\n       }<\/p>\n<p>\/\/ &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;- Griffith details !<\/p>\n<p>$query = $wpdb->prepare(<br \/>\n         &#8216;select * from _gr_grifvaluation<br \/>\n                    left join _grp_townlands<br \/>\n                      on _gr_grifvaluation.tl_id = _grp_townlands.TLid<br \/>\n                    left join _grp_civilparish<br \/>\n                      on LEFT(_gr_grifvaluation.tl_id,5)  = _grp_civilparish.cpid<br \/>\n                   WHERE _gr_grifvaluation.tl_id = %s&#8217;  , $tlnm  ); \/\/ %s<br \/>\n$gvresults = $wpdb->get_results($query , ARRAY_N);<br \/>\nif( $wpdb->num_rows > 0) \/\/ is there a good result<br \/>\n  { printf(&#8220;<\/p>\n<h2>Griffiths Valuation details :: 1848-54<\/h2>\n<p>&#8220;);<br \/>\n      printf(&#8220;<i>Click on the Griffiths Valuation <\/i>&#8220;);<br \/>\n      printf(&#8220;<a href=\\\"history\/griffiths.php?county=$rowTL[TLcounty]&#038;plu=$rowTL[TLpoorlawunion]&#038;page=$rowTL[TLgv_page]\\\" target=\\\"_blank\\\"> Page # $rowTL[TLgv_page] <\/a>&#8220;);<br \/>\n      printf(&#8220;<i> to see a list of tenants with plot numbers to match the Griffith map.<\/i><br \/>&#8220;);<br \/>\n      if(file_exists( $tlg_file ))<br \/>\n          {  printf(&#8220;<\/p>\n<table>\n<tr>\n<td width=\\\"270\\\">&#8220;);<br \/>\n             \/\/ &#8211;   $tlg_file = &#8216;history\/placenames\/&#8217;.$county.&#8217;\/&#8217;.$civilparish.&#8217;\/&#8217;.$tlg.&#8217;.png&#8217;  ;  $tlg_file= strtolower($tlg_file);<br \/>\n             printf(&#8220;<a href=\\\"$tlg_file\\\" target=\\\"_blank\\\" title=\\\"Plots :: click for detailed map...\\\">&#8220;);<br \/>\n             printf(&#8220;<img src=\\\"$tlg_file\\\" alt=\\\" click for more detail\\\" width=\\\"260\\\"><\/a><br \/>&#8220;);<br \/>\n             printf(&#8220;<\/td>\n<td>&#8220;);<br \/>\n             printf(&#8220;<\/p>\n<h2>Townland plot map<\/h2>\n<p>&#8220;);<br \/>\n             printf(&#8220;Griffith&#8217;s final published valuation of  South Mayo is dated circa 1854 due to the fact that Lady De Clifford  is listed&#8221;);<br \/>\n             printf(&#8221; as owner of Dalgan and Patrick Kirwan owned it until sold in 1853 on account of the Encumbered Estates Act.&#8221;);<br \/>\n             printf(&#8220;The original surveys of Shrule were carried out in late 1838 ( from surveyors letters ).<\/p>\n<hr>\n<p>&#8220;);<br \/>\n             printf(&#8220;Click on the map on the left to see a larger version&#8221;);<br \/>\n             printf(&#8220;<\/td>\n<\/tr>\n<table>&#8220;);<br \/>\n             printf(&#8220;The map has each renters plot numbered and recorded in the Valuation book so &#8220;);<br \/>\n             printf(&#8220;the exact location of your ancestors plot can be ascertained. &#8220;);<br \/>\n             printf(&#8221; Click on the Griffiths Valuation  &#8220;);<br \/>\n             printf(&#8220;<a href=\\\"history\/griffiths.php?county=$rowTL[TLcounty]&#038;plu=$rowTL[TLpoorlawunion]\"); \n             printf(\"&#038;page=$rowTL[TLgv_page]\\\" target=\\\"_blank\\\">$rowTL[TLpoorlawunion]  Page # $rowTL[TLgv_page] <\/a>&#8220;);<br \/>\n             printf(&#8221;  to see a list of tenants with plot numbers to match the Griffith map. &#8220;);<br \/>\n             printf(&#8220;<\/p>\n<hr>\n<p>&#8220;);<br \/>\n           }<br \/>\n          else{ printf(&#8220;<a href=\\\"http:\/\/www.askaboutireland.com\\\" target=\\\"_blank\\\"> See the Ask About Ireland website for Griffiths maps&#8230;.<\/a><br \/>&#8220;);   }<\/p>\n<p>        printf(&#8220;<\/p>\n<table class=\\\"resulttable\\\">\n<thead><TR>&#8220;);<br \/>\n        printf(&#8220;<TD>Tenants Name in the valuation<\/td>\n<p>&#8220;);<br \/>\n        printf(&#8220;<\/p>\n<td>Landlords name<\/TD>&#8220;);<br \/>\n        printf(&#8220;<\/p>\n<td>Comments<\/TD><\/TR><\/thead>\n<tbody>&#8220;);<br \/>\n        foreach ( $gvresults as $rowgv )<br \/>\n             {  printf(&#8220;<TR><TD><b>$rowgv[5] $rowgv[4]<\/b> <\/td>\n<p>&#8220;);<br \/>\n                printf(&#8220;<\/p>\n<td>  $rowgv[7] $rowgv[6]<\/TD> &#8220;);<br \/>\n                printf(&#8220;<\/p>\n<td>$rowgv[9] $rowgv[8]<\/TD><\/TR>&#8220;);<br \/>\n              }<br \/>\n        printf(&#8220;<\/TD><\/TR><\/tbody>\n<p><\/TABLE>&#8220;);<br \/>\n    }      <\/p>\n<p>\/\/ &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;- Tithe Applotments !<\/p>\n<p>$query = $wpdb->prepare(<br \/>\n         &#8216;select * from _gr_titheapps<br \/>\n                 left join _grp_townlands<br \/>\n                      on LEFT(_gr_titheapps.tl_id,8) = _grp_townlands.TLid<br \/>\n                 left join _grp_civilparish<br \/>\n                      on LEFT(_gr_titheapps.tl_id,5)  = _grp_civilparish.cpid<br \/>\n                   WHERE LEFT(_gr_titheapps.tl_id,8) = %s<br \/>\n                   GROUP by surname&#8217;  , $tlnm  ); \/\/ %s<br \/>\n$taresults = $wpdb->get_results($query , ARRAY_N);<br \/>\nif( $wpdb->num_rows > 0)<br \/>\n  \t {  printf(&#8220;<\/p>\n<h2>Tithe Applotments :: 1828 &#8211; 38<\/h2>\n<p>&#8220;); \/\/ COMMENCE INNER TABLE=<br \/>\n        printf(&#8220;<\/p>\n<table class=\\\"resulttable\\\">\n<thead><TR><TD>&#8220;);<br \/>\n        printf(&#8221; Tenants Name in the records <\/td>\n<td>&#8220;);<br \/>\n        printf(&#8221; Placename as recorded <\/TD><\/p>\n<td> Notes &#8220;);<br \/>\n        printf(&#8220;<\/TD><\/TR><\/thead>\n<tbody>&#8220;);<br \/>\n        foreach ( $taresults as $rowta )<br \/>\n                   {  printf(&#8220;<TR><TD>&#8220;);<br \/>\n                      printf(&#8220;<b>$rowta[2] $rowta[3]<\/b> <\/td>\n<td> $rowta[10] &#8220;);<br \/>\n                      printf(&#8220;<\/TD><\/p>\n<td>  $rowta[11]&#8221;);<br \/>\n                      printf(&#8220;<\/TD><\/TR>&#8220;);                  }<br \/>\n        printf(&#8220;<\/TD><\/TR><\/tbody>\n<p><\/TABLE>&#8220;);<br \/>\n      }      <\/p>\n<p>\/\/ &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212; list placenames in this townland &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<\/p>\n<p>$query = $wpdb->prepare(<br \/>\n         &#8216;select * from _grp_placenames<br \/>\n             where left(PNid,8) = %s ORDER BY PNplacename,PNstatus&#8217;  , $tlnm  ); \/\/<br \/>\n$pnresults = $wpdb->get_results($query , ARRAY_A);<br \/>\nif( $wpdb->num_rows > 0)<br \/>\n    { printf(&#8220;<\/p>\n<h2>Placenames<\/h2>\n<p>&#8220;);<br \/>\n      printf(&#8220;Placenames mentioned in this townland are :<\/p>\n<div class=\\\"l2columns\\\">\n<ul>&#8220;);<br \/>\n      foreach ( $pnresults as $row_PN)<br \/>\n        { printf(&#8221; <\/p>\n<li><a href=\\\"?page_id=$pid&#038;pnnm=$row_PN[PNid]\\\">$row_PN[PNplacename]<\/a> &#8220;);<br \/>\n          if( $row_PN[PN] <> &#8221; ){printf(&#8221; : $row_PN[PNalias] <\/li>\n<p>&#8220;); }  \/\/ alias names<br \/>\n            else{ printf(&#8220;<\/li>\n<p>&#8220;); }<br \/>\n         }<br \/>\n      printf(&#8220;<\/ul>\n<\/div>\n<p>&#8220;);<br \/>\n    }<br \/>\nprintf(&#8220;<\/p>\n<hr>\n<p>&#8220;);<\/p>\n<p>\/\/ &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br \/>\n\/\/ mgr2do  use townland number in file name  eg   26.shruletown.txt<\/p>\n<p>  $tlnum = substr($rowTL[TLid], 6,2);  \/\/ bcdstrtolower(strtok($rowTL[0],&#8221; &#8221; ));  \/\/ substr(&#8216;abcdef&#8217;, 1, 3);  \/\/ bcd<br \/>\n  $townstring = strtolower(strtok($rowTL[TLtownland],&#8221; &#8221; )); \/\/ takes all before space<br \/>\n  $civilparish = strtolower($rowTL[TLcivil_parish]);<br \/>\n  $county = strtolower($rowTL[TLcounty]);<\/p>\n<p>  $file2include = &#8216;history\/placenames\/&#8217;.$county.&#8217;\/&#8217;.$civilparish.&#8217;\/&#8217;.$tlnum.&#8217;.&#8217;.$townstring.&#8217;.txt&#8217; ;<br \/>\n  $file2include = strtolower($file2include);<\/p>\n<p>  if(file_exists($file2include))<br \/>\n     {<br \/>\n        printf(&#8221; <\/p>\n<h2>Field Name Book<\/h2>\n<p>&#8220;);<br \/>\n        printf(&#8220;<i>Field Name Book description from 1838\/1839 noted by the surveyors who produced the O.S maps originally.<\/i>&#8220;);<br \/>\n        include $file2include;<br \/>\n      }<br \/>\n  ELSE{ printf(&#8220;<\/p>\n<hr>\n<p>&#8220;); }<\/p>\n<p>}<\/p>\n<p>\/\/&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211; PLACENAME &#8212;&#8212;&#8212;<br \/>\nfunction show_placename($pid ,  $pn_id )<br \/>\n{<br \/>\nglobal $wpdb;<\/p>\n<p>$query = $wpdb->prepare(<br \/>\n         &#8216; select * from _grp_placenames<br \/>\n\t   left join _grp_townlands<br \/>\n                on LEFT(_grp_placenames.PNid,8) = _grp_townlands.TLid<br \/>\n\t   left join _grp_civilparish<br \/>\n                on LEFT(_grp_placenames.PNid,5) = _grp_civilparish.cpid<br \/>\n             WHERE _grp_placenames.PNid = %s<br \/>\n                GROUP by _grp_placenames.PNstatus&#8217;  , $pn_id );<\/p>\n<p>$row = $wpdb->get_row($query , ARRAY_A , 0);  \/\/ only 1 = pn_id<\/p>\n<p>  printf(&#8220;<TABLE><TR><TD width=\\\"140\\\"><b><\/p>\n<h1>$row[PNplacename]<\/h1>\n<p><\/b><\/TD><TD width=\\\"70%%\\\"><\/p>\n<h1>Placename (unofficial ?)<\/h1>\n<p><\/TD><\/TR>&#8220;);<\/p>\n<p>  if( $row[PNalias]  <> &#8221; ){  printf(&#8220;<TR><TD>Other name\/spellings<\/TD><TD>$row[PNalias]<\/TD><\/TR>&#8220;);  }<br \/>\n  if( $row[PNirishname]  <> &#8221; ){  printf(&#8220;<TR><TD>Irish name<\/TD><TD>$row[PNirishname]<\/TD><\/TR>&#8220;);  }<br \/>\n  if( $row[PNmeaning]  <> &#8221; ){  printf(&#8220;<TR><TD>Meaning<\/TD><TD>$row[PNmeaning]<\/TD><\/TR>&#8220;);  }<br \/>\n  if( $row[TLtownland]  <> &#8221; )<br \/>\n    {  printf(&#8220;<TR><TD>Situated in townland of : <\/TD><TD><A HREF=\\\"?page_id=$pid&#038;tlnm=$row[TLid]\\\">$row[TLtownland]<\/TD><\/TR>&#8220;);  }<br \/>\n  if( $row[TLcivil_parish]  <> &#8221; )<br \/>\n    {  printf(&#8220;<TR><TD>Civil Parish<\/TD><TD><A HREF=\\\"?page_id=$pid&#038;cpnm=$row[cpid]\\\">$row[TLcivil_parish]<\/a><\/TD><\/TR>&#8220;);  }<br \/>\n  if( $row[TLbarony]  <> &#8221; )<br \/>\n    {  printf(&#8220;<TR><TD>Barony<\/TD><TD>$row[TLbarony]<\/TD><\/TR>&#8220;);  }<br \/>\n  if( $row[TLreg_dist]  <> &#8221; ){  printf(&#8220;<TR><TD>Registrars District<\/TD><TD>$row[TLreg_dist]<\/TD><\/TR>&#8220;);  }<br \/>\n  if( $row[TLded]  <> &#8221; ){  printf(&#8220;<TR><TD>D.E.D.<\/TD><TD>$row[TLded]<\/TD><\/TR>&#8220;);  }<br \/>\n  if( $row[TLcounty]  <> &#8221; ){  printf(&#8220;<TR><TD>County<\/TD><TD>$row[TLcounty]<\/TD><\/TR>&#8220;); }  if( $row[TLcounty]  == &#8216;Galway&#8217; ){  printf(&#8220;<TR><TD>Galway Library<\/TD><TD><A HREF=\\\"http:\/\/places.galwaylibrary.ie\/\\\" target=\\\"_blank\\\"> Field name book records<\/a><\/TD><\/TR>&#8220;); }<br \/>\n  if( $row[TLos_sheet]  <> &#8221; ){  printf(&#8220;<TR><TD>6 inch OS sheet<\/TD><TD>$row[TLcounty] $row[TLos_sheet]<\/TD><\/TR>&#8220;);  }<br \/>\n  if( $row[TLgv_page]  <> &#8221; )<br \/>\n     {  printf(&#8220;<TR><TD>Griffiths Valuation<\/TD><TD>$row[TLpoorlawunion] $row[TLgv_page]<\/TD><\/TR>&#8220;);       }<br \/>\n \/\/ if( $row[PNtextfile1]  <> &#8221; ){  include(&#8220;$row[5]&#8221;);  } \/\/ textfile path and name<br \/>\n  if( $row[PNfieldnames]  <> &#8221; ){  printf(&#8220;<TR><TD>Field names<\/TD><TD>$row[7]<\/TD><\/TR>&#8220;);  }<br \/>\n  if( $row[PNfeatures]  <> &#8221; ){  printf(&#8220;<TR><TD>Features<\/TD><TD>$row[8]<\/TD><\/TR>&#8220;);  }<br \/>\n  if( $row[PNarcheological]  <> &#8221; ){  printf(&#8220;<TR><TD>Archeological<\/TD><TD>$row[9]<\/TD><\/TR>&#8220;);  }<br \/>\n  if( $row[PNimageid] <> &#8221; ){  printf(&#8220;<TR><TD colspan=\\\"2\\\"> image<\/TD><\/TR>&#8220;);  }<br \/>\n  if( $row[PNmisc_info] <> &#8221; ){ printf(&#8220;<TR><TD>Miscellanious : <\/TD><TD> $row[15]<\/TD><\/TR>&#8220;);    } \/\/ miscellanious<\/p>\n<p>  switch($row[PNstatus])<br \/>\n     {<br \/>\n        case(&#8216;PN&#8217;): printf(&#8220;<TR><TD colspan=\\\"2\\\">A placename commonly used but not an official townland name .<\/TD><\/TR>&#8220;);<br \/>\n                    break;<br \/>\n        case(&#8216;TN&#8217;): printf(&#8220;<TR><TD colspan=\\\"2\\\">A town or large village .<\/TD><\/TR>&#8220;);<br \/>\n                    break;<br \/>\n        case(&#8216;AS&#8217;): printf(&#8220;<TR><TD colspan=\\\"2\\\">An archaeological site or place of interest .<\/TD><\/TR>&#8220;);<br \/>\n                    break;<br \/>\n        case(&#8216;GF&#8217;): printf(&#8220;<TR><TD colspan=\\\"2\\\">A geographical feature in $row[TLcivil_parish] parish .<\/TD><\/TR>&#8220;);<br \/>\n                    break;<br \/>\n        case(&#8216;IS&#8217;): printf(&#8220;<TR><TD colspan=\\\"2\\\">An island attached to $row[TLcivil_parish] parish .<\/TD><\/TR>&#8220;);<br \/>\n                    break;<br \/>\n        case(&#8216;PR&#8217;): printf(&#8220;<TR><TD colspan=\\\"2\\\">Mentioned in $row[TLcivil_parish] parish records but its location is unknown so far.<\/TD><\/TR>&#8220;);<br \/>\n                    break;<br \/>\n        case(&#8216;SD&#8217;): printf(&#8220;<TR><TD colspan=\\\"2\\\">Mentioned in the Books of Survey and Distribution for $row[TLcivil_parish] parish .<\/TD><\/TR>&#8220;);<br \/>\n                    break;<br \/>\n        case(&#8216;TA&#8217;): printf(&#8220;<TR><TD colspan=\\\"2\\\">Mentioned in the Tithe Applotments for $row[TLcivil_parish] parish .<\/TD><\/TR>&#8220;);<br \/>\n                    break;<br \/>\n      }<br \/>\n  printf(&#8220;<\/TABLE>&#8220;);<\/p>\n<p>}<\/p>\n<p>\/\/===================================== FUNCTIONS END ==========<br \/>\n\/\/&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;  BEGIN LOOP  &#8212;&#8212;&#8212;&#8212;&#8212;-<\/p>\n<p>if( $submit == &#8220;Search&#8221;)<br \/>\n  {  printf(&#8220;Result of your search.&#8221;);<br \/>\n     if( isset($_REQUEST[&#8216;pn_id&#8217;]) ) \/\/ request comes from internal page<br \/>\n       {  \/\/ this affects the heading in the page &#8211; see lower in Page<br \/>\n\t  $query =<br \/>\n          $wpdb->prepare(&#8216;SELECT * FROM _grp_placenames WHERE _grp_placenames.PNid = %s&#8217; , $pn_id );<br \/>\n          $row = $wpdb->get_row($query , ARRAY_N , 0);<br \/>\n          $p_cat = $row[12] ;  \/\/ Get the type of placename this is<br \/>\n                                \/\/ choose the display depending on the pn_id<br \/>\n          switch( $p_cat)<br \/>\n                   {   case(&#8216;PN&#8217;):   \/\/ A placename<br \/>\n                                        printf(&#8220;Placename details.&#8221;);<br \/>\n                                        show_placename($pid ,  $pnnm );<br \/>\n                                        break;<\/p>\n<p>                        case(&#8216;TL&#8217;):    \/\/ A Townland<br \/>\n                                         printf(&#8220;Townland details.&#8221;);<br \/>\n                                         show_townland($pid ,  $tlnm );<br \/>\n                                         break;<\/p>\n<p>                        case(&#8216;CP&#8217;):   \/\/ A Civil parish<br \/>\n                                         printf(&#8220;Civil parish details.&#8221;);<br \/>\n                                         show_civilparish($pid ,  $cpnm );<br \/>\n                                         break;<\/p>\n<p>                            default:   \/\/ A placename<br \/>\n                                         printf(&#8220;Placename unknown.&#8221;);<br \/>\n                                         show_placename($pid ,  $pnnm );<br \/>\n                                         break;<br \/>\n                    }<br \/>\n        }<br \/>\n   }<br \/>\nelse<br \/>\n   {<br \/>\n     if(  isset($_REQUEST[&#8216;pnnm&#8217;])  )<br \/>\n       { printf(&#8220;Placename record details , ie a placename which is not an official townland&#8221;);<br \/>\n         }<br \/>\n     if(  isset($_REQUEST[&#8216;tlnm&#8217;])  )<br \/>\n       { printf(&#8220;Townland record details , townlands are the smallest official land division but many contain locally used placenames .&#8221;);<br \/>\n        }<br \/>\n     if(  isset($_REQUEST[&#8216;cpnm&#8217;])  )<br \/>\n        { printf(&#8220;Civil Parish record details , used pre 20th century &#8230;later DED divisions are used in census records&#8221;);<br \/>\n         }<br \/>\n    }  <\/p>\n<p>\/\/ &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;- next loop part<br \/>\nprintf(&#8220;<br \/><a href=\\\"?page_id=$maps\\\" target=\\\"_blank\\\">Explanation of administrative divisions such as D.E.D.s , Civil Parishs and Baronies , also some information on land measurement &#8230;<\/a> <br \/>&#8220;);<br \/>\n\/\/ &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;- next loop part<br \/>\n$seek = &#8216;%&#8217;.$pnnm.&#8217;%&#8217; ;<br \/>\nif( $submit == &#8220;Search&#8221;)<br \/>\n  {<br \/>\n   \/\/&#8212;&#8212;&#8212;&#8211; search placenames and townlands &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<\/p>\n<p>$query = $wpdb->prepare(<br \/>\n    &#8216;select * from _grp_placenames<br \/>\n\t\tleft join _grp_townlands<br \/>\n            on LEFT(_grp_placenames.PNid,8) = _grp_townlands.TLid<br \/>\n\t\tleft join _grp_civilparish<br \/>\n            on LEFT(_grp_placenames.PNid,5) = _grp_civilparish.cpid<br \/>\n        WHERE _grp_placenames.PNplacename like %s&#8217;  , $seek  ); <\/p>\n<p>$Xresults = $wpdb->get_results($query , ARRAY_A);<br \/>\n$placehit = $wpdb->num_rows ;<br \/>\nif( $placehit > 0)<br \/>\n   { if($placehit < 2 ){Printf(\" Found one place \");}\n       else{Printf(\" Found $placehit places \");}           \n     Printf(\"closely matching your query , click on the place name for more details .<br \/>&#8220;);<br \/>\n     \/\/ check if there are any results<br \/>\n      if( $placehit > 0 )<br \/>\n        { foreach ( $Xresults as $row )<br \/>\n            { switch( $row[PNstatus])<br \/>\n               {<br \/>\n                 case(&#8216;PN&#8217;):    printf(&#8220;<\/p>\n<h4><a href=\\\"?page_id=$pid&#038;pnnm=$row[PNid]\\\">$row[PNplacename]<\/a><\/h4>\n<p>&#8220;);<br \/>\n                                if( $row[alias] <> &#8221;)<br \/>\n\t\t\t\t\t\t\t\t  { printf(&#8221; &#8211; $row[alias]<BR>&#8220;); }<br \/>\n                                printf(&#8221;  A <i><a href=\\\"?page_id=$maps\\\" target=\\\"_blank\\\">placename<\/a><\/i> &#8220;);<br \/>\n                                $tlcode = substr($row[PNid],0,8);<br \/>\n                                $cpcode = substr($row[PNid],0,5);<br \/>\n                                printf(&#8220;located in <A HREF=\\\"?page_id=$pid&#038;tlnm=$tlcode\\\"><b>$row[TLtownland]<\/b><\/a> townland , &#8220;);<br \/>\n                                printf(&#8221; <A HREF=\\\"?page_id=$pid&#038;cpnm=$cpcode\\\"><b>$row[TLcivil_parish]<\/b><\/a> civil parish ,&#8221;);<br \/>\n                                printf(&#8221; Co $row[TLcounty].<br \/>&#8220;);<br \/>\n                                if($row[TLcounty] == &#8216;Galway&#8217;)<br \/>\n                                   {  printf(&#8220;<br \/>Co.Galway library <a href=\\\"http:\/\/places.galwaylibrary.ie \\\" target=\\\"_blank\\\"> &#8220;);<br \/>\n                                      printf(&#8220;Field Name Book<\/a> entry &#8220;);    }<br \/>\n                                if( $row[TLded] <> &#8221; )  printf(&#8220;<a href=\\\"?page_id=$maps\\\" target=\\\"_blank\\\">D.E.D.<\/a> is $row[TLded] &#8220;);<br \/>\n                                if( $row[TLreg_dist] <> &#8221; ) printf(&#8221; and Registrars District is $row[TLreg_dist] .&#8221;);<br \/>\n                                if( $row[TLos_sheet] <> &#8221; ) printf(&#8220;<br \/> Ordnance Survey 6in sheet # $row[TLos_sheet] ($row[TLcounty]).&#8221;);<br \/>\n                                if( $row[TLgv_page] <> &#8221; )<br \/>\n                                    {  printf(&#8221; <br \/>Griffith Valuation pages for $row[TLtownland] begin at &#8220;);<br \/>\n                                       printf(&#8220;<a href=\\\"history\/griffiths.php?county=$row[TLcounty]&#038;plu=$row[TLpoorlawunion]\"); \n                                       printf(\"&#038;page=$row[TLgv_page]\\\" target=\\\"_blank\\\">&#8220;);<br \/>\n                                       printf(&#8220;$row[TLpoorlawunion] $row[TLgv_page]<\/a> .&#8221;);          }<br \/>\n                                printf(&#8220;<\/p>\n<hr>\n<p>&#8220;);<br \/>\n                                break;  <\/p>\n<p>                  case(&#8216;TL&#8217;):   printf(&#8220;<\/p>\n<h4><a href=\\\"?page_id=$pid&#038;tlnm=$row[PNid]\\\">$row[PNplacename]<\/a><\/h4>\n<p>&#8220;);<br \/>\n\t\t\t\t                        $cpcode = substr($row[PNid],0,5);<br \/>\n                                if( $row[alias] <> &#8221;) { printf(&#8220;$row[alias]<BR>&#8220;); }<br \/>\n                                printf(&#8220;A <a href=\\\"?page_id=$maps\\\" target=\\\"_blank\\\">townland<\/a>&#8220;);<br \/>\n                                printf(&#8221; in <A HREF=\\\"?page_id=$pid&#038;cpnm=$cpcode\\\"><b>$row[TLcivil_parish]<\/b><\/a>&#8220;);<br \/>\n                                printf(&#8221; civil parish , Co $row[TLcounty].<br \/>&#8220;);<br \/>\n                                if( $row[TLded] <> &#8221; )  printf(&#8220;<a href=\\\"?page_id=$maps\\\" target=\\\"_blank\\\">D.E.D.<\/a> is $row[TLded] .&#8221;);<br \/>\n                                if( $row[TLreg_dist] <> &#8221; )  printf(&#8221; and Registrars District is $row[TLreg_dist] .&#8221;);<br \/>\n                                if( $row[TLos_sheet] <> &#8221; )  printf(&#8220;<br \/>Ordnance Survey 6in sheet # $row[TLos_sheet] ($row[TLcounty]).&#8221;);<br \/>\n                                if( $row[TLgv_page] <> &#8221; )<br \/>\n                                  {  printf(&#8220;<br \/>Griffith Valuation pages begin at <a href=\\\"history\/griffiths.php?county=$row[TLcounty]&#038;plu=$row[TLpoorlawunion]&#038;page=$row[TLgv_page]\\\" target=\\\"_blank\\\"> $row[TLpoorlawunion] $row[TLgv_page] <\/a>.&#8221;);<br \/>\n                                   }<br \/>\n                                if($row[TLcounty] == &#8216;Galway&#8217;)<br \/>\n                                   {printf(&#8220;<br \/>Co.Galway library <a href=\\\"http:\/\/places.galwaylibrary.ie \\\" target=\\\"_blank\\\">Field Name Book<\/a> entry &#8220;);}<br \/>\n                                printf(&#8220;<\/p>\n<hr>\n<p>&#8220;);<br \/>\n                                break;<\/p>\n<p>                  case(&#8216;CP&#8217;):   printf(&#8220;<\/p>\n<h4><a href=\\\"?page_id=$pid&#038;cpnm=$row[PNid]\\\">$row[PNplacename]<\/a><\/h4>\n<p> &#8220;);<br \/>\n                                $cpcode = $row[plu];<br \/>\n                                if( $row[PNalias] <> &#8221;)  { printf(&#8220;$row[PNalias]<BR>&#8220;); }<br \/>\n                                printf(&#8220;A <a href=\\\"?page_id=$maps\\\" target=\\\"_blank\\\">Civil Parish<\/a> in Co.$row[county] ,&#8221;);<br \/>\n                                printf(&#8221; Barony of $row[barony] &#8220;);<br \/>\n                                printf(&#8220;and $row[plu] Poor Law Union.<br \/>&#8220;);<br \/>\n                                if( $row[41] <> &#8221; )printf(&#8221; <br \/>Roman Catholic parish  $row[42] (church $row[45]).&#8221;);<br \/>\n                                if($row[TLcounty] == &#8216;Galway&#8217;)<br \/>\n                                  {printf(&#8220;<br \/>Co.Galway library <a href=\\\"http:\/\/places.galwaylibrary.ie \\\" target=\\\"_blank\\\">Field Name Book<\/a> entry &#8220;);}<br \/>\n                                printf(&#8220;<\/p>\n<hr>\n<p>&#8220;);<br \/>\n                                break;<\/p>\n<p>                  case(&#8216;CO&#8217;):   printf(&#8220;<\/p>\n<h4><a href=\\\"?page_id=$pid&#038;conm=$row[PNid]\\\">County $row[PNplacename]<\/a><\/h4>\n<p> &#8220;);<br \/>\n                                printf(&#8220;Follow link to see a list of Poor Law Unions , Baronies and Civil Parishes<\/p>\n<hr>\n<p>&#8220;);<br \/>\n                                break;<br \/>\n                  case(&#8216;UN&#8217;):   printf(&#8220;<\/p>\n<h4><a href=\\\"?page_id=$pid&#038;unnm=$row[PNid]\\\">$row[PNplacename] , Poor Law Union<\/a><\/h4>\n<p>&#8220;);<br \/>\n                                printf(&#8220;Follow link to see a list of Civil Parishes in the union and other Poor Law details<\/p>\n<hr>\n<p>&#8220;);<br \/>\n                                break;<br \/>\n                  case(&#8216;BY&#8217;):   printf(&#8220;<\/p>\n<h4><a href=\\\"?page_id=$pid&#038;bynm=$row[PNid]\\\">$row[PNplacename]<\/a> Barony<\/h4>\n<p> &#8220;);<br \/>\n                                printf(&#8220;Follow link to see a list of Civil Parishes in this barony plus other barony related information<\/p>\n<hr>\n<p>&#8220;);<br \/>\n                                break;<\/p>\n<p>                    default :   printf(&#8220;<a href=\\\"?page_id=$pid&#038;pnnm=$row[PNid]\\\"><\/p>\n<h4>$row[PNplacename]<\/h4>\n<p><\/a> &#8220;);<br \/>\n                                printf(&#8220;<a href=\\\"?page_id=$maps\\\" target=\\\"_blank\\\">Location or item of interest <\/a>&#8220;);<br \/>\n                                if( $row[alias] <> &#8221;){ printf(&#8220;$row[alias]<BR>&#8220;); }<br \/>\n                                printf(&#8220;Located in $row[TLtownland] townland ,&#8221;);<br \/>\n                                printf(&#8221; $row[TLcivil_parish] civil parish ,&#8221;);<br \/>\n                                printf(&#8221; Co $row[TLcounty].&#8221;);<br \/>\n                                if( $row[TLded] <> &#8221; )  printf(&#8220;D.E.D. is $row[TLded] .&#8221;);<br \/>\n                                if( $row[TLos_sheet] <> &#8221; )printf(&#8220;<BR> Ordnance Survey 6in sheet # $row[TLos_sheet] ($row[TLcounty]).&#8221;);<br \/>\n                                if( $row[TLcounty] == &#8216;Galway&#8217;)<br \/>\n                                   {printf(&#8220;<br \/>Co.Galway library <a href=\\\"http:\/\/places.galwaylibrary.ie \\\" target=\\\"_blank\\\">Field Name Book<\/a> entry&#8221;);}<br \/>\n                                printf(&#8220;<\/p>\n<hr>\n<p>&#8220;);<br \/>\n                                break;<br \/>\n                } \/\/ end switch statement<\/p>\n<p>            }<br \/>\n        }<br \/>\n     }<br \/>\n  }<br \/>\nelse<br \/>\n   {<br \/>\n    if( isset($_REQUEST[&#8216;pnnm&#8217;])  )<br \/>\n       { show_placename($pid ,  $pnnm );   }<br \/>\n    if( isset($_REQUEST[&#8216;tlnm&#8217;])  )<br \/>\n       { show_townland($pid ,  $tlnm );  }<br \/>\n    if( isset($_REQUEST[&#8216;cpnm&#8217;])  )<br \/>\n       { show_civilparish( $pid , $cpnm );  }<br \/>\n    if( isset($_REQUEST[&#8216;conm&#8217;])  )<br \/>\n       { show_county( $pid , $conm );  }<br \/>\n    if( isset($_REQUEST[&#8216;unnm&#8217;])  )<br \/>\n       { show_union( $pid , $unnm );  }<br \/>\n    if( isset($_REQUEST[&#8216;bynm&#8217;])  )<br \/>\n       { show_barony( $pid , $bynm );  }<br \/>\n    }<\/p>\n<p>\/\/&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;   LOOP ENDS  &#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<\/p>\n<p>?><\/p>\n<hr \/>\n<p>The shrule.com placename database covers the Poor Law Unions of  <strong> Ballinrobe <\/strong> and <strong> Tuam <\/strong> roughly a 15 kilometer radius centered on Shrule , the <strong> townland <\/strong> database covers most of Connaught in lesser detail . <\/p>\n<p><FORM METHOD=\"POST\" ACTION=\"?page_id=1359\" class=\"formshrule\"><br \/>\n Find :: <INPUT TYPE=\"TEXT\" NAME=\"pnnm\" TEXT=\"dalgan\"> <INPUT TYPE=\"SUBMIT\" NAME=\"submit\" VALUE=\"Search\"><br \/>\n<\/FORM><\/p>\n<p>When searching for a placename type some or all of the word  and click search. If you are unsure of the spelling try a part of the word . For example the placename Mocharra sounds like Moharra so if you search for <strong>arra<\/strong> you should find it. For example a placename record ( eg <a href=\"?page_id=1359&#038;pnnm=MOSHE.21.C\">Rostaff <\/a> ) gives the townland ( eg <a href=\"?page_id=1359&#038;tlnm=MOSHE.21\">Moyne )<\/a>  and the civil parish ( eg <a href=\"?page_id=1359&#038;cpnm=MOSHE\">Shrule <\/a> ) .<\/p>\n<div class=\"l2columns\">\n<ul>\n<li><a title=\"Mayo\" href=\"?page_id=1601\" target=\"_blank\">South Mayo parish maps<\/a><\/li>\n<li><a title=\"Galway\" href=\"?page_id=1604\" target=\"_blank\">North Galway parish maps<\/a><\/li>\n<\/div>\n<hr>\n<p><?php\n\n$pid  = $_GET['page_id'];  \/\/ current page id in wordpress\nglobal $wpdb;\n$query = $wpdb->prepare(<br \/>\n         &#8216;select * from _grp_placenames  where PNstatus = %s  order by PNid&#8217; , &#8216;CP&#8217; ); \/\/<br \/>\n$CPresults = $wpdb->get_results($query , ARRAY_A);<br \/>\n$rowcount  =  $wpdb->num_rows   ;<br \/>\nprintf(&#8220;<H3>Civil Parish details available :: $rowcount <\/H3>&#8220;);<br \/>\nforeach ( $CPresults as $row )<br \/>\n    {   printf(&#8221; <a href=\\\"?page_id=$pid&#038;cpnm=$row[PNid]\\\">$row[PNplacename]<\/a>&nbsp;, &nbsp;&#8220;);     }<\/p>\n<p> printf(&#8221; more to come . . . . <\/p>\n<hr>\n<p>&#8220;);<\/p>\n<p>$query = $wpdb->prepare(<br \/>\n         &#8216;select * from _grp_placenames  where PNstatus = %s order by PNid&#8217;  , &#8216;BY&#8217; ); \/\/ %s<br \/>\n$BYresults = $wpdb->get_results($query , ARRAY_A);<br \/>\n printf(&#8220;<H3>Barony details available<\/H3>&#8220;);<br \/>\n    foreach ( $BYresults as $row )<br \/>\n                 {    printf(&#8221; <a href=\\\"?page_id=$pid&#038;bynm=$row[PNid]\\\">$row[PNplacename]<\/a> &nbsp;, &nbsp;&#8220;);     }<\/p>\n<p> printf(&#8221; more to come . . . . <\/p>\n<hr>\n<p>&#8220;);<\/p>\n<p>$query = $wpdb->prepare(<br \/>\n         &#8216;select * from _grp_placenames  where PNstatus = %s order by PNid&#8217;  , &#8216;UN&#8217;  ); \/\/ %s<br \/>\n$UNresults = $wpdb->get_results($query , ARRAY_A);<br \/>\n  printf(&#8220;<H3>Poor Law Unions details available<\/H3>&#8220;);<br \/>\n     foreach ( $UNresults as $row )<br \/>\n                 {    printf(&#8221; <a href=\\\"?page_id=$pid&#038;unnm=$row[PNid]\\\">$row[PNplacename]<\/a> &nbsp;, &nbsp;&#8220;);     }<\/p>\n<p> printf(&#8221; more to come . . . .<\/p>\n<hr>\n<p>&#8220;);<\/p>\n<p>?><\/p>\n<h3>Land divisions and Administration<\/h3>\n<p>Go to the <a href=\"?page_id=1563\"  target=\"_blank\">Map Resources<\/a> page for descriptions and explanations of the land divisions used in genealogy plus explanations of terms etc&#8230;<\/p>\n<h3>Civil Parish Maps<\/h3>\n<p>There are two general index maps of the Civil Parishes , one for <a title=\"Mayo\" href=\"?page_id=1601\" target=\"_blank\">South Mayo<\/a> and the other for <a title=\"Galway\" href=\"?page_id=1604\" target=\"_blank\">North Galway<\/a> . These correspond roughly to the Baronies of Kilmaine (Co Mayo ) and Clare (Co Galway) and show the civil parish boundaries and parish locations in relation to each other.<\/p>\n<h3>Townland Index maps .<\/h3>\n<p><?php\nglobal $wpdb;\n$pid  = $_GET['page_id']; \n$query = $wpdb->prepare(&#8216;SELECT * FROM _grp_placenames<br \/>\n                          WHERE PNid LIKE %s AND PNstatus = %s<br \/>\n                          ORDER BY PNid&#8217; , &#8216;MOSHE%%&#8217; , &#8216;TL&#8217;  );<br \/>\n$results = $wpdb->get_results( $query , ARRAY_A);<br \/>\nprintf(&#8220;<\/p>\n<h4>Official O.S. townland names in Shrule parish<\/h4>\n<p>&#8220;);<br \/>\nforeach( $results as $row )<br \/>\n  { printf(&#8221; <a href=\\\"?page_id=$pid&#038;tlnm=$row[PNid]\\\">$row[PNplacename]<\/a> &nbsp; , &nbsp; &#8220;);<br \/>\n  }<br \/>\nprintf(&#8221; if the place you seek is not here it&#8217;s not an official townland name , search or select the parish link to see all placenames in that parish.<br \/>&#8220;);<\/p>\n<p>?><br \/>\nThere are townland index maps for Shrule and the surrounding civil parishes available below . They show the townland boundaries and main features of the Civil Parish . They can be useful in locating adjacent townlands or parishes to the one you may be researching.<\/p>\n<div class=\"l2columns\">\n<ul>\n<li><a title=\"Mayo\" href=\"?page_id=1601\" target=\"_blank\">South Mayo parish maps<\/a><\/li>\n<li><a title=\"Galway\" href=\"?page_id=1604\" target=\"_blank\">North Galway parish maps<\/a><\/li>\n<\/div>\n","protected":false},"excerpt":{"rendered":"","protected":false},"author":17,"featured_media":0,"parent":0,"menu_order":80,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-1359","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"http:\/\/www.shrule.com\/index.php?rest_route=\/wp\/v2\/pages\/1359","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.shrule.com\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"http:\/\/www.shrule.com\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"http:\/\/www.shrule.com\/index.php?rest_route=\/wp\/v2\/users\/17"}],"replies":[{"embeddable":true,"href":"http:\/\/www.shrule.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1359"}],"version-history":[{"count":0,"href":"http:\/\/www.shrule.com\/index.php?rest_route=\/wp\/v2\/pages\/1359\/revisions"}],"wp:attachment":[{"href":"http:\/\/www.shrule.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1359"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}