Jump to content
TNG Community
theKiwi

Search for Connections Mod

Recommended Posts

tngrlkrz

Michal,

This doesn't seem to impact results for me, but another include statement  in the function calcDigits fails with a warning in connections-lib.php:

    include($subroot . "config.php"); # Indi/Fam prefixes are inside

13-Apr-2021 21:16:55 UTC] PHP Warning: include(): Failed opening 'config.php' for inclusion (include_path='.;R:/laragon/etc/php/pear') in R:\Laragon\www\tng13c\connections-lib.php on line 24
[13-Apr-2021 21:16:55 UTC] PHP Warning: include(config.php): failed to open stream: No such file or directory in R:\Laragon\www\tng13c\connections-lib.php on line 24

 

Share this post


Link to post
Share on other sites
mjaro
35 minutes ago, tngrlkrz said:

13-Apr-2021 21:16:55 UTC] PHP Warning: include(): Failed opening 'config.php' for inclusion (include_path='.;R:/laragon/etc/php/pear') in R:\Laragon\www\tng13c\connections-lib.php on line 24
[13-Apr-2021 21:16:55 UTC] PHP Warning: include(config.php): failed to open stream: No such file or directory in R:\Laragon\www\tng13c\connections-lib.php on line 24

Ron, please check if it disappears if you insert

include("subroot.php");

just before line 24.

($subroot should be empty, and I guess it is not set to any value which makes the Laragon angry).

Thanks,

Michał

Share this post


Link to post
Share on other sites
tngrlkrz
50 minutes ago, mjaro said:

include("subroot.php");

just before line 24.

No, that had no effect.   I misunderstand when you say '$subroot should be empty, but subroot.php always exists and has value.  As to Laragon, that's my local host, and this warning occurs on my live and test websites as well.  I notice in other uses it is after a tng_begin statement.

Share this post


Link to post
Share on other sites
Michel KIRSCH

$subroot, Ron, not subroot.php...

Good night !

 

Michel

Share this post


Link to post
Share on other sites
tngrlkrz
8 minutes ago, Michel KIRSCH said:

$subroot, Ron, not subroot.php...

Yes, that's what I was using, not 'subroot.php'.  Without the $, a fatal error results.

    global $tngconfig;
    include ("$subroot.php");
    include($subroot . "config.php"); # Indi/Fam prefixes are inside

Share this post


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

I misunderstand when you say '$subroot should be empty, but subroot.php always exists and has value

Ron,

$subroot is a variable that TNG sets based on the value stored in your Setup > General Settings > Config Path.  If you open subroot.php in a text editor  it defaults to

$tngconfig['subroot'] = "";
$subroot = $tngconfig['subroot'] ? $tngconfig['subroot'] : "";

so if you cannot access your site because your Config Path is not correct, you can set the value to blanks in order to be able to get your Admin > Setup screen to fix it.

Maybe instead of the include you need to add $subroot to your global line.

Share this post


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

so if you cannot access your site because your Config Path is not correct,

I realized later after my post that $subroot is a variable, and I have had no issues accessing anything on the site.  I was only trying to help Michal with the include warning, which wasn't impacting my site.

But you are right, Ken.  Adding it to global removed the warning.  Michal can update his mod.

 

Share this post


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

you need to add $subroot to your global line.

Thanks Ken for explanation! (I always wondered how it works)

Thanks Ron for testing!

Michał

Share this post


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

documented the subroot.php in the Troubleshooting category

Yes, and this incident related more to coding or programming, i.e., having the global definition of the variable before the 'include' statement.

Share this post


Link to post
Share on other sites
Ken Roy

Michal,

I do not know what you  changed in the TNG Wiki version you posted, but my overrides to English-UTF8/cust_text.php for

$text['pri'] = "<span style='color:darkblue;'>&#9658;</span>&nbsp;"; #9733 big star, #9679 circle, #9658 right pointer
$text['fin'] = "&thinsp;<span style='color:darkblue;'>(&#9668;)</span>"; #9668 left pointer

no longer work after I download and install your TNG Wiki posted version versus what you had posted in the forum

Edited:  How do I get my overrides for the arrow pointer colors without having to modify your files with my mod.

 

Edited by Ken Roy
ask a question

Share this post


Link to post
Share on other sites
Ken Roy

OK I figured it out.  The posted v13.0.3.4f version of the mod no longer includes

@include($mylanguage."/cust_text.php");

in the mod languages/English-UTF8_custtext.php file, so overrides added to the cust_text.php files to override the inline <span style='color:tomato;'>  no longer work.

Because this mod uses its own languages folder rather than adding its custom text to the language cust_text.php files, the override options that were put in place with the Mod Guidelines in TNG v12 where users could code their own text overrides after the

%location:%
//Mods should put their changes before this line, local changes should come after it.
%end:%

%insert:after%

do not apply. 

I for one will be glad when the tweakng of this mod stops so that one can define private mod overrides to the mod  :)

Share this post


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

the mod no longer includes


@include($mylanguage."/cust_text.php");

Ken, sorry, I've had problems with this include path which caused crashes in some environments. I couldn't understand why it happened and thus decided to remove it until I know better how it works. If it worked well for you, please add the include (again) to the mod's custtext to make your private mod working. (btw the "regular" cust_text is then included for the second time - which is not error, but strange...) I don't put all texts in the recommended way because this would force me to put all the bunch of texts into the cfg file which is still dynamic and would be hard to editing. :( 

Michał

Share this post


Link to post
Share on other sites
Ken Roy

No problem Michal,

It is difficult to support everyone's environments.

As I said, I will be glad when you are no longer tweaking so we can figure out how to do our own overrides.   I may just create to Private mod override to directly change your inline style definition, rather than include the line your took out.

I use the following approach in the Census Plus International mod. 

1 - copy the cp_text_English file from the censusplus_v folder to both the English and English_UFT8 folder

2 - copy the cp_text_French file to the French_UTF8 folder (I use the US International keyboard to key the accents and save the file as UTF-8 encoded without BOM

3 - use the following include for the cp_text.php file so that if I do not provide the cp_text_lang file it will bring in the English file

if( file_exists( "$mylanguage/cp_text.php" ) ) {
   include("$mylanguage/cp_text.php");
}
else {
   include("languages/English-UTF8/cp_text.php");
}

I have not tested whether I can override the cp_text.php variables in cust_text.php

 

Share this post


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

I have not tested whether I can override the cp_text.php variables in cust_text.php 

Michal,

It does not appear that I can override my cp_text.php  variables in cust_text.php 

The best approach is most likely to create my private mod to change the color directly in your mods\connections_4f_forum\languages\English-UTF8_custtext.php file

Share this post


Link to post
Share on other sites
MichaelM

To Michal, the author of this mod:

The Find-Connections-Mod works fine on my Website and it is a big enrichment.

ThankYou from Germany

Michael

Share this post


Link to post
Share on other sites
mjaro
3 minutes ago, MichaelM said:

To Michal, the author of this mod:

The Find-Connections-Mod works fine on my Website and it is a big enrichment.

ThankYou from Germany

Michael

Nice to read it 😊 Thank you! 

Michał

Share this post


Link to post
Share on other sites
theKiwi

Hi Michal

I've just now got round to installing version 4f to my site, and made one change (apart from my changes for colour and font...

The two arrows you've chosen are oddly not the same height as designed apparently, but this

▶◀

are closer to being the same height, although they aren't the same either which is hard to understand - one should be the mirror image of the other?!.

They are &#9654; and &#9664; from this page https://www.compart.com/en/unicode/block/U+25A0

Cheers

Roger

 

Share this post


Link to post
Share on other sites
tngrlkrz

Roger,

Maybe we're splitting hairs, but these enlarged (the mod defaults) arrows look same height to me: (Chrome)

image.png.1c1879e1828b5c71e03c79764931ceab.png

&#9658 and &#9668

Ron

 

 

Share this post


Link to post
Share on other sites
theKiwi

Must be a browser thing perhaps? This is what I see in Safari on Mac OS - clearly the right pointing arrow is bigger than the left pointing arrow
 

image.png

This is what I see for Firefox

image.png

When I look at the page of samples https://www.compart.com/en/unicode/block/U+25A0 in Safari the shapes are different sizes slightly for left and right - the triangles and the pointers, and when I look in Firefox the size discrepancy seems even greater.

Roger

Share this post


Link to post
Share on other sites
tngrlkrz

Must be Safari and/or  Mac OS  , since in this snapshot on Windows, the upper pair is chrome, the lower is firefox.  The difference in FF is barely perceptible to my aging eyes.  Zoomed to 500%.  

image.png

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

×