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 91 results

  1. 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.
  2. 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.
  3. 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?
  4. 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
  5. 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!
  6. 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
  7. 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
  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. 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
  10. 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
  11. 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
  12. 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
  13. 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
  14. 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
  15. 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
  16. 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
  17. 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
  18. 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.
  19. 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.
  20. 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
  21. 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
  22. 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
  23. 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.
  24. 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?
  25. 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
×