PHP 클래스 AllViewedPlugin, vanilla

상속: extends Gdn_Plugin
파일 보기 프로젝트 열기: vanilla/vanilla

공개 메소드들

메소드 설명
base_render_before ( Gdn_Controller $sender ) Adds "Mark All Viewed" to main menu.
discussionModel_setCalculatedFields_handler ( DiscussionModel $sender ) Modify CountUnreadComments to account for DateAllViewed.
discussionsController_markAllViewed_create ( DiscussionsController $sender ) Allows user to mark all discussions as viewed.
discussionsController_markCategoryViewed_create ( DiscussionsController $sender, integer $CategoryID ) Allows user to mark all discussions in a specified category as viewed.
meModule_flyoutMenu_handler ( MeModule $sender ) Adds "Mark All Viewed" and (conditionally) "Mark Category Viewed" to MeModule menu.

비공개 메소드들

메소드 설명
checkDiscussionDate ( DiscussionModel $Discussion, integer | string $DateAllViewed ) Helper function to actually override a discussion's unread status
getCommentCountSince ( integer $DiscussionID, integer | string $DateAllViewed ) : integer Get the number of comments inserted since the given timestamp.
markCategoryRead ( CategoryModel $categoryModel, integer $categoryID ) Helper function that actually sets the DateMarkedRead column in UserCategory
recursiveMarkCategoryRead ( CategoryModel $CategoryModel, array $UnprocessedCategories, array $ParentIDs ) Helper function to recursively mark categories as read based on a Category's ParentID.

메소드 상세

base_render_before() 공개 메소드

Adds "Mark All Viewed" to main menu.
부터: 1.0
public base_render_before ( Gdn_Controller $sender )
$sender Gdn_Controller

discussionModel_setCalculatedFields_handler() 공개 메소드

Required in DiscussionModel->get() just before the return: $this->EventArguments['Data'] = $Data; $this->fireEvent('AfterAddColumns');
부터: 1.0
public discussionModel_setCalculatedFields_handler ( DiscussionModel $sender )
$sender DiscussionModel

discussionsController_markAllViewed_create() 공개 메소드

Allows user to mark all discussions as viewed.
부터: 1.0
public discussionsController_markAllViewed_create ( DiscussionsController $sender )
$sender DiscussionsController

discussionsController_markCategoryViewed_create() 공개 메소드

Allows user to mark all discussions in a specified category as viewed.
부터: 1.0
public discussionsController_markCategoryViewed_create ( DiscussionsController $sender, integer $CategoryID )
$sender DiscussionsController
$CategoryID integer

meModule_flyoutMenu_handler() 공개 메소드

Adds "Mark All Viewed" and (conditionally) "Mark Category Viewed" to MeModule menu.
부터: 2.0
public meModule_flyoutMenu_handler ( MeModule $sender )
$sender MeModule