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 12-29-2016, 04:28 PM
parayna's Avatar
parayna parayna is offline
Member
 
Join Date: May 2013
Location: Devon, UK
Posts: 342
Gender: Female
Credits: 16,505
parayna is on a distinguished road
Default Restyling Pound?

Aloha! Could anyone please help me to restyle the pound page? I know how to change the information that is there but I would like it to appear like my My Adopts page.

  Spoiler: Image 


This is the My Adopts page and I really like how it is set out, and so want the pound to be the same. I would know how to display info like the name and gender (and hide it for eggs), I'd just love it if the pound had this layout. And perhaps clicking the adoptable took you to a page where it asked if you wanted to adopt. Readopting costs nothing on my site, so I don't need anything included about price at all!


My pound currently looks like this:

  Spoiler: Image 


I have changed it a little but I don't like this XD


Thank you very much! ^_^
Reply With Quote
  #2  
Old 12-29-2016, 04:31 PM
Dinocanid's Avatar
Dinocanid Dinocanid is offline
Member
 
Join Date: Aug 2016
Location: Maryland, USA
Posts: 516
Gender: Unknown/Other
Credits: 65,267
Dinocanid is on a distinguished road
Default

You could always recycle the code from your myadoptsview.php and use it in the poundview.php.
__________________
Reply With Quote
  #3  
Old 12-29-2016, 05:27 PM
parayna's Avatar
parayna parayna is offline
Member
 
Join Date: May 2013
Location: Devon, UK
Posts: 342
Gender: Female
Credits: 16,505
parayna is on a distinguished road
Default

Um, I managed to get the page not showing any errors but no adopts show up.. :/ I had tried before but couldn't find my way around it, but this time is slightly better, I suppose...

Would you have any idea on how to make it work?

PHP Code:
    public function index(){
        
$mysidia Registry::get("mysidia");
        
$document $this->document;    
        
$document->setTitle($this->lang->title);        
        
$document->addLangvar($this->lang->default);
        
        
$readoptForm = new Form("readoptform""pound/adopt""post");
        
$readoptHeader = new Comment("Pounded Adoptables for adoption");
        
$readoptHeader->setHeading(3);
        
$readoptForm->add($readoptHeader);
        
        
$readoptTable = new TableBuilder("readopttable");
        
$readoptTable->setAlign(new Align("center""middle"));
        
$readoptTable->buildHeaders();
        
$readoptTable->setHelper(new AdoptTableHelper);
        
        
$pounds $this->getField("pounds");        
        
$iterator $pounds->iterator();        
        while(
$iterator->hasNext()){
            
$entry $iterator->next();
            
$adopt $entry->getKey();
            
$cost $entry->getValue();

                
$cells = new ArrayList;
                
$lvl $adopt->getCurrentLevel();
                if (
$lvl == 0) { $cells->add(new Comment("<a href='/myadopts/manage/{$adopt->getAdoptID()}'><img src='{$adopt->getImage()}'></a>")); }
                if (
$lvl == 1) { $cells->add(new Comment("<a href='/myadopts/manage/{$adopt->getAdoptID()}'><img src='{$adopt->getImage()}'></a>")); }
                if (
$lvl >= 2) { $cells->add(new Comment("<a href='/myadopts/manage/{$adopt->getAdoptID()}'><img src='{$adopt->getImage()}' width= '200px'></a>")); }  
                
$cells->add(new Comment("<b>Name: </b>"));
                
$cells->add(new Comment("<b>Gender: </b>"));
                
$cells->add(new Comment("<b>Total Clicks: </b>"));
                
$aCells = new TCell($cells"cell{$index}");
                
$aCells->setAlign(new Align("center""center"));
}
            
$readoptTable->add($aCells);
        
    } 
Thanks ^_^
Reply With Quote
  #4  
Old 12-29-2016, 06:01 PM
Dinocanid's Avatar
Dinocanid Dinocanid is offline
Member
 
Join Date: Aug 2016
Location: Maryland, USA
Posts: 516
Gender: Unknown/Other
Credits: 65,267
Dinocanid is on a distinguished road
Default

How's this?:
PHP Code:
public function index(){ 
        
$mysidia Registry::get("mysidia"); 
        
$document $this->document;     
        
$document->setTitle($this->lang->title);         
        
$document->addLangvar($this->lang->default); 
         
        
$readoptForm = new Form("readoptform""pound/adopt""post"); 
        
$readoptHeader = new Comment("Pounded Adoptables for adoption"); 
        
$readoptHeader->setHeading(3); 
        
$readoptForm->add($readoptHeader); 
         
        
$readoptTable = new TableBuilder("readopttable"); 
        
$readoptTable->setAlign(new Align("center""middle")); 
        
$readoptTable->buildHeaders(); 
        
$readoptTable->setHelper(new AdoptTableHelper); 
         
        
$pounds $this->getField("pounds");         
        
$iterator $pounds->iterator();         
        while(
$iterator->hasNext()){ 
            
$entry $iterator->next(); 
            
$adopt $entry->getKey(); 
            
$cost $entry->getValue(); 

                
$cells = new ArrayList
                
$lvl $adopt->getCurrentLevel(); 
                if (
$lvl == 0) { $cells->add(new Comment("<a href='/myadopts/manage/{$adopt->getAdoptID()}'><img src='{$adopt->getImage()}'></a>")); } 
                if (
$lvl == 1) { $cells->add(new Comment("<a href='/myadopts/manage/{$adopt->getAdoptID()}'><img src='{$adopt->getImage()}'></a>")); } 
                if (
$lvl >= 2) { $cells->add(new Comment("<a href='/myadopts/manage/{$adopt->getAdoptID()}'><img src='{$adopt->getImage()}' width= '200px'></a>")); }  
                
$cells->add(new Comment("<b>Name: </b>")); 
                
$cells->add(new Comment("<b>Gender: </b>")); 
                
$cells->add(new Comment("<b>Total Clicks: </b>")); 
                
$aCells = new TCell($cells"cell{$index}"); 
                
$aCells->setAlign(new Align("center""center")); 

            
$readoptTable->add($aCells); 
            
$readoptForm->add($readoptTable);
            
$document->add($readoptForm);
         
    } 
__________________
Reply With Quote
  #5  
Old 12-29-2016, 06:35 PM
parayna's Avatar
parayna parayna is offline
Member
 
Join Date: May 2013
Location: Devon, UK
Posts: 342
Gender: Female
Credits: 16,505
parayna is on a distinguished road
Default

Ooh, that's definitely on the right track! Thank you! It shows up but only 1 adoptable appears (and I know that there are 6 currently in the pound).

EDIT: Also, I am not sure how to make it so that the adoptable is actually adopted... I've put in that when you click an adoptable it sends you to the adopt link, however, it doesn't like you having the ID included (but how else can I say what adoptable is adopted? lol XD) Sorry for the trouble aha ^_^"

Last edited by parayna; 12-29-2016 at 07:04 PM.
Reply With Quote
  #6  
Old 06-20-2017, 08:31 AM
parayna's Avatar
parayna parayna is offline
Member
 
Join Date: May 2013
Location: Devon, UK
Posts: 342
Gender: Female
Credits: 16,505
parayna is on a distinguished road
Default

I just found this post again lol XD I still need help with it, hmm... just had a tinker with it all and can't get anything working without an error popping up XD No idea what I need to do to get it working and in order....
__________________
It's been a long time. I had so much fun making a site back in 2016 that recently, when I started thinking about it again, I decided to come back and work on something small. It'll probably just be a personal project but who knows? We'll see, anyway.

Reply With Quote
  #7  
Old 06-20-2017, 04:06 PM
Dinocanid's Avatar
Dinocanid Dinocanid is offline
Member
 
Join Date: Aug 2016
Location: Maryland, USA
Posts: 516
Gender: Unknown/Other
Credits: 65,267
Dinocanid is on a distinguished road
Default

I got it to work!

PHP Code:
public function index(){  
        
$mysidia Registry::get("mysidia");  
        
$document $this->document;      
        
$document->setTitle($this->lang->title);          
        
$document->addLangvar($this->lang->default);  
          
        
$readoptHeader = new Comment("Pounded Adoptables for adoption");  
        
$readoptHeader->setHeading(3);  
        
$document->add($readoptHeader);  
          
        
$readoptTable = new TableBuilder("readopttable");  
        
$readoptTable->setAlign(new Align("center""middle"));  
        
$readoptTable->buildHeaders();  
        
$readoptTable->setHelper(new AdoptTableHelper);  
          
          
        
$pounds $this->getField("pounds");          
        
$iterator $pounds->iterator();          
        while(
$iterator->hasNext()){  
            
$entry $iterator->next();  
            
$adopt $entry->getKey();  
            
$cost $entry->getValue();  
            if(
$adopt->getGender() == "m"){$gender "Male";}
            if(
$adopt->getGender() == "f"){$gender "Female";}

                
$cells = new ArrayList;  
                
$lvl $adopt->getCurrentLevel();  
                if (
$lvl == 0) { $cells->add(new Comment("<img src='{$adopt->getImage()}'></a>")); }  
                if (
$lvl == 1) { $cells->add(new Comment("<img src='{$adopt->getImage()}'></a>")); }  
                if (
$lvl >= 2) { $cells->add(new Comment("<img src='{$adopt->getImage()}' width= '200px'></a>")); }   
                
$cells->add(new Comment("<b>Name:</b> {$adopt->getName()}"));  
                
$cells->add(new Comment("<b>Gender:</b> {$gender}"));  
                
$cells->add(new Comment("<b>Total Clicks:</b> {$adopt->getTotalClicks()}"));
                
$readoptForm = new Form("readoptform""pound/adopt""post");
                
$readoptForm->add(new PasswordField("hidden","aid""{$adopt->getAdoptID()}""yes"));
                
$readoptForm->add(new Button("Adopt Me""submit""submit"));
                
$cells->add($readoptForm);
                
$aCells = new TCell($cells"cell{$index}");  
                
$aCells->setAlign(new Align("center""center"));
                
$readoptTable->add($aCells);
}  
            
$document->add($readoptTable); 
          
    } 
Now it should show more than one pet. Here's what it looks like:
__________________
Reply With Quote
  #8  
Old 06-20-2017, 07:04 PM
parayna's Avatar
parayna parayna is offline
Member
 
Join Date: May 2013
Location: Devon, UK
Posts: 342
Gender: Female
Credits: 16,505
parayna is on a distinguished road
Default

Wow! Thanks so much!! :D
__________________
It's been a long time. I had so much fun making a site back in 2016 that recently, when I started thinking about it again, I decided to come back and work on something small. It'll probably just be a personal project but who knows? We'll see, anyway.

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 08:04 AM.

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