Jump to content
TNG Community

Would anyone be interested in some mods? Deciding on Mod files or not.


HauntedWebby

Recommended Posts

HauntedWebby

Hi all! šŸ‘‹

Long time watcher in the shadows, first time poster. I’ve been using TNG since 2003, off and on. Apparently, I was just letting my ancestors age gracefully before I caught up with them. 🄁 (don't worry I have more terrible jokes in the post)

I officially retired three weeks ago. Three. Whole. Weeks. Hopefully, several hundreds more to enjoy! 😁

Now I have time on my hands, which is apparently very dangerous when you have relatives and opinions about how the family site works, and comments of 'oh you know how to fix that'. I haven’t slept much since retirement, and honestly… it’s glorious. My great-#-o'many grandparents didn’t cross oceans for me to waste time watching daytime TV.

I'm thinking about making these updates into mods to share. I haven't dived into the Mod Manager yet, other than to use y'alls creations! Relation Display and Historic Places, I'm looking you! 🤩

I would deeply love feedback. Encouragement welcome. Gentle discouragement welcome. If I’m about to accidentally create a fourth cousin relationship vortex without a TARDIS, please tell me ... nicely.

I'm just showing few projects right now. These work, not pretty but are the closest to possible mod ready. I have some others that the idea is more ambituses than the want. Maybe, someday, not.

First thing I did, for my site, was move my passwords and delicatesĀ outside of public_html and point it to a secrets file. It feels safer, but its going to make future upgrades interesting.Ā  I also built a simple PROD-to-DEV cloning tool. It has already saved me twice. Which is good, because sometimes I click things with the same confidence my co-researchers (aka family) had when they wrote down grandma's birth year ā€œfrom memory.ā€ It can also migrate back to PROD after everything has been tested.

Cross-References to online site, and FamilySearch consolidation.

I’ve always wanted a clean way to cross-reference my TNG people with other sites and have those links auto-display right on the Person view page on a single line.

So I built that. (see pic)

I also started using FamilySearch IDs for merging because… well… if you’ve worked in shared trees lately, you know it can feel like playing genealogical Whac-A-Mole.

Now that the FamilySearch PID lives in tng_person table, I can also use it as part of the OOB merge process. I added a new merge option that shows duplicates based on the same FamilySearch ID. (see pic)

The big, ugly, green button is to a report to how me how many duplicates I have. The top of the report has a summary:
Tree Statistics:Ā Ā  129,063 total people Ā |Ā  119,908 with FamilySearch PIDs Ā |Ā Ā 527 duplicate PID groups found

Still needs to be prettier and blend better with TNG themes, but it’s working.

Relations Display Mod Update

I love the existing Relations Display mod. LOVE it. What made me sad what how long it took to calculate on some of my pages.

So I added relationship caching. Now once OOB relationship is calculated, it’s stored. No more recalculating your connection to your wife’s cousin’s husband’s aunt every time you move between pages. Even if you change the default person, it's fine. It will recalculate and remember the relationship.

There’s also a recalc URL if I update something. Because I'm update something daily now.
This one cracked me up... It's my mom.
image.png

Research Status Indicator

I added a research status indicator. It’s basic right now, but it works. If you use the RootsMagic sync (below), it can auto-update the status based on what you’ve confirmed or found.

It’s surprisingly satisfying to see someone move from ā€œNeeds reviewā€ to ā€œVerified.ā€

RootsMagic | TNG Sync (Work in Progress)

This is the big one.

  • Imports your RootsMagic GEDCOM into staging tables only. Non-destructive. Your TNG data stays untouched unless you confirm changes.

  • Added a RM-UID to the tng_person tableĀ so RM and TNG know exactly who is who.

  • Auto-matching first by FamilySearch PID, then by exact name + birth/death year.

  • Side-by-side comparisons with field differences and family context.

  • Conflict resolution when multiple candidates match.

  • Manual linking when auto-match fails.

  • Tracks rejections so the same wrong match doesn’t keep popping back up.

  • Discrepancy report to show where RM might have better data.

  • Unmatched report listing RM-only people as potential additions.

  • Can create new TNG records from unmatched RM data.

  • Everything is logged.

  • Nothing changes in TNG until you explicitly confirm it.

Basically, it lets me review things calmly instead of discovering six accidental duplicates at 1:30 AM and questioning how many times I clicked the import button 3 years ago.

Office Administration

One of my pet peeves is when names get crowded with titles, royal styles, and everything else. ā€œSir Lord King Duke Bob III Esq.ā€ starts to look like a parade banner.

So I created an Office tracker.

You can define any office: Royal, Noble, Military, Religious, Civic, Club, etc. Make new ones. Each office can have its own custom attributes, and they only display if populated. The display is expand/collapse enabled and remembers for logged in users.

Anyway… Would love your thoughts.

Looking forward to finally stepping out of the shadows!Ā šŸ‘»

Snag_21257bc0.png

Snag_2122389b.png

image.png

image.png

image.png

Link to comment
Share on other sites

Philip Roy

Well if there’s an award for great first post…or maybe ā€œlongest forum lurker before postingā€ my vote is with you! You made me laugh many times with that intro. This suggestion caught my eye and confused me a bit?

7 minutes ago, HauntedWebby said:

Security & Setup

First thing I did was move my passwords and delicatesĀ outside of public_html and point it to a secrets file. It feels safer, but it’s going to make future upgrades interesting.

Isn’t that already possible? My config file including relevant passwords, is hidden in a folder (not at the top level) of my naming…so I’m not sure what you are suggesting that is different to what can be done in the admin area already?

Link to comment
Share on other sites

HauntedWebby

This is 24 hours for my server. Security is critical. The funny part is the malicious files came from an official Wordpress update. Blah!
image.png

Anyway, it's a standard security practice, keeping credentials outside the web-accessible directory means they can never be accidentally exposed to a browser, even if something goes wrong with the server configuration. It's on root. It's not accessible to anyone but me and the code.Ā  My past life still haunts meĀ šŸ‘»
Ā 

Snag_216e5de5.png

Snag_216ec0d5.png

Link to comment
Share on other sites

Philip Roy

I completely get what you are saying, but you were suggesting a mod might be needed. I was suggesting that functionality already exists. What am I missing?

Link to comment
Share on other sites

HauntedWebby

My site failed pen testing for exposed passwords using zeropath. I did change core code to fix it. Basically, I stopped the code fromĀ admin_updateconfig.php repopulating the config.php with the db and mail passwords from the admin page that is in the public_html. Plus, I have an automatic password changer that changes these two password every 90 days forĀ TNG and SQL. I have living people's data from EU and UK, so I have to be GDPR compliant. Here in the US, I haveĀ ADPPA and CPRA for data protection compliance. I'm not required to be compliant with the CMMC, but do it since I know it.

I could have missed an update that already did that, maybe a conflict with mods. But I don't think TNG has auto password changers. While all the coding I've done is very security first, I was just making a comment. I'm not offering a security mod.

Link to comment
Share on other sites

Welcome to the Forum as a 'contributor' @HauntedWebby

Lurking is not so bad and I think a lot of people do so because they fear contributing for what ever reason!

Like @Philip RoyĀ I had some laughs along the way reading your 'story'. And I thought OMG, there are some great ideas for Mods and some effort must have gone into such things.. IF I was still using TNG I would probably be interested to learn more about these 'Mods' and put them to use. The Relationship Display Mod would be a top starter for me. And whilst on that. If what you have shown is indeed your mother being related to yourself, then perhaps your mother is related to your father via a common ancestor.. SeeĀ Consanguinity on the Wiki Page here. My Aunt is related to her husband through her Great Great Grandmother and my Uncles Great Great Grandmother who are sisters. That makes the relationship between me and him as an Uncle AND a third cousin once removed ascending.. And strangely there was talk within the family of a relationship between the Malkins and Bullens way back in 1925 When they first met coming off the boat from England. My Aunt was about 6 1/2 yrs old..

The 'Security' thing might be a topic all on its own, because IMHO that is ALWAYS a paramount requirement. Perhaps explaining the whys and wherefores about what you have done might help everyone further understand the benefits. From what I see it seems you have automated this rather than it being

Ā 

*Optional & Manual. Use an absolute path name, like what you see in the Root Path, then move the following files to the Config Path immediately after saving and make them writeable (664 permissions): config.php, customconfig.php, importconfig.php, logconfig.php, mapconfig.php, mmconfig.php, pedconfig.php

as in Setup >> Configuration >> General Settings >>> Config Path, which I think @Philip RoyĀ is referring to.

Thank you for sharing and whilst I do not 'actively' use TNG anymore I would still be happy to test any 'Mod' you create on my Local site.. I only have TNG v15.0.4 installed though! <Smile>.

Ā 

Link to comment
Share on other sites

HauntedWebby

Hi @RickM,

Yes, that is my mom, and there are even more relationships if I expand the number viewable. My parents have a 5th great grand parent common ancestor. They didn't know. My dad was from Oklahoma, and my mom was from Idaho. They met at a wedding in California.  I used to think the odds were astronomical for that to happen. Then I found out I'm related to my former husband. Our son is related to my current husband. I guess we're keeping it all in the family like the Habsburgs. 😁  All the relationships are 5+ generations, so I guess if you go back far enough you can find relations with just about anyone.

I'm a little hesitant to talk about security because I don't want to be held accountable for anything if something goes wrong.

This is the structure I use for all my websites (names changed to protect the innocent), and what I changed my TNG to for my peace of mind. @Philip RoyĀ There is nothing secret about a structure like this for websites, it's common.Ā Sorry if I didn't answer your questions, I guess I'm not really sure what information you're looking for.

/home/
ā”œā”€ā”€ config/ Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā   ← PRIVATE (outside web root)
│ Ā  ā”œā”€ā”€ app.php Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā   ← App settings, session config
│ Ā  └── database.php Ā  Ā  Ā  Ā  Ā  Ā  Ā  ← DB credentials
ā”œā”€ā”€ src/ Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  ← PRIVATE (outside web root)
│ Ā  ā”œā”€ā”€ brap.php Ā  Ā  Ā  Ā  Ā  Ā   ← Loads everything
│ Ā  ā”œā”€ā”€ Ah.php Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  ← Registration, login, sessions
│ Ā  ā”œā”€ā”€ Botction.php Ā  Ā  Ā  Ā   ← Honeypot + timing + rate limit
│ Ā  ā”œā”€ā”€ Cf.php Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  ← CSRF token protection
│ Ā  ā”œā”€ā”€ Dase.php Ā  Ā  Ā  Ā  Ā  Ā  Ā  ← PDO connection
│ Ā  └── Seon.php Ā  Ā  Ā  Ā  Ā  Ā  Ā   ← Secure session handler
└── public_html/ Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  ← PUBLIC (web accessible)
Ā  Ā  ā”œā”€ā”€ .htaccess Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā   ← Security headers, directory blocking
Ā  Ā  ā”œā”€ā”€ index.php Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā   ← Home page
Ā  Ā  ā”œā”€ā”€ register.php Ā  Ā  Ā  Ā  Ā  Ā  Ā  ← Registration (with bot protection)
Ā  Ā  ā”œā”€ā”€ login.php Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā   ← Login
Ā  Ā  ā”œā”€ā”€ logout.php Ā  Ā  Ā  Ā  Ā  Ā  Ā  Ā  ← Logout

If you're on shared hosting the it would be /home/<your account name>/database.php

You can visitĀ https://dev.clan-history.com/

Dev database, so you can add, edit, whatever. :)
U: TNGPeeps
P:Ā !PJq0S!PkfY7vsi#

  • RootsMagic sync: Admin/ Import-Export / RootsMagic
  • Relation Display: Any person view. First page load is the OOB mod, the second load of the page is the cache I made.
  • Offices: Admin / OfficeĀ  (I35561 is a good person view) WIP, I need to make the chevrons on right bigger to collapse/expand the windows, and a couple other things.Ā 
  • FamilySearch ID: People / Merge, People / Search, Person view (I35561)
Link to comment
Share on other sites

Philip Roy

I wasn’t after any information. Your post was an offer to create mods I thought, and all I did was point out that this…

moveĀ my passwords and delicatesĀ outside of public_html and point it to a secrets file
Ā 

…is simple functionality kind of already inbuilt. You’ve clarified that what you actually do is far more advanced than just that.

Link to comment
Share on other sites

HauntedWebby

Ohh I see it now the header, like the mods.Ā Ā šŸ˜ž

Ā 

Ā 

Link to comment
Share on other sites

LeAnna

Looking at your home page, both live and dev I note the Print option does not match the rest of the menu items. FYI only.

image.png

Ā 

Link to comment
Share on other sites

Brett, I have never been able to get the print and the bookmark buttons the same size as other menu items, even with the Menubar Optimizer mod by Jean-Luc. So personnally, I just dropped the functions. With Jean-Luc's mod, I can just add the links on the same line, but never within the other dropdown menus, never with the same font size. I use Template Nr 16. But it was the same with 13, 14, 19.

Link to comment
Share on other sites

Hi LeAnna

What a story.. And in some ways the odds are amazing and in America 'astronomical' but as you say, go back far enough and anything is possible.. Especially when you realise the population has grown exponentially. Thank you for sharing, it is these sorts of things that makes family history research so interesting..

Understand yourĀ hesitance re speaking about security. I am curious about what you have done because it is something I don't know much about and am curious about. The fact I suggested you share was I felt the community might like to have an open discussion about such. And even though Darrin does not monitor the Forum regularly there are others who are in the 'dev/beta testing team' that do and they might take back a snippet or too! Anyways it was a thought..

Still would be happy to help 'test' Mods if you so needed such.

13 hours ago, Katryne said:

Brett, I have never been able to get the print and the bookmark buttons the same size as other menu items, even with the Menubar Optimizer mod by Jean-Luc. So personnally, I just dropped the functions. With Jean-Luc's mod, I can just add the links on the same line, but never within the other dropdown menus, never with the same font size. I use Template Nr 16. But it was the same with 13, 14, 19.

@KatryneĀ Might be worth opening a new post regards this.. I have noticed same on my Local Site.

Ā 

Link to comment
Share on other sites

HauntedWebby

Thank you @Brett, I honestly didn't notice it. It's fixed in PROD now.Ā 8)

@KatryneĀ The problem is your templatestyle.css in your template. Mine was lines 192-193 these two lines keeps the text small
div.icons-rt { font-size: 8pt !important; }
div.icons-rt a { font-size: 8pt !important; }

So in your mytngstyle.css in the same template css folder add this and it fixes it. No need to update the templatestyle.css.
div.icons-rt {
Ā  Ā  font-size: 16px !important;
Ā  Ā  margin: 0 !important;
Ā  Ā  padding-top: 0 !important;
Ā  Ā  align-items: center;
}
div.icons-rt a {
Ā  Ā  font-size: 16px !important;
Ā  Ā  padding: 4px 10px 0 10px !important;
}


image.png

Link to comment
Share on other sites

HauntedWebby

@RickM

Behold… my very first MOD has entered the chat. :mrgreen:

Built fresh on an out-of-the-box TNG install, Template 19, no archaeological layers of prior tinkering.Ā :wink:

image.png

It sprinkles Heritage Flags onto the Person view like a well-placed <div> of national pride. The logic is beautifully simple:

  1. Check Birth Place.

  2. If present, fetch flag.

  3. If null, gracefully fall through and interrogate any other place field.

No place left unparsed.

And the real magic? You do not have to upload a bazillion flag images. The siteĀ flagcdn.com handles the heavy lifting.

Next quest unlocked: building a Mod page. Wiki is not currently in my primary skill tree. If anyone has a +5 Sword of Documentation or a spare Wiki spellbook, I am ready to multiclass.

Heritage_Flags_v15_0_4_1.zip

Link to comment
Share on other sites

9 minutes ago, HauntedWebby said:

Next quest unlocked: building a Mod page

LeAnna

I suggest you start a new topic for this.

Link to comment
Share on other sites

HauntedWebby
47 minutes ago, Brett said:

LeAnna

I suggest you start a new topic for this.

@BrettĀ I will, once I figure out the wiki page.Ā  I'm almost there. I know I saw the how-to on tagging the TNG version... somewhere.Ā 

https://tng.lythgoes.net/wiki/index.php/Heritage_Flags
The draft, so far.

Link to comment
Share on other sites

Rob Severijns

Hello LeAnn,
Just downloaded the mod and noticed an issue in Mod Manager>

Will send you a PM

Link to comment
Share on other sites

@HauntedWebby

And thy works are being inspected.. <Smile>

That is a rather impressive addition.. So subtle, I actually missed it when first looking.. A very nice Mod LeAnna.

Add this line under author

%wikipage:Heritage_Flags%

and that will create a Wiki page link in the Mod Manager


Thanks.. Sing out if you need some help with the Wiki Page etc.. I found it easier to 'copy' a page and then do my thing..

Ā 

Link to comment
Share on other sites

Philip Roy

@HauntedWebbyĀ It's already been suggested you start a new thread concerning your first mod. I have to agree. I have tried it locally and have some feedback, but this thread is getting clutteredĀ 

Link to comment
Share on other sites

Philip Roy

You appear to have hard coded the mod folder name in the code to "mods" when TNG 15 allows you to rename the mods folder to whatever you want it to be, so the mod is failing for me. It needs to take the name of the mod folder from the TNG config file, which can also be located in a folder that you can rename, so I'm not someone who understands TNG enough to figure out how you pull those values into your mod.

Hope that helps.

Link to comment
Share on other sites

HauntedWebby

HI @Philip Roy, you are spot on I hardcoded where I should not have.Ā  Steve helped me, and some testers are retesting. I'm off to a) start a new thread and b) go argue with the wiki code to update it.

Thank you for taking a lookĀ :mrgreen:

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...