Jump to content
TNG Community
theKiwi

Search for Connections Mod

Recommended Posts

klooster

My advice is to rename every update, it easer for a user to see if he or she has the latest version.

186FD6F7-97BF-40B8-830C-4EC0868E6F0F.jpeg

Share this post


Link to post
Share on other sites
tngrlkrz
30 minutes ago, Ken Roy said:

latest version you published on the TNG Wiki

Sorry Ken, when I compared the latest and said only comments were added to the Edit Options for published v4a, I had not checked the language files, which apparently Michal said were modified.

Share this post


Link to post
Share on other sites
klooster

Hi Michael,

After putting 1000 and changing texts to

$text['pri'] = "(<span style='color:red;'>&#9733</span>)&nbsp;"; # black star, bigger than &bull;
$text['par'] = "(<span style='color:#FF8A00;font-weight:bold;'>p</span>)&nbsp;";
$text['chi'] = "(<span style='color:#297A34;font-weight:bold;'>c</span>)&nbsp;";
$text['spo'] = "(<span style='color:#555ADD;font-weight:bold;'>s</span>)&nbsp;";

Legend Diagram works for me ALSO.


THANKS

Share this post


Link to post
Share on other sites
mjaro
1 hour ago, klooster said:

Legend Diagram works for me ALSO.

👌

Share this post


Link to post
Share on other sites
Günter

Hi Michael,

do you have an idea why your Connection mod sometimes doesn't find quite obvious paths even if I increase the number of search steps to 999?

Example: please look at my site www.zerweck-family.de/stammbaum for connections from I998 to I119, and you'll get as the only relevant path:path1.jpg

But if you start at Hans Harser's daughter Agatha, you get several more paths, the shortest is this one:

Path2.jpg

Why is the shorter path from Hans Harser via Anna Harser not found at the first search request?

Furthermore I found that the number of paths which the mod finds sometimes may be different if person 1 and person 2 are just exchanged.

Regards Günter

 

Share this post


Link to post
Share on other sites
mjaro
1 hour ago, Günter said:

the number of paths which the mod finds sometimes may be different if person 1 and person 2 are just exchanged.

This is expected behaviour and the reason is not the function of founding paths itself but the need of eliminating (not displaying) many paths that are too similar (or differ in a thrivial way).

E.g., consider you see a path that is going through spouses. Another path (1 step longer) going via one of the spouses, then child, and then the second of the spouses - will be eliminated by the filtering function and will not be displayed. There are also several other patterns that are taken into account by the filtering function.

The correctness of the filtering function  has not yet been proven. I suspect that it can be also the reason of other anomalies reported, including your case.

If you allow, I'll register to your site and analyse the graph and the connections.

Thank you for the reported observations,

Michał

Share this post


Link to post
Share on other sites
mjaro
7 hours ago, Günter said:

if you start at Hans Harser's daughter Agatha, you get several more paths, the shortest is this one:

Yes! Now I see what I should improve/correct in the filtering function. I'll make this change and let you know when tested.

Thanks!

Michał

Share this post


Link to post
Share on other sites
mjaro

You will find attached a new sub-version 4b of the mod. The filtering function is improved, and Czech translation added thx to Ron.

I'm not going to release this version to TNG Wiki, but if you check it and confirm it is OK I'll include the changes to the next release which I'm working on.

Thanks for all your comments

Michał

Connections_v13.0.3.4b.zip

Share this post


Link to post
Share on other sites
Ken Roy

Michal,

What am I not doing correctly?  Both the version posted on the TNG Wiki and this 4b version no longer displays the photos in the chart.  It appears to be OK on my production site, but not on my WampServer site.  With WampServer (TNG 13.0.3) not showing the same thing as my production site (TNG 13.0.2), it makes it difficult to test TNG upgrades

Quote

Choose whether to display a thumbnail preceding the name in boxes. The default is (true)  is set to true

If you are adding new features, I would like to see an option that restricts the Connections to logged in users, or at minimum documentation on how to keep the bots from being able to click the tab and chewing up the MySQL time on my site.

Share this post


Link to post
Share on other sites
mjaro

Hi Ken,

If you don't know, who can know?... What I suffer in my test site is that ModManager cannot uninstall and delete a mod to the clear state if any file (managed by the mod) was modified after installation (either by another mod, or by hand), and I have to clear files (undo editing, or delete old files) by hand. This is obviously the correct behavior of MM.

This concerns also genstyle.css: if previously added lines remain in it, then the next mod installation adds the lines after the specified comment and thus before the old lines - which makes the new lines invisible. I don't know how to overcome this obstacle and put the lines at the end of it. CSS files hasn't any closing tag or mark (like php has ?>)  to put the new lines just before the end and thus after any other lines. The mod could put new lines before the comment but it would be against TNG's wishes(?) Either way, the CSS would have to eventually be cleaned up.

I'm working on update version that -in general- respects more the TNG settings (concerning privacy, and also thumbs and name settings). I hope it will fulfill your suggestions.

Michał

Share this post


Link to post
Share on other sites
Michel KIRSCH
3 hours ago, mjaro said:

What I suffer in my test site is that ModManager cannot uninstall and delete a mod to the clear state if any file (managed by the mod) was modified after installation

Hi Michal,

I don't understand the problem : if the cfg file reflects the state of the modified file you can uninstall it.

What do I do : My Mod is installed, but I must do modifications.
I work directly into the modified file, do my tests and when it's OK, I copy the modified code from the file and paste it into the cfg file.

The Mod can be uninstalled.

If the file is modified by two mods at the same place, uninstall them in the reverse order of the installation and all will works fine.

If I misunderstand your problem, please explain with an example.

Michel

Share this post


Link to post
Share on other sites
mjaro
On 3/11/2021 at 10:43 PM, Michel KIRSCH said:

copy the modified code from the file and paste it into the cfg file.

I've never checked that it allows uninstall!

("never" is one year [EDIT: a quarter of a year]; I still have a lot to learn...)

Thanks for this advice! 👌

Michał

Share this post


Link to post
Share on other sites
Ken Roy

Michal,

I do all my changes using the Mod Manager, so sometimes have several backup versions of the mod cfg file.  If it is a subfolder module, I may manually copy the version from the mods subfolder for the mod to the TNG root folder for testing.  I always create a backup version of the cfg file or subfolder module before I make changes to it.

Modifying the TNG scripts directly is always risky that it will not uninstall, but Michel's approach is a valid one.

I am having issues recently where something that works on my laptop WampServer does not work on my web accessible sandbox, or where something that works on my production site like your Connections 4a mod does nor work on my WampServer environment.  V13.0.2.3a was working on my WampServer environment.  Unfortunately, several other things needed by attention, so I might not have paid close enough attention when Ron was pushing for the compact version with no photos.  I will try to look at the code more closely tomorrow.  On my production site, I modified my mod that changed the colors to also require that $currentuser is set before allowing the Connections tab to be displayed.

Share this post


Link to post
Share on other sites
tngrlkrz
14 hours ago, Ken Roy said:

With WampServer (TNG 13.0.3) not showing the same thing as my production site

Hi Ken,   I see my name was dropped alongside an issue you're having  of photos not appearing.🙄 

I don't know if it's relevant or not, and I did make a small note of it back some time ago, but I experienced a similar issue with the mod not working as expected locally, but working OK  remotely.  I suspected that somehow css was involved, so since that time I take the step of doing a batch uninstall of all mods, and reinstall of all mods, anytime the connection mod is reinstalled. I don't understand it, and It may no longer be necessary, but it has always worked for me.

Share this post


Link to post
Share on other sites
tngrlkrz
13 hours ago, Michel KIRSCH said:

I work directly into the modified file, do my tests and when it's OK, I copy the modified code from the file and paste it into the cfg file.

 I work with mods and test changes to them in a similar fashion, testing code changes directly in the target tng file.   I make use extensively of Notepad++'s 'undo' or Ctl-Y or Ctl-z and then 'Save' to undo or redo changes I am testing so that the 'Installed' status of the mod is preserved in Mod Mgr, then uninstall the mod, and make the changes in the cfg file.

But I haven't thought or tried copying the altered code into an installed cfg file to keep Mod Mgr in sync. Interesting approach. 

Share this post


Link to post
Share on other sites
mjaro

I prepared a new mod version 13.0.3.5.

It takes into account the TNG settings including user rights, names settings, and some more. In place of showPict option there is a more general compactBox option which suppress thumbs and shortens the names (and displays tooltips incl.more data). 

I hope it is now more compatible to different TNG configurations.

Thank you for all insights and advices (also in private emails).

Michał

Connections_v13.0.3.5.zip

Share this post


Link to post
Share on other sites
Ken Roy
6 hours ago, tngrlkrz said:

so since that time I take the step of doing a batch uninstall of all mods, and reinstall of all mods, anytime the connection mod is reinstalled.

Thanks Ron,

However the Connections mod still only shows the Compact view after I uninstalled all mods, except my private mods for TNG configuration changes and my template site look and feel mods.  I am trying to get my WampServer environment upgraded to TNG 13.0.3  It also should not be necessary to uninstall all mods to get a new version of a mod to work correctly.

5 minutes ago, mjaro said:

I prepared a new mod version 13.0.3.5.

Thanks Michal,

I will download it and check it out.

 

Share this post


Link to post
Share on other sites
Ken Roy

Michal,

Downloaded your new version.  Uninstalled your 4a version and then installed the new version.  Made not changes to what you provided in the zip file.  When I tried a Forced Reload on a previous tab that was opened to your Connections, I got a Bad compactBox parameter parameter (my error since I should have clicked the Individual tab and reloaded from there.

However, I am still getting the Compact view, even though that Edit Option is set to false.  I did not check the code, but are you not using the TNG functions to display the photos in the chart ?

I have other things I need to do today, so I may not get back to testing this until later tonight

 

Share this post


Link to post
Share on other sites
Ken Roy
6 minutes ago, Ken Roy said:

However, I am still getting the Compact view, even though that Edit Option is set to false.  I did not check the code, but are you not using the TNG functions to display the photos in the chart ?

Oops, my mistake - since I have uninstalled all my mods previously I had not installed my Default Photo Path Mod to tell TNG where my default old style photos are located. Most likely this is also the issue in my previous post. 

By the way, the Mod Manager rewrites the cfg file when you make changes when testing.  So sometime you need to Edit Options to Restore the Default before packaging a mod.  Not an issue just an observation in case you are not aware of this behavior that when you zip the cfg file it will have the last options you used

Michal, thanks for all your hard work on this mod.  It is a valuable addition to TNG for those of us whose ancestors lived in tight knit communities

Share this post


Link to post
Share on other sites
Ken Roy
10 minutes ago, Ken Roy said:

Oops, my mistake - since I have uninstalled all my mods previously I had not installed my Default Photo Path Mod to tell TNG where my default old style photos are located. Most likely this is also the issue in my previous post. 

Michal,

I am sorry for raising an issue that is not yours, but mine for forgetting to install one of my critical mods in running my site, since I still use the old TNG style default photo names for the person (treeID.personID.jpg) and also moved these images to a photos/default folder.  Without my Default Photo Path Mod install, TNG does not find the default images.

Sorry for raising a non-issue as far as your mod is concerned.  Again thanks for such a great mod that shows 8 connection paths between my father and my father-in-law and 9 connection paths between my wife and I.  Sometimes a picture is worth more than a 1000 words  :)

Share this post


Link to post
Share on other sites
Michel KIRSCH
9 hours ago, tngrlkrz said:

But I haven't thought or tried copying the altered code into an installed cfg file to keep Mod Mgr in sync.

Don't know how you begin a Mod.

When I start a Mod, I carefully mark my changes with //BEGIN and //END Mod in the tng files (make a backup before !).
I write my code, test it, rework it if needed and when everything is fine, I start writing my cfg file.
If I need to correct, I correct in the code, then in the cfg file.
And I can see at any time that the cfg file matches the installed code...

Michel

Share this post


Link to post
Share on other sites
tngrlkrz
4 hours ago, mjaro said:

It takes into account the TNG settings including user rights, names settings, and some more

Hi Michal,

Version 5 does have the names displaying properly in expanded and compact versions, as well as tooltips, but *only* for deceased individuals. After clearing cache, etc., I have tried on both local and remote test site with different users who have 'see living' rights, but 'living' is the only name seen in both the boxes and the tooltip.  All else seems OK.  I was hoping the issue was fixed because you had noted you were able to reproduce the behavior.  

Share this post


Link to post
Share on other sites
tngrlkrz
3 hours ago, Michel KIRSCH said:

When I start a Mod, I carefully mark my changes with //BEGIN and //END Mod

Hi Michel,

I was referring mainly to modifying the mod, rather than from nothing.  But the same principle might work, testing changes directly in the target file while the mod is installed , and if good, making the same change in the mod's cfg file, and leaving the changes in the target.  But usually,  I undo all changes in the target so I can uninstall the mod, make the changes in the cfg, and then reinstall it.  But perhaps I misunderstood your procedure.

Share this post


Link to post
Share on other sites
mjaro
9 hours ago, Ken Roy said:

Oops, my mistake

You don't have to apologize a bit. Your continuous support is a great value for me!

I'm not sure if this is a good place to ask for advice on how to prepare a test environment?

I've been programming for >1 year, but it was only a few months ago that I started incorporating my program into TNG. I do tests on a plain TNG installation which is parallel to my "production" installation, but I cannot efficiently restore it to a clean state, which is often the cause of mysterious effects. Is it a good practice of making a complete backup of the clean installation to be able to easy restore it including connected database? I started reading about Docker and its containers, but not sure if it fits to these needs, and if anyone makes use of it in the TNG context.

Please comment.

Michał

Share this post


Link to post
Share on other sites
mjaro
6 hours ago, tngrlkrz said:

you were able to reproduce the behavior.

Ron, could you please show again a screen how it looks? ( hoped having it corrected :( )

Share this post


Link to post
Share on other sites
Guest
You are commenting as a guest. If you have an account, please sign in.
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.

Loading...

×