Jump to content
TNG Community

What's New after Import


mjaro

Recommended Posts

I have released a new mod called What's New after Import. It is intended for admins who frequently import data from PC or Apple computers into TNG via GEDCOM files. This often results in the last modified” time in the TNG database for media, people, and families being equal to the import time, which makes this description less useful. In particular, in the “What's New” tab, the set of new items presented does not correspond to the purpose of this tab.
This mod allows you to take into account the last edit time stored in the metadata of media files, rather than in their description in the database. In addition, individuals and families whose description indicates a change time close to the import time are filtered out.
The use of this metadata or the description in the database can be switched on an ongoing basis by selecting the appropriate option. The menu also allows you to select the time (age) of the oldest changes to be taken into account and to limit the number of items displayed.
The mod has several parameters. They allow you to redefine the list of values used in the age and number menus, the initial values of age and number, and the initial value of the change time source (metadata or database).
During data processing, which for a large database may require up to several dozen seconds of server time, a header and spinner are immediately displayed so that a blank screen does not confuse the user. This is a small detail that requires forcing an incomplete page to be sent to the browser - which was a new experience for me.
Feel free to try out the mod and post your comments and suggestions for improvement here. If anyone is interested in further details before trying out the mod, I will be happy to provide them.

Michał Jarociński

Edit: you can see the mod in action in my site: jarocinscy.pl/genealogy/whatsnew.php (the page is public).

Edited by mjaro
added link to my site
Link to comment
Share on other sites

I like the sound of this! I actually have an entry at the bottom of the text that I put on my What's New page that says..

Quote

If there is information shown below, it has been automatically generated by the website and may not be accurate (i.e., it may not in fact be as new as it seems). 

...because the generated output hasn't been that relevant given that I do a fresh import (and wipe all existing data) each time I do a GEDCOM import.

I've installed your and am not seeing anything though when I search. Trying this locally on my Mac. Do I need to do a new import to kick things off?

Also, I'd be keen to have the search options hidden....that I determine what gets displayed here rather than individual choice. I'd love it if I could set up two sections "Latest images added" and "Latest entries updated" and maybe have it display the first 10 of each....or am I misinterpreting how this mod works?

Link to comment
Share on other sites

4 hours ago, Philip Roy said:

not seeing anything though

I guess you don't have any media or people modified in the selected time range? Have you tried setting a longer time, e.g., 50 days?

 

4 hours ago, Philip Roy said:

I'd be keen to have the search options hidden

This is also my idea and thus there is the first mod parameter - which has not yet(!) been programmed. I would like to apologize that the mod turned out to be quite complicated, so I put it off for the future, if anyone happens to be interested—like you! 

Great to see you checked my mod!

 

Link to comment
Share on other sites

Sorry, I was in a bit of a rush when I tested it...so yes, if I set it to 50 days and search, then I do see items appear on the page.

I guess what I am after is more (in concept)..."X" recent changes after import...and that a day value wouldn't matter. This is the because the hidden private site I run has little use by others (it's not been accessed by anyone for over a year) so even if I set it to 50 days, then nothing would show up at times in the future, particularly when I don't work on it for a while. I'm hoping you might modify your mod to...

  • Give the option of hiding the settings from the user and just have the settings in the admin area
  • Give the option that instead of changed database and media entries from "X" number of days, there would be an option to simply show the most recent "X" number of changes, regardless of date? I appreciate that might mean a lot of calculations in the mod

So great mod! I hope you stick with it and others give you some feedback also.

Link to comment
Share on other sites

5 hours ago, Philip Roy said:

Give the option of hiding the settings from the user and just have the settings in the admin area

OK, I'm working on this.

5 hours ago, Philip Roy said:

Give the option that instead of changed database and media entries from "X" number of days, there would be an option to simply show the most recent "X" number of changes, regardless of date? I appreciate that might mean a lot of calculations in the mod

This is possible now! You can set Default number of days to show mod parameter to a big value of days, e.g., 365 (must be less that 1000). I deliberately do not check whether this value is on the list of values proposed for the menu. Anyway, you can also set any big values in the Comma-separated list of values to show in the selection lists parameter and then you'll be able to to select it dynamically (from the menu).

Make experiments and give me a feedback!

Link to comment
Share on other sites

 

Thanks. I have looked at the settings and I confess that I am struggling to understand what they mean in many cases. I think you should add the options to the wiki page (with explanations) and reword some of them. Hope it is OK to say that, as I work as someone who spends there day writing instructions for things :-)

Here's each setting and my feedback...

Quote

General switch of using the mod changes. Default: (1)

No idea what this value means, so it needs to be explained better. No idea what the range of acceptable numbers are. Could I put 100,000 for example...or is it a number between 1-5? I don't know what the value is for or what it is meant to do.

Quote

Deviation from the last import time. Any individual/family modification time within this deviation is considered resulting from the import rather than an actual editing.

Again, I'm lost. I don't understand what this means and I don't know what are acceptable values to put here?

Quote

Comma-separated list of values to show in the selection lists (both days and items). Default: (1,5,10,15,20,30,50)

I'd change this to...

Quote

Drop-down options available for "Max days" and "Max Items". Comma-separated. Default: (1,5,10,15,20,30,50)

UPDATE - If the max is 1000, what does this mean...

Quote

whatsnew.php: $cutoff_opt = "750"

Next...

Quote

Default number of days to show. Default: (15)

Change to...because you said up to 1000, but you should point that out...

Quote

Default number of days to show (max 1000). Default: (15)

Next...

Quote

Default number of items to show in each category. Default: (10)

UPDATE - But what does this mean...

Quote

whatsnew.php: $limit_opt = "10"

Next...

Quote

Default source of media modification date. Must be either mediafiles or database. Default: (mediafiles)

I would suggest on the wiki, you explain the final option in more detail. What's happening there when I choose between mediafiles and database? Why is it significant?

Finally, I tried setting values in the back end to automatically display a list on loading the what's new page...but nothing happens. The only time I get any content displaying is when I go to the what's new page and use the search options and click.

Hope that helps.

 

Screenshot 2025-09-21 at 12.08.37 PM.png

Edited by Philip Roy
Link to comment
Share on other sites

Thanks for all your comments!

You are right. I wanted to be concise in my descriptions, but as I can see from your comments, I went way overboard. Tonight, I'll finally have some time for programming, and when I'm done with v2 mod, I'll work on improving the descriptions. (Perhaps my explanations are unclear also because of my poor English...)

Link to comment
Share on other sites

No problem. I’m an Instructional Designer and the golden rule in that job is “less is more”…so concise instructions are great. It’s just good to get someone else’s perspective on things so everyone understands. If there’s anything you want to run by us, like an explanation you want to give to users, post it here and we can help.

Link to comment
Share on other sites

The new v15.0.0.2 mod version has been released.

The main improvement is a mod parameter to select who can see (and use) the menus: either everyone, or logged-in user, or admin only - this is what you wanted :(

I also improved validation of the values coming from the Mod Manger and from the GET mechanism.

There are some improvements of the description i both in the mod itself and in the Wiki, but for sure there is a lot more possible.

Link to comment
Share on other sites

This is coming along really nicely!

Is there a way to hide the "(past 700 days)" part at the top of the page and also the "Max 10 items shown" text?

I think I mentioned, my What's New page is a long list of changes that I have made to the site (like announcing when I last made a software update or someone gave me loads of images that I have added)...so after the heading and the max 10 part, you have to scroll right down the page to see the actual items that are now being displayed. I don't really want the 700 days comment, as people don't need to know that, and people might not understand what the max 10 text actually relates to.

Screenshot 2025-09-22 at 5.18.15 PM.png

Link to comment
Share on other sites

Philip, hiding those texts doesn't require mod changes. Just add two lines near the end of your cust_text.php:

$text['pastxdays'] = "";
$text['limitxitems'] = "";

Can you do it, or would you prefer me to make a tiny private mod?

Link to comment
Share on other sites

I'm really happy with the mod and have now installed it on my private site. Thank you so much. I listed my name on the wiki page....and I love the way it works.

I will say though, that having read the mod and wiki, I'm still stumped on what these two values and explanations mean, so I have just left them as default...

Quote

Deviation of the from the last import time. The modification time of an individual/family within this deviation is considered to result from the import rather than actual editing. Default: (1)

And...

Quote

Default source of media modification time. Must be either mediafiles or database. Default: (mediafiles)

I think maybe for the latter, it might be something like "Choose media to display based on the modification time from mediafiles or database. Default (mediafiles)"...but then I don't know what the difference between the two actually mean in real terms.

Edited by Philip Roy
Link to comment
Share on other sites

1. Deviation: there is a typo in the description - "modification time" disappered :(
This phrase was supposed to read: Deviation of the modification time from the last import time. The modification time of an individual/family within this deviation is considered to result from the import rather than actual editing.
Maybe a better phrase I put in the wiki:

Quote

Import time deviation (in minutes) - initial value is "1". The modification time of an individual/family that is closer than the deviation from the import time is considered to be the result from the import rather than the actual editing. There is usually no need to change this value.

A more verbose explanation could be:
Note that the modification time for persons and families is always read from the database. However, when the media modification time source is set to mediafiles, and a person or family's modification time is "very close" to the import time, it is assumed that this reflects the import time of that person or family’s description, rather than the actual time the description was edited. The deviation parameter determines this “very close” value.

 

2. Modification time source:
The TNG database contains descriptions of media, including the date the description was last modified. The age of the media itself, such as JPG photo files, is a completely separate matter. The datasource parameter allows you to choose which source to use for information about the media's age: either the description in the database or the metadata contained in the mediafiles.

 

Would that be understandable enough?...

Link to comment
Share on other sites

I still don't get the deviation setting and explanation at all, but that could just be me. It isn't an issue for me as the mod is working well.

I think your explanation re mediafiles/database in the post above is great!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...