PHP Class ResolvedPlugin, addons

This plugin adds the ability to mark discussions and "resolved", thereby closing them for further comments unless re-opened by the original author. Changes 1.0 Initial Release 1.1 1.2 Commenting, spacening 1.2.1 Fix DateResolved issue
Since: 1.0
Author: Matt Lincoln Russell ([email protected])
Inheritance: extends Gdn_Plugin
Show file Open project: vanilla/addons

Public Methods

Method Description
base_afterBodyField_handler ( $sender, $args ) : void Allow staff to Resolve via checkbox under comment form.
base_afterDiscussionFilters_handler ( $sender ) : void Add 'Unresolved' discussions filter to menu.
base_beforeDiscussionMeta_handler ( $sender, $args ) : void Show Unresolved meta tag.
base_discussionOptions_handler ( $sender, $args ) : void Allow staff to Resolve via discussion options.
commentModel_afterSaveComment_handler ( $sender, $args ) : void Handle comment form Resolved checkbox & new user comments.
countUnresolved ( ) : integer Count the number of unresolved discussions.
discussionController_beforeDiscussionOptions_handler ( $sender, $args ) : void Show [RESOLVED] in discussion title when viewing single.
discussionController_beforeDiscussionRender_handler ( DiscussionController $sender, $args ) Disallow comments in Resolved discussions by new participants.
discussionController_resolve_create ( $sender, $args ) : void Handle discussion option menu Resolve action.
discussionModel ( ) : DiscussionModel Get a DiscussionModel.
discussionsController_unresolved_create ( $sender, $args ) : void Discussions filter: Unresolved.
resolve ( object &$discussion, integer $resolve ) : void Resolves a discussion
setup ( ) : void Plugin setup method.
structure ( ) : void Plugin structure method.

Method Details

base_afterBodyField_handler() public method

Allow staff to Resolve via checkbox under comment form.
public base_afterBodyField_handler ( $sender, $args ) : void
return void

base_afterDiscussionFilters_handler() public method

Add 'Unresolved' discussions filter to menu.
public base_afterDiscussionFilters_handler ( $sender ) : void
return void

base_beforeDiscussionMeta_handler() public method

Show Unresolved meta tag.
public base_beforeDiscussionMeta_handler ( $sender, $args ) : void
return void

base_discussionOptions_handler() public method

Allow staff to Resolve via discussion options.
public base_discussionOptions_handler ( $sender, $args ) : void
return void

commentModel_afterSaveComment_handler() public method

Handle comment form Resolved checkbox & new user comments.
public commentModel_afterSaveComment_handler ( $sender, $args ) : void
return void

countUnresolved() public static method

Count the number of unresolved discussions.
public static countUnresolved ( ) : integer
return integer Returns the number of unresolved discussions

discussionController_beforeDiscussionOptions_handler() public method

Show [RESOLVED] in discussion title when viewing single.

discussionController_beforeDiscussionRender_handler() public method

Disallow comments in Resolved discussions by new participants.
public discussionController_beforeDiscussionRender_handler ( DiscussionController $sender, $args )
$sender DiscussionController

discussionController_resolve_create() public method

Handle discussion option menu Resolve action.
public discussionController_resolve_create ( $sender, $args ) : void
return void

discussionModel() public static method

Get a DiscussionModel.
public static discussionModel ( ) : DiscussionModel
return DiscussionModel Returns a DiscussionModel

discussionsController_unresolved_create() public method

Discussions filter: Unresolved.
public discussionsController_unresolved_create ( $sender, $args ) : void
return void

resolve() public method

Resolves a discussion
public resolve ( object &$discussion, integer $resolve ) : void
$discussion object
$resolve integer
return void

setup() public method

Plugin setup method.
public setup ( ) : void
return void

structure() public method

Add 'Resolved' columns to the Discussion table.
public structure ( ) : void
return void