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

  1. 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
  2. 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?
  3. 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.
  4. 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
  5. 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.
  6. 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
  7. Hello, I am looking for option to give a user acccess to sone branches, not only one? ENo
  8. 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
  9. 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
  10. 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
  11. 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
  12. 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); ?>
  13. 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.
  14. 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.
  15. 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
  16. 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
  17. Hi all, Fairly new to this. It's been a long time since I messed around with web pages. I've installed Template 15 and it has the featured articles with headers and the sidebar feature articles with headers. I've modified some of what appears there and I've looked around before posting, so my question is to add a new feature 'article' or feature post, do I need to edit the features.php (I think that's what the file is called) and add what i need, just as I would when creating a new web page? I did see something in the tutorials or wiki pages about modifying the code, but wasn't sure if it pertained to this, or something else. Also, would just adding a page feature1.php ; feature2.php etc be what I need to call the content from those pages to add to the feature 1, feature 2, sidebar feature 3, 4, 5 etc? Or should I be following this instruction for histories?: https://tng.lythgoes.net/wiki/index.php?title=User_Pages_-_Getting_Started I found it last night but I can't for the life of me find the features.php instructional. Basically, I want to be able to add the article that I've got to a page and keep it looking somewhat like the rest of the TNG site with the template colors etc. If I modify the colors, cool, but at the moment that's purely aesthetics and I have MUCH to do! Thanks in advance. Raewyn.
  18. Hi all; I had posted this in another, older, thread but decided perhaps it should be here. Forgive me for any duplication. I'm still struggling to get the Simile Timeline to work properly. I've made the changes referenced earlier in this thread, in terms of changes to the history_html file, and by installing the revised Timeline by SKDavis. I much appreciate all the help. Here are the errors that are showing on the page. Can anyone help me with these errors, or point me to things to read or learn that might help me? simile-ajax-bundle.js:1541 TypeError: Cannot read property 'documentElement' of null "XmlHttp: Error handling onReadyStateChange" I have additional errors - similar verbiage - that I did not include, just for brevity. If I can find the error in this one, perhaps it will lead to the solution in the others. Maybe? Thanks for any help or direction. Mike
  19. 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
  20. Hi all, There's something off with my index.php page and I'm hoping some kind soul will help me understand how to fix it. If you hover over the top drop-down menu you'll see what I mean. https://thechosenscribe.uk/genealogy/index.php Thanks in advance Laura
  21. 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
  22. When someone registers using the new account form both the person AND I receive (as I've set it up) an acknowledgement email. In MY (Admin) email, I've got all the wording the way I want it BUT, at the bottom of the email I receive (the New TNG user registration request) is a link to Administration showing http://mysite/admin.php. I want to change that link to http://mysite/folder1/admin.php. Where can I find this link to change it? In the User Acknowledgement email where I thank them for registering, once again, I have all the wording the way I want it BUT, at the beginning we have HELLO (which I know how to change) and then the persons full name, as they entered it on the registration form. I want to use JUST the persons first name, not first and last. Is there a way to make this happen? Thanks for your help on this.
  23. jimatpdx

    mytngstyle.css modification

    I am trying to run TNG hooked to Wordpress with the plugin. I understand that I can't use TNG templates and that I need to modify the mytngstyle.css file. With no modification the TNG page just looks like what is shown below. The WIKI says "The mytngstyle.css overrides the TNG following TNG style sheets: genstyle.css the default TNG style sheet when you do not select a template templatestyle.css the template override style sheet tngtabs1.css tngtabs2.css" My problem is that I have no experience with css files and don't know where to start modifying the mytngstyle.css file. Any suggestions would be appreciated. Jim Stevens Home Page Welcome, Administrator. Search Last Name: First Name: Other Features Log Out Register for a User Account Advanced Search Surnames Bookmarks Statistics Photos Histories Documents Videos Recordings Albums All Media Cemeteries Headstones Places Notes Dates and Anniversaries Reports Sources Repositories What's New Most Wanted Change Language Access Log Administration Contact Us Please customize this page! © 2019
  24. I am using template 18. Utilizing my limited knowledge of java-script and what I could look up on the internet, I created a script that uses some dom-manipulation to load 19 pictures of individuals over the main image on the home page so that it would resemble a montage of photos kind of laid about. It makes each photo a link to that individuals page. Each photo is of a deceased person in the tree. By using Adobe Elements I was able to make sure each photo was of a very small byte-size to reduce the time it took to load these images. I struggled trying to decide the best place to load and run this script and decided based on what I read on various websites, that the best place was as near the closing body tag as possible. Of course on TNG pages this would be the footer. After a few attempts to create a custom footer failed because they had no effect, I discovered that I could easily plant a script there just by putting in at Admin > General Settings > Site Design and Definition > Custom Footer message. It works. My question: Is the fact that it seems to work good enough? Is this best way to add script there using a text-box that was clearly meant to add text to the footer? Incidentally, the script checks to see if this is the home page and if so, to load another script that loads the pictures. var script = document.createElement("script"); script.type = "text/javascript"; if (document.title == "Our Family History") { script.src = "templates/template18/customloadpics.js"; } document.body.appendChild(script) What is the best way to put a script like this in the footer? Thanks, James Brown https://thebrownfamilytree.info
  25. I am very new to HTML - I'm having to learn it because I want to create history pages based on historytemplate.php, and I need to be able to format my text etc so it looks good on screen. At the moment I have two history files, the first (rogues1.php) was created by converting a Word file from Word into HTML, and copying the html into my new file. This has resulted in a lot of messy code, but thanks to Newfloridian some of this has been stripped out. The second (jamesmcaleerstory.php) was created by copying and pasting the contents of another Word document directly into a second php file, and starting the formatting from there. This is a much tidier file. Both are still very much a work in progress, so please be understanding. I've been using the forums and online HTML tutorial where I have been able to find something that seems to be what I want, but sometimes I can't find an answer that works, and other times it seems to work in one file and not another. I'm sure I am going to be posting a lot of queries for help in the next few weeks, but my first two questions are these: 1. Why do the two files handle single and double quotes differently from each other? In one (rogues1.php), I can just enter them directly and the display perfectly - as in father's or "The Flight of the Allens". In the other (jamesmcaleerstory.php) this produces and error - so here father's appears on the page as father’s. In this file I have to use codes &#39; and &#34; . However, there is at least one example in this same file where I have typed "Peter's" in the html document and it appears exactly as that with double and single quotes which is exactly what I wanted! 😩 2. My second question is about center-justifying text - ie so that text ends neatly on both sides and is centred in the middle of the page . This will apply to various quotations that I've included like a newspaper article extract in rogues1.php and a quote from a letter in jamesmcaleerstory.php. I found out how to produce the newspaper extract in two columns, which I liked but have since taken out, but it still didn't justify the text on both left and right. The files are attached and can be viewed on my website at http://parcel-of-rogues.org.uk/parcel-of-rogues/histories/rogues1.php and http://parcel-of-rogues.org.uk/histories/jamesmcaleerstory.php Username: Guest; Password: Familyfriend Can anyone help please? Thank you Sharon rogues1.php jamesmcaleerstory.php
×