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

  1. Brett

    Mod Manager changing code

    I have a clean install of TNG13 with no changes and no Mods installed. It is running on WAMPSERVER 3.2.3, PHP 5.6.40 - 7.4.9, MySQL 5.7.31. When I install a Mod affecting getperson.php, lines 197, 200 and 203 are modified, even when those lines are not a Location in the Mod. It is always the same 3 lines, no matter which Mod is installed. Those lines, on a clean getperson.php end with a blank. Mod Manager removes the blanks on installing the Mod but does not return them when the Mod is uninstalled. I have tested this with several Mods. One to try is Collapse Family Children. Why is Mod Manager making these unnecessary changes? Additionally, shouldn't Mod Manager return any changes to how it was before the Mod was installed?
  2. There is unfortunate conflict between the two mods: Regroup Person Profile ( and Fixed Family Tab ( concerning line 583 of getperson.php (13.0.1). It's quite easy to resolve the problem temporarily, but of course it could be better to have it definitely correlated by the authors. Both mods are extremely useful and both are among my favourites for years. I wonder why they are still not included in TNG... Best regards Michal
  3. marcirish

    Suppress showing some fields

    I have a number of fields that I import from my Reunion 12 database. These fields are really flags to indicate various things, like Died Young, Veteran, Has a Signature and the like. I use these flags to generate reports on people who have this flag set. These flags also show up under events for a person. I would like to suppress these items from showing up on the GetPerson Page but keep them active in the database for use on reports. Is this possible. https://marcirish.us Thanks. Marc
  4. The DNA table in the getperson-page has a bigger font size as all the other tables on that page. Css class definition for the DNA table is "table.whiteback.tfixed", all other tables have "table.whiteback.tfixed.normal". I dont know where to change. Templapte is 19. Pls Hlp. Regards Walter
  5. Rob Severijns

    Show photo's on one row

    Hello everyone, I always save all my documents as a .jpg file so the generating of thumbnails is easy and I always have thumbnail available. If you go to Setup >> Configuration >> General Settings>>Media>> and set “Show photo's on one row” to Yes all photo's on the person page appear on one row. Except for photo's (documents) that are not linked to an event (See picture) With this in mind I asked Darrin of this was intended. Here's what he said. Since I save all my documents as a .jpg file I wanted to see those on one row too. This is for those who save their documents as a .jpg file too. If you want to see the photo's (documents) on one row too (see picture below) do the following: Make sure you make a backup of your personlib.php. Edit your personlib.php file. Find the line (somewhere around 1012) that says : if(count($media) > 1 && ($mediatypeID == "photos" || in_array($mediatypeID, $mediatypes_like['photos']))) { and change it into: if(count($media) > 1) { Make sure to use the closing bracket after the 1 for otherwise it will generate an error 500. (happend to me 😞) If you reload your person page the photo's (documents) that are not linked to an event will appear on one row. Unfortunately I'm not able to write a mod so after an update/upgrade this needs to be reapplied. HTH Rob
  6. Can anyone tell me where the code is to set the default opening option for the Get Person page? On my online site (still testing, not public) it is defaulting to Personal Information instead of All. On my computer (Wamp server) it defaults to All which is what I want. TNG version is updated to ver 13 and I have added the most recently updated files as well. So far to troubleshoot I uninstalled and deleted all mods and loaded a fresh getperson.php file, but it still defaults to Personal information, so I'm assuming the code is in another file. Help please.
  7. Michel KIRSCH

    Working with search function of TNG

    Hi Moders and Programmers ! I would like to write a Mod that would allow to insert a link to a individual of the genealogy into a note. For this, I would like to use TNG's search function (the one we usually use to search for a spouse or a child we would like to add). This search function is called with a button : <input type="button" value="Person Search" onclick="return findItem('I','hiddennote' , 'mynote' , '' , '' );"> findItem() is a function from selectutils.js So I create a button, a text field (mynote) and a hidden field (hiddennote) in the note editing window. It works very well, the search window opens and I can select a person in the genealogy. The return URL is in the form : http://....../admin_editperson.php?personID=I5&tree=KC1&cw=1# The problem is that I don't know where and when this "admin_editperson.php" is inserted in the URL. I would have to replace it by "admin_editnote.php" to be able to intercept the result... Can someone help me? Thank you Michel
  8. Rob Severijns

    Login issue

    I have an issue when trying to login. Normaly if I press the login button on the startpage https://www.severijns.family/index.php I should be directed the the login screen. In my case I'm directed to: https://www.severijns.family/index.php# Basicly my startpage ending with a # I saw the underlying code looks like this: <a href="#" onclick="return openLogin('ajx_login.php?p=');" title="Login" class="tngsmallicon" id="log-smicon">Login</a> If I change the code into: <a href="login.php" onclick="return openLogin('ajx_login.php?p=');" title="Login" class="tngsmallicon" id="log-smicon">Login</a> logging in works but not via the login popup. I have no clou what the side effects of the code change will be but maybe someone can shed a light on this. I also have no idea where to permanently change the code so if someone could tell me that too that would be really nice 😊 Rob Using TNG 13.0
  9. Brett

    Mod: Click Counter II Email Notify

    On rare occassions, I receive the 'download not authorized email' where the Mod requested does not match the Wiki page. email subject: Download not authorized: Hide Admin DNA TNG11+ Hide Admin DNA TNG11+ was requested by User:Anonymous IP: (xxx.xxx.xx.xx) Country: France Region: City: TNG Wiki page is: https://tng.lythgoes.net/wiki/index.php/Insert_Children_Gender I have not been able to replicate this myself. Do any other Mod developers using Click Counter II Email Notify notice this? Does anyone have an idea of what may be occurring?
  10. Hello all I have been away for several years but have now updated my TNG to version 12.3. My old reports doesn't work anymore. One error I have fixed. The call "mysql_num_rows()." in the file showreport.php I changed tomysqi_num_rows() That was appearantly fine, but now I get another error... Parse error: syntax error, unexpected '$textpart' (T_VARIABLE) in /customers/6/6/5/binatech.se/httpd.www/tng/showreport.php on line 1 FYI, the file showreport.php was upgraded together with everything else to TNG 12.3 (the date on the file) This is my Diagnostic screendump Thanks for any help. // Ove Tegnér
  11. RLByrd

    Emailed reports

    I've been fiddling about with creating a method to email a birthday report using the existing codebase. The idea would be to create a cron job that sent out an email with birthdates, death dates, etc., that occurred on the current date. While I could do this using curl or wget and then using sed to change a few bits and pieces of the html that is generated, it would be much more user-friendly is there were a mod to email reports out in the codebase or as a modification. Does anyone else do this kind of thing, and if so, how?
  12. rcpettit

    Add citation section

    Is there any plans to add a citations section to the admin area. It seems a waste of space to have multiple copies of a citation in the database and having to edit them individually if you make an error.
  13. users should terminate and log out in the normal course. In many cases, the process is just kept in the background when other activities are in use. In any case there should be time limit to terminate the process say 5 minutes to process terminate automatically or call a reminder if the user want to continue. Is there any code or mode for for this situation? Thanks Kris
  14. I've tried to enhance privacy by adding mods and by (considering) making mods described in your Protecting Access Log wiki article. Neither can be used because the majority of user roles have a limited admin status. I would like close relatives to be able to add and suggest modifications to my data, giving them a "Custom" user role. Their page access (template 12 info drop down menu) includes Admininistration (though as far as I can tell they then have no access to any of the administrator pages) and Access Log (which I would like to keep private and available only for the true Administrator, i.e., me). They also no longer have the convient menu option of "Contact Us". I tried to use a Hide Branches mod but it didn't seem to be working. Roy informed me, and now I see on the user roles in their setup screen that only Guest and Submitter roles "have no access to Admin area", so in my case, I cannot use the mod. Alternatively, I suppose, mod writers could be encouraged to include an option to true Administrators only, though I don't know how difficult or feasible this would be. (If the latter is the preferred solution, it would be helpful if wiki articles like Protecting Access Log would include code to execute for true Administrators, also.) I'd rather that users (other than me, the Administrator) not be able see other users' search history. So as not to seem unappreciative: TNG is a solution I've been looking for for years, being a longtime Rootsweb WorldConnect user, but not happy with the alternatives offered today. But needing to get my tree/database back online to help me share and collaborate with other genealogy researchers. The installation assistance through the readme file, and the support you make available through direct e-mail, readme, wiki, and forums is really impressive, and the display of information is very nice.
  15. I would like to replace the links to his and her sides of the family tree with personalized links based on who is logged in. It appears that this mod has been done previously. Question: It has been a long time since I set up my site and I have done virtually nothing to it since setup. I would like to make this modification, but am at a loss as to how to accomplish it. Can someone help me with how to make this change? Please provide a step-by-step approach if you have the patience. This mod: https://tng.lythgoes.net/wiki/index.php/My_User_Links_Add-on This thread: https://tng.community/index.php?/forums/topic/12161-mod-wanted-or-code/&tab=comments#comment-57912 My site: http://www.garyconniefamilytree.net/index.php My server (if it matters): I am using SimplyHosting. Thank you, Gary
  16. Hello, I am looking for option to give a user acccess to sone branches, not only one? ENo
  17. Hi All, Attached is a text file with the SQL code I use to produce the figures for the 52 places and 4 perishes pointed to at the map on this site index page https://botebygden.se (If you have trouble understanding what I do, because it's only in Swedish; just ask and I'll explain) As you will notice, the map takes quite some time because of all the number collecting (it's really quick w/o the DB calls). And this is only a 690 persons DB... Every new figure is a DB call so it's 4 perishes x 3 events (below the map) and then 52 places x 4 events (list to the right of the map). My hope is that the SQLs can be combined or something to increase the speed and to be able to handle a bigger register. But I don't know SQL so well so I'm looking for help. Thank You In Advance, for any help or idea, Erik botebygdenSQL.txt
  18. 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
  19. Hi All, I created my first page in TNG today (an FAQ for visitors to my site). However, there was one thing that was frustrating and I am wondering if I could have done something differently. How do I chose the right size for the images without guessing a bunch of times and reloading the page after each adjustment. What is a good size for images that works? (width = , height = ). Here's what I did. I altered the template for a page as directed in the creating user pages documentation. I captured images I wanted to use with screenshots in Windows 10 (and then I edited the images (cropped, put in circles or underlining)). I used an online WYSIWYG HTML Editor for the text and inserted the images accordingly. I guessed on the sizing of the images and then changed them as I saw fit. I cut and pasted the code into the right place on the page blank. I uploaded the changes to the site, and all came out well, except the images are kind of different sizes. How do I fix that? Check out the page I created if you like: https://landgen.us/extrapgs/User FAQ.php Thanks for your help! Best, Bob
  20. Hi, I'm trying to turn off the use of templates to better customize the homepage (index.php). But, since I already have some useful text stored in the templates, I was wondering if its possible to access them without using templates directly? And maybe there will be some better ways to use text in the customized homepage without storing it in the index.php file itself? Best regards Jastro
  21. zanger02

    Template 18 - links on home page

    I'd like to add more links to the right of the existing links on the home page. No matter what I try the extra links don't show or they are duplicates of the first two. TNG v12.1 and template 18. Not sure what I'm missing. I'm a developer but I'm really new to PHP. Before changes <?php include($cms['tngpath'] . "surname_cloud.class.php"); $flags['noicons'] = true; $flags['noheader'] = true; $flags['nobody'] = true; $tngconfig['showshare'] = false; tng_header( $sitename ? "" : $text['ourhist'], $flags ); if(!$cms['support'] && $sitever != "mobile") echo "<body id=\"bodytop\" class=\"" . pathinfo(basename($_SERVER['SCRIPT_NAME']), PATHINFO_FILENAME) . " homebody\">\n"; $dadlabel = getTemplateMessage('t18_dadside'); $momlabel = getTemplateMessage('t18_momside'); ?> <div class="theader"> <div id="thomemast" class="mast"> <h1><?php echo getTemplateMessage('t18_maintitle'); ?></h1> <span class="tsubtitle"><?php echo getTemplateMessage('t18_headsubtitle'); ?></span> </div> <div id="tmenu"> <ul> <?php if($dadlabel) { ?> <li><a href="<?php echo $cms['tngpath']; ?>pedigree.php?personID=<?php echo $tmp['t18_dadperson']; ?>&tree=<?php echo $tmp['t18_dadtree']; ?>"><?php echo $dadlabel; ?></a></li> <?php } if($momlabel) { ?> <li><a href="<?php echo $cms['tngpath']; ?>pedigree.php?personID=<?php echo $tmp['t18_momperson']; ?>&tree=<?php echo $tmp['t18_momtree']; ?>"><?php echo $momlabel; ?></a></li> <?php } echo showLinks($tmp['t18_featurelinks'],false); ?> </ul> </div> </div> I tried adding two more links ............ $dadlabel = getTemplateMessage('t18_dadside'); $momlabel = getTemplateMessage('t18_momside'); $stepdadlabel = getTemplateMessage('t18_stepdadside'); $stepmomlabel = getTemplateMessage('t18_stepmomside'); ............ <?php if($dadlabel) { ?> <li><a href="<?php echo $cms['tngpath']; ?>pedigree.php?personID=<?php echo $tmp['t18_dadperson']; ?>&tree=<?php echo $tmp['t18_dadtree']; ?>"><?php echo $dadlabel; ?></a></li> <?php } if($momlabel) { ?> <li><a href="<?php echo $cms['tngpath']; ?>pedigree.php?personID=<?php echo $tmp['t18_momperson']; ?>&tree=<?php echo $tmp['t18_momtree']; ?>"><?php echo $momlabel; ?></a></li> <?php } if($stepdadlabel) { ?> <li><a href="<?php echo $cms['tngpath']; ?>pedigree.php?personID=<?php echo $tmp['t18_stepdadperson']; ?>&tree=<?php echo $tmp['t18_stepdadtree']; ?>"><?php echo $stepdadlabel; ?></a></li> <?php } if($stepmomlabel) { ?> <li><a href="<?php echo $cms['tngpath']; ?>pedigree.php?personID=<?php echo $tmp['t18_stepmomperson']; ?>&tree=<?php echo $tmp['t18_stepmomtree']; ?>"><?php echo $stepmomlabel; ?></a></li> <?php } echo showLinks($tmp['t18_featurelinks'],false); ?>
  22. I am doing a simple mod to my site that will show who was born or died on todays date. I got it working and get a list of people that is added to the topmenu.php file. My problem is that I also want the names in the list to link to the getperson.php page for more information on that person. This is the code I have echo '<a href="getperson.php?personID=' . $row['personID'] . '&tree=' . $row['gedcom'] . '">' . $row['firstname'] . ' ' . $row['lastname'] . '<br>' . $row['birthdatetr'] . '</a></p>'; This will give me: Parse error: syntax error, unexpected ' ' (T_STRING), expecting ',' or ';' in your code What makes this even more frustrating is that exactly the same line of code works perfectly in Joomla that runs in parallell with my TNG site. I have also tried different variants. If I run it without the HREF it will show the names, see screen shot. This line is in a While loop and if I don't do that loop it will show correctly the last line with working link. Below is the whole thing $query = "SELECT * FROM `tng_people` WHERE DAYOFMONTH( birthdatetr ) =$daynumber AND MONTH( birthdatetr ) =$monthnumber AND YEAR(`deathdatetr`) != 0000 ORDER BY birthdatetr"; if($result = mysqli_query($connection, $query)){ if(mysqli_num_rows($result) > 0) { while($row = mysqli_fetch_array($result)){ echo "<p>"; echo '<a href="getperson.php?personID=' . $row['personID'] . '&tree=' . $row['gedcom'] . '">' . $row['firstname'] . ' ' . $row['lastname'] . '<br>' . $row['birthdatetr'] . '</a></p>'; } } } I'm not a PHP expert but I can normally get it done, this is above my skills. Appreciate any help, thanks.
  23. LJLachance

    GDPR Popup "template?" Customize

    I want to modify the size and shape of the GDPR popup AND add an icon to the popup as well. Where will I find the size and shape defined in order to attempt to accomplish these changes? I have found that I can change the "layout" in terms of color etc., in mytngstyle.css as well as changed the wording in the Cookie Notes text of the languages but cannot find where the actual size and shape is defined. Thanks for any help.
  24. I'm using template 18 and at the top of the front page, I want a link that says "Log In". When the user clicks that and logs in, I want the text to change to 2 links..."Most Wanted" and "Log Out" The great news is that on the front page, I have figured out the code. I have added this code to /templates/template18/index.php So I got that going and it works perfectly on the main page of the site. But when you move away from the main page, that all disappears. I realised that I need to edit /templates/template18/topmenu.php also for the rest of the sites pages. But this is where things start to go weird. Inserting the same code into the top menu file, it works in the exact opposite way to what you expect...it suggests you log in, when you already are. It's not picking up that currentuser variable. If I try using !$currentuser (and I'm not sure why I would) it also kind of works. On top of that, I have some histories pages that are available without login in, and it seems to ignore the fact that those don't require login. My site is a private site and still under development, so I can't share the link. All users are required to login to view any content, except a few history pages that I mentioned. TNG v12.2 Thanks, Phil
  25. Having run a commercial site in the past, I like to give users a heads up if there's server performances issue or if I plan maintenance...just out of courtesy. I try to avoid sending emails out to this effect, so I have come up with some code I am going to use in my index.php file of the template I use whenever I need to.... So they'll see this and be able to dismiss it when they come to the home page. I think it would be great to put this in as a part of TNG itself...I could find myself using it for a lot of other things, like announcing more images etc...just to add a bit of excitement? I'm suggesting an alert that can remain on for a number of days, when you choose to use it, and before you put the site into maintenance mode. Phil