Jump to content
TNG Community

Search for Connections Mod


theKiwi

Recommended Posts

40 minutes ago, ton van lil said:

Hello,

I am trying to install the Search_for_connections mod but get an error. See below.

image.png

What is wrong?

Greetings

Ton



 

You've probably got some other Mod installed that changes genlib.php - if you have the Fixed Family Tabs mod, uninstall that, install this one and then reinstall the Fixed Family Tab mod.

If it's not that one, use the Analyse Mods tab in Mod Manager to find out what Mod is changing genlib.php.

Roger

Link to comment
Share on other sites

  • Replies 598
  • Created
  • Last Reply

Top Posters In This Topic

  • mjaro

    210

  • tngrlkrz

    117

  • Ken Roy

    91

  • theKiwi

    54

Top Posters In This Topic

Posted Images

Hi Ton,

Do you have Fixed Family Tab mod installed?

If so please uninstal it, then install my mod, and then reinstall FFT. 

Give me a message if it was the case.

Michał

Link to comment
Share on other sites

On 2/11/2021 at 2:18 PM, mjaro said:

For displaying persons' thumbnails I use the standard TNG functions. 

Ken,

I see I do use non-standard function. I'll try to return back to the TNG standard getSmallPhoto(). I assume that it works also with the old naming standard, am I right?

I see also my hard-coded use of gender thumbs 😡. The time I coded these I couldn't cope with the use of standard function, but I should be able to do it now.

Michał

 

Link to comment
Share on other sites

Michal,

Publishing personal mods is always a learning process on the first one. 

Use of TNG css classes might also be beneficial.  I have not had a chance to look at it closely since I am still trying to resolve some issues with the MediaWiki upgrade

Very impressive mod that shows connections I might not have followed

Link to comment
Share on other sites

Sorry, I did not answer your question. 

I would have to look at what function is used in the TNG charts, but I think that the  getSmallPhoto function is the correct one. 

Link to comment
Share on other sites

On 2/12/2021 at 9:34 AM, mjaro said:

Ironically, both kinds of the problems are because - as a novice programmer learning PHP 7 - I coded very carefully according to the patterns I read... (the problematic ": string" was return type declaration, another was parameter scalar type declaration - both introduced in PHP 7; the part containing global is a recommended comment explaining function definitions). 

 

@mjaro I've found a different solution now for this problem...

Change lines 11 and 44 by putting a ; (semi-colon) after $visited - so

 $visited; - list of visited nodes (distance, prev node, relation to the prev)

So now when the TNG-WordPress plugin scans all the files looking for global variables, it finds a variable called 

 $visited

instead of finding a variable called

$visited - list of visited nodes (distance, prev node, relation to the prev)

Roger

Link to comment
Share on other sites

Good!

my solution was to write (in comments) g1obal with inentional misspelling ;)

But yours is better!

Link to comment
Share on other sites

27 minutes ago, mjaro said:

Good!

my solution was to write (in comments) g1obal with inentional misspelling ;)

But yours is better!

I thought about that too, but figured that was a bit clumsy...

I have a couple of other comments about the next update...

1 - Name the folder of files that comes with the Mod to

search_for_connections

that way it will be in the Mods folder listed next to the .cfg file which should be of the form

search_for_connections_V13.0.2.x

2 - the zipped download should also have the same name

3 - put nextpaths.css into the site's main css folder rather than the tng folder to keep it with all the other css files

4 - put comments in nextpaths.css in those first few lines that are defining the colour variables to explain what each variable controls (i.e. table background, box background, etc)
By the way - nice to see the use of variables in the css - I wish TNG did that as there are so many places that use the same colour that are all defined, and all have to be over-ridden to change colours in a site - using the variables means that you only have to make the change once!!

5 - the use of "search for connections" and "nextpaths" - if everything was searchforconnections, or perhaps even just "connections", it would be easier to see what files belong to different mods, so the Mod would be "connections_v_13.0.2.x", the folder of files that comes with the Mod would be connections, the css would be connections.css and the working files connections.php and connections2.php.

But I have to say this is a brilliant Mod, and one that hopefully Darrin might like enough to incorporate into TNG. Well Done!!

Roger

Link to comment
Share on other sites

Michal,

I agree with Roger on the use of Connections for the mod name, folder and zip file, and possible also for the tab you add.  To put the nextpaths.css or renamed connections.css in the TNG css folder you would use the $copyfile2 directive to put it in another folder

If you decide to rename the mod, let me know what your TNG username is and I will make sure you have rename (Move) authority on the TNG Wiki.

Link to comment
Share on other sites

Roger,, and Ken

I'll follow your advice! (I'd explain myself that from the very beginning my work was called NextPaths which was close to the key algorithm name; this was the reason of the further mess in naming...)

I'm finishing also other improvements:

 - mod options for presetting search parameters

 - just received Norwegian translation from User:Kare

 - use TNG standard getSmallPhoto() in place my own function (at my beginnings I had problems understanding names visibility) - Ken's pointing out

 - multiple smaller code improvements and cleaning unnecessary debug commented lines.

I'm pleased to read the praise as this is my first program in my 73y life!  It's fantastic that I have such experienced and patient advisers. Thank you!

Michał

Link to comment
Share on other sites

Michel KIRSCH
38 minutes ago, Ken Roy said:

I am impressed if this is your first program.

I'm too. Really.

Michel

 

Link to comment
Share on other sites

1 hour ago, Ken Roy said:

I am impressed if this is your first program.   

When I volunteered to test his first version of this mod and  asked if he should publish, I told Michal, 'Yes', and 'Wow, Amazing!'.  If he first learned programming one year ago,  he is a 'natural' for it.

Link to comment
Share on other sites

A question on what to expect with this Mod - If I make myself the Person 1, and my great great grandfather the Person 2 as here

image.png

I get this - shows a single path between us

[Website Example URL Removed as Website is Defunct]

But if I reverse that, and make my great great grandfather Person 1 and myself Person 2, then I get 4 possible paths

[Website Example URL Removed as Website is Defunct]

I guess I was expecting that starting at either end would result in the same number of paths?

Roger

Link to comment
Share on other sites

Yes,  I have noticed that also.  It is consistent.  Up the tree to my g-g-grandfather, from myself as primary, I have 1 path, but the reverse results in 7 paths, but in both cases, the first path is the same and the shortest. It seems that the logic results in less paths if the primary (@) must go up the tree, versus down the tree.

Link to comment
Share on other sites

Michel KIRSCH

Ron, if you remember, we have found the same problem when testing the add_cousins_button_to_user Mod.

We must invert the 1st and 2nd person to obtain a satisfactory result.

I know : it was in jan 2020, a loooong year ago :-)

Michel

Link to comment
Share on other sites

You are all right!

BTW in the shortest paths  Relate mod of Chriss Moss there is a (commented) message "Sometimes..."

The algorithm itself is asymmetric but mathematicians consider it correct.

One thing can increase the assymetry, and here can be a point to see possible correction: when a next path is found it is checked that the path is not a "trivial" variation of the previous paths, and if it is, the path is eliminated. Most of the "next paths" are filtered this way: maxR parameter decides how many paths are to be found, and only few of them pass the check and are displayed. The filter is my own invention and I haven't yet possibility to discuss if it is correct.

In the graph of all persons there are two kinds of connection between them: coitions (between spouses) and filiations (between each child and its parents).

1. If a (sub)path goes from a person to one parent, then 1-step longer path going from this person to the parent via second parent is filtered.

2. If a (sub)path goes between siblings via one of the parent, then another path going via the second parent is filtered.

3. If a (sub)path goes directly between spouses, then 1-step longer path going via their child is filtered. 

There is one more such filter. They are all the 4 implemented in the small function skipPath at the end of the Yen-BFS.php.

Michał

Link to comment
Share on other sites

On local host, both with WampServer and Laragon. I receive multiple lines of the same  error. The Mod script does return the correct results.

Warning: Invalid argument supplied for foreach() in C:\laragon\www\tng13\db2graph.php on line 79

PHP is 7.2.19 on Windows10

 

 

Link to comment
Share on other sites

20 hours ago, Ken Roy said:

If you decide to rename the mod, let me know what your TNG username is and I will make sure you have rename (Move) authority on the TNG Wiki.

Ken, I've renamed the mod, mod directory, css, and tab title (but remaining php files haven't been renamed yet; I would be afraid to get completely lost...)

The new version works for me.

Ken, Roger, Ron, Michel,

There are many changes in the mod itself as well as in the program files. Thus, it could be good if somebody checks if my internal tests are enough before publishing. May I ask you? 

Michał

Connections_v13.0.2.2.zip

Link to comment
Share on other sites

Brett, could you please uninstall the mod and then install the new version (renamed! to Connections) from the file I attached to the mail above?

Link to comment
Share on other sites

Michal,

I would recommend that you change the folder name to connections_v13.0.2.2 instead of simply connections because I suspect that as you make changes or improvements to the mod, several of the changes will be in the modules you include from the mod subfolder

Link to comment
Share on other sites

Michal,

Preliminary testing with new version is good.  Thank you for giving option of removing textual description and removing inactive  'show spouses' option .  I do not use the FGW mod., but do have the FFT mod installed.

Link to comment
Share on other sites

Thanks also for now using the TNG small photo function.  The chart now shows pictures where available, and now honors the option - Use default thumbnails:

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