Michel KIRSCH 0 Report post Posted March 12 4 hours ago, tngrlkrz said: But perhaps I misunderstood your procedure you have understood well. And I can assure you that you will save time and have less risk of mistakes. Just be careful not to forget to copy a piece of code into the cfg! Quote Share this post Link to post Share on other sites
Michel KIRSCH 0 Report post Posted March 12 51 minutes ago, mjaro said: Is it a good practice of making a complete backup of the clean installation to be able to easy restore it including connected database Why not? I sometimes make a "clean" local copy from my live version. First you have to uninstall the mods of the live site and then replace the local files with those of the live site. Be careful with the config files ! Especially the config.php file if the data of connections to the database are not the same... After that, you just have to make a backup of the tables of the living site, transfer the .bak files and restore the tables on the local site. You can also work from a full version of TNG... Michel Quote Share this post Link to post Share on other sites
tngrlkrz 0 Report post Posted March 12 2 hours ago, mjaro said: a screen how it looks? Logged in as 'admin', or any other user with 'living' rights. Could someone else test v5 and tell me what they are seeing? This is on supposed 'clean' sites. HTH. Quote Share this post Link to post Share on other sites
Ken Roy 0 Report post Posted March 13 Ron, I was going to say that I am not seeing that behavior. However after I uninstalled v13.0.3.5 and installed v13.0.0.4b to verify that no photos was my problem for not installing my Default Photo Path mod, when I uninstalled v4b and re-installed v5 I am now see that same behavior as you are. What is weird is that the default photo is shown for a living person but not the name. Quote Share this post Link to post Share on other sites
tngrlkrz 0 Report post Posted March 13 1 hour ago, Ken Roy said: I am now see that same behavior as you are Thanks Ken...glad to know it's not just my system. I agree, if a rights issue, one would expect the photo to have been blocked as well. But strangely Michal has told be earlier when he was working on v5 that his sites were working fine. Quote Share this post Link to post Share on other sites
Ken Roy 0 Report post Posted March 13 Michal, there is also another issue in v5 in that charts show compacted when no default image is specified in the Admin > Setup > General Settings > Media section and the Edit option for the mod connections-form.php: $compactBoxopt is the default false Note that these are only external behavior options on my WampServer local host and that I have not looked at your code Quote Share this post Link to post Share on other sites
tngrlkrz 0 Report post Posted March 13 31 minutes ago, Ken Roy said: charts show compacted when no default image That is right, Ken. I noted this to Michal earlier outside the forum. The boxes without thumbs will be compacted, unless there is a connection on the same row to a person who has a thumb. However, I didn't find it detracts from the chart, just an expected behavior of no thumbs and the chart building code. Quote Share this post Link to post Share on other sites
Ken Roy 0 Report post Posted March 13 Sorry Ron, but personally, I do not want my chart boxes without thumbs to be compacted. I uninstalled v5 and have gone back to v4b. 2 different size boxes do not look good on a chart. Quote Share this post Link to post Share on other sites
tngrlkrz 0 Report post Posted March 13 Ken, for clarification, I meant to say it doesn't detract from the functionality of the chart, but for cosmetic appearance, I do agree with you. More important to me in v5 though is to be able to see living people in the charts if the user has those rights. Quote Share this post Link to post Share on other sites
mjaro 0 Report post Posted March 13 On 3/11/2021 at 3:54 PM, Ken Roy said: I would like to see an option that restricts the Connections to logged in users Ken, do you mean that the default TNG login checking is not working or is not enough?!? At the beginning of connections.php and connection-form.php I include tng_begin.php As far as I understand it checks if login is required: !isset($nologin) || !$nologin and calls checklogin.php (unless changelanguage, newacctform, addnewacct,, suggest, login is requested). How do you add an additional login checking? Michał P.S. I start suspecting that here is the reason of "mysterious" errors I cannot reproduce. In my site I absolutely cannot enter neither connections nor connections-form (and cannot call them via url, neither with- or without get parameters). Maybe I miss a configuration option I should take into account. Quote Share this post Link to post Share on other sites
mjaro 0 Report post Posted March 13 On 3/12/2021 at 2:10 AM, Ken Roy said: on my web accessible sandbox 22 hours ago, Michel KIRSCH said: Be careful with the config files Ken, Ron, Michel, you all mention -from time to time- about the testing methods and environment. There are also articles and guides for Administrator and Programmer in the TNG Wiki - however, most of them are several years old, and I don't see any discussion there. Is there another place where these topics are discussed in the context of TNG? Quote Share this post Link to post Share on other sites
mjaro 0 Report post Posted March 13 8 hours ago, Ken Roy said: 2 different size boxes do not look good It could be improved quite easy. This is stuck on my todo list... Let me explain: the diagram is made purely with html/css rather than graphics, and your browser decides what are sizes of the table cells. This comes from the beginning of my software when it was completely independent on TNG. Now I think that I should rather turn to the standard TNG boxes... Where to put this on the todo?... Quote Share this post Link to post Share on other sites
Michel KIRSCH 0 Report post Posted March 13 (edited) 1 hour ago, mjaro said: Is there another place where these topics are discussed in the context of TNG? Not to my knowledge... It is difficult to give advice because each programmer has his own habits. But giving tips... Why not? I would see this rather in wiki pages: Coding tips or something else Michel EDIT : old tip : Edited March 13 by Michel KIRSCH Quote Share this post Link to post Share on other sites
Ken Roy 0 Report post Posted March 14 3 hours ago, mjaro said: Ken, do you mean that the default TNG login checking is not working or is not enough?!? At the beginning of connections.php and connection-form.php I include tng_begin.php Michal, As far as I know the checklogin.php only sets up the variables for what the user is allowed to do if logged in and the $nologin flag is used to bypass the login check for sites that require login but want to make certain pages available to all visitors. To restrict a function to logged in users, one must check the $currentuser variable. In my private mod, I added the following %target:genlib.php% %location:% #### Connections mod - inserting new tab #### $choices .= doMenuItem( $nexttab++, $connectionsform_url . "primaryID=$entityID&tree=$tree" , "next", $text['connections'], $currpage, "connections" ); # mja %end:% %insert:before% if ($currentuser) { // restrict to logged in users %end:% %location:% #### Connections mod - inserting new tab #### $choices .= doMenuItem( $nexttab++, $connectionsform_url . "primaryID=$entityID&tree=$tree" , "next", $text['connections'], $currpage, "connections" ); # mja %end:% %insert:after% } // restrict Connections to logged in users %end:% If no one else wants to restrict your Connections mod to logged in user, I have not problem including the above in my private mod that changes the colors and eliminates the background to the charts. The TNG Wiki has some articles in the How to Code and Programmer categories. While some of the article might be old, they might still apply. Quote Share this post Link to post Share on other sites
theKiwi 0 Report post Posted March 14 I've installed version 13.0.0.5 on my main site, and there is something not working with the rights calculations... When I'm signed into my site as Admin, I see this but since I'm the site's only Admin, I expect to see my Dad's name and my name in those last two "Living" boxes? Roger Quote Share this post Link to post Share on other sites
Ken Roy 0 Report post Posted March 14 Roger, That is exactly the issue that Ron and I both reported. I have not had a chance to look at the code, but suspect that it is not using the TNG functions to determine what a user is allowed to do or view. If you reverse the connection search to look for yourself as the starting point you will see your default photo but the word Living instead of your name. Quote Share this post Link to post Share on other sites
mjaro 0 Report post Posted March 14 10 hours ago, Ken Roy said: In my private mod, I added the following OK, let me tell in my words: The site is public. The goal to not display the tab (even if you allow non-logged to see other tabs and getperson itself). Without this restriction bots can call connections-form (and maybe could even reach connections.php setting a person2 and doing server consuming calculations). Is this the scenario you want to be protected? If so, it make sense to include your changes as the standard behavior of the mod. Alternative could be to not to hide the tab but rather protect connection.php against non-logged. Thus the visible tab could attract users(?). Any of the two (or both?) I can introduce to the code to not require additional mod. Michał NB. Of course, I have read many (most) articles and guides from Wiki, but I may not understand all of them well. My intention was to use default TNG functions for access control, also when reading person's data. In v5, I rewrote the code to follow the TNG standard more precisely. Unfortunately, I introduced even more errors I should correct... Quote Share this post Link to post Share on other sites
mjaro 0 Report post Posted March 14 17 hours ago, Michel KIRSCH said: EDIT : old tip I have studied multiple of your tips (or script samples, or just mods) and used to use them (without mentioning the copyright ) Quote Share this post Link to post Share on other sites
Ken Roy 0 Report post Posted March 14 1 hour ago, mjaro said: OK, let me tell in my words: The site is public. The goal to not display the tab (even if you allow non-logged to see other tabs and getperson itself). Without this restriction bots can call connections-form (and maybe could even reach connections.php setting a person2 and doing server consuming calculations). Is this the scenario you want to be protected? Michal, That is exactly the scenario, but then not everyone might have a family where they have 9 different connection paths between themselves and their spouse One of the reasons I cannot use the Relationship to Site Owner Mod nor the Relationship Display Mod. My site has been open with only living and private being restricted for the last 15 years I have used TNG. I am not likely to attract any new user although I have found a lot of my default photos in other peoples trees on Ancestry. As I indicated, you can just leave your code as is, unless other users request that you add that as an Edit Option. The only reason for locking that down is that I am continually exceeding my hosting service's MySQL execution time but am not receiving any emails from them on that issue. Quote Share this post Link to post Share on other sites
mahesh 0 Report post Posted March 14 20 minutes ago, Ken Roy said: That is exactly the scenario, but then not everyone might have a family where they have 9 different connection paths between themselves and their spouse Only 5 for me. I am not really funderstanding all the inputs in this thread here, but I am extremely happy with the privacy rules set in 13.03.4a which, I think, respects TNG privacy settings. Just to say that I am really enjoying following this thread. Thank you. Quote Share this post Link to post Share on other sites
tngrlkrz 0 Report post Posted March 15 19 hours ago, mjaro said: Alternative could be to not to hide the tab but rather protect connection.php against non-logged. Thus the visible tab could attract users(?). Michal, That is the approach I take; display the tab to attract users with a feature that doesn't work unless the user registers. For my site, using the Restrict_Access_mod which, with small code added in a php script disables it to visitors. For example, in connections-form.php, at top of file: include($cms['tngpath'] . "checklogin.php"); include($cms['tngpath'] . "$mylanguage/text.php"); if( ! $currentuser ) { $showguest=0; include("extensions/noaccess.php"); exit; } Then the 'connections' tab will appear in the menu, but clicking it tells the visitor the tab is available only if they register. Quote Share this post Link to post Share on other sites
theKiwi 0 Report post Posted March 15 On 3/14/2021 at 12:11 PM, mjaro said: If so, it make sense to include your changes as the standard behavior of the mod. Alternative could be to not to hide the tab but rather protect connection.php against non-logged. Thus the visible tab could attract users(?). Any of the two (or both?) I can introduce to the code to not require additional mod. If this is implemented, it needs to be an option - I'm happy with people finding it and playing with it. I have user registrations (apart from my Admin account) on any of my TNG sites, and so telling someone they have to log in, or create an account to log in is not helpful to me. Roger Quote Share this post Link to post Share on other sites
Ken Roy 0 Report post Posted March 15 Michal, I agree with Roger that implementing my private mod or Ron's private mod to your Connections mod would need to be an option. However it might be better to leave your current mod as is and then publish my private mod in your wiki mod article, for those who want to restrict access. Note that I only require login for cousins who want to see their living relatives, so new requests have to provide a parent or grand-parent connection to a person already in my database. We all have different situations and not everyone will have families that migrated together like my French-Canadian and Acadian family where spouse might be distant cousins from the late 1600 - early 1700. Quote Share this post Link to post Share on other sites
tngrlkrz 0 Report post Posted March 15 I think that any restriction to the connection mod be left externally with either a public or a private mod. That's more or less what I was suggesting by referring to the Restrict Access mod. However, there are several mods with have Edit Option restrictions to 'admin' only, but this case is a bit broader to disallow only visitors. Ken you mention 'publish your private mod' in the wiki mod article, which seems contradictory. Which mod are you referring to, something posted earlier? Quote Share this post Link to post Share on other sites
Ken Roy 0 Report post Posted March 15 1 hour ago, tngrlkrz said: Which mod are you referring to, something posted earlier? Ron, My private mod that I posted in this thread Quote Share this post Link to post Share on other sites