Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members | Related Pages

BaseComment Class Reference
[Base Objects]

Inheritance diagram for BaseComment:

MyObject BaseObject MyModule BaseModule List of all members.

Detailed Description

BaseComment is an object used for comment threads.

A class that simplifies adding, editing, deleting, replying, and displaying of comments. It makes adding comments to content very easy.

Definition at line 9 of file base-comment.inc.php.

Public Member Functions

 __construct ($data, $class)
 The constructor...
 initDeletePage ()
 Initialize teh delete page.
 deletePost ()
 Redirect to our original object the comment was posted on.
 delete ()
 do the actual deletion.
 initEditPage ()
 initialize the edit page.
 editFormAddFields ($form)
 Add our comment fields...
 createReplyForm ($contentId=null)
 creates a reply form for inline displaying with our nifty javascript.
 getEditPageParamXml ()
 get the edit page parameters xml
 editPagePostSuccess ($form)
 emails the author of original content and also poster you replied to.
 emailNotification ()
 emails the author of the original content notifying them of a new comment on their stuff.
 emailReply ()
 if the comment was in response to another comment, will email author of the comment.
 getRssItem ()
 this function generates the rss data for the comment.
 drawComment ($kids=array())
 draw the comment.
 drawChildComments ($coms, $parent)
 this function draws the child comments for a parent id.
 drawViewPage ()
 Draws teh view page.
 getPublicData ()
 gets the public data of the object...
 getCreateFieldsArray ()
 gets an array of fields.
 getCreateIndexesArray ()
 gets an array of indexes.
 save ()
 save our comment, also save parent to update comment count

Public Attributes

 $class = ''

Protected Member Functions

 drawTitleBar ()
 draws the title bar for the comment
 drawCommentDetails ()
 draws the details div for the comment
 drawCommentBody ()
 draws the body of the comment w/ signature
 drawCommentSignature ()
 draws a signature...
 drawCommentReplyForm ()
 draw our comment reply form.


Member Function Documentation

BaseComment::__construct data,
class
 

The constructor...

Parameters:
$data see BaseObject constructor
$class the name of the class the comment is on... dont put 'comment' in here.... unless its a comment comment.

Reimplemented from BaseObject.

Definition at line 20 of file base-comment.inc.php.

References $class.

BaseComment::createReplyForm contentId = null  ) 
 

creates a reply form for inline displaying with our nifty javascript.

Returns:
the reply form as a Form object.

Definition at line 123 of file base-comment.inc.php.

References BaseModule::getUrl().

Referenced by drawCommentReplyForm().

BaseComment::delete  ) 
 

do the actual deletion.

also save the abandoned child comments.

Reimplemented from BaseObject.

Definition at line 55 of file base-comment.inc.php.

References dbExecute().

BaseComment::deletePost  ) 
 

Redirect to our original object the comment was posted on.

Definition at line 47 of file base-comment.inc.php.

BaseComment::drawChildComments coms,
parent
 

this function draws the child comments for a parent id.

usually called from a BaseThread

Parameters:
$coms an array of comment objects to use to draw from.
$parent the id of the parent comment to draw from.

Definition at line 415 of file base-comment.inc.php.

Referenced by drawComment().

BaseComment::drawComment kids = array()  ) 
 

draw the comment.

it is called from drawChildComments. it draws its comment, then recurses back to drawChildComments with the kids array and its id.

Parameters:
$kids is an array of comments to use.

Definition at line 298 of file base-comment.inc.php.

References BaseObject::canView(), drawChildComments(), drawCommentBody(), drawCommentDetails(), drawCommentReplyForm(), and drawTitleBar().

BaseComment::drawCommentBody  )  [protected]
 

draws the body of the comment w/ signature

Definition at line 382 of file base-comment.inc.php.

References Linkify::bbcode(), and drawCommentSignature().

Referenced by drawComment().

BaseComment::drawCommentDetails  )  [protected]
 

draws the details div for the comment

Definition at line 364 of file base-comment.inc.php.

References BaseObject::canDelete(), BaseObject::canEdit(), Time::formatRelative(), and BaseModule::getLink().

Referenced by drawComment().

BaseComment::drawCommentReplyForm  )  [protected]
 

draw our comment reply form.

Definition at line 400 of file base-comment.inc.php.

References createReplyForm().

Referenced by drawComment().

BaseComment::drawCommentSignature  )  [protected]
 

draws a signature...

you must define to tell it how.

Definition at line 393 of file base-comment.inc.php.

Referenced by drawCommentBody().

BaseComment::drawTitleBar  )  [protected]
 

draws the title bar for the comment

Definition at line 330 of file base-comment.inc.php.

References Time::formatRelative(), and BaseModule::getUrl().

Referenced by drawComment().

BaseComment::drawViewPage  ) 
 

Draws teh view page.

it redirects to the view page of the object the comment was on.

Definition at line 439 of file base-comment.inc.php.

References Util::redirect().

BaseComment::editFormAddFields form  ) 
 

Add our comment fields...

pretty basic. body and submit button.

Reimplemented from BaseObject.

Definition at line 105 of file base-comment.inc.php.

BaseComment::editPagePostSuccess form  ) 
 

emails the author of original content and also poster you replied to.

then redirects to main content.

Reimplemented from BaseObject.

Definition at line 171 of file base-comment.inc.php.

References emailNotification(), emailReply(), and Util::redirect().

BaseComment::emailNotification  ) 
 

emails the author of the original content notifying them of a new comment on their stuff.

If you want this enabled, the user table must have 'email_comments' as a tinyint(1)

Definition at line 184 of file base-comment.inc.php.

Referenced by editPagePostSuccess().

BaseComment::emailReply  ) 
 

if the comment was in response to another comment, will email author of the comment.

that is if the user table has a field called "email_comment_replies" of type tinyint(1)

Definition at line 227 of file base-comment.inc.php.

Referenced by editPagePostSuccess().

BaseComment::getCreateFieldsArray  ) 
 

gets an array of fields.

see BaseObject

Returns:
array of fields.

Reimplemented from BaseObject.

Definition at line 463 of file base-comment.inc.php.

BaseComment::getCreateIndexesArray  ) 
 

gets an array of indexes.

see BaseObject

Returns:
array of indexes.

Reimplemented from BaseObject.

Definition at line 479 of file base-comment.inc.php.

BaseComment::getEditPageParamXml  ) 
 

get the edit page parameters xml

Returns:
an xml string of edit page xml

Reimplemented from BaseObject.

Definition at line 157 of file base-comment.inc.php.

BaseComment::getPublicData  ) 
 

gets the public data of the object...

adds in the body of the comment.

Returns:
an array of public data for json, php serialize, etc.

Reimplemented from BaseObject.

Definition at line 449 of file base-comment.inc.php.

BaseComment::getRssItem  ) 
 

this function generates the rss data for the comment.

you probably wont have to define this at all. this means AUTOMAGIC comment rss feeds!!

Returns:
a rss item object as per BaseObject

Reimplemented from BaseObject.

Definition at line 276 of file base-comment.inc.php.

References BaseObject::hasField().

BaseComment::initDeletePage  ) 
 

Initialize teh delete page.

Definition at line 37 of file base-comment.inc.php.

BaseComment::initEditPage  ) 
 

initialize the edit page.

Definition at line 69 of file base-comment.inc.php.

References $class, and BaseModule::params().

BaseComment::save  ) 
 

save our comment, also save parent to update comment count

Reimplemented from BaseObject.

Definition at line 492 of file base-comment.inc.php.


Member Data Documentation

BaseComment::$class = ''
 

Definition at line 11 of file base-comment.inc.php.

Referenced by __construct(), and initEditPage().


The documentation for this class was generated from the following file:
Generated on Fri Oct 27 12:26:40 2006 for BaseJumper by doxygen 1.3.9.1