Janos Dibusz Posted September 1, 2017 Report Share Posted September 1, 2017 I wouldlike showing the sex icon for the children in the page. But this not working. getperson.php $gender = getGenderIcon( $row['sex'], -1 ); $famchildren[0] .= "<tr><td valign=\"top\" width=\"10\">$ifkids</td><td onmouseover=\"highlightChild(1,'$childID');\" onmouseout=\"highlightChild(0,'$childID');\" class=\"unhighlightedchild\" id=\"child$childID\"><span class=\"normal\">$kidcount. <a href=\"$getperson_url" . "personID=$childID&tree=$tree\">$childname.$gender</a>"; if(!$gotfile) { if( $gender && $tngconfig['usedefthumbs'] ) { if($gender == "M") { $photocheck = "img/male.jpg"; } elseif ($gender == "F") { $photocheck = "img/female.jpg"; } $photoref = $photocheck; $gotfile = file_exists( "$rootpath$photocheck" ); } } Quote Link to comment Share on other sites More sharing options...
Janos Dibusz Posted September 1, 2017 Author Report Share Posted September 1, 2017 I know, but not the children row. Quote Link to comment Share on other sites More sharing options...
Janos Dibusz Posted September 1, 2017 Author Report Share Posted September 1, 2017 On teh picture which one is the boy and which one is the girl? So I want here the icon. Quote Link to comment Share on other sites More sharing options...
Janos Dibusz Posted September 1, 2017 Author Report Share Posted September 1, 2017 26 minutes ago, manofmull said: Boy is blue (short hair) and girl pink (long hair) Other picture. Yellow-braun. Quote Link to comment Share on other sites More sharing options...
bhemph Posted September 1, 2017 Report Share Posted September 1, 2017 The tng_male.gif and tng_female.gif files would be small enough to fit and not extend the page. Is the problem with your code that it is showing the sex of the getperson page instead of the child? That might be because $row is for the person who the page belongs, while $child would be for the current child in the loop. Quote Link to comment Share on other sites More sharing options...
Janos Dibusz Posted September 1, 2017 Author Report Share Posted September 1, 2017 9 minutes ago, bhemph said: The tng_male.gif and tng_female.gif files would be small enough to fit and not extend the page. Is the problem with your code that it is showing the sex of the getperson page instead of the child? That might be because $row is for the person who the page belongs, while $child would be for the current child in the loop. Yes, this the problem: if see a male, all children male, if see female, all children female. I think here is the problem: $row['sex'] Quote Link to comment Share on other sites More sharing options...
Janos Dibusz Posted September 1, 2017 Author Report Share Posted September 1, 2017 10 minutes ago, Janos Dibusz said: Yes, this the problem: if see a male, all children male, if see female, all children female. I think here is the problem: $row['sex'] Quote Link to comment Share on other sites More sharing options...
Janos Dibusz Posted September 1, 2017 Author Report Share Posted September 1, 2017 Just now, Janos Dibusz said: Quote Link to comment Share on other sites More sharing options...
tngrlkrz Posted September 1, 2017 Report Share Posted September 1, 2017 Janos, I like that. Could you share here the final code in getperson.php that worked for you? Or send a private message if you wish? Would like to include in my personal mods. Also, the family preview mod (see image) has a popup which, when hovering over a child, displays the gender symbol. Thanks Ron Quote Link to comment Share on other sites More sharing options...
tngrlkrz Posted September 1, 2017 Report Share Posted September 1, 2017 2 hours ago, manofmull said: I misunderstood the icon thing. Yes this does look good, so maybe someone could "mod" it. I've sent Janos a personal message as well. Hope he responds. I put all my changes to TNG in Mods, but haven't published any. I could 'Mod'ify the changes. My issue is integrating to the many published Mods and a large private Mod I have in place now. I've actually removed the 'gender' row on the individual page since the universal gender symbol is already beneath the name header. Ron Quote Link to comment Share on other sites More sharing options...
tngrlkrz Posted September 1, 2017 Report Share Posted September 1, 2017 After rereading, I see now that Janos appeared to still be having a problem, since 'Katalin' (female?) is appearing as a boy, so as he says if person on page is male, then all children are male, conversedly for female. Needs more work. Quote Link to comment Share on other sites More sharing options...
tngrlkrz Posted September 1, 2017 Report Share Posted September 1, 2017 Well, I've got the child's gender as M and F by the name, now I just need to convert to symbols. So far just couple lines of code. Note this is my modified children's rows which include the person ID edit hyperlink at the side as well. I would likely put the symbols after the name, just getting the data available now. Quote Link to comment Share on other sites More sharing options...
Janos Dibusz Posted September 1, 2017 Author Report Share Posted September 1, 2017 1 hour ago, tngrlkrz said: Well, I've got the child's gender as M and F by the name, now I just need to convert to symbols. So far just couple lines of code. Note this is my modified children's rows which include the person ID edit hyperlink at the side as well. I would likely put the symbols after the name, just getting the data available now. Great job. How you do this? Quote Link to comment Share on other sites More sharing options...
bhemph Posted September 2, 2017 Report Share Posted September 2, 2017 $gender = getGenderIcon( $child['sex'], -1 ); $persontext .= "<tr><td valign=\"top\" width=\"10\">$ifkids</td><td onmouseover=\"highlightChild(1,'$childID');\" onmouseout=\"highlightChild(0,'$childID');\" class=\"unhighlightedchild\" id=\"child$childID\"><span class=\"normal\">$kidcount. <a href=\"$getperson_url" . "personID=$childID&tree=$tree\">$gender $childname</a>"; Quote Link to comment Share on other sites More sharing options...
jayat1familytree Posted September 2, 2017 Report Share Posted September 2, 2017 where do you change the code in the getperson.php to get that result ? Quote Link to comment Share on other sites More sharing options...
bhemph Posted September 2, 2017 Report Share Posted September 2, 2017 The "unhighlightedchild" text only exists once in the unmodified 10.1.3 getperson.php and the only part of that line that was changed was to add the $gender in the string. I am guessing that Janos might be on 11 and that accounts for the code that he posted in the initial post setting a different variable than my code. So I just changed the row variable to the child variable in that first message as I had suggested was the issue. Quote Link to comment Share on other sites More sharing options...
Janos Dibusz Posted September 2, 2017 Author Report Share Posted September 2, 2017 20 minutes ago, bhemph said: The "unhighlightedchild" text only exists once in the unmodified 10.1.3 getperson.php and the only part of that line that was changed was to add the $gender in the string. I am guessing that Janos might be on 11 and that accounts for the code that he posted in the initial post setting a different variable than my code. So I just changed the row variable to the child variable in that first message as I had suggested was the issue. Thank you very much, it's great job. WORKING!!! Quote Link to comment Share on other sites More sharing options...
klooster Posted September 2, 2017 Report Share Posted September 2, 2017 It is not working in TNG 11.1.1 where and how do you change the code in the getperson.php TNG 1.1.1 to get that result ? Quote Link to comment Share on other sites More sharing options...
klooster Posted September 2, 2017 Report Share Posted September 2, 2017 There is no $gender in TNG. 11.1.1 only $childname. If I change $childname = getName( $child ); into $childname = getGenderIcon( $child['sex'], -1 ); I do get the icons but the names are gone Quote Link to comment Share on other sites More sharing options...
tngrlkrz Posted September 2, 2017 Report Share Posted September 2, 2017 changes I made (TNG 11.1.1., sent my phone, blocked on my wifi yesterday with earlier response. Gustav contacted. Added one line in 'getperson.php' after the following line (~541) in getperson.php (pristine version), puts gender symbol in front of child's name. $childname = getName( $child ); $childname= getGenderIcon($child['sex']-2)." ".$childname; You get names too. Ron Quote Link to comment Share on other sites More sharing options...
klooster Posted September 2, 2017 Report Share Posted September 2, 2017 Thanks for the response, but it it is not working, page is cut off: Quote Link to comment Share on other sites More sharing options...
klooster Posted September 2, 2017 Report Share Posted September 2, 2017 Found the solution, slight error in your code; instead of what you wrote; $childname = getName( $child ); $childname= getGenderIcon(['sex']-2)." ".$childname; It should be: $childname = getName( $child); $childname = getGenderIcon($child['sex'], -2)." ".$childname; THANKS again, works great !! Quote Link to comment Share on other sites More sharing options...
tngrlkrz Posted September 2, 2017 Report Share Posted September 2, 2017 See correction, sorry, working from phone now until block removed by Gustav. I actually had this solution last night but got blocked during the submit.😣 Quote Link to comment Share on other sites More sharing options...
stores Posted September 2, 2017 Report Share Posted September 2, 2017 Thanks Cees and Ron & Janos for starting this thread, it looks great. Quote Link to comment Share on other sites More sharing options...
Janos Dibusz Posted September 3, 2017 Author Report Share Posted September 3, 2017 Here is TNG 11.0.0 pgetperson.php For me working.http://dibuszfamily.com/getperson.php?personID=I6&tree=D1 getperson.php 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.