original_string: public function ProfileController_Comments_Create($Sender, $UserReference = '', $Username = '', $Page = '', $UserID = '') {
  		$Sender->EditMode(FALSE);
  		$View = $Sender->View;
        // Tell the ProfileController what tab to load
  		$Sender->GetUserInfo($UserReference, $Username, $UserID);
        $Sender->_SetBreadcrumbs(T('Comments'), UserUrl($Sender->User, '', 'comments'));
        $Sender->SetTabView('Comments', 'profile', 'Discussion', 'Vanilla');
        
        $PageSize = Gdn::Config('Vanilla.Discussions.PerPage', 30);
        list($Offset, $Limit) = OffsetLimit($Page, $PageSize);
        
        $CommentModel = new CommentModel();
        $Comments = $CommentModel->GetByUser2($Sender->User->UserID, $Limit, $Offset, $Sender->Request->Get('lid'));
        $TotalRecords = $Offset + $CommentModel->LastCommentCount + 1;
        
        // Build a pager
        $PagerFactory = new Gdn_PagerFactory();
        $Sender->Pager = $PagerFactory->GetPager('MorePager', $Sender);
        $Sender->Pager->MoreCode = 'More Comments';
        $Sender->Pager->LessCode = 'Newer Comments';
        $Sender->Pager->ClientID = 'Pager';
        $Sender->Pager->Configure(
           $Offset,
           $Limit,
           $TotalRecords,
           UserUrl($Sender->User, '', 'comments').'?page={Page}' //?lid='.$CommentModel->LastCommentID
        );
        
        // Deliver JSON data if necessary
        if ($Sender->DeliveryType() != DELIVERY_TYPE_ALL && $Offset > 0) {
           $Sender->SetJson('LessRow', $Sender->Pager->ToString('less'));
           $Sender->SetJson('MoreRow', $Sender->Pager->ToString('more'));
           $Sender->View = 'profilecomments';
        }
  		$Sender->SetData('Comments', $Comments);
        
        // Set the HandlerType back to normal on the profilecontroller so that it fetches it's own views
        $Sender->HandlerType = HANDLER_TYPE_NORMAL;
        
        // Do not show discussion options
        $Sender->ShowOptions = FALSE;
        
        if ($Sender->Head) {
           $Sender->Head->AddTag('meta', array('name' => 'robots', 'content' => 'noindex,noarchive'));
        }
        
        // Render the ProfileController
        $Sender->Render();
     }
code: public function ProfileController_Comments_Create($Sender, $UserReference = '', $Username = '', $Page = '', $UserID = '') {
  		$Sender->EditMode(FALSE);
  		$View = $Sender->View;
        // Tell the ProfileController what tab to load
  		$Sender->GetUserInfo($UserReference, $Username, $UserID);
        $Sender->_SetBreadcrumbs(T('Comments'), UserUrl($Sender->User, '', 'comments'));
        $Sender->SetTabView('Comments', 'profile', 'Discussion', 'Vanilla');
        
        $PageSize = Gdn::Config('Vanilla.Discussions.PerPage', 30);
        list($Offset, $Limit) = OffsetLimit($Page, $PageSize);
        
        $CommentModel = new CommentModel();
        $Comments = $CommentModel->GetByUser2($Sender->User->UserID, $Limit, $Offset, $Sender->Request->Get('lid'));
        $TotalRecords = $Offset + $CommentModel->LastCommentCount + 1;
        
        // Build a pager
        $PagerFactory = new Gdn_PagerFactory();
        $Sender->Pager = $PagerFactory->GetPager('MorePager', $Sender);
        $Sender->Pager->MoreCode = 'More Comments';
        $Sender->Pager->LessCode = 'Newer Comments';
        $Sender->Pager->ClientID = 'Pager';
        $Sender->Pager->Configure(
           $Offset,
           $Limit,
           $TotalRecords,
           UserUrl($Sender->User, '', 'comments').'?page={Page}' //?lid='.$CommentModel->LastCommentID
        );
        
        // Deliver JSON data if necessary
        if ($Sender->DeliveryType() != DELIVERY_TYPE_ALL && $Offset > 0) {
           $Sender->SetJson('LessRow', $Sender->Pager->ToString('less'));
           $Sender->SetJson('MoreRow', $Sender->Pager->ToString('more'));
           $Sender->View = 'profilecomments';
        }
  		$Sender->SetData('Comments', $Comments);
        
        // Set the HandlerType back to normal on the profilecontroller so that it fetches it's own views
        $Sender->HandlerType = HANDLER_TYPE_NORMAL;
        
        // Do not show discussion options
        $Sender->ShowOptions = FALSE;
        
        if ($Sender->Head) {
           $Sender->Head->AddTag('meta', array('name' => 'robots', 'content' => 'noindex,noarchive'));
        }
        
        // Render the ProfileController
        $Sender->Render();
     }
code_tokens: public function ProfileController_Comments_Create ( $ Sender , $ UserReference = '' , $ Username = '' , $ Page = '' , $ UserID = '' ) { $ Sender -> EditMode ( FALSE ) ; $ View = $ Sender -> View ; // Tell the ProfileController what tab to load $ Sender -> GetUserInfo ( $ UserReference , $ Username , $ UserID ) ; $ Sender -> _SetBreadcrumbs ( T ( 'Comments' ) , UserUrl ( $ Sender -> User , '' , 'comments' ) ) ; $ Sender -> SetTabView ( 'Comments' , 'profile' , 'Discussion' , 'Vanilla' ) ; $ PageSize = Gdn :: Config ( 'Vanilla.Discussions.PerPage' , 30 ) ; list ( $ Offset , $ Limit ) = OffsetLimit ( $ Page , $ PageSize ) ; $ CommentModel = new CommentModel ( ) ; $ Comments = $ CommentModel -> GetByUser2 ( $ Sender -> User -> UserID , $ Limit , $ Offset , $ Sender -> Request -> Get ( 'lid' ) ) ; $ TotalRecords = $ Offset + $ CommentModel -> LastCommentCount + 1 ; // Build a pager $ PagerFactory = new Gdn_PagerFactory ( ) ; $ Sender -> Pager = $ PagerFactory -> GetPager ( 'MorePager' , $ Sender ) ; $ Sender -> Pager -> MoreCode = 'More Comments' ; $ Sender -> Pager -> LessCode = 'Newer Comments' ; $ Sender -> Pager -> ClientID = 'Pager' ; $ Sender -> Pager -> Configure ( $ Offset , $ Limit , $ TotalRecords , UserUrl ( $ Sender -> User , '' , 'comments' ) . '?page={Page}' //?lid='.$CommentModel->LastCommentID ) ; // Deliver JSON data if necessary if ( $ Sender -> DeliveryType ( ) != DELIVERY_TYPE_ALL && $ Offset > 0 ) { $ Sender -> SetJson ( 'LessRow' , $ Sender -> Pager -> ToString ( 'less' ) ) ; $ Sender -> SetJson ( 'MoreRow' , $ Sender -> Pager -> ToString ( 'more' ) ) ; $ Sender -> View = 'profilecomments' ; } $ Sender -> SetData ( 'Comments' , $ Comments ) ; // Set the HandlerType back to normal on the profilecontroller so that it fetches it's own views $ Sender -> HandlerType = HANDLER_TYPE_NORMAL ; // Do not show discussion options $ Sender -> ShowOptions = FALSE ; if ( $ Sender -> Head ) { $ Sender -> Head -> AddTag ( 'meta' , array ( 'name' => 'robots' , 'content' => 'noindex,noarchive' ) ) ; } // Render the ProfileController $ Sender -> Render ( ) ; }
docstring: Creates virtual 'Comments' method in ProfileController.
  
  @since 2.0.0
  @package Vanilla
  
  @param ProfileController $Sender ProfileController.
docstring_tokens: Creates virtual Comments method in ProfileController .