Ejemplo n.º 1
0
 /**
  * Instead of showing notices, link to the original offsite profile.
  */
 function showNotices()
 {
     $url = $this->profile->profileurl;
     $host = parse_url($url, PHP_URL_HOST);
     $markdown = sprintf(_m('This remote profile is registered on another site; see [%1$s\'s original profile page on %2$s](%3$s).'), $this->profile->nickname, $host, $url);
     $html = common_markup_to_html($markdown);
     $this->raw($html);
     if ($this->profile->hasRole(Profile_role::SILENCED)) {
         // TRANS: Message on blocked remote profile page.
         $markdown = _m('Site moderators have silenced this profile, which prevents delivery of new messages to any users on this site.');
         $this->raw(common_markup_to_html($markdown));
     } else {
         $pnl = null;
         if (Event::handle('ShowStreamNoticeList', array($this->notice, $this, &$pnl))) {
             $pnl = new ProfileNoticeList($this->notice, $this);
         }
         $cnt = $pnl->show();
         if (0 == $cnt) {
             $this->showEmptyListMessage();
         }
         $args = array('id' => $this->profile->id);
         if (!empty($this->tag)) {
             $args['tag'] = $this->tag;
         }
         $this->pagination($this->page > 1, $cnt > NOTICES_PER_PAGE, $this->page, 'remoteprofile', $args);
     }
 }
Ejemplo n.º 2
0
 function showNotices()
 {
     $notice = $this->user->getNotices(($this->page - 1) * NOTICES_PER_PAGE, NOTICES_PER_PAGE + 1);
     $pnl = new ProfileNoticeList($notice, $this);
     $cnt = $pnl->show();
     $this->pagination($this->page > 1, $cnt > NOTICES_PER_PAGE, $this->page, 'showstream', array('nickname' => $this->user->nickname));
 }
Ejemplo n.º 3
0
 function showNotices()
 {
     $pnl = null;
     if (Event::handle('ShowStreamNoticeList', array($this->notice, $this, &$pnl))) {
         $pnl = new ProfileNoticeList($this->notice, $this);
     }
     $cnt = $pnl->show();
     if (0 == $cnt) {
         $this->showEmptyListMessage();
     }
     $args = array('nickname' => $this->user->nickname);
     if (!empty($this->tag)) {
         $args['tag'] = $this->tag;
     }
     $this->pagination($this->page > 1, $cnt > NOTICES_PER_PAGE, $this->page, 'showstream', $args);
 }
Ejemplo n.º 4
0
 function showNotices()
 {
     $notice = empty($this->tag) ? $this->user->getNotices(($this->page - 1) * NOTICES_PER_PAGE, NOTICES_PER_PAGE + 1) : $this->user->getTaggedNotices($this->tag, ($this->page - 1) * NOTICES_PER_PAGE, NOTICES_PER_PAGE + 1, 0, 0, null);
     $pnl = new ProfileNoticeList($notice, $this);
     $cnt = $pnl->show();
     if (0 == $cnt) {
         $this->showEmptyListMessage();
     }
     $args = array('nickname' => $this->user->nickname);
     if (!empty($this->tag)) {
         $args['tag'] = $this->tag;
     }
     $this->pagination($this->page > 1, $cnt > NOTICES_PER_PAGE, $this->page, 'showstream', $args);
 }