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-27-2016, 12:54 PM
Pear's Avatar
Pear Pear is offline
Woah man.
 
Join Date: Dec 2013
Location: The Underworld
Posts: 169
Gender: Female
Credits: 45,616
Pear is on a distinguished road
Default Need help with pet grouping & pet rarities with images..o.o

How would one go about making pet groups? I really like how eldemore's is set up.

Users are able to make their own groups and organize their pets. I really would love to make this, but I have no idea what I'd have to do. ^^;

There is a pet group sort mod for Mys 1.3.1, so is anyone able to update it to 1.3.4? Here's another thread regarding it for 1.3.4, but the OP did not post their update on if they got it to work..haha. cx I would not mind if it were to look like this instead of Eldemore's looks. x3

____
This part has been solved (Although I haven't had time to try it out haha)
Yo. I have been trying to do this mod, but it just is not working out for me. |D /because I'm a coding n00b/ I'm following all the instructions to the best of my ability, including starting from this post. I just don't understand anything.

I was wondering if there was a way where I could just put the rarity images by the pet's gender kind of like this? And be able to have 7 different rarity types, for the different pets rarities.


And maybe a place in the AdminCP where I could do the pet's rarity from there. (Kind of like this post. Unless this method would work? I have it installed already..haha)

I am not really sure where I should post this, so if it needs to be moved I'm fine with it.
__________________
Noot noot! Gotta get a new signooture. >->

Last edited by Pear; 03-30-2016 at 12:34 PM.
Reply With Quote
  #2  
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: 49,663
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
  #3  
Old 03-29-2016, 12:55 PM
Pear's Avatar
Pear Pear is offline
Woah man.
 
Join Date: Dec 2013
Location: The Underworld
Posts: 169
Gender: Female
Credits: 45,616
Pear is on a distinguished road
Default

@tahbikat - Thank you so much QwQ <3 You're a life saver! Yeah, I figured that the pet grouping would be a bit more complicated. ^-^ <3
__________________
Noot noot! Gotta get a new signooture. >->
Reply With Quote
  #4  
Old 03-29-2016, 03:50 PM
tahbikat's Avatar
tahbikat tahbikat is offline
Member
 
Join Date: Feb 2014
Location: Louisiana
Posts: 408
Gender: Female
Credits: 49,663
tahbikat is on a distinguished road
Default

Quote:
Originally Posted by Pear View Post
@tahbikat - Thank you so much QwQ <3 You're a life saver! Yeah, I figured that the pet grouping would be a bit more complicated. ^-^ <3
No problem! c:
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 10:29 AM.

Currently Active Users: 9726 (0 members and 9726 guests)
Threads: 4,080, Posts: 32,024, 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 - 2024, vBulletin Solutions Inc.
vBCommerce I v2.0.0 Gold ©2010, PixelFX Studios
vBCredits I v2.0.0 Gold ©2010, PixelFX Studios
Emoticons by darkmoon3636