Mysidia Adoptables Support Forum  

Home Community Mys-Script Creative Off-Topic
Go Back   Mysidia Adoptables Support Forum > Mysidia Adoptables > Questions and Supports

Notices

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #4  
Old 02-11-2016, 11:13 PM
Kyttias's Avatar
Kyttias Kyttias is offline
Premium Member
 
Join Date: Jan 2014
Posts: 857
Gender: Unknown/Other
Credits: 137,446
Kyttias is on a distinguished road
Default

Oh, um, put it wherever you like/need to? In my version, it also happens to contain 'Children:' beforehand but takes into account whether or not they have any before displaying the text at all. My code as it is currently just loops through a list of text names, whereas yours are images.

So let's start again, now that I see what you have. ^^;;;

You really shouldn't need to access the database over and over again as you are, the variables that hold the id# of the the parents and grandparents are now literally part of the current pet's object in the same way their species type, gender, and the personality/stat mod is. So, try just {$adopt->grandfatherB} for example, rather than making a database call?

Actually, here:
PHP Code:
if ($adopt->mother == NULL) { $motherview "Unknown"; } else { $motherview "<a href='../../levelup/click/{$adopt->mother}'><img src='../../levelup/siggy/{$adopt->mother}' width='25%' height='25%'/></a>"; }
if (
$adopt->father == NULL) { $fatherview "Unknown"; } else { $fatherview "<a href='../../levelup/click/{$adopt->father}'><img src='../../levelup/siggy/{$adopt->father}' width='25%' height='25%'/></a>"; }
if (
$adopt->grandmotherA == NULL) { $grandmotherAview "Unknown"; } else { $grandmotherAview "<a href='../../levelup/click/{$adopt->grandmotherA}'><img src='../../levelup/siggy/{$adopt->grandmotherA}' width='12%' height='12%'/></a>"; }
if (
$adopt->grandmotherB == NULL) { $grandmotherBview "Unknown"; } else { $grandmotherBview "<a href='../../levelup/click/{$adopt->grandmotherB}'><img src='../../levelup/siggy/{$adopt->grandmotherB}' width='12%' height='12%'/></a>"; }
if (
$adopt->grandfatherA == NULL) { $grandfatherAview "Unknown"; } else { $grandfatherAview "<a href='../../levelup/click/{$adopt->grandfatherA}'><img src='../../levelup/siggy/{$adopt->grandfatherA}' width='12%' height='12%'/></a>"; }
if (
$adopt->grandfatherB == NULL) { $grandfatherBview "Unknown"; } else { $grandfatherBview "<a href='../../levelup/click/{$adopt->grandfatherB}'><img src='../../levelup/siggy/{$adopt->grandfatherB}' width='12%' height='12%'/></a>"; } 
Also, try this for establishing children instead (so it works on the myadoptsview.php page and uses just images):
PHP Code:
$babies = array();
$offsprings explode(","$adopt->offsprings);
if (
$offsprings != ""){
    foreach(
$offsprings as $offspring){
        if (
$offspring != 0){
            
$babies[] = "<a href='../../levelup/click/{$offspring}'><img src='../../levelup/siggy/{$offspring}' width='12%' height='12%'/></a>";
        }
    }
    
$children implode(""$babies);
    if (empty(
$children)){ $children "None"; } 

Use {$children} just like you're using things like {$grandfatherBview} in your table.
__________________
Please do not contact me directly outside of Mysidia.
I also cannot troubleshoot code more than two years old - I legit don't remember it.

Last edited by Kyttias; 02-12-2016 at 12:19 AM.
Reply With Quote
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 02:37 PM.

Currently Active Users: 10437 (0 members and 10437 guests)
Threads: 4,081, Posts: 32,032, Members: 2,016
Welcome to our newest members, jolob.
BETA





What's New?

What's Hot?

What's Popular?


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
vBCommerce I v2.0.0 Gold ©2010, PixelFX Studios
vBCredits I v2.0.0 Gold ©2010, PixelFX Studios
Emoticons by darkmoon3636