Ejemplo n.º 1
0
 protected function avatar($user)
 {
     $avatar = URL_IMG . 'avatar' . DASH . $user->getGender() . EXT_PNG;
     if ($user->getAvatar()) {
         $avatar = URL_PHOTOS . $user->getId() . SLASH . 'avatar' . EXT_JPG;
     }
     return DOMFactory::getLink($this->url->getCustomActionURL('profile', $user->getLogin()), DOMFactory::getImage($avatar))->addClass('avatar');
 }
Ejemplo n.º 2
0
 protected function user()
 {
     if ($this->values->error) {
         $this->template->message = DOMFactory::getDiv($this->values->error)->addClass('error');
     }
     if (($comments = $this->values->videos) != null) {
         foreach ($this->values->videos as $video) {
             $image = DOMFactory::getImage($video->getThumbnail());
             $link = DOMFactory::getLink($this->url->getCustomActionURL('video', 'show', array($video->getId())), $image)->addClass('thumbnail');
             $this->template->videos .= DOMFactory::getDiv($link);
         }
     }
     $this->template->show($this->url->getActionPath());
 }
Ejemplo n.º 3
0
 protected function account()
 {
     $profile = $this->values->profile;
     $this->template->name = $profile->getFirstname() . SPACE . $profile->getLastname();
     $photo = URL_IMG . 'profile' . DASH . $profile->getGender() . EXT_PNG;
     if ($profile->getAvatar()) {
         $photo = URL_PHOTOS . $profile->getId() . SLASH . 'profile' . EXT_JPG;
     }
     $this->template->photo = DOMFactory::getLink($this->url->getCustomActionURL('profile', $profile->getLogin()), DOMFactory::getImage($photo)->addClass('photo-frame'));
     $this->template->videoLink = DOMFactory::getLink($this->url->getCustomActionURL('video', 'user', array($profile->getLogin())), 'Videos')->addClass('tahoma-13')->addStyle('margin-right: 6px;');
     $this->template->photosLink = DOMFactory::getLink($this->url->getCustomActionURL('photos', 'user', array($profile->getLogin())), 'Photos')->addClass('tahoma-13')->addStyle('margin-right: 6px;');
     $this->template->friendsLink = DOMFactory::getLink($this->url->getCustomActionURL('friends', 'user', array($profile->getLogin())), 'Friends')->addClass('tahoma-13')->addStyle('margin-right: 6px;');
     $this->template->blogLink = DOMFactory::getLink($this->url->getCustomActionURL('blog', 'user', array($profile->getLogin())), 'Blog')->addClass('tahoma-13')->addStyle('margin-right: 6px;');
     $this->template->show($this->url->getActionPath());
 }