bryanlewis Posted May 28, 2020 Report Share Posted May 28, 2020 I have a fresh install of TNG 12.3 with the Regroup Person Profile mod installed. It does almost all of the customization I would like, with the exception that I would prefer to have the "Family" section appear before the "Parents" section. I know enough PHP to be dangerous, so I tried to tweak on it myself, but I kept messing up the page (thankfully made backups). Either I keep getting a duplicate copy of the Parent section or multiple sections disappear. I guess I am not totally understanding the logic of how the various sections are built in the getperson.php file. Since Regroup Person makes some not trivial changes to getperson.php, I think I need some Regroup Person specific help here. Sample Page, currently with Parents first (but I want Family first): https://genealogy.lewisfamily.us/getperson.php?personID=I10&tree=lewisbratti Thanks, Bryan Quote Link to comment Share on other sites More sharing options...
XerxX Posted May 29, 2020 Report Share Posted May 29, 2020 Hi Bryan, I've done the same thing and when the parents and the family are married and there is a note in the Family wedding date it appears in the Parent's wedding too. (Or maybe it is the reversed - I don't remember because it was a long time ago I wrote this MOD) I don't know why it does that but my solution was to remove thr Parent's wedding block. The move of blocks and the prevention of data is like this - in a MOD: 1) Remark the whole block "// do parents" (down to before "// do marriages") SImply enclose it in /* ... */ 2) Insertt a new block "// do parents" before "$persontext .= endSection("info");" BUT this inserted block ALSO contains these remarked lines /* setEvent( array( "text"=>$text['married'], "fact"=>$stdexf['MARR'], "date"=>$parentrow['marrdate'], "place"=>$parentrow['marrplace'], "event"=>"MARR", "entity"=>$parentrow['familyID'], "type"=>"F", "nomap"=>1 ), $parentrow['marrdatetr'] ); setEvent( array( "text"=>$text['divorced'], "fact"=>$stdexf['DIV'], "date"=>$parentrow['divdate'], "place"=>$parentrow['divplace'], "event"=>"DIV", "entity"=>$parentrow['familyID'], "type"=>"F", "nomap"=>1 ), $parentrow['divdatetr'] ); */ That will prevent the wedding from appearing in the Parent's section AND it will also help MM to distinguish the two blocks ("not unique") It's a huge muti-purpose MOD so I hope my description helps. You can see the result at my site https://xerxx.se - any person [EDIT: Married with parents ] will show the re-arrangement. (and then some ) Good luck! Erik Quote Link to comment Share on other sites More sharing options...
bryanlewis Posted May 29, 2020 Author Report Share Posted May 29, 2020 Thanks Erik. I will play around with it some more and see if I can get it working. Quote Link to comment Share on other sites More sharing options...
bryanlewis Posted May 29, 2020 Author Report Share Posted May 29, 2020 It turned out to be simpiler that I thought. After looking at Erik's suggestions and digging back into the getperson.php file again, I discovered this line put in by Regroup Person: echo "<div id=\"getperson\">$basictext $parenttext $marriagetext $othertext $persontext</div>\n"; It was as easy as swapping the order of the variables to: echo "<div id=\"getperson\">$basictext $marriagetext $parenttext $othertext $persontext</div>\n"; So $marriagetext came before $parenttext. And voila! Bryan Quote Link to comment Share on other sites More sharing options...
Ken Roy Posted May 29, 2020 Report Share Posted May 29, 2020 Bryan and Erik, If you modify original mods, I would recommend that you save them in your mods folder with a different name and possibily a %private: note added in the cfg file to indicate what you changed so you can re-install it easily when you upgrade to a new TNG version. Memory plays a trick on us as we get older Quote Link to comment Share on other sites More sharing options...
marcirish Posted May 30, 2020 Report Share Posted May 30, 2020 I made the same change as did Bryan. It would be cool if we could select the order we want the sections to display in the mod as an option. Thanks. Quote Link to comment Share on other sites More sharing options...
bryanlewis Posted May 30, 2020 Author Report Share Posted May 30, 2020 Agreed marcirish. It seems like it would be a fairly straight forward config option to add the admin web interface. Quote Link to comment Share on other sites More sharing options...
Robin Richmond Posted May 31, 2020 Report Share Posted May 31, 2020 As the author of the mod, I also like the idea of being able to choose the order of the data blocks. I looked into it some time ago, and decided that it was too hard to specify an arbitrary order. (Not impossibly hard, but hard enough that it wasn't worth doing based just on my own brainstorm.) My thinking was that I needed to implement a series of selection boxes, and eliminate each selection from the next selection box. But now that someone else has suggested it, I've given it more thought, and I think that I could implement a control based on this one from my Admin Users-More mod. (I'm sure that I'd start it with all sections in the box on the right with the expectation that users could use the up and down arrows to reorder the block and the left and right arrow to remove a block or re-add it. I The control above is far from trivial, too, but I've already written it, and it should not be hard to reuse that code. I can't promise that I'll do it soon, though I think that I'll check it out quickly, and may go ahead and push it out if it looks easy enough. - Robin Quote Link to comment Share on other sites More sharing options...
bryanlewis Posted May 31, 2020 Author Report Share Posted May 31, 2020 Thanks for responding Robin. I think it would be a useful addition. I would say that there are probably a few standard orders that would make most of us happy, but since you've already written the code for the arbitrary selection box, then perhaps that is the way to go. Thanks again. Bryan Quote Link to comment Share on other sites More sharing options...
marcirish Posted May 31, 2020 Report Share Posted May 31, 2020 That would be amazing! It would really make the display of a persons information personal. Thanks so much for considering this! marc Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.