Exemple #1
0
 /**
  * Fill the content area
  *
  * Shows a list of the notices in the public stream, with some pagination
  * controls.
  *
  * @return void
  */
 function showContent()
 {
     $user = common_current_user();
     if (!empty($user) && $user->streamModeOnly()) {
         $nl = new NoticeList($this->notice, $this);
     } else {
         $nl = new ThreadedNoticeList($this->notice, $this, $this->userProfile);
     }
     $cnt = $nl->show();
     if ($cnt == 0) {
         $this->showEmptyList();
     }
     $this->pagination($this->page > 1, $cnt > NOTICES_PER_PAGE, $this->page, 'public');
 }
Exemple #2
0
 function showContent()
 {
     if (Event::handle('StartShowAllContent', array($this))) {
         $profile = null;
         $current_user = common_current_user();
         if (!empty($current_user)) {
             $profile = $current_user->getProfile();
         }
         if (!empty($current_user) && $current_user->streamModeOnly()) {
             $nl = new NoticeList($this->notice, $this);
         } else {
             $nl = new ThreadedNoticeList($this->notice, $this, $profile);
         }
         $cnt = $nl->show();
         if (0 == $cnt) {
             $this->showEmptyListMessage();
         }
         $this->pagination($this->page > 1, $cnt > NOTICES_PER_PAGE, $this->page, 'all', array('nickname' => $this->user->nickname));
         Event::handle('EndShowAllContent', array($this));
     }
 }
Exemple #3
0
 function showContent()
 {
     if (Event::handle('StartShowAllContent', array($this))) {
         if ($this->scoped instanceof Profile && $this->scoped->isLocal() && $this->scoped->getUser()->streamModeOnly()) {
             $nl = new PrimaryNoticeList($this->notice, $this, array('show_n' => NOTICES_PER_PAGE));
         } else {
             $nl = new ThreadedNoticeList($this->notice, $this, $this->scoped);
         }
         $cnt = $nl->show();
         if (0 == $cnt) {
             $this->showEmptyListMessage();
         }
         $this->pagination($this->page > 1, $cnt > NOTICES_PER_PAGE, $this->page, 'all', array('nickname' => $this->target->getNickname()));
         Event::handle('EndShowAllContent', array($this));
     }
 }
Exemple #4
0
 /**
  * Show the group notices
  *
  * @return void
  */
 function showGroupNotices()
 {
     $user = common_current_user();
     if ($this->group->force_scope && (empty($this->userProfile) || !$this->userProfile->isMember($this->group))) {
         $this->elementStart('p');
         $this->raw('Este grupo es privado, por lo que no es posible ver su contenido.<br/><br/>' . 'Si lo desea, puede comunicarse con el administrador del grupo, o solicitar unirse al grupo. ');
         $this->elementEnd('p');
     } else {
         if (empty($this->notice->_items)) {
             $this->elementStart('p');
             $this->raw('¡Una lástima! Este grupo aún no tiene mensajes. ');
             $this->elementEnd('p');
         } else {
             if (!empty($user) && $user->streamModeOnly()) {
                 $nl = new NoticeList($this->notice, $this);
             } else {
                 $nl = new ThreadedNoticeList($this->notice, $this, $this->userProfile);
             }
             $cnt = $nl->show();
             $this->pagination($this->page > 1, $cnt > NOTICES_PER_PAGE, $this->page, 'showgroup', array('nickname' => $this->group->nickname));
         }
     }
 }
 /**
  * Show the group notices
  *
  * @return void
  */
 function showGroupNotices()
 {
     $user = common_current_user();
     if (!empty($user) && $user->streamModeOnly()) {
         $nl = new PrimaryNoticeList($this->notice, $this, array('show_n' => NOTICES_PER_PAGE));
     } else {
         $nl = new ThreadedNoticeList($this->notice, $this, $this->userProfile);
     }
     $cnt = $nl->show();
     $this->pagination($this->page > 1, $cnt > NOTICES_PER_PAGE, $this->page, 'showgroup', array('nickname' => $this->group->nickname));
 }
 /**
  * Fill the content area
  *
  * Shows a list of the notices in the public stream, with some pagination
  * controls.
  *
  * @return void
  */
 function showContent()
 {
     $nl = new ThreadedNoticeList($this->notice, $this, $this->userProfile);
     $cnt = $nl->show();
     if ($cnt == 0) {
         $this->showEmptyList();
     }
     $this->pagination($this->page > 1, $cnt > NOTICES_PER_PAGE, $this->page, 'public');
 }
 /**
  * Fill the content area
  *
  * Shows a list of the notices in the public stream, with some pagination
  * controls.
  *
  * @return void
  */
 function showContent()
 {
     if ($this->scoped instanceof Profile && $this->scoped->isLocal() && $this->scoped->getUser()->streamModeOnly()) {
         $nl = new PrimaryNoticeList($this->notice, $this, array('show_n' => NOTICES_PER_PAGE));
     } else {
         $nl = new ThreadedNoticeList($this->notice, $this, $this->scoped);
     }
     $cnt = $nl->show();
     if ($cnt == 0) {
         $this->showEmptyList();
     }
     $this->pagination($this->page > 1, $cnt > NOTICES_PER_PAGE, $this->page, $this->action);
 }
 /**
  * Show the group notices
  *
  * @return void
  */
 function showGroupNotices()
 {
     $nl = new ThreadedNoticeList($this->notice, $this, $this->userProfile);
     $cnt = $nl->show();
     $this->pagination($this->page > 1, $cnt > NOTICES_PER_PAGE, $this->page, 'showgroup', array('nickname' => $this->group->nickname));
 }