Jump to content
TNG Community

Reordering Family & Parents Blocks when using Regroup Person Profile


bryanlewis

Recommended Posts

bryanlewis

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

bryanlewis

Thanks Erik.  I will play around with it some more and see if I can get it working.

Link to comment
Share on other sites

bryanlewis

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.

 

Link to comment
Share on other sites

bryanlewis

Agreed marcirish.  It seems like it would be a fairly straight forward config option to add the admin web interface.

Link to comment
Share on other sites

Robin Richmond

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.

image.png

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

 

Link to comment
Share on other sites

bryanlewis

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

Link to comment
Share on other sites

That would be amazing!  It would really make the display of a persons information personal.  Thanks so much for considering this!

 

marc

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

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

×
×
  • Create New...