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)
-   -   Add Favorite Adopt to sidebar? (http://www.mysidiaadoptables.com/forum/showthread.php?t=5419)

KatFennec 04-25-2017 09:28 PM

Final version of the module. As per aquapyrofan's suggestion, moved the OwnedAdoptable line below the else statement, and I have verified that it works.

PHP Code:

$profile $mysidia->user->getprofile();


if(
$profile->getFavpetID() == 0){
$texta = new Paragraph;
$texta->add(new Comment(
<br>
Unfortunately, you don't seem to have a favourite pet set.
<br>
Would you like to <a href='
{$mysidia->path->getAbsolute()}account/profile'> set one</a>? 
"
));
}
else {
$owned = new OwnedAdoptable($profile->getFavpetID());
$Name $owned->getName();
$Type $owned->getType();
$texta = new Paragraph;
$texta->add(new Comment(

<br> 
<img src='
{$owned->getImage()}'> 
<br> 
{$Name} the {$Type} 
<br> 
<a href='
{$mysidia->path->getAbsolute()}myadopts/manage/{$owned->getAdoptID()}'>View</a> | <a href='{$mysidia->path->getAbsolute()}account/profile'>Change</a> 
"
)); 
}
$moduleContainer->add($texta); 



All times are GMT -5. The time now is 08:50 PM.

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