Jump to content
TNG Community

Search for Connections Mod


theKiwi

Recommended Posts

Good morning Michal,

thank you very much for making this change.

For the German text please take this:

$text['spo'] = "(P) "; # spouse = (Ehe)Partner
$text['chi'] = "(K) "; # child = Kind
$text['par'] = "(E) "; # parent = Elternteil
(please in large letters, if possible)

Before you release a new version I would like to submit an update of the German text file. I will change a few phrases.

Jürgen

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

Jürgen, thank you.

What $text['pri'] do you prefer for german users: (@) or (•) or any other?

BTW yesterday night I had this change working, only small touch, and then suddenly crashed and couldn't return to the previous state. Today I decided to start it from scratch - wrrrrr! 🤬

Link to comment
Share on other sites

Michel KIRSCH
15 minutes ago, mjaro said:

What $text['pri'] do you prefer for german users: (@) or (•) or any other?

Michal,

why not set a parameter to determine the sign used? So everyone can choose the sign he uses...

Michel

Link to comment
Share on other sites

13 minutes ago, Michel KIRSCH said:

Michal,

why not set a parameter to determine the sign used? So everyone can choose the sign he uses...

Michel

Good idea! I'll do it!

Link to comment
Share on other sites

Couple observations testing the current version of Connections mod.

Getting warnings for each path search,...got  4200 of them with just one connection search.

17-Feb-2021 13:07:27 UTC] PHP Warning: Invalid argument supplied for foreach() in R:\Laragon\www\tng13c\connections-graph.php on line 79

With this one warning at the start of those repeated  warnings.

17-Feb-2021 13:07:20 UTC] PHP Warning: Use of undefined constant sortByLenopt - assumed 'sortByLenopt' (this will throw an Error in a future version of PHP) in R:\Laragon\www\tng13c\connections-form.php on line 67

 

 

Just as a 'whatif' , as suggested by Ken sometime ago.   This is a look at the results without the diagrams or containers.  Only required a couple changes to mytngstyle.css.  Some container outlines remain in some templates, however.  Just an idea.

image.png

Link to comment
Share on other sites

47 minutes ago, tngrlkrz said:

With this one warning at the start of those repeated  warnings.

17-Feb-2021 13:07:20 UTC] PHP Warning: Use of undefined constant sortByLenopt - assumed 'sortByLenopt' (this will throw an Error in a future version of PHP) in R:\Laragon\www\tng13c\connections-form.php on line 67

 

There is $ missing, the line should be:

$sortByLength = $pedigree['sortByLength'] ? $pedigree['sortByLength'] : $sortByLenopt;

Could you please correct and check if works better?

Link to comment
Share on other sites

52 minutes ago, tngrlkrz said:

Just as a 'whatif'

The reason for visible containers was that for paths going through several marriages the diagram becomes wider then the page width. Then no scrollbar is used but you can drag it horizintally by mouse.- the cursor shape changes to show this possibility. 

Anyway, I'm not against hiding container; I can show it for my template only :) 

Link to comment
Share on other sites

14 minutes ago, mjaro said:

There is $ missing, the line should be:

$sortByLength = $pedigree['sortByLength'] ? $pedigree['sortByLength'] : $sortByLenopt;

Could you please correct and check if works better?

Yes, that removes the single warning, but the others remain:

[17-Feb-2021 14:20:43 UTC] PHP Warning: Invalid argument supplied for foreach() in R:\Laragon\www\tng13c\connections-graph.php on line 79

 

Link to comment
Share on other sites

26 minutes ago, mjaro said:

The reason for visible containers was that for paths going through several marriages the diagram becomes wider then the page width. Then no scrollbar is used but you can drag it horizintally by mouse.- the cursor shape changes to show this possibility. 

Anyway, I'm not against hiding container; I can show it for my template only :) 

Ah...I haven't tested the ability to drag.   I will check that out.  In testing on mobile device, I did notice that some diagrams are off the screen and cannot be reached, however.

I haven't been able to see that happen yet, where the cursor changes and draggability is possible.

Link to comment
Share on other sites

18 minutes ago, tngrlkrz said:

but the others remain:

I'll work on this. The function is fairly simple and thus I hope to catch the bug... So far I cannot reproduce in my environment :(  

Link to comment
Share on other sites

17 minutes ago, tngrlkrz said:

In testing on mobile device, I did notice that some diagrams are off the screen and cannot be reached

You are right, for mobiles I have a lot to do... I have no idea how to deal with this area of problems.

Edit: I see I dont detect viewport width properly. Work on this also.

Edited by mjaro
Link to comment
Share on other sites

1 hour ago, tngrlkrz said:

Just as a 'whatif'

To be a bit more similar to other TNG diagrams I've added shadows to boxes (as suggested by Jürgen elsewhere).

Also replacing (@) (p) etc. with mod options already works in my test site. :) 

Link to comment
Share on other sites

24 minutes ago, mjaro said:

So far I cannot reproduce in my environment

This was on Laragon local with PHP 7.4.7, will try on remote with PHP 7.4.13 to see if any difference/change.

Edit:Update

On remote website: same warnings as on local site.......(on remote also was logging Notices also, so likely can disregard the one below?).

17-Feb-2021 10:02:50 America/New_York] PHP Notice: Constant s already defined in /home/krzmarzick/www/tng13c/connections-YenBFS.php on line 115
[17-Feb-2021 10:02:50 America/New_York] PHP Notice: Constant 0.01 already defined in /home/krzmarzick/www/tng13c/connections-YenBFS.php on line 114
Link to comment
Share on other sites

Michel KIRSCH
19 hours ago, tngrlkrz said:

17-Feb-2021 13:07:27 UTC] PHP Warning: Invalid argument supplied for foreach() in R:\Laragon\www\tng13c\connections-graph.php on line 79

Michal,

because not all family have childrens, the warning is raised.

so, test your family to see if it have childrens before  :

        if(isset($children[$familyID])):
            foreach ($children[$familyID] as $chi):  # for each child create 2x edge to every parent (cost=1)
                $graph[$par][$chi] = CHILD;
                $graph[$chi][$par] = PARENT;
//            echo " par=$par--chi=$chi ";
            endforeach;
        endif;    

Michel

Link to comment
Share on other sites

20 hours ago, tngrlkrz said:

PHP Warning: Invalid argument supplied for foreach() in R:\Laragon\www\tng13c\connections-graph.php on line 79

This is the warning I mentioned very early in this thread.

Since then I now receive several different warnings.

Link to comment
Share on other sites

Michel and Brett,

It's really strange that in my production site I do have exactly the lines Michel suggest. 

But it is also strange is that in the test site the version without this lines never warns me! (I use several trees containig very strange family structures, many families without children, of course - this is quite normal case, isn't it?)

Is it possible that the warning is dependent on the PHP version?

Anyway, I'll recreate "if isset". Thank you Michel!

Michał

Link to comment
Share on other sites

Michal,

If your production site has the instruction

if(isset($children[$familyID])):

then that is not the code you are distributing in your mod since the if (isset instruction is not in

Since this code is in the connections subfolder to the mod, that subfolder at a minimum needs to have connections_v3 (at least the last digit of the mod number) so there is no confusion that users have the latest module provide because folders might not get replaced when extracted into the mods folder

Link to comment
Share on other sites

22 minutes ago, Ken Roy said:

subfolder at a minimum needs to have connections_v3

Yes, I know you were absolutely right, I should have done this since your first word about this.

For the coming update I have the forder prepared of the  proper folder name (and other renamings in the code).

Long learning curve :(

Link to comment
Share on other sites

Michal,

On the positive side, your mod has avoided several issues new developers encounter when initially publishing a personal mod

  • handling information on Living individuals correctly
  • working in a multiple tree environment

Make a personal mod available to others is always a challenge since we all work differently and often have conflicting requirements.   Very much appreciate you mod and your queries find connections rather quickly.

So do not take all my suggestions as negative

Link to comment
Share on other sites

13 minutes ago, Ken Roy said:

So do not take all my suggestions as negative

Not at all, Ken. I see your advices only positive!

Now I know that programming for my own needs is the pure fan, and programming for a public use is full of stress...

Link to comment
Share on other sites

I'm almost ready to release the next update:

  • mod folder name includes mod version
  • new mod option: sorting paths by length / by number of marriages / not sorted (then they appear in the order as they were found, usually = by length
  • bullets preceding fullname in each box come from mod languages (can easily be modded eg. to be empty)
  • warning on family with no childern should disappear (back?)
  • mod languages are (to be*) corrected
  • box shadow (gives more "TNG look")
  • multiple internal improvements

*  only Norwegian and Polish are "ready to release",  for the rest I added a few new words by myself and I hope receiving corrections if needed; also need to find ANSI sequence to display this bullet "".

I attach zip file. If there is anybody that could look if it works not only on my site... (I believe it should work OK!)

Michał

connections_v13.0.2.3a.zip

Link to comment
Share on other sites

Michal,

I am not sure about your box shadow since it is not shown on all boxes.   

Michael,

5 minutes ago, manofmull said:

I unzipped the file and notice there is no connections.css

You must not have been running the previous version since the css definitions moved to genstyle.css

Link to comment
Share on other sites

5 minutes ago, manofmull said:

Michal

I unzipped the file and notice there is no connections.css

Is this correct?

Yes. The content of css file is now copied to genstyle.css to be more TNG-typical.

On the other hand, this change requires that the user has to clear browser cache to make css working after unistalling old and then installing new version!

Michał

Link to comment
Share on other sites

37 minutes ago, mjaro said:

mod languages are (to be*) corrected

If you need Dutch input, let me know!

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