PHP Class VotingPlugin, addons

Inheritance: extends Gdn_Plugin
Mostrar archivo Open project: vanilla/addons Class Usage Examples

Protected Properties

Property Type Description
$_CommentSort

Public Methods

Method 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 method

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

Base_BeforeDiscussionContent_Handler() public method

Add the "Stats" buttons to the discussion list.

Base_BeforeDiscussionTabs_Handler() public method

Add the "Popular Questions" tab.

Base_GetAppSettingsMenuItems_Handler() public method

Admin Toggle to turn Voting on/off

CategoriesController_Render_Before() public method

CommentModel_AfterConstruct_Handler() public method

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

CommentSort() public static method

public static CommentSort ( )

DiscussionController_AfterCommentMeta_Handler() public method

DiscussionController_BeforeCommentDisplay_Handler() public method

Insert sorting tabs after first comment.

DiscussionController_Render_Before() public method

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

DiscussionController_VoteComment_Create() public method

Increment/decrement comment scores

DiscussionController_VoteDiscussion_Create() public method

Increment/decrement discussion scores

DiscussionModel_AfterDiscussionSummaryQuery_Handler() public method

Grab the score field whenever the discussions are queried.

DiscussionsController_AfterDiscussionFilters_Handler() public method

DiscussionsController_Render_Before() public method

OnDisable() public method

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 method

Insert the voting html on comments in a discussion.

PostController_Render_Before() public method

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

ProfileController_Render_Before() public method

public ProfileController_Render_Before ( $Sender )

SettingsController_ToggleVoting_Create() public method

SettingsController_Voting_Create() public method

Setup() public method

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