applications/dashboard/controllers/class.profilecontroller.php
public function Notifications($Page = FALSE) {
      $this->Permission('Garden.SignIn.Allow');
      $this->EditMode(FALSE);
      
      list($Offset, $Limit) = OffsetLimit($Page, 30);

      $this->GetUserInfo(); 
      $this->_SetBreadcrumbs(T('Notifications'), '/profile/notifications');
      
      $this->SetTabView('Notifications');
      $Session = Gdn::Session();
      
      $this->ActivityModel = new ActivityModel();
      
      // Drop notification count back to zero.
      $this->ActivityModel->MarkRead($Session->UserID);
      
      // Get notifications data.
      $Activities = $this->ActivityModel->GetNotifications($Session->UserID, $Offset, $Limit)->ResultArray();
      $this->ActivityModel->JoinComments($Activities);
      $this->SetData('Activities', $Activities);
      unset($Activities);
      //$TotalRecords = $this->ActivityModel->GetCountNotifications($Session->UserID);
      
      // Build a pager
      $PagerFactory = new Gdn_PagerFactory();
      $this->Pager = $PagerFactory->GetPager('MorePager', $this);
      $this->Pager->MoreCode = 'More';
      $this->Pager->LessCode = 'Newer Notifications';
      $this->Pager->ClientID = 'Pager';
      $this->Pager->Configure(
         $Offset,
         $Limit,
         FALSE,
         'profile/notifications/%1$s/'
      );
      // Deliver json data if necessary
      if ($this->_DeliveryType != DELIVERY_TYPE_ALL) {
         $this->SetJson('LessRow', $this->Pager->ToString('less'));
         $this->SetJson('MoreRow', $this->Pager->ToString('more'));
         if ($Offset > 0) {
            $this->View = 'activities';
            $this->ControllerName = 'Activity';
         }
      }
      $this->Render();
   }
public function Notifications($Page = FALSE) {
      $this->Permission('Garden.SignIn.Allow');
      $this->EditMode(FALSE);
      
      list($Offset, $Limit) = OffsetLimit($Page, 30);

      $this->GetUserInfo(); 
      $this->_SetBreadcrumbs(T('Notifications'), '/profile/notifications');
      
      $this->SetTabView('Notifications');
      $Session = Gdn::Session();
      
      $this->ActivityModel = new ActivityModel();
      
      // Drop notification count back to zero.
      $this->ActivityModel->MarkRead($Session->UserID);
      
      // Get notifications data.
      $Activities = $this->ActivityModel->GetNotifications($Session->UserID, $Offset, $Limit)->ResultArray();
      $this->ActivityModel->JoinComments($Activities);
      $this->SetData('Activities', $Activities);
      unset($Activities);
      //$TotalRecords = $this->ActivityModel->GetCountNotifications($Session->UserID);
      
      // Build a pager
      $PagerFactory = new Gdn_PagerFactory();
      $this->Pager = $PagerFactory->GetPager('MorePager', $this);
      $this->Pager->MoreCode = 'More';
      $this->Pager->LessCode = 'Newer Notifications';
      $this->Pager->ClientID = 'Pager';
      $this->Pager->Configure(
         $Offset,
         $Limit,
         FALSE,
         'profile/notifications/%1$s/'
      );
      // Deliver json data if necessary
      if ($this->_DeliveryType != DELIVERY_TYPE_ALL) {
         $this->SetJson('LessRow', $this->Pager->ToString('less'));
         $this->SetJson('MoreRow', $this->Pager->ToString('more'));
         if ($Offset > 0) {
            $this->View = 'activities';
            $this->ControllerName = 'Activity';
         }
      }
      $this->Render();
   }
public function Notifications ( $ Page = FALSE ) { $ this -> Permission ( 'Garden.SignIn.Allow' ) ; $ this -> EditMode ( FALSE ) ; list ( $ Offset , $ Limit ) = OffsetLimit ( $ Page , 30 ) ; $ this -> GetUserInfo ( ) ; $ this -> _SetBreadcrumbs ( T ( 'Notifications' ) , '/profile/notifications' ) ; $ this -> SetTabView ( 'Notifications' ) ; $ Session = Gdn :: Session ( ) ; $ this -> ActivityModel = new ActivityModel ( ) ; // Drop notification count back to zero. $ this -> ActivityModel -> MarkRead ( $ Session -> UserID ) ; // Get notifications data. $ Activities = $ this -> ActivityModel -> GetNotifications ( $ Session -> UserID , $ Offset , $ Limit ) -> ResultArray ( ) ; $ this -> ActivityModel -> JoinComments ( $ Activities ) ; $ this -> SetData ( 'Activities' , $ Activities ) ; unset ( $ Activities ) ; //$TotalRecords = $this->ActivityModel->GetCountNotifications($Session->UserID); // Build a pager $ PagerFactory = new Gdn_PagerFactory ( ) ; $ this -> Pager = $ PagerFactory -> GetPager ( 'MorePager' , $ this ) ; $ this -> Pager -> MoreCode = 'More' ; $ this -> Pager -> LessCode = 'Newer Notifications' ; $ this -> Pager -> ClientID = 'Pager' ; $ this -> Pager -> Configure ( $ Offset , $ Limit , FALSE , 'profile/notifications/%1$s/' ) ; // Deliver json data if necessary if ( $ this -> _DeliveryType != DELIVERY_TYPE_ALL ) { $ this -> SetJson ( 'LessRow' , $ this -> Pager -> ToString ( 'less' ) ) ; $ this -> SetJson ( 'MoreRow' , $ this -> Pager -> ToString ( 'more' ) ) ; if ( $ Offset > 0 ) { $ this -> View = 'activities' ; $ this -> ControllerName = 'Activity' ; } } $ this -> Render ( ) ; }
Show notifications for current user.

@since 2.0.0
@access public
@param int $Page Number to skip (paging).
Show notifications for current user .