\PageCommentInterface
Represents an interface for viewing and adding page comments Create one, passing the page discussed to the constructor. It can then be inserted into a template.
Synopsis
class PageCommentInterface
extends RequestHandler
{
- // members
- public static array $url_handlers = ;
- public static array $allowed_actions = ;
- protected $controller;
- public static bool $comments_require_login = false;
- public static string $comments_require_permission = "";
- public static bool $use_ajax_commenting = true;
- public static bool $show_comments_when_disabled = true;
- public static String $order_comments_by = "\"Created\" DESC";
- // methods
- public void __construct()
- public void Link()
- public static void set_comments_require_login()
- public static void set_comments_require_permission()
- public static void set_show_comments_when_disabled()
- public static void set_order_comments_by()
- public static void set_use_ajax_commenting()
- public void forTemplate()
- public static boolean CanPostComment()
- public bool PostingRequiresPermission()
- public void Page()
- public void PostCommentForm()
- public void Comments()
- public void CommentRssLink()
- public void DeleteAllLink()
Hierarchy
Extends
- RequestHandler
Members
protected
- $controller
public
- $allowed_actions
- $comments_require_login
—
bool
If this is true, you must be logged in to post a comment (and therefore, you don't need to specify a 'Your name' field unless your name is blank) - $comments_require_permission
—
string
If this is a valid permission code, you must be logged in and have the appropriate permission code on your account before you can post a comment. - $order_comments_by
—
String
Define how you want to order page comments by. By default order by newest to oldest. - $show_comments_when_disabled
—
bool
If this is true then we should show the existing comments on the page even when we have disabled the comment form. - $url_handlers
- $use_ajax_commenting
—
bool
If this is true it will include the javascript for AJAX commenting. If it is set to false then it will not load the files required and it will fall back
Methods
public
- __construct() — Create a new page comment interface
- CanPostComment()
- CommentRssLink()
- Comments()
- DeleteAllLink() — A link to PageComment_Controller.deleteallcomments() which deletes all comments on a page referenced by the url param pageid
- Link()
- Page()
- PostCommentForm()
- PostingRequiresPermission() — if this page comment form requires users to have a valid permission code in order to post (used to customize the error message).
- forTemplate()
- set_comments_require_login() — See {@link PageCommentInterface::$comments_require_login}
- set_comments_require_permission() — See {@link PageCommentInterface::$comments_require_permission}
- set_order_comments_by() — See {@link PageCommentInterface::$order_comments_by}
- set_show_comments_when_disabled() — See {@link PageCommentInterface::$show_comments_when_disabled}
- set_use_ajax_commenting() — See {@link PageCommentInterface::$use_ajax_commenting}