Mysidia Adoptables Support Forum  

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

Notices

Reply
 
Thread Tools Display Modes
  #1  
Old 03-28-2016, 10:58 PM
tahbikat's Avatar
tahbikat tahbikat is offline
Member
 
Join Date: Feb 2014
Location: Louisiana
Posts: 408
Gender: Female
Credits: 69,324
tahbikat is on a distinguished road
Default

For the rarity part, try this,


I'm assuming you want this in your My Adopts page?

First go to myadoptsview.php in your view folder, and you need to add a rarity column to the table. So add the "Rarity" title next to gender. This is located in the public function index section right at the top of the file. I also changed my table width to 900 so don't copy that part unless you want to.

PHP Code:
$adoptTable = new TableBuilder("adopttable"900);
        
$adoptTable->setAlign(new Align("center""middle"));
        
$adoptTable->buildHeaders("Gender""Rarity""Name/Type""Image""Points""Level"); 
Then under the gender cell, add your rarity cell like so:
PHP Code:
$cells->add(new TCell($adopt->getGender("gui")));
            
$cells->add(new TCell("<img src='/picuploads/{$adopt->getRarity()}.png' />")); 
Here's the whole index part if you want to just copy and paste. This is the public function index section only, not the whole file, so only replace that part.

PHP Code:
    public function index(){
        
$mysidia Registry::get("mysidia");
        
$document $this->document;
        
$document->setTitle($this->lang->title);
 
        
$pagination $this->getField("pagination");
        
$stmt $this->getField("stmt")->get();
        if(
$stmt->rowCount() == 0){
            
$document->addLangvar($this->lang->empty);
            return;
        }
        
        
$adoptTable = new TableBuilder("adopttable"900);
        
$adoptTable->setAlign(new Align("center""middle"));
        
$adoptTable->buildHeaders("Gender""Rarity""Name/Type""Image""Points""Level");
        
        while(
$aid $stmt->fetchColumn()){
            
$adopt = new OwnedAdoptable($aid);
            
$cells = new LinkedList;
            
$cells->add(new TCell($adopt->getGender("gui")));
            
$cells->add(new TCell("<img src='/picuploads/{$adopt->getRarity()}.png' />"));
            
$cells->add(new TCell("<b>{$adopt->getName()}</b><br />{$adopt->getType()}"));
            
$cells->add(new TCell(new Link("myadopts/manage/{$aid}"$adopt->getImage("gui"))));
            
$cells->add(new TCell($adopt->getTotalClicks()));
            
$cells->add(new TCell($adopt->getCurrentLevel()));
            
$adoptTable->buildRow($cells);
        }
        
$document->add($adoptTable);
        
$document->addLangvar($pagination->showPage());
    } 

As for your second question, I'm afraid pet groups are a bit more complicated/take longer to code and I'm not sure if anyone here has done that yet.

Last edited by tahbikat; 03-28-2016 at 11:02 PM.
Reply With Quote
Reply


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 03:26 AM.

Currently Active Users: 1662 (0 members and 1662 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