Comments
Blog comments are created from people commenting on your posts. After a person has commented, the author is sent an email notification. He can then login to FUEL and publish the comment (assuming the monitor_comments setting is set) and reply to the comment. Comments are powered by a blog_comments_model and have a grandparent class of MY_Model.
Comment Fields
Below are the fields to fill out to submit a comment from the blog (note that author in this case refers to the comment and not the post):
author_name - the commentor's nameauthor_email - the commentor's email addressauthor_wesite - the commentor's website address
Comment Security
The Blog Settings module has several security options for comments:
- Akismet key - The Akismet antispam key to use for checking the validity of comments
- Allow comments - You have the option to allow comments at both a global settings level and at a per post level.
- Use captchas - Adds a captcha to the comment form
- Monitor comments - Sends an email to the author to publish the comments.
- Save spam - Whether to save comments marked as spam by Akismet or not
- Comment submission time limit - The time limit allow for multiple comment submission
- Comments time_limit - How the comment form for a post remains active after the creation date
The Comment Model Properties
The comment object model has the following properties:
- id
- post_id
- parent_id (parent comment id if it exists)
- author_id
- author_name
- author_email
- author_website
- author_ip
- is_spam
- content
- published (returns 'yes' or 'no')
- date_added
- last_modified
The Comment Model Methods
The comment object model has the following specific methods:
content_formatted()
Returns the content of the comment.
get_post()
Returns the post associate with the comment.
is_duplicate()
Returns boolean value whether the comment is considered a duplicate of an existing.
is_by_post_author()
Returns a boolean as to whether the comment is by the post's author or not.
is_child()
Returns a boolean as to whether the comment is a child of another comment.
get_author_and_link()
Returns the comments author and link if a website was specified in the comment.
get_date_formatted('[format]')
Returns a formatted version of the date of the comment. Takes a date format. Default is 'M d, Y'.
is_spam()
Returns a boolean value if the comment should be considered as SPAM.
check_is_spam()
Performs a spam check on the comment using stopforumspam or AKISMET (if a key is provided in the settings).
is_savable()
Returns a boolean value depending on if the comment can be saved based on the SPAM settings.