Jump to content
TNG Community
theKiwi

Search for Connections Mod

Recommended Posts

manofmull

Ron

Hope you find the culprit assuming there is one.

I'd like to change colours too.

Share this post


Link to post
Share on other sites
Ken Roy

Ron and Michel,

Does Laragon not allow the browser to do a forced reload to get new css files.

Michael and others,

To change the colors in mytngstyle.css you need to add something like the following in your template mytngstyle.css

/* Connections Mod style overrides */
#pathlist {
	--bgr: #f8f8f8; /* background of main cell (and invisible box border) */
	--bg1: #fff; /* background of person box on hover */
	--bg2: #dbedff; /* background of person box */
	--cl1: #bba28c; /* not used */
	--cl2: #111; /* text in box colour */
}

I used a private mod to install my changes to template20/css/mytngstyle.css

Edited - I use Color Schemer to find the colors I want.  There is a link to the color schemer in Admin > Setup > General Settings in the DNA test section

Edited by Ken Roy
add link to Color Schemer

Share this post


Link to post
Share on other sites
tngrlkrz

Ken,

Yes, forced reload and cache clearing works fine...normally.  I did finally get genstyle and default colors to take properly when I uninstalled *all* mods.  Not sure why that was necessary.

Michael,

I wasn't changing colors...the default colors weren't being activated...so they were transparent.

Edit:Update...had same issue on remote site as on local site: for some mysterious reason, the mod's genstyle.css entries only kick in if I uninstall all mods first and then reinstall them, including the Connections mod.  I have no clue why since Michals' tags should be unique, but appears to be a css precedence issue of some sort. (and in all cases, I always clear cache in browsers).

Share this post


Link to post
Share on other sites
manofmull
1 hour ago, Ken Roy said:

Ron and Michel,

Does Laragon not allow the browser to do a forced reload to get new css files.

Michael and others,

To change the colors in mytngstyle.css you need to add something like the following in your template mytngstyle.css


/* Connections Mod style overrides */
#pathlist {
	--bgr: #f8f8f8; /* background of main cell (and invisible box border) */
	--bg1: #fff; /* background of person box on hover */
	--bg2: #dbedff; /* background of person box */
	--cl1: #bba28c; /* not used */
	--cl2: #111; /* text in box colour */
}

I used a private mod to install my changes to template20/css/mytngstyle.css

Edited - I use Color Schemer to find the colors I want.  There is a link to the color schemer in Admin > Setup > General Settings in the DNA test section

Ken

Many thanks, works a treat. Image below for template 18. Light-blue background exactly same as tab colour.

Ron/ I misunderstood your last!

conn.jpg

Share this post


Link to post
Share on other sites
JPB

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

Share this post


Link to post
Share on other sites
mjaro

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! 🤬

Share this post


Link to post
Share on other sites
JPB

I have no preference.

Maybe the small dot is a little too inconspicuous?

 

Share this post


Link to post
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

Share this post


Link to post
Share on other sites
mjaro
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!

Share this post


Link to post
Share on other sites
tngrlkrz

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

Share this post


Link to post
Share on other sites
mjaro
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?

Share this post


Link to post
Share on other sites
mjaro
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 :) 

Share this post


Link to post
Share on other sites
tngrlkrz
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

 

Share this post


Link to post
Share on other sites
tngrlkrz
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.

Share this post


Link to post
Share on other sites
mjaro
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 :(  

Share this post


Link to post
Share on other sites
mjaro
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

Share this post


Link to post
Share on other sites
mjaro
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. :) 

Share this post


Link to post
Share on other sites
tngrlkrz
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

Share this post


Link to post
Share on other sites
manofmull
55 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 :) 

Personally, I like the container.

From my pic above, the container blue offsets against the box colour.

At least please make this an option to keep or not.

Share this post


Link to post
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

Share this post


Link to post
Share on other sites
Brett
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.

Share this post


Link to post
Share on other sites
mjaro

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ł

Share this post


Link to post
Share on other sites
Ken Roy

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

Share this post


Link to post
Share on other sites
mjaro
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 :(

Share this post


Link to post
Share on other sites
Ken Roy

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

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

×