Fixing the size issue with avatars in private messages

Forum
Last Post
Threads / Messages

GeneticAlpha

Loving Mysidia!
Member
Joined
May 24, 2020
Messages
283
Points
18
Age
30
Location
Tennessee
Mysidian Dollar
13,356
This tutorial I'm making because of a issue I ran into with private message avatar displays. I had my husband create a test account and he uploaded an image that was quite large. On his profile, the site sidebar's avatar was the right size, but when he sent me a test message I saw his avatar was its legit size, which was huge. So, thanks to Restless, she helped me make a fix for this issue.​

- Open up your Files Manager
- Open up
classes/class_privatemessage.php and you will see this:

public function getPostbar(){
if($this->mid == 0) return FALSE;
$sender = new Member($this->fromuser);
$sender->getprofile();
$this->postbar = new Table("postbar", "100%", FALSE);
$postHeader = new TRow;
$postHeader->add(new TCell(new Image($sender->profile->getAvatar(),'',150)));
$this->postbar->add($postHeader);
return $this->postbar;
}

You want to only change the​
$postHeader bit. Yours will look different than mine because mine has the fix already so the code below is what you need to change your $postHeader to. So change to:

$postHeader->add(new TCell(new Image($sender->profile->getAvatar(),'',150)));

The 150 is the size you want the avatar. Hope this helps!​
 
Last edited:

Similar threads

Users who are viewing this thread

  • Forum Contains New Posts
  • Forum Contains No New Posts

Forum statistics

Threads
4,267
Messages
33,048
Members
1,602
Latest member
BerrieMilk
BETA

Latest Threads

Latest Posts

Top