PHP Class VotingPlugin, addons

Inheritance: extends Gdn_Plugin
Afficher le fichier Open project: vanilla/addons Class Usage Examples

Protected Properties

Свойство Type Description
$_CommentSort

Méthodes publiques

Méthode Description
AddJsCss ( $Sender ) Add JS & CSS to the page.
Base_BeforeDiscussionContent_Handler ( $Sender ) Add the "Stats" buttons to the discussion list.
Base_BeforeDiscussionTabs_Handler ( $Sender ) Add the "Popular Questions" tab.
Base_GetAppSettingsMenuItems_Handler ( $Sender ) Admin Toggle to turn Voting on/off
CategoriesController_Render_Before ( $Sender )
CommentModel_AfterConstruct_Handler ( CommentModel $CommentModel ) Sort the comments by popularity if necessary
CommentSort ( )
DiscussionController_AfterCommentMeta_Handler ( $Sender )
DiscussionController_BeforeCommentDisplay_Handler ( $Sender ) Insert sorting tabs after first comment.
DiscussionController_Render_Before ( $Sender ) Add the vote.js file to discussions page, and handle sorting of answers.
DiscussionController_VoteComment_Create ( $Sender ) Increment/decrement comment scores
DiscussionController_VoteDiscussion_Create ( $Sender ) Increment/decrement discussion scores
DiscussionModel_AfterDiscussionSummaryQuery_Handler ( $Sender ) Grab the score field whenever the discussions are queried.
DiscussionsController_AfterDiscussionFilters_Handler ( $Sender )
DiscussionsController_Popular_Create ( $Sender ) Load popular discussions.
DiscussionsController_Render_Before ( $Sender )
OnDisable ( ) If turning off scoring, make the forum go back to the traditional "jump to what I last read" functionality.
PostController_AfterCommentMeta_Handler ( $Sender ) Insert the voting html on comments in a discussion.
PostController_Render_Before ( $Sender ) Add voting css to post controller.
ProfileController_Render_Before ( $Sender )
SettingsController_ToggleVoting_Create ( $Sender )
SettingsController_Voting_Create ( $Sender )
Setup ( ) Add a field to the db for storing the "State" of a question.

Method Details

AddJsCss() public méthode

Add JS & CSS to the page.
public AddJsCss ( $Sender )

Base_BeforeDiscussionContent_Handler() public méthode

Add the "Stats" buttons to the discussion list.

Base_BeforeDiscussionTabs_Handler() public méthode

Add the "Popular Questions" tab.

Base_GetAppSettingsMenuItems_Handler() public méthode

Admin Toggle to turn Voting on/off

CategoriesController_Render_Before() public méthode

CommentModel_AfterConstruct_Handler() public méthode

Sort the comments by popularity if necessary
public CommentModel_AfterConstruct_Handler ( CommentModel $CommentModel )
$CommentModel CommentModel

CommentSort() public static méthode

public static CommentSort ( )

DiscussionController_AfterCommentMeta_Handler() public méthode

DiscussionController_BeforeCommentDisplay_Handler() public méthode

Insert sorting tabs after first comment.

DiscussionController_Render_Before() public méthode

Add the vote.js file to discussions page, and handle sorting of answers.

DiscussionController_VoteComment_Create() public méthode

Increment/decrement comment scores

DiscussionController_VoteDiscussion_Create() public méthode

Increment/decrement discussion scores

DiscussionModel_AfterDiscussionSummaryQuery_Handler() public méthode

Grab the score field whenever the discussions are queried.

DiscussionsController_AfterDiscussionFilters_Handler() public méthode

DiscussionsController_Render_Before() public méthode

OnDisable() public méthode

If turning off scoring, make the forum go back to the traditional "jump to what I last read" functionality.
public OnDisable ( )

PostController_AfterCommentMeta_Handler() public méthode

Insert the voting html on comments in a discussion.

PostController_Render_Before() public méthode

Add voting css to post controller.
public PostController_Render_Before ( $Sender )

ProfileController_Render_Before() public méthode

public ProfileController_Render_Before ( $Sender )

SettingsController_ToggleVoting_Create() public méthode

SettingsController_Voting_Create() public méthode

Setup() public méthode

Add a field to the db for storing the "State" of a question.
public Setup ( )

Property Details

$_CommentSort protected_oe static_oe property

protected static $_CommentSort