Mysidia Adoptables Support Forum

Mysidia Adoptables Support Forum (http://www.mysidiaadoptables.com/forum/index.php)
-   Questions and Supports (http://www.mysidiaadoptables.com/forum/forumdisplay.php?f=18)
-   -   Restyling Pound? (http://www.mysidiaadoptables.com/forum/showthread.php?t=5320)

parayna 12-29-2016 04:28 PM

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 
http://i1346.photobucket.com/albums/...pse25gqpm9.png

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 
http://i1346.photobucket.com/albums/...pscjtjdzjq.png

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


Thank you very much! ^_^

Dinocanid 12-29-2016 04:31 PM

You could always recycle the code from your myadoptsview.php and use it in the poundview.php.

parayna 12-29-2016 05:27 PM

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 ^_^

Dinocanid 12-29-2016 06:01 PM

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);
         
    } 


parayna 12-29-2016 06:35 PM

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). :ooo:

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 ^_^"

parayna 06-20-2017 08:31 AM

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....

Dinocanid 06-20-2017 04:06 PM

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:
http://www.clipular.com/c/6281221048...d-P0C0YsPQyU6M

parayna 06-20-2017 07:04 PM

Wow! Thanks so much!! :D


All times are GMT -5. The time now is 04:03 AM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.