Mys 1.3.4 Public Profile Mod

Forum
Last Post
Threads / Messages
Okay I got it lol. Well, in so far as the page works, there's no information displayed but it worked for the owner and for another user viewing it. If you want help with adding information, especially different if the owner is viewing it or not, just let me know and I can try to cobble together an actual profile :LOL: Pulled an all nighter as I couldn't sleep so I am tiirreeddd lol. But this might be a good starting point for you. Change 'public function profile' to 'publicprofile' if you want it back to that.

levelupview:

PHP:
    public function profile(){
        $mysidia = Registry::get("mysidia");
        $document = $this->document;             
        $adopt = $this->getField("adopt");         
        $document->setTitle("Viewing {$adopt->getName()}'s Profile");

        $image = $adopt->getImage(Model::GUI);     
        $image->setLineBreak(TRUE);     
        $profile = new Division;
        $profile->setAlign(new Align("center"));
        $profile->add($image);
        $profile->add(new Comment("Viewing Profile Of This Adopt!!!"));
        $profile->add(new Comment("Profile info here"));
        $document->add($profile);         
    }

levelupcontroller:

PHP:
public function profile($aid){
        $mysidia = Registry::get("mysidia");
        $this->adopt = new OwnedAdoptable($aid);
        $this->setField("adopt", $this->adopt);
    }
You are a lifesaver but you also need sleep lol.
 
I wanted to add a shorter way to make a link to the profile using the newer 1.3.6 things. I stuck this in the click function so it shows up after you click the pet (in the isloggedin block after the reward stuff).

$summary->add(new Link("levelup/profile/{$adopt->getAdoptID()}", "Visit this Adoptable"));
$summary->add(new Comment("</br>"));
 

Similar threads

Users who are viewing this thread

  • Forum Contains New Posts
  • Forum Contains No New Posts

Forum statistics

Threads
4,277
Messages
33,119
Members
1,602
Latest member
BerrieMilk
BETA

Latest Threads

Latest Posts

Top