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


  • 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


  • Community News
  • TNG News

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...

Found 97 results

  1. wmpbrown

    How can I move "Contact Us"

    I want to move Contact Us to the empty space below. I'm using v11, template 10. Please include a screen shot of the code placement so I don't get it wrong.
  2. Bruce Roy

    Report formulas not working

    I have had several reports listing births/deaths/marriages in the last 12 months using the formula: ( Convert to Days Today (true date) - Convert to Days Birth Date (True) < 366 ) but they now produce an error code which I don't understand! 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_people.living, tng_people.private, lnprefix, prefix, suffix, tng_people.branch,lastname,firstname,birthdate,birthplace,treename, tng_people.personID, tng_people.gedcom, nameorder FROM (tng_people , tng_trees) WHERE (( TO_DAYS(todayDATE_ADD(NOW(), INTERVAL 15 HOUR)) - TO_DAYS(birthdatetr) < 366 )) AND tng_people.gedcom = "rr_tree" AND tng_people.gedcom = tng_trees.gedcom ORDER BY birthdatetr,lastname,firstname LIMIT 200 You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ')) - TO_DAYS(birthdatetr) < 366 )) AND tng_people.gedcom = "rr_tree" AND tng_pe' at line 1
  3. Brett

    Identify Mods affecting pages

    Recently there have been some forum posts regarding conflicts on some sites, mainly due to Mod changes. It is not always easy to identify which Mods affect which pages. I would like to highlight Show Mod Names by Robin Richmond as a working solution. Show Mod Names lists mods (utilising the Mod) that affect the files used by the running program. While it does not identify errors, it can save some time, as it is not as necessary to uninstal all the Mods when finding the error Mod. It is only needed to uninstall those Mods affecting the page the error occurs on. If Mod developers would look into incorporating this into their Mods, it could benefit TNG admin users in identifying or reporting error detail. An example on the getperson.php is shown. No details print and the view is only available to logged in Admins.
  4. I seem to be having a coding problem. I'm trying to add a caption to an image in my history page. I would like the caption to be beneath the image and would like to image to be all the way to the left. Can anyone help me with the correct code to move the image to the left margin and the caption centered beneath it? Thank you, Kate
  5. Hi everyone, On both the Registration form and the suggest form there is a link to the Data Protection Policy. My question is how I can accomplish some extra space between the Data Protection Policy link and the text above is. In my opinion it is squeezed together to much at the moment. Kind regards, Rob Severijns
  6. KmBdev

    Using History template

    I have followed the directions in the historytemplate.php. I get a -- Fatal error: Uncaught Error: Call to undefined function writelog() in E:\wamp64\www\histories\extrapgs\salemtrials.php:35 Stack trace: #0 {main} thrown in E:\wamp64\www\histories\extrapgs\salemtrials.php on line 35. The code is as follows: $yourlink = "/extrapgs/salemtrials.php"; $logstring = "<a href=\"extrapgs/salemtrials.php\">Salem Witch Hysteria</a>"; writelog($logstring); preparebookmark($logstring); Could anyone inform me of what the error is? I have been struggling with this. Thank you.
  7. Hello TNG team, I have a clean install of v. 12.0.3 and do not have any integrations, a couple small mods from the Community here is all. I was playing with New User Registration and noticed the following behavior. After the description is a proposed fix. Thank you for reading this. I look forward to the replies. ---Bob https://spanel.familyds.com/tng Pre Conditions: New user follows the Registration link and successfully submits a valid request. Procedure: The admin reviews the newly submitted access request and changes the username to something different than user submitted. Admin checks box to notify user upon activation with email. Admin submits (approves) the new registration. Post Conditions: The approval email is successfully generated, however the user name contained within is wrong. Instead of the modified user name the Admin approved, TNG continues to use the user-submitted user name. BUT the user name in the TNG database is properly changed to the Admin-approved text. Proposed design: Modify the User Review page with a listener on the field for user_name. If it is modified, the text that is used in the email is dynamically re-generated. This must apply whether or not the check box to notify user has been checked or not. Then, according to my understanding of how the current code works, the generated email notification will contain the correct user_name data matching the database. This design will allow the user to verify the text in the email that will be sent upon submission. Especially helpful for people that make small tweaks depending on who is registering.
  8. Within a Mod cfg file, is it possible for the Target to be dynamic. I am wanting the Target to identify the particular template currently being used. So instead of: %target:templates/template16/css/mytngstyle.css% I would like something like: %target:currenttemplatepath/css/mytngstyle.css% . If possible, what code would I require.
  9. The Wiki page Mod Manager - Edit Parameters states: By setting a mod parameter a webmaster could, for example, prevent exposing information to certain users, or could conveniently change the color scheme for a custom form. I have searched the Wiki and Forum but cannot find if Paramenter Options could do something similar to remove or show a row. As an example, a Mod is installed that removes the Suffix Row on the Person page %target:getperson.php% %location:% if( $row['suffix'] ) $persontext .= showEvent( array( "text"=>$text['suffix'], "fact"=>$row['suffix'], "event"=>"NSFX", "entity"=>$personID, "type"=>"I" ) ); %end:% %replace:% // if( $row['suffix'] ) // $persontext .= showEvent( array( "text"=>$text['suffix'], "fact"=>$row['suffix'], "event"=>"NSFX", "entity"=>$personID, "type"=>"I" ) ); %end:% Rather than installing/uninstalling the Mod, could a show/remove option be available as a Mod option? If so, how might I code this?
  10. Brett

    Add New Event Type

    Which file or Table would contin the Options available from the Select Tag Drop Down box? Items include Adoption, Address and Census. Custom Event Types >> Add New Event Type Search Add New Help for this area Associated with: Individual Family Source Repository Select Tag: EVEN - Event ADOP - Adopted ADDR - Address ALIA - Also Known As ANCI - Ancestor Interest BARM - Barmitzvah BASM - Basmitzvah CAST - Caste CENS - Census CHRA - Adult Christening CONF - Confirmation CREM - Cremated DESI - Descendant Interest DSCR - Physical Description EDUC - Education EMIG - Emigration FCOM - First Communion GRAD - Graduation IDNO - National ID Number IMMI - Immigration LANG - Language NATI - Nationality NATU - Naturalization NCHI - Count of Children NMR - Count of Marriages OCCU - Occupation ORDI - Ordinance ORDN - Ordained PHON - Phone PROB - Probate PROP - Possessions REFN - Reference Number RELI - Religion RESI - Residence RESN - Restriction Notice RETI - Retired RFN - Permanent Record Number RIN - Record ID Number SSN - Social Security Number WILL - Will or enter: (will take precedence if both fields contain data) Display: Display Order: Event Data: Accept Ignore Collapse Event: Yes No LDS Event: Yes No
  11. I find it very useful and inspiring to see the design adaptions in the different member webpages. I am currently using template 12 - does anyone like to share their template 12 webpage? Thank you!
  12. BobS

    TNG Book Generator Demo

    Hello All, I’ve had this desire to generate an old-fashioned genealogy book using TNG, and thought I would share my results. If you click on the following link, you will see 4 generations of descendants of my ancestor Peter Baker: http://www.schwartznet.net/genealogy/register.php?personID=I118&tree=Tree1&generations=4&tngmore=1 The page you see is an extensive rewrite of the register.php and reglib.php routines. There are two buttons at the top of the output. The “Book Format” button will invoke a javascript routine that will show this output in book format. You will need a modern browser (Chrome, Firefox) for this to work. I am pleased with the results. It handles all my mangled HTML and CSS well. Once the book looks right, I can use the “download HTML” button to create a file to input to a high level HTML-to-pdf converter such as PrinceXML or Docraptor to create the book. Comments and Feedback are welcome. Bob Schwartz
  13. Hello All, In continuing the development of the Book Format, I have added two new features. First is the addition of the “Book Options” button. Now the user can select printing options and add sections in the book such as a preface, introduction - whatever verbiage is needed to enhance the book. In order to make this section work, there is now a new database table to remember all the options for the given individual. You can see the results here for my example ancestor Peter Baker http://www.schwartznet.net/genealogy/register.php?personID=I118&tree=Tree1&generations=3 Feel free to play around with the various buttons. However, remember that any changes will be saved to the database table so that the next user will see it. I might suggest that you “adopt” any random person other than Peter Baker if you experiment. Eventually, I will reset the database, and the Book Options button will be closed off by the login. The second feature is the cemetery section were I list all the people buried in the various cemeteries. To be listed on this section, the individual must be noted on the Headstone part of TNG. It takes into account multiple photos for one individual, and multiple individuals for one photo. Finally, there were several requests to produce a mod so that others can test the routine. In all honesty, I am not sure how to do it. So let me offer this compromise. I will disable the database part of the Book Option section. Then I can make available my modified register.php, reglib.php and a new CSS file called bookformat.css. Simply rename your current files to something like register-original.php and reglib-original.php for safekeeping, and drop the new files in their place. Comments/suggestions are always welcome. Regards, Bob Schwartz
  14. I have released Citation Master versions (TNG 11.0) , (TNG 11.1), and (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
  15. BeverleyStimpson

    dadlabel, momlabel - can I change and add?

    Hi, Apologies if I'm posting this in the wrong topic area. I'm trying to customise template 16 in TNG12 v. 12.0.3. I'd only just got my head around the basics to do the templateconfig file for the custom footer, index and topmenu without template in V11. But I had it figured enough to work! I like the design of Template 16 in V12.0.3 - it's not that different to the one I'd designed previously. However, I can't figure out how to include the template snippets I had in V11 to not use a template in the new version. So, I'm attempting to customise Template 16 - colours etc are fairly easy. And I've sorted out (from the Wiki instructions) how to add new variables to the admin_templateconfig, cust_text and the T16 template config. YAY.... now my problem is this... I want to use the four links across the top of T16 for my grandparents. I've made new variables as in Person 1, Person 2, 3 and 4 - and personname1, 2, 3 and 4, tree id etc. BUT at the top of the pages topmenu and index php, there is this code $dadlabel = getTemplateMessage('t16_dadside'); $momlabel = getTemplateMessage('t16_momside'); I've searched and cannot locate anything that resembles dadlabel or momlabel... so my questions (if I've explained it correctly - apologies for being a bit long-winded) is where do I find this $dadlabel? and can I change dadlabel, momlabel to something other - to include all four grandparent labels? I can add links to the menu manually, but it does seem silly if I can use the php to do it. I'd really like to get the customisation done on my localhost server before I upload everything to my new domain. Many thanks in advance Beverley
  16. Good afternoon, I need your help, I have change the primary image and on the front side of my homepage it is displayed correctly, but when I go to subpages it's not, where do I have to change the codes to view my primary image correctly on the subpages? I have one more small problem, when I add a link from the Danish church books (direct link to page) is the whole link not marked = not directly to the page https://www.sa.dk/ao-soegesider/da/billedviser?bsid=203400#203400,38575096 Thank you in advance Regards Jane
  17. Hi, I have noted an issue with 12.03 and wonder if others have the same. When creating a new event and saving, the box should disappear and the new event is added. Since the upgrade the only way I Can get this to work is to create an event, save then hit refresh. Has anyone else had this issue? Regards Tigs
  18. pdwight

    Menus organize

    I would like to arrange the TNG menus left and right. I have 4 dropdowns 'File' 'Media' 'Info' 'Other' and I want to put 'Other' on the left or before 'Info'. I think I have the hang of adding and moving menu links up and down (vertical) but can not find what makes the Main Menus lists move left or right (horizontal). Using TNG 12.0.2 Template 12 …...paul
  19. I'm using template 13, v12.0.2. I see this code on the index.php page: <?php foreach( $mediatypes as $mediatype ) { if(!$mediatype['disabled']) { echo "<li><a href=\"browsemedia.php?mediatypeID={$mediatype['ID']}\">{$mediatype['display']}</a></li>\n"; } } ?> But, I don't see anywhere in admin how to "disable media types" so they don't appear among the list on my homepage? I can delete "reports," for instance, since that has its own line. But there are no lines here for histories, recordings, or videos. I'm sure I'm missing something obvious, but I can't find it. Can anyone tell me where this might be? homepage: https://buffalo.pitard.net/index.php
  20. My genealogy is integrated in a website and I would like to make a new link to "Home" of the website on all the pages. What is the best place and how do I do that? I did manage to make a new link on the homepage of TNG I am using TNG v. 12.02.2 Thank you for your help Muyz
  21. I just discovered...quite by accident, that TNG's 'Advanced Search' capability does not return any results for existence searches (the fact itself) on a broad range of custom events. My database has entries that contain the following custom events for which an EXISTS search fails to return any results: Adoption (ADOP) Naturalization (NATU) Emigration (EMIG) Immigration (IMMI) Residence (RESI) Cremation (CREM) And I believe that there are probably some others as well, but my testing hasn't been exhaustive. Conversely, some other events--'Also Known As (ALIA), 'Married Name' (_NAMM), and 'Degree' (DEGR), for example--seem to work fine. Is this a known issue? Anybody else experiencing this on TNG 12.0.2? (PHP 7.2, CentOS, MariaDB 5.5.56) Thanks, Bill Herndon Lindell-Herndon Genealogy
  22. Brian Yare

    PHPMailer end of life

    I have received a notification to say that " Outdated script detected on: (my web site) This is a notification that the PHPMailer installation in /htdocs/TNG on hosting account (my account), is end of life (version 5.2.22). End of life software is susceptible to vulnerabilities and bugs, which could result in your site being compromised. Please ensure you obtain and install the latest updates from the software vendor as soon as possible. Some of the scripts may be included as part of another software installation. Contact the vendor if you require further advice. Should the installed software remain out of date we may have no option but to suspend your web hosting service." What can I do to prevent losing my hosting service? Brian
  23. 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
  24. 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.
  25. 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.