- Edited
"avatar" and "osticket" directories on the same level.
File format avatars: IOFamily@gmail.com.jpg the same as the address in the profile + JPG.
The width of the avatars - 80px (96px).
Find and edit file - osticket/upload/include/class.avatar.php
Make changes to it as shown below.
Code part:
abstract class Avatar {
var $user;
function __construct($user) {
$this->user = $user;
$this->email = $user->getEmail();
}
abstract function getUrl($size);
function LoadLocal($size) {
$eml = $this->email; // from construct abstract class Avatar
$im = '../../../avatar/'.$eml.'.jpg';
if(!is_readable($im)){ return $this->getUrl($size); }
return $im;
}
function getImageTag($size=null) {
$img = $this->LoadLocal($size);
$style = ($size)
? sprintf('style="max-height:%spx"', $size)
: '';
return "<img {$style} class=\"avatar\" alt=\""
.__('Avatar').'" src="'.$img.'" />';
}
function __toString() {
return $this->getImageTag();
}
function isChangeable() {
return false;
}
function toggle() {}
}