mot777mot Posted June 23, 2015 Share Posted June 23, 2015 Good day All Can someone please assist me in this as i know nothing about PHP coding i have a site that shows dog family tree, but i only want it to show from parents onwords and not the child item. You can see example here: http://www.sa-apbt.co.za/base/printable_pedigree.php?id=89601&gens=4&images=yes Attached is the code file printable_pedigree.php Quote Link to comment Share on other sites More sharing options...
Ch0cu3r Posted June 23, 2015 Share Posted June 23, 2015 At a guess try changing line 113 to } elseif($level != 1) { Quote Link to comment Share on other sites More sharing options...
mot777mot Posted June 23, 2015 Author Share Posted June 23, 2015 Thanx allot Works like a bomb. Appreciate your assistance Quote Link to comment Share on other sites More sharing options...
Ch0cu3r Posted June 23, 2015 Share Posted June 23, 2015 Although it appears to work it actually is still outputting the the first level (child item). I also meant to to say to delete line 116 and and to add a } after line 149. I submitted my post earlier too soon. Quote Link to comment Share on other sites More sharing options...
mot777mot Posted June 23, 2015 Author Share Posted June 23, 2015 Ok i have tried that, but then it shows tables as blank Quote Link to comment Share on other sites More sharing options...
Ch0cu3r Posted June 23, 2015 Share Posted June 23, 2015 Lines 113 to 149 should read as } elseif($level != 1) { echo "<TD ROWSPAN=" . pow(2,($generations - $level)); echo " >"; if (($dogVO != -1) && (!empty($dogVO ))) { $name = $dogVO->name; $sireId = $dogVO->sire->id; $damId = $dogVO->dam->id; $landofbirth = $dogVO->landofbirth; $yearofbirth = $dogVO->yearofbirth; $color = $dogVO->color; $title = $dogVO->title; $photo = $dogVO->photo->thumb_ref; if (empty($photo)) $photo = $dogVO->photo->reference; ### Highlight title w/ red font if (!empty($title)) { echo "<label>"; echo "<font color=\"blue\">$title</font><BR>"; echo "</label>"; } if ($images == "yes") { if (!empty($photo)) { echo '<img SRC="'.$photo.'" width="'.$THUMBNAIL_WIDTH.'"></p>'; } } echo "$name"; echo "<label>"; echo "</label>"; } else { $out[] = "<label>unknown</label>"; } echo "</TD>"; } Quote Link to comment Share on other sites More sharing options...
mot777mot Posted June 23, 2015 Author Share Posted June 23, 2015 Good day Yes, it is exactly like that, but his is the result then. Quote Link to comment Share on other sites More sharing options...
Ch0cu3r Posted June 23, 2015 Share Posted June 23, 2015 Continue to replace 113 through to 149 with the code I provided earlier but then on lines 159 and 162 replace $sireid with $dogVO->sire->id and on lines 174 and 177 replace $damId with $dogVO->dam->id Now delete lines 119 and 120 $sireId = $dogVO->sire->id; $damId = $dogVO->dam->id; That should now fix it. Quote Link to comment Share on other sites More sharing options...
Barand Posted June 23, 2015 Share Posted June 23, 2015 An alternative approach to the problem might be instead of calling the chart for the pup, call it twice - once for the sire and again for the dam and output the two charts one above the other Quote Link to comment Share on other sites More sharing options...
mot777mot Posted June 23, 2015 Author Share Posted June 23, 2015 Thank you so much, you are the best. I appreciate it 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.