Jump to content
TNG Community

Search the Community

Showing results for tags 'code'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • TNG Specific
    • Announcements
    • Questions and Answers
    • Installation and Configuration
    • New Ideas and Suggestions
    • Code Discussion
    • Templates or Design Questions
    • CMS Integrations
    • TNG Wiki
  • Community
    • Member Webpages
    • Genealogy
    • Chit Chat
    • Questions and Answers
    • Offers And Requests

Blogs

  • Community News
  • TNG News

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Found 76 results

  1. anderson.mc

    1900 Census Import Issue

    I have been importing multiple pages of census data for a couple of months now, no problems. Recently, I started having problems with importing 1900 census data. Using the same workflow I had been using, when I import the DOM I get the following table and data (see screenshot). I updated TNG to the latest v12.02. Upgraded Census Plus to the latest v12.0.0.7d. I still have the same problem. I deleted a previously imported 1900 DOM record, then reimported, and I had no issues. I have attempted to import about 6 different 1900 census DOM records and keep having the same problem. I imported a different year and had no issues. Does anyone have any experience with this? Is there something new about how Ancestry is handling 1900 DOM source files? Appreciate help from somebody who knows more than I do. Thank you.
  2. Without success from another source, I am posting here in hopes someone will tell me what I am doing wrong with the validation code AND answer the two questions at the end: I have added a field to the “newacctform.php” as follows (in the table) <tr><td valign="top"><?php echo $text['howrelate']; ?>*:</td><td><textarea cols="50" rows="4" name="howrelate"></textarea></td></tr> I have the text right and I believe everything else is correct. The form works fine until I go to try to “validate” the field. This is what (and where) I have currently: <script type="text/javascript"> function validateForm(form) { var rval = true; if( form.username.value.length == 0 ) { alert("<?php echo $text['enterusername']; ?>"); rval = false; } else if( form.password.value.length == 0 ) { alert("<?php echo $text['enterpassword']; ?>"); rval = false; } else if( form.password2.value.length == 0 ) { alert("<?php echo $text['enterpassword2']; ?>"); rval = false; } else if( form.password.value != form.password2.value ) { alert("<?php echo $text['pwdsmatch']; ?>"); rval = false; } else if( form.realname.value.length == 0 ) { alert("<?php echo $text['enterrealname']; ?>"); rval = false; } else if( form.<?php echo $_SESSION['tng_email']; ?>.value.length == 0 || !checkEmail(form.<?php echo $_SESSION['tng_email']; ?>.value)) { alert("<?php echo $text['enteremail']; ?>"); rval = false; } else if( form.em2.value.length == 0 ) { alert("<?php echo $text['enteremail2']; ?>"); rval = false; } else if( form.howrelate.value.length == 0 ) { alert("<?php echo $text['howrelatepop']; ?>"); rval = false; } else if( form.<?php echo $_SESSION['tng_email']; ?>.value != form.em2.value ) { alert("<?php echo $text['emailsmatch']; ?>"); rval = false; } return rval; } </script> I have tried to place the validation field in different locations but no matter where I put it, when I fill out the form and submit – I get the message that the “user name is already taken”. IF all I do is remove the validation statement, the form is working and submitting just fine, and everything works as designed. Is it possible to tell me where I am going wrong with the validation? Second – once I get this working, where do I need to go to tell the submittal to include the newly added field information when I go to review the new user. And finally, as an extra bit of question – When an error occurs such as “password does not match” an alert is generated which may be java script but I'm not certain. Where can I find this alert so I can change the part at the top that now says “my website name” – for example, your password doesn’t match or any other error has occurred.
  3. Bruce Roy

    Map pins do not show

    Having installed and then uninstalled Open Street Map, I find that my map pins did not show in OSM and now do not show with Google maps reinstalled. There is a "Link to Google Maps" where the pins should be. The link opens a new tab in google.com/maps. The map pins are in the img folder - they just don't show on the web page. Checking in Firefox/Web Developer/Console I get this message: uncaught exception: InvalidValueError: initMap is not a function Any advice appreciated. Bruce Roy https://royroyes.net
  4. Hello all, You can now make your menu selection restricted to logged-in users using a new parameter: https://tng.lythgoes.net/wiki/index.php?title=Custom_Menu_Hook#Logged_in_users // Custom menu $custommenulinks[$link_nr]['user'] = true; // Find menu $findmenulinks[$link_nr]['user'] = true; // etc It works the same way as the Admin parameter. The main reason for this is that it's recommended that the menu hook is added in customconfig.php but when that file is read, $currentuser is not known. Up to and including TNG v12.0.2 you have to use a very small mod that is found at the Custom Menu Hook page. Copy-and-paste. (Link above) I have today confirmed that the genlib.php file Darrin sent to me works, with the modification included, so it looks like it's a part of TNG from the next update. Enjoy! Erik
  5. Thanks to sterling efforts by Roger and Erik, my maps now appear where they should. But I still have a problem. When I select a map marker in a person's page, I think what is supposed to happen is that the map zooms in to that location. But when I select a marker it opens a new window with Google Maps, which searches for the coordinates for a place but decides to identify with a place name sometimes different from my record (but in the vicinity). Example: https://royroyes.net/getperson.php?personID=I916&amp;tree=rr_tree
  6. pdwight

    'Notes" link not working. Ver 12.02

    'Notes' for all Notes (General, Birth, Marriage etc,) for person is not working whether there is data in the section or not - any ideas? Data got in the Notes by import but can not get at the data. Gives me a different website. Also under Admin, Cemeteries Link. Can not display my website yet, working on it.
  7. Hello, I'm running into an issue when attempting to display the custom event types in the administration of TNG 11.1.2. The query fails and returns this message: An error has occurred in the TNG software. This could be due to a setup issue, an incomplete upgrade or a program bug. If you are the site owner, you may contact TNG support for help with this problem. Please copy the query below and paste it into your message. Query: SELECT tng_eventtypes.eventtypeID, tag, description, display, type, keep, collapse, ordernum, count(eventID) as total_events FROM tng_eventtypes LEFT JOIN tng_events ON tng_eventtypes.eventtypeID = tng_events.eventtypeID GROUP BY eventtypeID ORDER BY tag, description LIMIT 50 MySQL server has gone away My database has many, many events and obviously the LEFT JOIN puts to much load on the MySQL server. A modified query that uses INNER JOIN works, but takes very long, and does not include those eventtypes that are not (yet) used, so it is not an acceptable solution. TNG version 10 did not do a LEFT JOIN for counting the events, so, this was not a problem in v10. Any ideas how to optimize the query to work / work fast? Thanks, Dietmar
  8. I have released Citation Master versions 11.0.0.8 (TNG 11.0) , 11.1.0.8 (TNG 11.1), and 11.1.2.8 (TNG 11.1.2). This is a major update that adds: Formatted page references--Generated by getperson.php and suitable for copying by other genealogists. (Requested by Darryl Brady, Brian Larson, and Mark Middleton.) A new configuration file for the APA format, and updates to all other configuration files for the new page reference feature. The ability to prepend and append text to citation/source fields. (Requested by a few users who would like to add labels like 'Page:' to certain fields.) The ability to turn Citation Master's formatting engine on/off for citations, sources, references--controlled by mod parameters. (Requested by Darryl Brady and Bill Desjardin.) A new formatting instruction for inserting HTML breaks. (Requested by Ken Roy.) Improvements to the formatting engine's algorithm that eliminate some extra spacing that crept into sources and citations. Internationalization for 12 languages. In addition, the Citation Master Wiki page has been extensively updated to cover all the current features and provide additional examples and instructions on use. This version is recommended for all TNG 11 Citation Master users. Happy to help with any fine tuning of the configuration files. Bill Herndon Lindell-Herndon Genealogy
  9. I'm using Template 14 in TNG v12.0.1. Emails are not being sent from "Contact Us", "Suggest", or "New Account Requests". I followed the guidance in the wiki to set Send all mail from address above: to Yes because I am not getting emails, but I still get the following error: Fatal error: Uncaught exception 'phpmailerException' with message 'SMTP Error: Could not authenticate.' in /public_html/class.phpmailer.php:1692 Stack trace: #0 /public_html/class.phpmailer.php(1540): PHPMailer->smtpConnect(Array) #1 /public_html/class.phpmailer.php(1335): PHPMailer->smtpSend('...') #2 /public_html/class.phpmailer.php(1213): PHPMailer->postSend() #3 /public_html/tngmaillib.php(53): PHPMailer->send() #4 public_html/addnewacct.php(144): tng_sendmail('...') #5 {main} thrown in public_html/class.phpmailer.php on line 1692 I can send and receive emails from the account directly without a problem. Does anyone have a recommendation as to how to fix this?
  10. I'm interested in trying to enable "responsive fonts" in the template footer. When viewing in a mobile device, including iPad and iPad pro, while everything else on the page IS responsive, the text inside the footer is not and will not resize the font. Any suggestions appreciated. Larry
  11. So many questions - but progress is being made... When someone submits a "user registration request", Admin gets an email saying go to your Admin to Review. Once you approve the request, you have the option to send an email to the user notifying them that their account is active. In this block, the admin can type out a custom message to the new user BUT there is a built-in message somewhere. Either I'm getting too old or I just can't see anymore but - would someone kindly point me to where I can change the default text in that reply - Thanks L
  12. Bruce Roy

    Most Wanted issues

    I find that I cannot add/edit/delete Most Wanted entries - actually I can edit but cannot save the edited version. Bruce Roy roy-royes.net
  13. LJLachance

    Template 13 V12 - et al

    Again, Template 13, but I suspect this question would apply to any template. I want to remove the "register for new account" link and form from the index page in its entirety and republish it on a separate web page (same public html hierarchy but outside TNG). First I need to know how (from where) to remove the standard link and replace it with a link to "the other page" outside TNG, then I need to know how to link back to the "register form" inside TNG. (Where is this form?) I know how to make links, just not where to find these two pieces in V12. Thanks
  14. With Version 12 I am using/customizing Template 13 (a pre-V12 template). At the top of the index page is a nav bar image (nav.png I believe). The behavior for this image is defined in .artnav in the css for this template. I'd like to find someone who might know the css syntax to enable this image/nav bar to be responsive. Under usual circumstances I would simply have a ".responsive" statement but how to add this for this template is above my skill level. The reason for this request is that while everything else seems to resize just fine (whether using breakpoints or otherwise), this image does not, causing it to deploy in two sections at lower resolutions 480 or less. Anybody with ideas please let me know. Thanks
  15. wkenddad

    Layout of media change

    I have several people with Yearbook Entries I link the Jpegs of each page to a "Education" Event. When the persons page displays these Jpegs are in rows. is it possible to have these items display as columns in a single row or a table of 1 x 4 or 2 x 2? Or even better a MOD that allows several Items to be linked in a table format and that table be linked to the event. P.S. Is there anyway to have them display in order A-Z versus order of entry?
  16. Edit: find latest update at the end of this thread. -- Hi, if someone is interested, I just created the following code to have a link to FamilySearch-Search on any Person's page. It's quick and dirty, as I don't know PHP at all. If you want to make an addon out of it, please do so diff --git a/getperson.php b/getperson.php index 11c4126..1abc8b1 100644 --- a/getperson.php +++ b/getperson.php @@ -154,6 +154,21 @@ echo tng_DrawHeading( $photostr, $namestr, getYears( $row ) ); setEvent( array( "text"=>$text['born'], "fact"=>$stdex['BIRT'], "date"=>$row['birthdate'], "place"=>$row['birthplace'], "event"=>"BIRT", "entity"=>$personID, "type"=>"I" ), $row['birthdatetr'] ); setEvent( array( "text"=>$text['christened'], "fact"=>$stdex['CHR'], "date"=>$row['altbirthdate'], "place"=>$row['altbirthplace'], "event"=>"CHR", "entity"=>$personID, "type"=>"I" ), $row['altbirthdatetr'] ); } + // JPT search Familysearch + $searchparam="https://familysearch.org/search/record/results"; + $searchparam.="?count=20"; + $searchparam.="&query="; + + if( $row['firstname'] ) $searchparam.="%2Bgivenname%3A". $row['firstname']."~"; + if( $row['lastname'] ) $searchparam.="%20%2Bsurname%3A". $row['lastname']."~"; + if( $row['birthplace'] ) $searchparam.="%20%2Bbirth_place%3A".$row['birthplace']."~"; +// TODO if( ) $searchparam.="%20%2Bbirth_year%3A".$row['birthdatetr']."-".$row['birthdatetr']."~"; + if( $spouserow['firstname'] ) $searchparam.="%20%2Bspouse_givenname%3A".$spouserow['firstname']."~"; + if( $spouserow['lastname'] ) $searchparam.="%20%2Bspouse_surname%3A". $spouserow['lastname']."~"; + + setEvent( array( "text"=>"Search", "fact"=>"<a href=$searchparam target=\"_blank\">Familysearch</a>")); + if ( $row['sex'] == "M" ) { $sex = $text['male']; $spouse = "wife"; $self = "husband"; $spouseorder = "husborder"; }
  17. Problem with eventdate, eventdatetr and eventplace being empty during import I have imported a gedcom file into TNG. Now I noticed that on an individuals page the events like BIRTh, OCCUpation, RESIdence, EDUCation and DEATh are neatly presented in chronological order. However the events that have the tag "EVEN" in the admin's Custom Event Types pages are presented on the individual's page in a random order. So I looked in the tng_events table and noticed that the columns eventdate and eventplace are empty and eventdatetr is set to a default value of "0000-00-00" for all rows that contain the tag EVEN. I checked the file gedimport_misc.php contains this piece of code: $query = "INSERT INTO $events_table (eventtypeID, persfamID, eventdate, eventdatetr, eventplace, age, agency, cause, addressID, parenttag, info, gedcom) VALUES(\"$eventtypeID\", \"$persfamID\", \"" . $eventptr['DATE'] . "\", \"" . $eventptr['DATETR'] . "\", \"" . $eventptr['PLAC'] . "\", \"" . $eventptr['AGE'] . "\", \"" . $eventptr['AGNC'] . "\", \"" . $eventptr['CAUS'] . "\", \"" . $eventptr['ADDR'] . "\", \"" . $eventptr['parent'] . "\", \"$eventinfo\", \"$tree\")"; I then put in some echo statements and concluded that during import the variables $evendate , $eventdatetr, $eventplace are empty. One can change and update those events using the Edit Existing Person , Other Events table, but this seems a bit cumbersome as I have hundreds of those events. My question, has anyone seen this behaviour and more important, has anyone got a solution for me? Thanks Jan Wessel P.s. I did send an email to Darrin some weeks ago, but have not had a reply from him yet.
  18. During export via Gedcom from Legacy 9.0, I'm having trouble transferring geo-codes to TNG. I have examined the Gedcom-files, but cannot find latitudes or latitudes in the file ( and of course they are not shown in TNG after import, either). I have tried different sets of setups from Legacy (Legacy file and Gedcom 5.5), but when I examine the Gedcom-files, none of these have info on geo coordinates. If anyone out there can help a panicking Norwegian, I would greatly appreciate your feedback! Best regards Morten
  19. Masterhistorian

    New user: Temp 15 Error

    I am very new but Iam learning as i go. I was in admin setup and the whole right sidebar and underneath main photo just vanished. I t at the time messing with anything. I've compared index, and other files and they all match up. Ideas on what could have happened? Also were would I go to add background image to entire site. and would this be the appropriate code Background-image:url (); for the body
  20. Renze

    Google Adsense

    Anyone have experience with Google AdSense? Anyone have any tips where I should post the code? Is that in Getperson. php or somewhere else. Who can help? Would like to place an advertisement before Google Maps starts on the personal page
  21. Hi, I have a problem with displaying TNG help pages. Environment and TNG installation: I have installed "DesktopServer Limited" v3.8.3 (by ServerPress.com) on one of my Windows 10 Home PCs. The Apache, PHP and MySQL version-releases can be seen on attached screen copy of TNG Setup>>Diagnostics page. To install TNG I downloaded v 11.1.2 zip file and copied it to DesktopServer C:\xampplite\blueprints folder Using DesktopServer I created a local site www.tngtest1.dev from "blueprint" tngfiles1112.zip (Note! This site is not visible from internet) DesktopServer creates a virtual host by adding the following line in Windows hosts file ( C:\Windows\System32\drivers\etc\hosts ): 127.0.0.1 www.tngtest1.dev I created a new mysql database for TNG using phpMyAdmin with collation utf8_swedish_ci I created a database admin user with ALL PRIVILEGES and with HOST field set to localhost A TNG Regular installation was done and everything went OK. Database Host Name set to localhost and TNG tables created with collation utf8_swedish_ci Launched page www.tngtest1.dev/admin.php in FireFox and created a TNG admin user. Login to TNG with Admin user and checked: Setup >> Configuration >> General Settings > Database > Database Host: localhost Checked: Setup >> Configuration >> General Settings > Site Design and Definition and changed Genealogy URL from www.tngtest1.dev to localhost So far so good Problem and Error message: Using the TNG panels works fine but when trying to access TNG help pages I get error: Error: TNG is not communicating with your database. Please check your database settings and try again. Settings can be found under Admin/Setup/General Settings/Database, or at the top of your config.php file. Debugging done: I found an earlier forum topic on this issue but it did not conclude what the error cause is. I have done some debugging and found the following: The TNG help files are basically just html but most of them begin with including a "TNG help header". Here is a code snippet: <?php include("../../helplib.php"); echo help_header("Help: General Settings"); ?> Now helplib.php looks like this: <?php function help_header($helptitle) { $relpath = "../../"; include($relpath . "begin.php"); include($relpath . "version.php"); $header = $tngconfig['doctype'] ? $tngconfig['doctype'] . *** text excluded from code extract *** *** lines excluded from code extract *** return $header; } global $link; ?> So helplib.php includes begin.php In begin.php the last php statement contains a function call of tng_db_connect(): $link = tng_db_connect($database_host,$database_name,$database_username,$database_password,$database_port,$database_socket); I added some echo statements before the function call and found that the problem is that "$database_..." variables are not set (=empty) when function tng_db_connect is called. And this is strange since earlier in begin.php the file config.php (where these variables are set) is indeed included with statement: include($tngconfig['subroot'] . "config.php"); which I checked resolves to include("config.php") in my environment. And even more strange is that the include of config.php works flawless in the "admin_***.php" files. (Yes, I have tested it) Solution found to work: I added an include of config.php in helplib.php as follows (see line in blue color): <?php function help_header($helptitle) { $relpath = "../../"; include($relpath . "config.php"); // Added to make Help pages work in DesktopServer environment include($relpath . "begin.php"); include($relpath . "version.php"); $header = $tngconfig['doctype'] ? $tngconfig['doctype'] . *** text excluded from code extract *** *** lines excluded from code extract *** return $header; } global $link; ?> As far as I have seen so far this solves the problem. Question: Any ideas on what might cause this problem? I can do further debugging as needed, feel free to guide me. Regards Bosse
  22. KmBdev

    Custom event with hyperlink

    I have tng in word press using the wordpress plug in. I have a custom event "Links" which lists mainly the name of battles the person was involved in. What I would like to do is make the battle name, in my custom event, link to a wordpress page I have in my web site about the battle. Is there any way to do this? Thank you for any help.
  23. XerxX

    Fan Chart Text-align Fix

    Hi all, I just upgraded to v11 and found the Fan Chart really nice. There is, however, in my view a problem in generation 5: There is too much space "above" the text/name: . I have found how to tweak it (and I also add some space for generation 3) and post it here in "Mod-format": %target:fan.php% %location:% // console.log("placeWrappedText: %s",pText); %end:% %insert:before% if (gens == 4) originY -= 16; // Modfd: Remove space from gen 5 if (gens == 2) originY += 8; // Modfd: Add space to gen 3 %end:% The result for generation 5: I DON'T post this as a Mod in the TNG Wiki because I suppose it will soon be fixed by Darrin. He's notified of this. (If you think it should be a Wiki Mod: Be my guest to post it!) Regards, Erik
  24. I recently upgraded from version 9 to version 11. I also upgraded PHP and MySQL. Somewhere along the way I lost the links to all of my images. The personal pages show that there are documents or pictures, but there is only a broken image icon showing. When I FTP into my site I can see that all of the images are still in their folders. I went to General settings and tried to add a “direct path(?)”, but now when I go to my site I just get this list of Warning Fail Errors. ____________________ Warning: include(/wissersitecss/tng/config.php): failed to open stream: No such file or directory in /home/content/20/4982920/html/wissersitecss/tng/begin.php on line 11 Warning: include(): Failed opening '/wissersitecss/tng/config.php' for inclusion (include_path='.:/usr/local/php5_4/lib/php') in /home/content/20/4982920/html/wissersitecss/tng/begin.php on line 11 Warning: include(/wissersitecss/tng/templateconfig.php): failed to open stream: No such file or directory in /home/content/20/4982920/html/wissersitecss/tng/begin.php on line 15 Warning: include(): Failed opening '/wissersitecss/tng/templateconfig.php' for inclusion (include_path='.:/usr/local/php5_4/lib/php') in /home/content/20/4982920/html/wissersitecss/tng/begin.php on line 15 Warning: session_start(): Cannot send session cookie - headers already sent by (output started at /home/content/20/4982920/html/wissersitecss/tng/begin.php:11) in /home/content/20/4982920/html/wissersitecss/tng/begin.php on line 28 Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /home/content/20/4982920/html/wissersitecss/tng/begin.php:11) in /home/content/20/4982920/html/wissersitecss/tng/begin.php on line 28 Error: TNG is not communicating with your database. Please check your database settings and try again. Settings can be found under Admin/Setup/General Settings/Database, or at the top of your config.php file. ___________________ My first question is where can I go to remove that “Direct Path” since I can no longer reach my General Settings Page? My next question would be how can I restore links to my image files so they will show up on a person’s page. My home page: http://wisserfamily.com/tng/index.php I am running: TNG v11 If you search a name like “Steve” you will see that the images do not likn to the page. Thanks for any help, Gary
  25. Hoping someone can give me a coding tip. Currently have this line of code: $resstuff="<form method=\"post\" action='kicker.php' target='_blank'><b>RESEARCH POPULAR SITES <br />; <select onchange=submit() multiple name=\"researchlink\" size=\"3\" style=\"vertical-align:text-top;\"> <option value=$callres[0] >$rv[0]</option> ......more options </select> </form>"; ----- giving me this: I wish to have a cust_text variable in various languages I support, in the form $text[rm-header] = "Research Popular Sites". I've tried various ways such as : $resstuff="<form method=\"post\" action='kicker.php' target='_blank'><b><?php echo $text['rm-header'] ; ?><br />; but no luck. I tinker in coding, but could use help on this. Thanks, Ron
×