Ejemplo n.º 1
0
 public function getAvatarURL($profile)
 {
     $config = EasyBlogHelper::getConfig();
     $class = 'EasyBlogAvatar' . $config->get('layout_avatarIntegration');
     $obj = new $class();
     if ($obj->_init()) {
         return $obj->_getAvatar($profile)->link;
     }
     $obj = new EasyBlogAvatarDefault();
     return $obj->_getAvatar($profile)->link;
 }
Ejemplo n.º 2
0
 public function getAvatarURL($profile)
 {
     // Get the avatar type
     $type = $this->config->get('layout_avatarIntegration');
     $class = 'EasyBlogAvatar' . ucfirst($type);
     if (!$this->loadLibrary($type)) {
         return false;
     }
     // Try to get the avatar
     $obj = new $class();
     $link = $obj->getAvatar($profile);
     // If we get a failed status, just render default avatar
     if ($link === false) {
         $this->loadLibrary('default');
         $obj = new EasyBlogAvatarDefault();
         $link = $obj->getAvatar($profile);
     }
     return $link;
 }