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 04-25-2017, 08:30 PM
Abronsyth's Avatar
Abronsyth Abronsyth is offline
A Headache Embodied
 
Join Date: Aug 2011
Location: NY
Posts: 1,011
Gender: Male
Credits: 162,931
Abronsyth is on a distinguished road
Default

I have the function in classes/class_siderbar as this;
PHP Code:
    public function getFavPetSB(){
        return 
$this->FavPetSB;
    }

    protected function 
setFavPetSB(){
        
$mysidia Registry::get("mysidia");
        
$profile $mysidia->user->getprofile();   
        
        
/* IF THE USER DOES *NOT* HAVE A FAVPET: */
        
if ($profile->getFavpetID() == "0"){
            
$this->FavPetSB = new Paragraph
            
$this->FavPetSB->add(new Comment("<a href='LINK TO CHOOSE PAGE'>Choose Companion</a>"));
        }

        
/* IF THE USER *DOES* HAVE A FAVPET: */
        
if ($profile->getFavpetID() != "0"){
            
$favpet = new OwnedAdoptable($profile->getFavpetID());
            
$this->FavPetSB = new Paragraph
            
$this->FavPetSB->add(new Comment("<center><b>Companion</b><br><a href='/myadopts/manage/{$profile->getFavpetID()}'><img src='{$favpet->getImage()}' style='max-width:80px;' rel='tooltip' title=\"{$favpet->name}\"></a><br></center>"));


        }        
        
$this->setDivision($this->FavPetSB);
    } 
That makes it so if a user doesn't have it set then they'll just get a link to set it. I don't know how much I changed it from Kyttias's version, but maybe it'll work for you?
__________________
My Mods Site (1.3.4, 2020 Mods)
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 11:09 AM.

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