Represents a comment on a blog entry or article.
OnInit | Fired when object is first created. |
InitComplete | Fired at end of constructor. |
OnInsert | Fired before object is saved to persistent storage. This is run after the insertion setup is done, but before anything is actually saved to disk. |
InsertComplete | Fired after object has finished saving. |
OnDelete | Fired before object is deleted. |
DeleteComplete | Fired after object is deleted. |
OnUpdate | Fired before changes are saved to persistent storage. |
UpdateComplete | Fired after changes to object are saved. |
OnOutput | Fired before output is generated. |
OutputComplete | Fired after output has finished being generated. |
POSTRetrieved | Fired after data has been retreived from an HTTP POST. |
public function getPath( |
| ) |
Get the path to use for to store the comment. This is specific to file-based storage and so is for internal use only.
ts | The timestamp of the entry. |
A string to use for the file name.
Commit changes to a comment.
True on success, false on failure.
Delete a comment.
True on success, false on failure.
public function insert( |
| ) |
Add a new comment on an entry or article.
Entry | The entry to which this comment will belong. This determines where the comment is stored. |
True on success, false on failure.
Pulls data out of the HTTP POST headers and into the object.
The interface for this uses pre-defined POST field names they are as follows. If the poster is an authenticated user, then the userid is also recorded automatically from the HTTP session. username - The name of the poster. email - The poster's e-mail address. url - The poster's homepage. showemail - If not empty, show the poster's e-mail address publically. subject - The subject of the post. data - The post content. This cannot be empty.
Get text to use as the name attribute in an HTML anchor tag.
A string for anchor text based on the file name/storage ID.
public function getFilename( |
| ) |
Get the global identifier for this comment.
Get the permalink to the object. This is essentially the URI of the parent's comments page with the anchor name appended.
The full URI to the object's permalink, including page anchor.
public function isComment( |
| ) |
Determines whether or not the object is an existing, saved comment.
path | The optional path to the comment data file. If not specified, then the file property is used. |
True if the comment data file exists, false otherwise.
Gets a copy of the parent object of this comment, i.e. the object which this is a comment on.
A BlogEntry.
public function get( |
| ) |
Gets the markup to display the object in a web browser.
show_edit_controls | Optional boolean that determines whether or not to display edit controls, e.g. delete link. |
A string containing the markup.