Search Forums
Forums
Kiwitrees on Twitter
    Tags

    IE problem, button, place, xmas, nickname, locked out, roadmap, menu, news module, webtrees 1.4.4.1, My Page, default individual, help, 3.2.2, users, gettext, 2.0.2, immigration, sidebar, responsive menus, descendants, 3.3.0, chart, spam, Batch Updates, events of close relatives, birth, special character, tree, customising, updates, order, NCHI, 7.2, 3.2.1, BURI, research tasks, simpl_pages, logs, fact, FAQ, kiwitrees-nova, Export/Import, research, 500, not married, Google Maps, missing data, edit interface, places, road map, configure, Default record, pop-ups, ID facts, emigration, blank screem, json, bug, inactive

    Topic:   Adding new KT_Gedcom_Code in new BIRT Fact  

    This topic contains 1 reply, has 2 voices, and was last updated by kiwi kiwi 1 week, 1 day ago.

    Viewing 2 posts - 1 through 2 (of 2 total)
    • Author
      Posts
    • #10228

      pfelix
      Participant

      4 posts

      Hi all,
      I want to add GMT Timezone info in the BIRT fact regarding to the PLAC of birth, exactly like you can add a Temple (TEMP) while adding a new “SDJ: confirmation event” (CONL) for ex

      For that, I have looked (and duplicated) the TEMP

        In function_edit.php page, i’ve added a line :

      echo select_edit_control($element_name, KT_Gedcom_Code_Gmt::GMTFuseauxNames(), KT_I18N::translate(‘Fuseau Horaire’), $value);

        In \library\KT\Gedcom\Code I’ve created a Gmt.php page with functions and arrays (from Temp.php) duplicated.

      It’s a dropdown menu with some data like +1 / +2 / +3 ….

      It works well (my data are shown in the select) if I call KT_Gedcom_Code_Gmt::GMTFuseauxNames() instead of KT_Gedcom_Code_Temp::templeNames() in the function_edit.php page for example

      But how can I add a complete line when a BIRT event is added (or updated) displaying my KT_Gedcom_Code_Gmt::GMTFuseauxNames() function below the “birth place” area field ?

      I can’t find the loop that displays the infos in order to call my “function” inside the

      I think it should be simple, but …. not form me !
      Thanks if you can help !

      #10230
      kiwi
      kiwi
      Keymaster

      1643 posts

      There is possibly a lot to add. But the loop you are looking for is the code in functions_edit.php following this comment (about line 2436)

      	// List of tags we would expect at the next level
      	// NB insert_missing_subtags() already takes care of the simple cases
      	// where a level 1 tag is missing a level 2 tag.  Here we only need to
      	// handle the more complicated cases.

      Further down (about line 2528) you will see a reference to KT_Gedcom_Code_Temp::isTagLDS($level1type). You will need similar code for your changes.

      But you will also need to make additions to the file /includes/config_data.php

      (Note – I can’t test what you are doing so can not say if this is everything. You may well need much more. The following tip should help though.)

      Tip:
      Use a quality text editor that has the ability to search globally, through the entire kiwitrees code. Then you can take a function like “isTagLDS”, or a specific tag like “SLDC” and find all it’s use locations quickly and easily. Then you know what you need to do for your new code. I recommend either “atom” (https://atom.io/) or “sublime” (https://www.sublimetext.com/). I use both.

      I probably do not need to remind you of this, but just in case:
      Remember that all changes to the core code will need to be done over again after every kiwitrees upgrade, as that will over-write the standard files. That means repeating your changes somewhere between 5 and 8 times each year.

      Nigel
      My personal kiwitrees site is www.our-families.info
    Viewing 2 posts - 1 through 2 (of 2 total)

    You must be logged in to reply to this topic.