FUEL CMS User Guide : Version 1.4


Posts

Posts are where you create articles for your blog. Posts are powered by a blog_posts_model and have a grandparent class of MY_Model.

Post Fields

Below are the fields to fill out for a post:


The Post Model Properties

The post model has the following properties:


The Post Model Methods

The post model has the following specific methods:

get_content_formatted(strip_images)

Gets the post content with the selected formatting settings applied. You can optionally strip all HTML tags from the excerpt.

get_excerpt_formatted(char_limit, '[readmore]')

Gets the post excerpt. The char_limit parameter will return only a certain character limit (if so, strip_tags is applied). The readmore parameter will be appended to the end of the excerpt with a link to the full post.

is_published()

Returns a boolean of whether the post is published

get_comments('[order]', [limit])

Returns an array of comment objects. Default order is date added in ascending order.

get_comments_count('[order]', [limit])

Returns the number of comments for the post Default order is date added in ascending order.

get_categories('[order]')

Returns an array of category objects associated with the post Default ordering is by name in ascending order.

get_categories_linked('[order]', '[join]')

Returns a string of category links. Default ordering is by name in ascending order. Default join parameter is ', '.

get_author()

Returns the author object.

get_url('full_path')

Returns the url of the post. The default for full_path is set to TRUE.

get_rss_date()

Returns an rss formatted date for the post.

get_atom_date()

Returns an atom formatted date for the post.

get_date_formatted('[format]')

Returns the date of the post. Takes a date format. Default is 'M d, Y'.

get_allow_comments()

Returns a boolean as to whether comments are allowed.

is_within_comment_time_limit()

Returns a boolean as to whether the current time is within the time limits specified by the post to comment.

get_social_bookmarking_links()

Gets a string of bookmarking links.

get_facebook_recommend()

Returns a Facebook Recommend button.

get_digg()

Returns a digg button.

get_tweetme()

Returns a TweetMe button.