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

  1. 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.
  2. 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.
  3. 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
  4. 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
  5. 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
  6. 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.
  7. 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 ' and " . 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
  8. SharonM

    Help with custom History page

    I am trying a different way of recording Features and Histories on my site. I have created a custom page using Historytemplate.php, and so far have managed to get the title, font size, and temporary image as I want them. I have also added a link to a person page. I have been referencing the Wiki pages here, as well as getting additional help from HTML/PHP coding tutorials on the internet, but basically all I have done is copy and paste lines of code which I've found, which seem to be doing the sort of thing I want. So far so good. Now I want to add a link to open a pdf file, in the same way that I added a link to go to a person page, but I haven't been able to find a way to get this to work. I've put a copy of my code below (minus a large section of the text to save space). The code which is causing the problem is highlighted in bold - I've tried to use <a href ...> to make the link as the php code in the link to the person page completely defeats me, and inserted html seems to work elsewhere on the page. For testing/trial purposes I've also put the link in as a seperate line, so that I can identify it easily amongst all the other tags. The finished version would have this code in the previous paragrah, where the book is named. I should add that the custom template is in the Histories folder, and the document is in the Media folder (same location as the image already inserted successfully) I should also add that for the moment, the pronblem code has been renmoved from the php on my site, so that it looks and works OK until I can get this resolved. My site is in TNGv9 (for the moment) and is at http://parcel-of-rogues.org.uk/index.php It's locked down, but you can access the site with username "Guest" and "Familyfriend" if you need to. The page is can be accessed from the Features section on the right hand side, 2nd from bottom in that section, "Defrauding the Government" Many thanks for your help. <?php //Remove the following two lines before deploying copies of this file to the "histories" folder. //Replace all the "include" lines in your pre-5.x histories with the following lines (up to the next comment) include( "../begin.php"); //Nuke users must include "../../../begin.php" here if( !$cms['support'] ) $cms['tngpath'] = "../"; include($cms['tngpath'] ."genlib.php"); include($cms['tngpath'] ."getlang.php"); include($cms['tngpath'] ."$mylanguage/text.php"); tng_db_connect($database_host,$database_name,$database_username,$database_password) or exit; include($cms['tngpath'] ."checklogin.php"); include($cms['tngpath'] . "log.php" ); //end of new include lines $logstring = "<a href=\"histories/millenium1.php\">Defrauding the Revenue - Alfred & Dennett Allen</a>"; writelog($logstring); preparebookmark($logstring); //Note: histories created this way may function differently that other histories when placed in an "album". If that is annoying to you, consider creating //your history by pasting the text into Admin/Media/Body Text instead. // Remove the comments (leading slashes) on the next line if you don't want the TNG menu icons to show on your history page. //$flags[noicons] = true; tng_header( "Defrauding the Revenue - Alfred & Dennett Allen", $flags ); ?> <p class="subhead"><strong><font size="3">Defrauding the Revenue - Alfred & Dennett Allen</font></strong></p> <p class="normal"><font size="1"><i>The following article is by <a href="<?php echo $cms['tngpath']; ?>getperson.php?personID=I438&amp;tree=tree1"><b>William Albery</b></a> of Horsham. It first appeared in the <br> Sussex County Magazine, 1934 and later formed the basis for the chapter on Smuggling <br>in his book <b>A Millennium of Facts In the History of Horsham and Sussex 947-1947</i> </b>, published 1947.</p> <a href="../media/hist_William Albery Millennium chapter on Allens.pdf><b>A Millennium of Facts In the History of Horsham and Sussex 947-1947 </b> </a> <img src="../media/William Albery 2 Images of Horsham Susan Djabri.jpg" hspace="5" style="width:400px;height:300px;padding: 0 15px;" border="0" align="right" /> <div align="justify"> <p> A system of defrauding the Revenue was successfully carried on over ten years by two brothers, Alfred and Dennett Allen, maltsters and farmers. Alfred the elder, lived at Horsham near his malthouse in Springfield Road; Dennett, the younger, lived at Gay Street, West Chiltington. Both were steady and keen business men who were able to make honest trade pay. Precisely at what period of time they began cheating the Revenue is not known, but it was certainly at a time when such an act would trouble the consciences of but few business people. Moreover, it was soon evident that it paid well, a fact that would be sure to resist successfully any amount of moral promptings that might attempt to intrude into the business world. To the businesses carried on at the Horsham and Chiltington malthouses were added later, one each at Worthing, Mulsey, near Pulborough and Adversane - Five malthouses and three farms altogether, with plenty of financial means for carrying on a large trade. </p> ....removed content here..... <p>The trial came before the Chief Baron and a special jury at the Court of Exchequer, King's Bench, on the 16th June. The case against each of the absent Allens was gone into separately. The Attorney-General, Sir F. Thesiger, Mr Wilde Q.C., and Mr Bevan prosecuted for the Crown and Mr Collins and Mr Brown defended. There were thirty counts in the indictment, to which there was no defence. The Chief Baron said he had never heard of so flagrant and extensive a case of fiscal dishonesty as had been made out that day by the Crown against the defendants. The jury found the defendants guilty and although they were liable to a fine of &pound;370,000 the Solicitor General consented on behalf of the Crown to a fine of &pound;110,000. Had the Allens not escaped they would be in default of paying the fine have been imprisoned during Her Majesty's pleasure, but they were perfectly safe, and well-to-do to boot, in America, as the American Government would not, at that time, surrender men convicted of fraud. After a time, however the Solicitor General, upon the principle that half a loaf is better than no bread, reduced the amount of the fine to the odd &pound;10,000, which amount the Allens paid and so restored themselves to their country and their friends.</p> </font> </div> <?php tng_footer( "" ); ?>
  9. 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
  10. 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.
  11. 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
  12. 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
  13. 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.
  14. 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
  15. 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.
  16. 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.
  17. 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.
  18. 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?
  19. 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
  20. 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
  21. 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
  22. 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
  23. 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
  24. 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
  25. 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
×