View Single Post
  #2  
Old 01-05-2016, 09:41 AM
Abronsyth's Avatar
Abronsyth Abronsyth is offline
A Headache Embodied
 
Join Date: Aug 2011
Location: NY
Posts: 1,011
Gender: Male
Credits: 161,287
Abronsyth is on a distinguished road
Default

Well, for the favepet, the lines here in .../classes/class_userprofile.php are what display the favepet on the adoptables tab:
PHP Code:
      $document->add($this->favpet);
      
$document->add(new Comment($this->about)); 
I just copied those lines and added it to the about me tab like this;
PHP Code:
  private function aboutme(){
      
$mysidia Registry::get("mysidia");    
      
$document $mysidia->frame->getDocument();
      
$title = new Comment($mysidia->lang->basic.$mysidia->input->get("user"));
      
$title->setBold(TRUE);
      
$title->setUnderlined(TRUE);
      
$membersince $mysidia->db->select("users", array("membersince"), "username = '{$mysidia->input->get("user")}'")->fetchColumn();      
      
$basicinfo "<br><strong>Member Since:</strong> {$membersince}<br>
                    <strong>Gender:</strong> 
{$this->gender}<br>
                    <strong>Favorite Color:</strong> 
{$this->color}<br>
                    <strong>Nickname:</strong> 
{$this->nickname}<br>
                    <strong>Bio:</strong> 
{$this->bio}";
      
      
$document->add($title);
      
$document->add(new Image($this->avatar"avatar"100));
      
$document->add(new Comment($basicinfo));
      
$document->add($this->favpet);
      
$document->add(new Comment($this->about));
  } 
And as you can see here, it displays just fine.

As for the rest...well I know the adoptables section is done primarily through tables. If you want them to appear on separate pages then I believe you're going to need to build new pages to display the information. I'm going to play around with tables to see if I can get the pets, at least, to display like how you have it in your mockup.

EDIT:
OK, I got the pets to display in a table like they do on the myadopts page, the only issue is that when a user has a lot of pets you'll probably want to be able to go to another page of pets, and that's something I'm still working on.
PHP Code:
      $title = new Comment("{$mysidia->input->get("user")}'s Pets:");
      
$title->setBold(TRUE);
      
$title->setUnderlined(TRUE);
      
$document->add($title);
        
$adoptTable = new TableBuilder("adopttable"650);
        
$adoptTable->setAlign(new Align("center""middle"));
        
$adoptTable->buildHeaders("Creature""Name""Species""Level""Points");
      
$stmt $mysidia->db->select("owned_adoptables", array("aid"), "owner = '{$mysidia->input->get("user")}'");
      while(
$id $stmt->fetchColumn()){
            
$adopt = new OwnedAdoptable($id);
            
$cells = new LinkedList;
            
$cells->add(new TCell(new Comment("<a href='http://mysgardia.com/levelup/click/{$adopt->getAdoptID()}'><img src='{$adopt->getImage()}'/></a>")));
            
$cells->add(new TCell("{$adopt->getName()}"));
            
$cells->add(new TCell("{$adopt->getType()}"));
            
$cells->add(new TCell($adopt->getCurrentLevel()));
            
$cells->add(new TCell($adopt->getTotalClicks()));
            
$adoptTable->buildRow($cells);
        }
        
$document->add($adoptTable);
    } 
__________________
My Mods Site (1.3.4, 2020 Mods)

Last edited by Abronsyth; 01-05-2016 at 11:43 AM.
Reply With Quote