Mysidia Adoptables Support Forum

Mysidia Adoptables Support Forum (http://www.mysidiaadoptables.com/forum/index.php)
-   Questions and Supports (http://www.mysidiaadoptables.com/forum/forumdisplay.php?f=18)
-   -   I love questions =) (http://www.mysidiaadoptables.com/forum/showthread.php?t=2351)

SilverDragonTears 08-28-2011 01:19 AM

should i do this in the family tree script in premium area? since this was a premium mod?

Hall of Famer 08-28-2011 01:21 AM

Well just send me a PM if you want to, I can get back to you soon.

SilverDragonTears 08-28-2011 01:22 AM

PM sent =)

Hall of Famer 08-28-2011 01:36 AM

Guess I understand how family tree works now. The $mother or $father is the $parentid I was referring to. You can ignore the first step and modify the second step as:

PHP Code:

if(isset($mother)){
    
$query "SELECT * FROM {$prefix}owned_adoptables,  
                            
{$prefix}adoptables  WHERE {$prefix}owned_adoptables.mother = '{$mother}
                                                 AND 
{$prefix}adoptables.type = {$prefix}owned_adoptables.type 
                                                 ORDER BY 
{$prefix}owned_adoptables.aid";
    
$result runquery($query);
}
if(isset(
$father)){
    
$query "SELECT * FROM {$prefix}owned_adoptables,  
                            
{$prefix}adoptables  WHERE {$prefix}owned_adoptables.father = '{$father}
                                                 AND 
{$prefix}adoptables.type = {$prefix}owned_adoptables.type 
                                                 ORDER BY 
{$prefix}owned_adoptables.aid";
    
$result runquery($query);


It seems that you may need to either write a new script file or create a subpage for familytree.php to display an adoptables' children.

SilverDragonTears 08-28-2011 01:39 AM

=/ how do i do that? lol!
told you my coding isn't great yet

Hall of Famer 08-28-2011 01:46 AM

Oh I see, I will find another time(maybe next week) to rewrite the entire familytree.php for you.

SilverDragonTears 08-28-2011 01:51 AM

alright =) and one more small thing. if i have this code

Code:

if($numpets >= 50){
        $article_content .= "<div style='width: 100%; float:left; padding:5px;'><img src='http://media.giantbomb.com/media/bomb/img/achievements/trophy-bronze.png' title='Bronze Trophy'></div>";
} else if($numpets >= 200){
        $article_content .= "<div style='width: 100%; float:left; padding:5px;'><img src='/images/silvertrophy.png' title='Silver Trophy'></div>";
} else if($numpets >= 500){
        $article_content .= "<div style='width: 100%; float:left; padding:5px;'><img src='http://media.giantbomb.com/media/bomb/img/achievements/trophy-gold.png' title='Gold Trophy'></div>";
}

which isn't right b/c it isn't working. what i want to do is show a bronze tropy if the member has 60 or less pets
silver trophy if the have 200 or less
and gold if 500 or more

but the code i have either shows all the trophies or only if they have that exact amount =/


EDIT::
I was doing it backwards eh?
Code:

if($numpets >= 500){
        $article_content .= "<div style='width: 100%; float:left; padding:5px;'><img src='/images/trophy-gold.png' title='Gold Trophy'></div>";
} else if($numpets <=50 && $numpets <= 200){
        $article_content .= "<div style='width: 100%; float:left; padding:5px;'><img src='/images/silvertrophy.png' title='Silver Trophy'></div>";
} else if($numpets != 50){
        $article_content .= "<div style='width: 100%; float:left; padding:5px;'><img src='/images/trophy-bronze.png' title='Bronze Trophy'></div>";
}else{
        $article_content .= "";
}

no still not working correctly.


second EDIT::
i think this is correct...
Code:

if($numpets >= 500){
        $article_content .= "<div style='width: 100%; float:left; padding:5px;'><img src='/images/trophy-gold.png' title='Gold Trophy'></div>";
} else if($numpets >= 200){
        $article_content .= "<div style='width: 100%; float:left; padding:5px;'><img src='/images/silvertrophy.png' title='Silver Trophy'></div>";
} else if($numpets >= 50){
        $article_content .= "<div style='width: 100%; float:left; padding:5px;'><img src='/images/trophy-bronze.png' title='Bronze Trophy'></div>";
}else{
        $article_content .= "";
}



All times are GMT -5. The time now is 05:24 PM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.