FUEL CMS User Guide : Version 1.4


A PHP Error was encountered

Severity: Runtime Notice

Message: Declaration of Fuel_blog::model() should be compatible with & Fuel_advanced_module::model($model = NULL)

Filename: libraries/Fuel_blog.php

Line Number: 1272

Backtrace:

File: /var/www/vhosts/getfuelcms.com/subdomains/docs/httpdocs/fuel/modules/fuel/libraries/Inspection.php
Line: 128
Function: _error_handler

File: /var/www/vhosts/getfuelcms.com/subdomains/docs/httpdocs/fuel/modules/fuel/libraries/Inspection.php
Line: 128
Function: initialize

File: /var/www/vhosts/getfuelcms.com/subdomains/docs/httpdocs/fuel/modules/user_guide/libraries/Fuel_user_guide.php
Line: 354
Function: initialize

File: /var/www/vhosts/getfuelcms.com/subdomains/docs/httpdocs/fuel/modules/user_guide/helpers/user_guide_helper.php
Line: 72
Function: generate_docs

File: /var/www/vhosts/getfuelcms.com/subdomains/docs/httpdocs/fuel/modules/blog/views/_docs/fuel_blog.php
Line: 1
Function: generate_docs

File: /var/www/vhosts/getfuelcms.com/subdomains/docs/httpdocs/fuel/modules/fuel/core/Loader.php
Line: 396
Function: include

File: /var/www/vhosts/getfuelcms.com/subdomains/docs/httpdocs/fuel/modules/fuel/core/Loader.php
Line: 323
Function: _ci_load

File: /var/www/vhosts/getfuelcms.com/subdomains/docs/httpdocs/fuel/modules/fuel/core/Loader.php
Line: 462
Function: view

File: /var/www/vhosts/getfuelcms.com/subdomains/docs/httpdocs/fuel/modules/user_guide/controllers/User_guide.php
Line: 125
Function: module_view

File: /var/www/vhosts/getfuelcms.com/subdomains/docs/httpdocs/index.php
Line: 364
Function: require_once

A PHP Error was encountered

Severity: Runtime Notice

Message: Declaration of Fuel_blog::save_cache() should be compatible with Fuel_advanced_module::save_cache($cache_id, $data, $group = NULL, $ttl = NULL)

Filename: libraries/Fuel_blog.php

Line Number: 1272

Backtrace:

File: /var/www/vhosts/getfuelcms.com/subdomains/docs/httpdocs/fuel/modules/fuel/libraries/Inspection.php
Line: 128
Function: _error_handler

File: /var/www/vhosts/getfuelcms.com/subdomains/docs/httpdocs/fuel/modules/fuel/libraries/Inspection.php
Line: 128
Function: initialize

File: /var/www/vhosts/getfuelcms.com/subdomains/docs/httpdocs/fuel/modules/user_guide/libraries/Fuel_user_guide.php
Line: 354
Function: initialize

File: /var/www/vhosts/getfuelcms.com/subdomains/docs/httpdocs/fuel/modules/user_guide/helpers/user_guide_helper.php
Line: 72
Function: generate_docs

File: /var/www/vhosts/getfuelcms.com/subdomains/docs/httpdocs/fuel/modules/blog/views/_docs/fuel_blog.php
Line: 1
Function: generate_docs

File: /var/www/vhosts/getfuelcms.com/subdomains/docs/httpdocs/fuel/modules/fuel/core/Loader.php
Line: 396
Function: include

File: /var/www/vhosts/getfuelcms.com/subdomains/docs/httpdocs/fuel/modules/fuel/core/Loader.php
Line: 323
Function: _ci_load

File: /var/www/vhosts/getfuelcms.com/subdomains/docs/httpdocs/fuel/modules/fuel/core/Loader.php
Line: 462
Function: view

File: /var/www/vhosts/getfuelcms.com/subdomains/docs/httpdocs/fuel/modules/user_guide/controllers/User_guide.php
Line: 125
Function: module_view

File: /var/www/vhosts/getfuelcms.com/subdomains/docs/httpdocs/index.php
Line: 364
Function: require_once

A PHP Error was encountered

Severity: Runtime Notice

Message: Declaration of Fuel_blog::get_cache() should be compatible with Fuel_advanced_module::get_cache($cache_id, $cache_group = NULL, $skip_checking = false)

Filename: libraries/Fuel_blog.php

Line Number: 1272

Backtrace:

File: /var/www/vhosts/getfuelcms.com/subdomains/docs/httpdocs/fuel/modules/fuel/libraries/Inspection.php
Line: 128
Function: _error_handler

File: /var/www/vhosts/getfuelcms.com/subdomains/docs/httpdocs/fuel/modules/fuel/libraries/Inspection.php
Line: 128
Function: initialize

File: /var/www/vhosts/getfuelcms.com/subdomains/docs/httpdocs/fuel/modules/user_guide/libraries/Fuel_user_guide.php
Line: 354
Function: initialize

File: /var/www/vhosts/getfuelcms.com/subdomains/docs/httpdocs/fuel/modules/user_guide/helpers/user_guide_helper.php
Line: 72
Function: generate_docs

File: /var/www/vhosts/getfuelcms.com/subdomains/docs/httpdocs/fuel/modules/blog/views/_docs/fuel_blog.php
Line: 1
Function: generate_docs

File: /var/www/vhosts/getfuelcms.com/subdomains/docs/httpdocs/fuel/modules/fuel/core/Loader.php
Line: 396
Function: include

File: /var/www/vhosts/getfuelcms.com/subdomains/docs/httpdocs/fuel/modules/fuel/core/Loader.php
Line: 323
Function: _ci_load

File: /var/www/vhosts/getfuelcms.com/subdomains/docs/httpdocs/fuel/modules/fuel/core/Loader.php
Line: 462
Function: view

File: /var/www/vhosts/getfuelcms.com/subdomains/docs/httpdocs/fuel/modules/user_guide/controllers/User_guide.php
Line: 125
Function: module_view

File: /var/www/vhosts/getfuelcms.com/subdomains/docs/httpdocs/index.php
Line: 364
Function: require_once

Fuel Blog Class

This class extends the Fuel_advanced_module class.

Properties Reference

Property Default Value Description
protected
_settings N/A
_current_post N/A

Function Reference [+]

$this->fuel->blog->initialize([$params=array()])

Initialize the user preferences. Accepts an associative array as input, containing display preferences.

Returns

void

Parameters

(array) $params config preferences

$this->fuel->blog->title()

Returns the title of the blog specified in the settings.

Returns

string

$this->fuel->blog->description()

Returns the descripton of the blog specified in the settings.

Returns

string

$this->fuel->blog->language(['$code'=FALSE])

Returns the language abbreviation currently used in CodeIgniter.

Returns

string

Parameters

(boolean) $code 

$this->fuel->blog->domain()

Returns the domain to be used for the blog based on the FUEL configuration. If empty it will return whatever $_SERVER['SERVER_NAME']. Needed for Atom feeds.

Returns

string

$this->fuel->blog->url(['$uri'=''])

Returns the blog specific URL.

Returns

string

Parameters

(string) $uri 

$this->fuel->blog->feed(['$type'='rss'], ['$category'=''])

Returns the blog specific RSS feed URL.

Returns

string

Parameters

(string) $type 
(string) $category 

$this->fuel->blog->feed_header()

Sets the HTTP headers needed for the RSS feed.

Returns

string

$this->fuel->blog->feed_output(['$type'='rss'], ['$category'=NULL])

Returns the output for the RSS feed.

Returns

string

Parameters

(string) $type 
(string) $category 

$this->fuel->blog->feed_data(['$category'=NULL], ['$limit'=10])

Returns the data need for the blog feed.

Returns

array

Parameters

(string) $category 
(string) $limit 

$this->fuel->blog->last_updated()

Returns last updated blog post.

Returns

string

$this->fuel->blog->theme_path()

Returns the path to the theme view files.

Returns

string

$this->fuel->blog->layout()

Returns name of the theme layout file to use.

Returns

string

$this->fuel->blog->image_path('$image', ['$variable'=NULL], ['$is_server'=FALSE])

Returns an image based on the assets upload path.

Returns

string

Parameters

(string) $image 
(string) $variable 
(boolean) $is_server 

$this->fuel->blog->is_home()

Returns a boolean value whether it is the home page.

Returns

boolean

$this->fuel->blog->header([$vars=array()], ['$return'=TRUE])

Returns header of the blog.

Returns

string

Parameters

(string) $vars 

$this->fuel->blog->view('$view', [$vars=array()], ['$return'=TRUE])

Returns a view for the blog.

Returns

string

Parameters

(string) $view 
(array) $vars 
(boolean) $return 

$this->fuel->blog->block('$block', [$vars=array()], ['$return'=TRUE])

Returns a block view file for the blog.

Returns

string

Parameters

(string) $block 
(array) $vars 
(boolean) $return 

$this->fuel->blog->model('$model')

Returns a the specified blog model object. Options are posts, categories, comments, settings and links.

Returns

object

Parameters

(string) $model 

$this->fuel->blog->sidemenu([$blocks=array([0]=>search[1]=>categories)])

Returns the sidemenu for the blog.

Returns

string

Parameters

(array) $blocks 

$this->fuel->blog->current_post()

Returns the current post for the page. Only set when viewing a single post.

Returns

object

$this->fuel->blog->get_recent_posts(['$limit'=5], [$where=array()])

Returns the most recent posts.

Returns

array

Parameters

(int) $limit 

Returns the most popular posts.

Returns

array

Parameters

(int) $limit 

$this->fuel->blog->get_category_posts(['$category'=''], ['$order_by'='post_date desc'], ['$limit'=NULL], ['$offset'=NULL], ['$return_method'=NULL], ['$assoc_key'=NULL])

Returns the most recent posts for a given category.

Returns

array

Parameters

(string) $category 
(string) $order_by 
(int) $limit 
(int) $offset 
(string) $return_method 
(string) $assoc_key 

$this->fuel->blog->get_category_posts_by_date('$category', ['$year'=NULL], ['$month'=NULL], ['$day'=NULL], ['$limit'=NULL], ['$offset'=NULL], ['$order_by'='sticky, post_date desc'], ['$return_method'=NULL], ['$assoc_key'=NULL])

Returns posts by providing a given date.

Returns

array

Parameters

(string) $category 
(int) $year 
(int) $month 
(int) $day 
(string) $limit 
(int) $offset 
(int) $order_by 
(string) $return_method 
(string) $assoc_key 

$this->fuel->blog->get_posts_by_date(['$year'=NULL], ['$month'=NULL], ['$day'=NULL], ['$slug'=NULL], ['$limit'=NULL], ['$offset'=NULL], ['$order_by'='sticky, post_date desc'], ['$return_method'=NULL], ['$assoc_key'=NULL])

Returns posts by providing a given date.

Returns

array

Parameters

(int) $year 
(int) $month 
(int) $day 
(string) $slug 
(int) $limit 
(int) $offset 
(string) $order_by 
(string) $return_method 

$this->fuel->blog->get_posts([$where=array()], ['$order_by'='sticky, post_date desc'], ['$limit'=NULL], ['$offset'=NULL], ['$return_method'=NULL], ['$assoc_key'=NULL])

Returns posts based on specific query parameters.

Returns

array

Parameters

(mixed) $where 
(string) $order_by 
(int) $limit 
(int) $offset 
(string) $return_method 
(string) $assoc_key 

$this->fuel->blog->get_posts_count([$where=array()])

Returns the number of posts.

Returns

array

Parameters

(mixed) $where 

$this->fuel->blog->get_posts_by_page(['$limit'=NULL], ['$offset'=NULL], ['$return_method'=NULL], ['$assoc_key'=NULL])

Returns posts to be displayed for a specific page. Used for pagination mostly.

Returns

array

Parameters

(int) $limit 
(int) $offset 
(string) $return_method 
(string) $assoc_key 

$this->fuel->blog->get_post_archives([$where=array()], ['$limit'=NULL], ['$offset'=NULL])

Returns posts grouped by the year/month.

Returns

array

Parameters

(array) $where 
(int) $limit 
(int) $offset 

$this->fuel->blog->get_post('$post', ['$order_by'=NULL], ['$return_method'=NULL])

Returns a single post.

Returns

object

Parameters

(mixed) $post can be id or slug
(string) $order_by 
(string) $return_method 

$this->fuel->blog->get_next_post('$current_post', ['$return_method'=NULL])

Returns the next post (if any) from a given date.

Returns

object

Parameters

(object) $current_post The current post
(string) $return_method The return type of the object (array or object)

$this->fuel->blog->get_prev_post('$current_post', ['$return_method'=NULL])

Returns the previous post (if any) from a given date.

Returns

object

Parameters

(object) $current_post The current post
(string) $return_method The return type of the object (array or object)

$this->fuel->blog->get_categories([$where=array()], ['$order_by'=NULL], ['$limit'=NULL], ['$offset'=NULL], ['$return_method'=NULL], ['$assoc_key'=NULL])

Returns a list of blog categories.

Returns

array

Parameters

(mixed) $where 
(int) $order_by 
(int) $limit 
(string) $offset 
(string) $return_method 

$this->fuel->blog->get_category('$category', ['$order_by'=NULL], ['$return_method'=NULL])

Returns a single blog category.

Returns

object

Parameters

(string) $category 
(string) $order_by 
(string) $return_method 

$this->fuel->blog->get_published_categories()

Returns a the posts associated with categories.

Returns

array

$this->fuel->blog->search_posts('$term', ['$order_by'='post_date desc'], ['$limit'=NULL], ['$offset'=NULL])

Searches posts for a specific term.

Returns

array

Parameters

(string) $term 
(string) $order_by 
(int) $limit 
(int) $offset 

$this->fuel->blog->get_comments([$where=array()], ['$order_by'='date_added desc'], ['$limit'=NULL], ['$offset'=NULL], ['$return_method'=NULL], ['$assoc_key'=NULL])

Returns comments. Usually specify a post in the where parameter.

Returns

array

Parameters

(mixed) $where 
(string) $order_by 
(int) $limit 
(int) $offset 
(string) $return_method 
(string) $assoc_key 

$this->fuel->blog->get_comment('$id')

Returns a single comment.

Returns

array

Parameters

(int) $id 

Returns links.

Returns

array

Parameters

(mixed) $where 
(string) $order_by 
(int) $limit 
(int) $offset 
(string) $return_method 
(string) $assoc_key 

$this->fuel->blog->get_user('$id')

Returns a FUEL author/user.

Returns

object

Parameters

(int) $id 

$this->fuel->blog->get_users([$where=array()], ['$order_by'=NULL], ['$limit'=NULL], ['$offset'=NULL], ['$return_method'=NULL], ['$assoc_key'=NULL])

Returns FUEL users/authors.

Returns

array

Parameters

(mixed) $where 
(string) $order_by 
(int) $limit 
(int) $offset 
(string) $return_method 
(string) $assoc_key 

$this->fuel->blog->logged_in_user()

Returns the logged in information array of the currently logged in FUEL user.

Returns

mixed

$this->fuel->blog->is_logged_in()

Returns whether you are logged into FUEL or not.

Returns

boolean

$this->fuel->blog->use_cache()

Returns whether cache should be used based on the blog settings.

Returns

boolean

$this->fuel->blog->get_cache('$cache_id')

Returns a cached file if it exists.

Returns

mixed

Parameters

(string) $cache_id 

$this->fuel->blog->save_cache('$cache_id', '$output')

Saves output to the cache.

Returns

void

Parameters

(string) $cache_id 
(string) $output 

$this->fuel->blog->remove_cache(['$cache_id'=NULL])

Removes page from cache.

Returns

void

Parameters

(string) $cache_id 

$this->fuel->blog->page_title(['$title'=''], ['$sep'=NULL], ['$order'='right'])

Returns the page title.

Returns

string

Parameters

(string) $title 
(string) $sep 
(string) $order 

$this->fuel->blog->run_hook('$hook', [$params=array()])

Runs a specific blog hook.

Returns

string

Parameters

(string) $hook 
(array) $params 

$this->fuel->blog->__call('$name', $args)

Convenience magic method if you want to drop the "get" from the method.

Returns

string

Parameters

(string) $name 
(array) $args