View Single Post
  #3  
Old 06-22-2017, 12:01 PM
Abronsyth's Avatar
Abronsyth Abronsyth is offline
A Headache Embodied
 
Join Date: Aug 2011
Location: NY
Posts: 1,011
Gender: Male
Credits: 111,714
Abronsyth is on a distinguished road
Default

Bonus code!

Want to show more generations on a pet's page? Easy! Since we already call the parent in a manner that let's us call their information, we can readily do this;
PHP Code:
$maternalgma $mother->mother
Want to readily call the maternal grandmother's data? Also easy!

PHP Code:
if ($mother->mother != NULL) { $matgrandmother = new OwnedAdoptable($mother->mother); $gp1name $matgrandmother->name$gp1id $matgrandmother->aid; } else { $gp1name "Unkown"; } 
Now you can summon the maternal grandmother's data like so;
(maternal grandmother's mother)
PHP Code:
$mgmm $matgrandmother->mother
And so on! ...I have not tested this quite yet, but it ought to work!

So you can create obnoxiously long pedigrees
__________________
My Mods Site (1.3.4, 2020 Mods)
Reply With Quote