Jump to content
TNG Community
JPT

rpt_pedigree.php improved

Recommended Posts

JPT

I modified rpt_pedigree.php a long time ago. Now I had issues with php8 and/or TNG 13. So I did a complete rework of my code.

While the base code is still in bad shape, at least you get some new features:

- If you input the starting number into the form it will attach correct individual count to each one, like powers of two.

- marriage date moved to the center between the spouses where possible, better readable

bugs:

- reduce the husband's box size if marriage date was moved. Any help apprechiated.

please tell me if you use it, as I usually don't get any feedback if my posts are useful to anyone.

 

rpt_pedigree.php

Share this post


Link to post
Share on other sites
Ken Roy

It might help if you posted your mod on the TNG Wiki, although new users have not been updating the Sites Using section of the mod pages since some of them perceive that section as simply examples, which of course does not help the mod developers

Share this post


Link to post
Share on other sites
RickM

Hey @JPT

D/loaded and tried your modified file.. I have the following error message on my Local site TNG v13.1.2 and PHP v8.0.12 up

Quote

Deprecated: Optional parameter $endspace declared before required parameter $boxformat is implicitly treated as a required parameter in D:\Dev_Sites\Malkins-NZ\Malkins-Gen-13\rpt_pedigree.php on line 614

Fatal error: Uncaught Exception: FPDF error: Some data has already been output, can't send PDF file in D:\Dev_Sites\Malkins-NZ\Malkins-Gen-13\tfpdf.php:274 Stack trace: #0 D:\Dev_Sites\Malkins-NZ\Malkins-Gen-13\tfpdf.php(1288): tFPDF->Error('Some data has a...') #1 D:\Dev_Sites\Malkins-NZ\Malkins-Gen-13\tfpdf.php(1224): tFPDF->_checkoutput() #2 D:\Dev_Sites\Malkins-NZ\Malkins-Gen-13\rpt_pedigree.php(93): tFPDF->Output() #3 {main} thrown in D:\Dev_Sites\Malkins-NZ\Malkins-Gen-13\tfpdf.php on line 274

Swapped the two parameters around produced a 1 page PDF but terribly laid out and some extraneous characters as well..

Worked fine on PHP v 7.4.9

Hope this helps..

Edited by RickM
Extra info

Share this post


Link to post
Share on other sites
fluffy82
On 5/2/2022 at 9:36 PM, Ken Roy said:

It might help if you posted your mod on the TNG Wiki, although new users have not been updating the Sites Using section of the mod pages since some of them perceive that section as simply examples, which of course does not help the mod developers

I think there are two issues with those lists...

  • there is no manual; I found out per chance that when you hover over the left extremity of the table, there is an option to add a row; if you just edit the page, or click on a cell or below the table or right click on it, it doesn't do anything. It took me weeks to stumble on that. So many people probably don't know how to add a line, and don't want to disturb anyone else asking to do it for them.
  • a bigger issue is that you need to add both the mod version and the TNG version; so with every single update or upgrade of a single mod or of TNG, you need to go through all your mods to modify those numbers; I'm using 53 mods and some people even more, so that's a hell of a job... Some mods have a link to the wiki in the mod manager for easy access, but some don't, so you first have to manually go look for them; I can imagine people don't want to do that, or just forget to do it.

 

EDIT: I was going to be a good boy and start adding mine to my mods... The process of entering the information also takes a lot of time... First entering your url, then click edit, then click edit text, exit the edit pop-up and go back to the field because where it says "edit text" you can't edit anything, change the text, click outside the field, double click on the next field you want to fill out, repeat. When everything is finished, you wait about a minute, twice, to get 2x the message "Invalid response from server."... It took me almost 5 minutes to add one user line. So you understand why I didn't do all 53 yet :)

Share this post


Link to post
Share on other sites
stores

I finally got around to adding my name the mods i use a couple days ago.

It took me most of a day... 1st i created a user page... https://tng.lythgoes.net/wiki/index.php/User:Stores which made it simpler. Then i clicked on the mods and added my name to the mod page. Plus, now i don't have to go back and update each mod page as i upgrade, i just update my user page and delete my name from mods i stop using.

Share this post


Link to post
Share on other sites
Chris Lloyd
2 hours ago, stores said:

I finally got around to adding my name the mods i use a couple days ago.

It took me most of a day... 1st i created a user page... https://tng.lythgoes.net/wiki/index.php/User:Stores which made it simpler. Then i clicked on the mods and added my name to the mod page. Plus, now i don't have to go back and update each mod page as i upgrade, i just update my user page and delete my name from mods i stop using.

great idea

Share this post


Link to post
Share on other sites
edglimited
5 hours ago, fluffy82 said:

I think there are two issues with those lists...

  • there is no manual; I found out per chance that when you hover over the left extremity of the table, there is an option to add a row; if you just edit the page, or click on a cell or below the table or right click on it, it doesn't do anything. It took me weeks to stumble on that. So many people probably don't know how to add a line, and don't want to disturb anyone else asking to do it for them.
  • a bigger issue is that you need to add both the mod version and the TNG version; so with every single update or upgrade of a single mod or of TNG, you need to go through all your mods to modify those numbers; I'm using 53 mods and some people even more, so that's a hell of a job... Some mods have a link to the wiki in the mod manager for easy access, but some don't, so you first have to manually go look for them; I can imagine people don't want to do that, or just forget to do it.

 

EDIT: I was going to be a good boy and start adding mine to my mods... The process of entering the information also takes a lot of time... First entering your url, then click edit, then click edit text, exit the edit pop-up and go back to the field because where it says "edit text" you can't edit anything, change the text, click outside the field, double click on the next field you want to fill out, repeat. When everything is finished, you wait about a minute, twice, to get 2x the message "Invalid response from server."... It took me almost 5 minutes to add one user line. So you understand why I didn't do all 53 yet :)

Tommy, there's a nice easy way, other than what you have described. Yes it can be frustrating with all the clicking etc. Like you, I stumbled across a simple method. Rather than hover over the left extremity, bypass that idea and go straight to the top of the page. After Login, you will see 4 tabs, Read, Edit, Edit Source and View History. Click on Edit Source, let it open, then "copy and paste" at the bottom, a section of already added "sites using this mod" and edit that data. Click save, wait for the I'm not a robot etc and your done. Easier than the other way of editing boxes..  Cheers Drew..

Share this post


Link to post
Share on other sites
fluffy82
33 minutes ago, edglimited said:

Tommy, there's a nice easy way, other than what you have described. Yes it can be frustrating with all the clicking etc. Like you, I stumbled across a simple method. Rather than hover over the left extremity, bypass that idea and go straight to the top of the page. After Login, you will see 4 tabs, Read, Edit, Edit Source and View History. Click on Edit Source, let it open, then "copy and paste" at the bottom, a section of already added "sites using this mod" and edit that data. Click save, wait for the I'm not a robot etc and your done. Easier than the other way of editing boxes..  Cheers Drew..

Ooooh I'll have to try that. As I suppose the table is built according to one template, it should even be possible to copy it across all mods, changing only the number of the mod version. That way you don't even have to change your url and name etc manually.

Share this post


Link to post
Share on other sites
edglimited
3 hours ago, fluffy82 said:

Ooooh I'll have to try that. As I suppose the table is built according to one template, it should even be possible to copy it across all mods, changing only the number of the mod version. That way you don't even have to change your url and name etc manually.

It should work across all Mod Pages, where you have to enter you're Website as using that Mod. (don't quote me on that). There were a couple of Mod Pages I did see, that used a slightly different layout, (as below ) but that could have been from the early day's, before someone went "hang on, try this, it looks better".

|-
| [http://thatwebsite.com/ thatwebsite]
| that bloke
| Public/Private - T17 customised
| 10.1.3.2g/12.0.2 <---- Mod / Tng version
| En
|-

With the majority of Mod Pages, (it seems) as long as you have the pipes above and below, the correct source code as seen here, with the closing bracket, you should be ok. (Just an fyi, if anyone isn't sure, what a pipe is, it's the vertical line that looks like a lower case l, it's not an l). It resides on my keyboard, on the button with the backslash. Depending on your Computer and keyboard layout, it maybe different, as Tom pointed out in the post below...

|-
| [http://www.mywebsite.com.au/ My Website] <---- website link / name of website
| [[User:Edglimited|Drew McClenaghan]] <---- user wiki name / real name
| Private <---- website option, public or private
| 12.0.0.0 <----- mod version
| 12.3 <---- tng version
| En <---- language
|}

Edited by edglimited
keyboard placement correction

Share this post


Link to post
Share on other sites
fluffy82
1 minute ago, edglimited said:

It should work across all Mod Pages, where you have to enter you're Website as using that Mod. (don't quote me on that). There were a couple of Mod Pages I did see, that used a slightly different layout, (as below )but that could have been from the early day's, before someone went "hang on, try this, it looks better".

|-
| [http://thatwebsite.com/ thatwebsite]
| that bloke
| Public/Private - T17 customised
| 10.1.3.2g/12.0.2 <---- Mod / Tng version
| En
|-

With the majority of Mod Pages, (it seems) as long as you have the pipes above and below, the correct source code as seen here, with the closing bracket, you should be ok. (Just an fyi, if anyone isn't sure, what a pipe is, it's the vertical line that looks like a lower case l, it's not an l). It normally resides on your keyboard, on the button with the backslash.

|-
| [http://www.mywebsite.com.au/ My Website] <---- website link / name of website
| [[User:Edglimited|Drew McClenaghan]] <---- user wiki name / real name
| Private <---- website option, public or private
| 12.0.0.0 <----- mod version
| 12.3 <---- tng version
| En <---- language
|}

Already did about 20 tonight, it worked :)

Share this post


Link to post
Share on other sites
fluffy82
2 minutes ago, edglimited said:

It normally resides on your keyboard, on the button with the backslash.

That depends on where you're from. On our keyboards, it's a third option on the key with "1" and "&" ;)

Share this post


Link to post
Share on other sites
edglimited
Just now, fluffy82 said:

That depends on where you're from. On our keyboards, it's a third option on the key with "1" and "&" ;)

I was just about to edit my comment about that, before you posted. 😁

Share this post


Link to post
Share on other sites
edglimited
3 minutes ago, fluffy82 said:

Already did about 20 tonight, it worked :)

You're on a roll. If in doubt, follow the code used on the Mod Page. Most pages should be identical, there will be the odd one.

Share this post


Link to post
Share on other sites
tngrlkrz

I may have mentioned this before, but another option for an up-to-date mods used list is to use the current wiki version of the Mod_Manager_Compare mod.  That is, if it runs on your site.  I remember from a prior thread that for some unknown reason, some users have indicated it doesn't work for them.  Be aware is still has many warnings for sites using PHP 8.x that need to be fixed.  But I don't run it often, nor should you, because of server processing it requires.  I only run when changes to mods installed for various reasons. You do have to set the URL options appropriately however.  But it's great, I don't have to do any typing to produce and keep it updated.  I  also use this link in the 'sites using this mod' section on the wiki as well, so less maintenance there as well.

Roots & Relatives Mod Listing

This is still working on TNG 13.1.2.

Share this post


Link to post
Share on other sites
Ken Roy

Ron,

I suspect that you have a personal version of Robin's Mod Manager Compare mod since I never could get the published version of the mod to create the listing you show on your site.

Besides that mods does nothing to update the TNG Wiki pages to indicate that a user is using the mod, which is the real issue here.

Several users keep asking what mods they were using that provided given functions but they never updated the TNG Wiki to add their site to the Sites Using table in the first place.

A big thank you to all of your who have recently taking the time to update the TNG Wiki Sites Using table in the mod articles.

Share this post


Link to post
Share on other sites
Ken Roy
22 hours ago, edglimited said:

|-
| [http://www.mywebsite.com.au/ My Website] <---- website link / name of website
| [[User:Edglimited|Drew McClenaghan]] <---- user wiki name / real name
| Private <---- website option, public or private
| 12.0.0.0 <----- mod version
| 12.3 <---- tng version
| En <---- language

The |-  is the MediaWiki syntax that indicates a table row, the equivalent of the HTML <tr>

the | is the MediaWiki syntax for the table column, the equivalent of the the HTML <td>

There are essentially 2 different table formats.  The newer format uses separate cells for the mod version and TNG version. 

The easiest way to add your site to the Site Using table is to

  1. use the Table of Contents
  2. click on the link for the Sites Using table
  3. Click on the Edit Source tab
  4. select and copy the last entry in the table (do not copy the end of table marker |}
  5. and paste the copied table row before the |} which is the MediaWiki syntax for end of table </table>
  6. edit it to show your site information 

If you edit and save the Sites Using table section, the MediaWiki will automatically indicate the change for that section name

Note that you should not need to update the tables for each TNG release if the mod did not change for that release.

Share this post


Link to post
Share on other sites
theKiwi
20 hours ago, tngrlkrz said:

I may have mentioned this before, but another option for an up-to-date mods used list is to use the current wiki version of the Mod_Manager_Compare mod.  That is, if it runs on your site.  I remember from a prior thread that for some unknown reason, some users have indicated it doesn't work for them.  Be aware is still has many warnings for sites using PHP 8.x that need to be fixed.  But I don't run it often, nor should you, because of server processing it requires.  I only run when changes to mods installed for various reasons. You do have to set the URL options appropriately however.  But it's great, I don't have to do any typing to produce and keep it updated.  I  also use this link in the 'sites using this mod' section on the wiki as well, so less maintenance there as well.

Roots & Relatives Mod Listing

This is still working on TNG 13.1.2.

Ron

I've struggled on and off with this on my site - I've never been able to get it to display the way as your site does - eg

http://lisaandroger.com/tng/rrmodcompare_report.php?power=basic&amp;cachemethod=3&amp;sb=filename&amp;aformat=full&amp;statushilite=1&amp;b1=0

or the URL you're using, changed for my site

http://lisaandroger.com/tng/rrmodcompare_report.php?sb=filename

And it never seems to find what is needed to fill out all the rows...

image.png

If it would work it would fantastic, but...

Roger

Share this post


Link to post
Share on other sites
tngrlkrz

Roger,

Have you tried running it without other mods installed?  I can only think it must be some other mod involved. I am using nearly 100 mods, so it's likely not one of those.  I am able to run this on a clean TNG 13.1.2 testbox successfully with no other mods installed.  Is it possible there is some database difference generated by a mod I am not using that is throwing a wrench in the Mod Manager Compare mod?  If one knew which one, you could maybe still run the compare mod by uninstalling that mod first, then reinstalling it.  Better yet, if one knew which mod, perhaps the issue could be fixed.

And of course, as I mentioned, there are PHP 8.x warnings to be fixed yet as well.  Hoping Robin finds time to do that.

A lot of assumptions in my explanation, I guess.

Maybe if we compared our list of mods installed to see what mods you have that I do not, one could begin there to narrow it down?

 

Share this post


Link to post
Share on other sites
theKiwi

Ron - I've wondered if it's a PHP version problem - my server is on PHP 5.6.x still, so I hadn't worried too much about it until I get my new server running, or migrate all the sites running on my server here at home over to Simply Hosting - neither idea is jolting me in to action, so apathy wins out.

I've just tried with all Mods uninstalled except the Mod Manager Compare Mod - no difference.

You can see my list of Mods at the link I'd posted above.

I'm about to head away for 8 days, so won't have any time to think about this  at least over the next 8 days.

Roger

Share this post


Link to post
Share on other sites
Ken Roy

Ron,

Maybe some of us need a basic tutorial on how to generate the report the way you and how to save it so it is not run everytime a user wants to access your website to see what version of the mod you are using.

I had not attempted to use the Robin's mod since TNG 12 when I was never able to get it to complete.  Now  while the report runs, the column sequences are not the same as you show as you can see

 

Mod_Comparison_report_2022-05-16_140242.png

And more importantly on the default I do not see any option that allows saving the report to a file such that it does not need to be run every time. 

Edited by Ken Roy
add more information

Share this post


Link to post
Share on other sites
Ken Roy

Ron,

I figured it out and updated Robin's very cryptic example for the first My report only on the My Mods Reports section of the Mod Manager Compare

Maybe Robin will take the hint and update the other examples accordingly.  I currently do not have the time

Looks like he might have fixed the problems I was originally encountering.   Report does run but generates a slew of PHP errors under PHP 8.1.5

Edited - Mod Manager Compare generates the PHP errors under PHP 7.4 as well.  So use at your own risk

Edited by Ken Roy
add more info

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×