This is the documentation for LemonStand V1, which has been discontinued. You can learn more and upgrade your store here.

LemonStand Version 1 Has Been Discontinued

This documentation is for LemonStand Version 1. LemonStand is now offered as a cloud-based eCommerce platform.
You can try the new LemonStand and learn about upgrading here.

Blog_Comment class

The Blog_Comment class represents a blog comment. The class contains fields for accessing a blog comment content, author details, creation date and other properties.

Class fields

  • $created_at - a date the post has been created on. An instance of the Phpr_DateTime class.
  • $author_name - a name of the comment author.
  • $author_email - an email address of the comment author.
  • $author_url - a URL of the comment author website.
  • $content - the comment content in plain text format. Use the h() and nl2br() functions to output the comment content:
    <?= nl2br(h($comment->content)) ?>
  • $author_email - an email address of the comment author.
  • $blog_owner_comment - indicates whether the comment has been created from the LemonStand Administration Area. You can use this field to mark comments created by you or other blog editors.

Class methods

  • getUrlFormatted() - adds the http:// protocol to the website URL, if a protocol was not specified by the comment author. Usage example:
    Author: <a href="<?= $comment->getUrlFormatted() ?>"><?= h($author_name) ?></a>

Next: Blog module events
Previous: Blog_Category class
Return to Blog API