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 01-08-2016, 01:28 PM
Abronsyth's Avatar
Abronsyth Abronsyth is offline
A Headache Embodied
 
Join Date: Aug 2011
Location: NY
Posts: 1,011
Gender: Male
Credits: 111,654
Abronsyth is on a distinguished road
Default Restyling the adopt manage page

Resolved

I am trying to restyle the .../myadopts/manage/ID# page to actually display adopt data, but it's proving to be difficult. For some reason the methods that work to display data everywhere else in the .../myadopts file does not work right on the manage page. Elsewhere data can be displayed like;
PHP Code:
{$adopt->getTotalClicks()} 
And that'll display the total clicks an adopt has accumulated, but that same code does not work within the manage function.

If I could figure out how to at least define things within the manage function then I could get it all working, but I've tried;
PHP Code:
        $gender $this->getField("gender")->getValue(); 
And it doesn't work...so I'm lost.

Here is my public function manage:
PHP Code:
    public function manage(){
        
$mysidia Registry::get("mysidia");
        
$aid $this->getField("aid")->getValue();
        
$name $this->getField("name")->getValue();
        
$image $this->getField("image");
        
        
$document $this->document;        
        
$document->setTitle("Managing {$name}");
        
$document->add($image);
        
$document->add(new Comment("<br><br>This page allows you to manage {$name}.  Click on an option below to change settings.<br>
                        <a href='http://catisserie.mysidiahost.com/levelup/click/
{$aid}'>Play</a> | <a href='http://catisserie.mysidiahost.com/myadopts/stats/{$aid}'>Stats</a> | <a href='http://catisserie.mysidiahost.com/myadopts/bbcode/{$aid}'>Codes</a> | <a href='http://catisserie.mysidiahost.com/myadopts/freeze/{$aid}'>(Un)Freeze</a><br>
                        <ul>
                                        <li>Name: 
{$name} | <a href='http://catisserie.mysidiahost.com/myadopts/rename/{$aid}'>change</a></li>
                                        <li>Birthday: date adopted will display here </li>
                                        <li>Type: adopt breed will display here</li>
                                        <li>Sex: m or f will display here</li>
                                        <li>Trade Status: trade status will display here | <a href='http://catisserie.mysidiahost.com/myadopts/trade/
{$aid}'>change</a></li>
                                        <li>LVL: level will display here</li>
                                        <li>Total EXP: number of clicks will go here</li> 
                                    </ul>"
));
        
        
$document->add(new Image("templates/icons/delete.gif"));
        
$document->add(new Link("pound/pound/{$aid}"" Pound {$name}"TRUE)); 
    } 
Sorry again for all of the questions ;~;
__________________
My Mods Site (1.3.4, 2020 Mods)

Last edited by Abronsyth; 02-18-2016 at 02:49 PM.
Reply With Quote
  #2  
Old 01-08-2016, 03:24 PM
Kyttias's Avatar
Kyttias Kyttias is offline
Premium Member
 
Join Date: Jan 2014
Posts: 857
Gender: Unknown/Other
Credits: 86,940
Kyttias is on a distinguished road
Default

Try setting $adopt = new Adoptable($aid); and then using it as you were trying before?
__________________
Please do not contact me directly outside of Mysidia.
I also cannot troubleshoot code more than two years old - I legit don't remember it.
Reply With Quote
  #3  
Old 01-08-2016, 08:29 PM
Abronsyth's Avatar
Abronsyth Abronsyth is offline
A Headache Embodied
 
Join Date: Aug 2011
Location: NY
Posts: 1,011
Gender: Male
Credits: 111,654
Abronsyth is on a distinguished road
Default

Set it to $adopt = new OwnedAdoptable($aid); and it works brilliantly now! I am much obliged, Kyttias! I cannot thank you enough!
__________________
My Mods Site (1.3.4, 2020 Mods)
Reply With Quote
  #4  
Old 01-08-2016, 08:44 PM
Kyttias's Avatar
Kyttias Kyttias is offline
Premium Member
 
Join Date: Jan 2014
Posts: 857
Gender: Unknown/Other
Credits: 86,940
Kyttias is on a distinguished road
Default

I was close. ^^;; Glad it's working!
__________________
Please do not contact me directly outside of Mysidia.
I also cannot troubleshoot code more than two years old - I legit don't remember it.
Reply With Quote
  #5  
Old 01-08-2016, 10:43 PM
tahbikat's Avatar
tahbikat tahbikat is offline
Member
 
Join Date: Feb 2014
Location: Louisiana
Posts: 408
Gender: Female
Credits: 48,898
tahbikat is on a distinguished road
Default

Oooh, so this displays stats on the actual manage page? I have some stats on the Stats page under manage, but this would be much better!
Reply With Quote
  #6  
Old 01-08-2016, 11:05 PM
Abronsyth's Avatar
Abronsyth Abronsyth is offline
A Headache Embodied
 
Join Date: Aug 2011
Location: NY
Posts: 1,011
Gender: Male
Credits: 111,654
Abronsyth is on a distinguished road
Default

Yep! It was killing me to have to go to the adoptable and then click on the stats link to see any information about the pet XD If you need help getting any specific stats to display just ask! Here's my resulting page;


PHP Code:
    public function manage(){
        
$mysidia Registry::get("mysidia");
        
$aid $this->getField("aid")->getValue();
        
$name $this->getField("name")->getValue();
        
$image $this->getField("image");
        
$adopt = new OwnedAdoptable($aid);
        
        
$document $this->document;        
        
$document->setTitle("Managing {$name}");
        
$document->add($image);
        
$document->add(new Comment("<br><br>This page allows you to manage {$name}.  Click on an option below to change settings.<br>
                        <a href='http://YOUR URL/levelup/click/
{$aid}'>Play</a> | <a href='http://YOUR URL/myadopts/stats/{$aid}'>Stats</a> | <a href='http://YOUR URL/myadopts/bbcode/{$aid}'>Codes</a> | <a href='http://YOUR URL/myadopts/freeze/{$aid}'>(Un)Freeze</a><br>
                        <ul>
                                        <li><strong>Name:</strong> 
{$name} | <a href='http://YOUR URL/myadopts/rename/{$aid}'>change</a></li>
                                        <li><strong>Birthday:</strong> 
{$adopt->getBirthday()} </li>
                                        <li><strong>Type:</strong> 
{$adopt->getType()}</li>
                                        <li><strong>Sex:</strong> 
{$adopt->getGender()}</li>
                                        <li><strong>Trade Status:</strong> 
{$adopt->getTradeStatus()} | <a href='http://YOUR URL/myadopts/trade/{$aid}'>change</a></li>
                                        <li><strong>LVL:</strong> 
{$adopt->getCurrentLevel()}</li>
                                        <li><strong>Total EXP:</strong> 
{$adopt->getTotalClicks()}  </li> 
                                    </ul>"
));
        
        
$document->add(new Image("templates/icons/delete.gif"));
        
$document->add(new Link("pound/pound/{$aid}"" Pound {$name}"TRUE)); 
    } 
__________________
My Mods Site (1.3.4, 2020 Mods)
Reply With Quote
  #7  
Old 01-09-2016, 04:31 AM
tahbikat's Avatar
tahbikat tahbikat is offline
Member
 
Join Date: Feb 2014
Location: Louisiana
Posts: 408
Gender: Female
Credits: 48,898
tahbikat is on a distinguished road
Default

Thank you kindly Abron. <3 Gonna add this to my ever growing list of things to add. :P
Reply With Quote
  #8  
Old 01-16-2017, 02:17 AM
SilverDragonTears's Avatar
SilverDragonTears SilverDragonTears is offline
I am your Nemesis.
 
Join Date: Jun 2011
Posts: 1,113
Gender: Female
Credits: 81,204
SilverDragonTears is on a distinguished road
Default

the birthday part is throwing an error but I have that in my database.
__________________

Check out SilvaTales
Reply With Quote
  #9  
Old 01-17-2017, 08:28 AM
Abronsyth's Avatar
Abronsyth Abronsyth is offline
A Headache Embodied
 
Join Date: Aug 2011
Location: NY
Posts: 1,011
Gender: Male
Credits: 111,654
Abronsyth is on a distinguished road
Default

Are you using Kyttias's birthday mod?
__________________
My Mods Site (1.3.4, 2020 Mods)
Reply With Quote
  #10  
Old 06-25-2018, 03:09 AM
kingsofjuly kingsofjuly is offline
Member
 
Join Date: Jun 2018
Posts: 5
Gender: Female
Credits: 1,691
kingsofjuly is on a distinguished road
Default

Where do I insert this, please? I attempted to place it under line 38:

Quote:
public function manage(){
$this->setField("aid", new Integer($this->adopt->getAdoptID()));
$this->setField("name", new String($this->adopt->getName()));
$this->setField("image", $this->image);
}
but it keeps throwing me to a blank page, on both My Adopts and Manage the Pet page. I have altered the URLs to my own domain. Would love to implement this, as I've just added the stat adding script :) Thanks
Reply With Quote
Reply

Thread Tools
Display Modes

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

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