Search
Forums
Kiwitrees on Twitter
    Tags

    notes, css, multiple marriages, kiwitrees 2.0.2, order, login, birth, missing data, support, slideshow, clippings cart, icons, cookie, check, married, 3.3.0, upgrade, html, google, language, add, BAPM, clipboard, re-order, Advanced search, cousin tab, php 7, progress, 3.3.3, 3.2.1, dropbox. token, relationships, timeout, installation, new feature, custom text, edit, descendants, logs, Support/Bug Reporting, blocks, login failure, prefix, kiwitrees theme, census assistant, error, lists, mobile, burial, datatables, kiwitrees-nova, default individual, googlemap. modified, .po, blank screem, help, gettext, 3.2.2, ASSO, googlemap

    Topic:   Adding new KT_Gedcom_Code in new BIRT Fact  

    This topic contains 3 replies, has 2 voices, and was last updated by kiwi kiwi 3 months, 1 week ago.

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

      pfelix
      Participant

      2 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

      1660 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
      #10336

      pfelix
      Participant

      2 posts

      Hi Nigel,
      I tried to add the field but … it’s a bit complex…. so I prefer renounce

      But if I want to add an existing field to an event, such as “URL” to the Birth event (in order to add a url that present the picture of the baby), how can I do easily ?
      Do I just have to add in the config_data.php php the “BIRT” field in the “URL” Array like that ?
      ‘URL’ => array(
      ‘OCCU’,
      ‘RESI’,
      ‘BIRT’,
      ),

      Or is there an other config file ?
      Thanks for your help

      #10337
      kiwi
      kiwi
      Keymaster

      1660 posts

      But if I want to add an existing field to an event, such as “URL” to the Birth event (in order to add a url that present the picture of the baby), how can I do easily ?

      Do I just have to add in the config_data.php php the “BIRT” field in the “URL” Array like that ?

      ‘URL’ => array(

      ‘OCCU’,

      ‘RESI’,

      ‘BIRT’,

      ),

      Or is there an other config file ?

      Thanks for your help

      It’s really neither necessary or recommended to do this.
      Not recommended because URL is not a valid GEDCOM tag for any event such as BIRT.
      Not necessary because you can add a url in place of a media object. Just follow the normal process for adding a media object to the event, but add the URL instead (this will make more sense when you see the “Add media” screen). The image will be displayed like any normal media object but using the external url instead of the internal link. The only minor issue is that in such cases nor ‘thumbnail’ version can be created.

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

    You must be logged in to reply to this topic.