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

  1. Bruce Roy

    Most Wanted issues

    I find that I cannot add/edit/delete Most Wanted entries - actually I can edit but cannot save the edited version. Bruce Roy roy-royes.net
  2. LJLachance

    Template 13 V12 - et al

    Again, Template 13, but I suspect this question would apply to any template. I want to remove the "register for new account" link and form from the index page in its entirety and republish it on a separate web page (same public html hierarchy but outside TNG). First I need to know how (from where) to remove the standard link and replace it with a link to "the other page" outside TNG, then I need to know how to link back to the "register form" inside TNG. (Where is this form?) I know how to make links, just not where to find these two pieces in V12. Thanks
  3. With Version 12 I am using/customizing Template 13 (a pre-V12 template). At the top of the index page is a nav bar image (nav.png I believe). The behavior for this image is defined in .artnav in the css for this template. I'd like to find someone who might know the css syntax to enable this image/nav bar to be responsive. Under usual circumstances I would simply have a ".responsive" statement but how to add this for this template is above my skill level. The reason for this request is that while everything else seems to resize just fine (whether using breakpoints or otherwise), this image does not, causing it to deploy in two sections at lower resolutions 480 or less. Anybody with ideas please let me know. Thanks
  4. wkenddad

    Layout of media change

    I have several people with Yearbook Entries I link the Jpegs of each page to a "Education" Event. When the persons page displays these Jpegs are in rows. is it possible to have these items display as columns in a single row or a table of 1 x 4 or 2 x 2? Or even better a MOD that allows several Items to be linked in a table format and that table be linked to the event. P.S. Is there anyway to have them display in order A-Z versus order of entry?
  5. Edit: find latest update at the end of this thread. -- Hi, if someone is interested, I just created the following code to have a link to FamilySearch-Search on any Person's page. It's quick and dirty, as I don't know PHP at all. If you want to make an addon out of it, please do so diff --git a/getperson.php b/getperson.php index 11c4126..1abc8b1 100644 --- a/getperson.php +++ b/getperson.php @@ -154,6 +154,21 @@ echo tng_DrawHeading( $photostr, $namestr, getYears( $row ) ); setEvent( array( "text"=>$text['born'], "fact"=>$stdex['BIRT'], "date"=>$row['birthdate'], "place"=>$row['birthplace'], "event"=>"BIRT", "entity"=>$personID, "type"=>"I" ), $row['birthdatetr'] ); setEvent( array( "text"=>$text['christened'], "fact"=>$stdex['CHR'], "date"=>$row['altbirthdate'], "place"=>$row['altbirthplace'], "event"=>"CHR", "entity"=>$personID, "type"=>"I" ), $row['altbirthdatetr'] ); } + // JPT search Familysearch + $searchparam="https://familysearch.org/search/record/results"; + $searchparam.="?count=20"; + $searchparam.="&query="; + + if( $row['firstname'] ) $searchparam.="%2Bgivenname%3A". $row['firstname']."~"; + if( $row['lastname'] ) $searchparam.="%20%2Bsurname%3A". $row['lastname']."~"; + if( $row['birthplace'] ) $searchparam.="%20%2Bbirth_place%3A".$row['birthplace']."~"; +// TODO if( ) $searchparam.="%20%2Bbirth_year%3A".$row['birthdatetr']."-".$row['birthdatetr']."~"; + if( $spouserow['firstname'] ) $searchparam.="%20%2Bspouse_givenname%3A".$spouserow['firstname']."~"; + if( $spouserow['lastname'] ) $searchparam.="%20%2Bspouse_surname%3A". $spouserow['lastname']."~"; + + setEvent( array( "text"=>"Search", "fact"=>"<a href=$searchparam target=\"_blank\">Familysearch</a>")); + if ( $row['sex'] == "M" ) { $sex = $text['male']; $spouse = "wife"; $self = "husband"; $spouseorder = "husborder"; }
  6. Problem with eventdate, eventdatetr and eventplace being empty during import I have imported a gedcom file into TNG. Now I noticed that on an individuals page the events like BIRTh, OCCUpation, RESIdence, EDUCation and DEATh are neatly presented in chronological order. However the events that have the tag "EVEN" in the admin's Custom Event Types pages are presented on the individual's page in a random order. So I looked in the tng_events table and noticed that the columns eventdate and eventplace are empty and eventdatetr is set to a default value of "0000-00-00" for all rows that contain the tag EVEN. I checked the file gedimport_misc.php contains this piece of code: $query = "INSERT INTO $events_table (eventtypeID, persfamID, eventdate, eventdatetr, eventplace, age, agency, cause, addressID, parenttag, info, gedcom) VALUES(\"$eventtypeID\", \"$persfamID\", \"" . $eventptr['DATE'] . "\", \"" . $eventptr['DATETR'] . "\", \"" . $eventptr['PLAC'] . "\", \"" . $eventptr['AGE'] . "\", \"" . $eventptr['AGNC'] . "\", \"" . $eventptr['CAUS'] . "\", \"" . $eventptr['ADDR'] . "\", \"" . $eventptr['parent'] . "\", \"$eventinfo\", \"$tree\")"; I then put in some echo statements and concluded that during import the variables $evendate , $eventdatetr, $eventplace are empty. One can change and update those events using the Edit Existing Person , Other Events table, but this seems a bit cumbersome as I have hundreds of those events. My question, has anyone seen this behaviour and more important, has anyone got a solution for me? Thanks Jan Wessel P.s. I did send an email to Darrin some weeks ago, but have not had a reply from him yet.
  7. During export via Gedcom from Legacy 9.0, I'm having trouble transferring geo-codes to TNG. I have examined the Gedcom-files, but cannot find latitudes or latitudes in the file ( and of course they are not shown in TNG after import, either). I have tried different sets of setups from Legacy (Legacy file and Gedcom 5.5), but when I examine the Gedcom-files, none of these have info on geo coordinates. If anyone out there can help a panicking Norwegian, I would greatly appreciate your feedback! Best regards Morten
  8. Masterhistorian

    New user: Temp 15 Error

    I am very new but Iam learning as i go. I was in admin setup and the whole right sidebar and underneath main photo just vanished. I t at the time messing with anything. I've compared index, and other files and they all match up. Ideas on what could have happened? Also were would I go to add background image to entire site. and would this be the appropriate code Background-image:url (); for the body
  9. Renze

    Google Adsense

    Anyone have experience with Google AdSense? Anyone have any tips where I should post the code? Is that in Getperson. php or somewhere else. Who can help? Would like to place an advertisement before Google Maps starts on the personal page
  10. Hi, I have a problem with displaying TNG help pages. Environment and TNG installation: I have installed "DesktopServer Limited" v3.8.3 (by ServerPress.com) on one of my Windows 10 Home PCs. The Apache, PHP and MySQL version-releases can be seen on attached screen copy of TNG Setup>>Diagnostics page. To install TNG I downloaded v 11.1.2 zip file and copied it to DesktopServer C:\xampplite\blueprints folder Using DesktopServer I created a local site www.tngtest1.dev from "blueprint" tngfiles1112.zip (Note! This site is not visible from internet) DesktopServer creates a virtual host by adding the following line in Windows hosts file ( C:\Windows\System32\drivers\etc\hosts ): 127.0.0.1 www.tngtest1.dev I created a new mysql database for TNG using phpMyAdmin with collation utf8_swedish_ci I created a database admin user with ALL PRIVILEGES and with HOST field set to localhost A TNG Regular installation was done and everything went OK. Database Host Name set to localhost and TNG tables created with collation utf8_swedish_ci Launched page www.tngtest1.dev/admin.php in FireFox and created a TNG admin user. Login to TNG with Admin user and checked: Setup >> Configuration >> General Settings > Database > Database Host: localhost Checked: Setup >> Configuration >> General Settings > Site Design and Definition and changed Genealogy URL from www.tngtest1.dev to localhost So far so good Problem and Error message: Using the TNG panels works fine but when trying to access TNG help pages I get error: Error: TNG is not communicating with your database. Please check your database settings and try again. Settings can be found under Admin/Setup/General Settings/Database, or at the top of your config.php file. Debugging done: I found an earlier forum topic on this issue but it did not conclude what the error cause is. I have done some debugging and found the following: The TNG help files are basically just html but most of them begin with including a "TNG help header". Here is a code snippet: <?php include("../../helplib.php"); echo help_header("Help: General Settings"); ?> Now helplib.php looks like this: <?php function help_header($helptitle) { $relpath = "../../"; include($relpath . "begin.php"); include($relpath . "version.php"); $header = $tngconfig['doctype'] ? $tngconfig['doctype'] . *** text excluded from code extract *** *** lines excluded from code extract *** return $header; } global $link; ?> So helplib.php includes begin.php In begin.php the last php statement contains a function call of tng_db_connect(): $link = tng_db_connect($database_host,$database_name,$database_username,$database_password,$database_port,$database_socket); I added some echo statements before the function call and found that the problem is that "$database_..." variables are not set (=empty) when function tng_db_connect is called. And this is strange since earlier in begin.php the file config.php (where these variables are set) is indeed included with statement: include($tngconfig['subroot'] . "config.php"); which I checked resolves to include("config.php") in my environment. And even more strange is that the include of config.php works flawless in the "admin_***.php" files. (Yes, I have tested it) Solution found to work: I added an include of config.php in helplib.php as follows (see line in blue color): <?php function help_header($helptitle) { $relpath = "../../"; include($relpath . "config.php"); // Added to make Help pages work in DesktopServer environment include($relpath . "begin.php"); include($relpath . "version.php"); $header = $tngconfig['doctype'] ? $tngconfig['doctype'] . *** text excluded from code extract *** *** lines excluded from code extract *** return $header; } global $link; ?> As far as I have seen so far this solves the problem. Question: Any ideas on what might cause this problem? I can do further debugging as needed, feel free to guide me. Regards Bosse
  11. KmBdev

    Custom event with hyperlink

    I have tng in word press using the wordpress plug in. I have a custom event "Links" which lists mainly the name of battles the person was involved in. What I would like to do is make the battle name, in my custom event, link to a wordpress page I have in my web site about the battle. Is there any way to do this? Thank you for any help.
  12. XerxX

    Fan Chart Text-align Fix

    Hi all, I just upgraded to v11 and found the Fan Chart really nice. There is, however, in my view a problem in generation 5: There is too much space "above" the text/name: . I have found how to tweak it (and I also add some space for generation 3) and post it here in "Mod-format": %target:fan.php% %location:% // console.log("placeWrappedText: %s",pText); %end:% %insert:before% if (gens == 4) originY -= 16; // Modfd: Remove space from gen 5 if (gens == 2) originY += 8; // Modfd: Add space to gen 3 %end:% The result for generation 5: I DON'T post this as a Mod in the TNG Wiki because I suppose it will soon be fixed by Darrin. He's notified of this. (If you think it should be a Wiki Mod: Be my guest to post it!) Regards, Erik
  13. I recently upgraded from version 9 to version 11. I also upgraded PHP and MySQL. Somewhere along the way I lost the links to all of my images. The personal pages show that there are documents or pictures, but there is only a broken image icon showing. When I FTP into my site I can see that all of the images are still in their folders. I went to General settings and tried to add a “direct path(?)”, but now when I go to my site I just get this list of Warning Fail Errors. ____________________ Warning: include(/wissersitecss/tng/config.php): failed to open stream: No such file or directory in /home/content/20/4982920/html/wissersitecss/tng/begin.php on line 11 Warning: include(): Failed opening '/wissersitecss/tng/config.php' for inclusion (include_path='.:/usr/local/php5_4/lib/php') in /home/content/20/4982920/html/wissersitecss/tng/begin.php on line 11 Warning: include(/wissersitecss/tng/templateconfig.php): failed to open stream: No such file or directory in /home/content/20/4982920/html/wissersitecss/tng/begin.php on line 15 Warning: include(): Failed opening '/wissersitecss/tng/templateconfig.php' for inclusion (include_path='.:/usr/local/php5_4/lib/php') in /home/content/20/4982920/html/wissersitecss/tng/begin.php on line 15 Warning: session_start(): Cannot send session cookie - headers already sent by (output started at /home/content/20/4982920/html/wissersitecss/tng/begin.php:11) in /home/content/20/4982920/html/wissersitecss/tng/begin.php on line 28 Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /home/content/20/4982920/html/wissersitecss/tng/begin.php:11) in /home/content/20/4982920/html/wissersitecss/tng/begin.php on line 28 Error: TNG is not communicating with your database. Please check your database settings and try again. Settings can be found under Admin/Setup/General Settings/Database, or at the top of your config.php file. ___________________ My first question is where can I go to remove that “Direct Path” since I can no longer reach my General Settings Page? My next question would be how can I restore links to my image files so they will show up on a person’s page. My home page: http://wisserfamily.com/tng/index.php I am running: TNG v11 If you search a name like “Steve” you will see that the images do not likn to the page. Thanks for any help, Gary
  14. Hoping someone can give me a coding tip. Currently have this line of code: $resstuff="<form method=\"post\" action='kicker.php' target='_blank'><b>RESEARCH POPULAR SITES <br />; <select onchange=submit() multiple name=\"researchlink\" size=\"3\" style=\"vertical-align:text-top;\"> <option value=$callres[0] >$rv[0]</option> ......more options </select> </form>"; ----- giving me this: I wish to have a cust_text variable in various languages I support, in the form $text[rm-header] = "Research Popular Sites". I've tried various ways such as : $resstuff="<form method=\"post\" action='kicker.php' target='_blank'><b><?php echo $text['rm-header'] ; ?><br />; but no luck. I tinker in coding, but could use help on this. Thanks, Ron
  15. I made changes to my site to allow multiple languages and the translation works great. However, I discovered when a new user tries to register, they get an error message. After looking at the tng_users table, the languageID field is not in the database. Of course, I can add this field to the table, but I need to understand why it is missing. Did I miss a step somewhere? I have been using TNG for 8 years and done many upgrades, but this is a first. Here is the 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: INSERT IGNORE INTO tng_users (description,username,password,password_type,realname,phone,email,website,address,city,state,zip,country,languageID,notes,gedcom,role,allow_living,dt_registered) VALUES ("xxx","x@gmail.com","xxxx","md5","abc","999-000-9999","x@gmail.com","http://","xx","xx","CA","99999","USA","2","","","guest","-1","2017-08-07 13:06:35")
  16. Between the upgrades to WordPress as well as the TNG core, the old TNG WordPress plugin has become completely useless. This forced me to use an alternate method for integration. I chose the Kloosterman method which worked great. Unfortunately, this left me without Single Sign-In capability so that only site members would have access to the genealogy section, TNG. Even if I left the TNG directory out of all the site's navigation and links and used ROBOTS.TXT to prevent it being indexed by searchbots (at least the compliant, reputable ones,) it would still be accessible by any user (logged in or not) that entered the TNG directory address directly or had a link or bookmark that led to it. The imperfect workaround I went with was to use the .HTACCESS file to check the already existing WordPress cookie to see if a user is logged in. This applies only when they try to visit that directory or any of its subdirectories or files. If they go there and they're not logged in, they get redirected to the login page. (It's an imperfect method, because it's still hackable, but it's the best I could come up with on the spot.) <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_URI} ^.*tng/.* RewriteCond %{HTTP_COOKIE} !^.*wordpress_logged_in.*$ [NC] RewriteRule . /wp-login.php?redirect_to=%{REQUEST_URI} [R,L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule> INSTRUCTIONS (Use at your own risk. I am will not be held responsible for any damage or losses to you or your site for trying this nor is it my responsibility to help you fix things if they break. I'm sharing a method that I use that works for me. I think it will work for most others as well, but I can't guarantee that.) Copy the code above, and be sure to change the TNG folder name to the one you use on your site. Open your own HTACCESS file, and find the basic WordPress code that looks like this: # BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule> # END WordPress Overwrite the part between BEGIN and END WORDPRESS with the new, edited code. Save your changes, and upload the new file back to the server. ADDITIONAL ACTIONS These are additional actions I went with for my site. I hope they help you as well. I turned REQUIRE LOGIN off so that users only had to log in to the membership section of the site once to see the full genealogy section. This keeps them from being able to edit the records. They can only suggest changes. This also prevents hackers that bypass my method above from being able to easily make changes without a login. I removed all LOGIN and ADMINISTRATION links from the TNG pages. Now I have to use my bookmarked links to get to the admin.php and login.php pages.
  17. raisondetre

    Histories - with Subfolders

    This 'should' be easy but . . . In C-panel, I created sub-folders under 'Histories' so a number of stories will be grouped with a particular family. For example, a story file name is BenjaminArgust.php which belongs with the Lawton family so I placed it under the subfolder, 16Lawton The path therefore, one would think, would be /histories/16lawton/benjaminargust.php but that does not work I CAN save benjaminargust.php directly under the Histories subfolder and that works fine: /histories/benjaminargust.php As I enter numerous essays, research articles, biographies, this will be increasingly important. I know I can name my files with lead-in codes (16 = Lawton family so the Benjamin Argust file could be renamed 16benjaminargust.php) - that would be one long list of files under "Histories" - but traditionally I created hierarchies that kept this sort of thing in order. It appears TNG does not accept 'child' folders to the sub-folder 'Histories'. Or am I missing something? Can you confirm/help?
  18. Hi folks, is it in a MOD-file possible to identify a location in a certain file and then insert something before AND after this location without repeating to locate this same location again? I know, I could do this in THIS example with one "%replace:%", but I would like to know, if it's also possible to make after the first "%location:%" two different inserts: a "%insert:before%" and directly afterwards a "%insert:after%" without repeating the red %location:% Example: Greetings from Berlin, Lübbe
  19. Hi! I am trying to figure out how to turn off or code out the description field in the headstones menu. That way it will have: the 1. thumb (with the description in the popup anyway) 2. Cemetery 3. Status 4. Link to Thanks greatly! Jeff
  20. Hi! I was wondering if anyone knew how to center the "Elusive People" and "Mystery Photos" boxes in the "Most Wanted" Menu.... I looked around and inspected, but could figure it out. Any thoughts? Thanks! Jeff
  21. Hi! I am trying to change the color attribute as seen in the background light blue box of the pedigree view in the attached pic. Is is a actual image from an img folder; or a color code attribute found in a php, css, js file? I have tried examining numerous times with the "inspect" function, but cant seem to find the right item. Thanks for the help on this one! Jeff
  22. I have been working with my Headstones. When I change to another media type that I have created to change something, the Cemetery field gets populated with the last cemetery I used in Headstones
  23. Hi! Several People have hinted on the advantage of writing a mod to save one's customizations, but how exactly do i write the mod for that? I have looked in the wiki and here on the forum, but perhaps I missed it somewhere? Thanks! Jeff :D
  24. Hi! I have spent a number of hours trying to relink the icon from my img folder to the dropdown menu. It is an additional menu i created under the "media" tab. called "GIROD records" For the life of me I have searched thru as the usual .php and .css files that would be associated. the icon still exists in the img folder. Much appreciated for any help here Jeff https://www.swissfamilygirod.com
  25. Hi! I looked in the genlib.php and a number of other places to find much less how to remove the "find a grave" and "billiongraves" from the menu tab. Any ideas? Thanks! Jeff
×