public $citations
public $comments
public $posts = array()
public $post_ids
public $post_count = 0
public $trackbacks
public $user
public $versions
protected $sql
public __construct($post_ids=null)
Initiates post object
array $post_ids post IDs (use Find class to locate them)
public __destruct()
Terminates object, closes the database connection
return void
public hook($orbit=null)
Perform Orbit hook
Orbit $orbit
return void
public updateViews()
Increase post_views field by 1
return void
public attachUser($user)
Attribute actions to user
User $user User object
return void
public delete($permanent=false)
Deletes posts
bool Delete permanently (and therefore cannot be recovered)
return void
public recover()
Recover posts (and comments also deleted at same time)
return bool
public updateFields($array, $overwrite=true, $version=true)
Update post table
array $array Associative array of columns and fields
bool $overwrite
bool $version If post_text_raw changed, create a new version
return void
public formatTime($format=null)
Format time
string $format Same format as date();
return void
public addSequence($label, $frequency, $start_first=false)
Add string notation to particular sequence, good for CSS columns
string $label String notation
int $frequency
bool $start_first True if first post should be selected and begin sequence
return void
public getSeries($start=null, $asc=true)
Get word and numerical sequencing of posts
int $start First number on page
bool $asc Sequence order (false if DESC)
return void
public getRelated($limit=null)
Find related posts
int $limit Number of posts to retrieve
return Post
public updateRelated($limit=100)
Update related posts
int $limit Number of posts to find
return void
public getComments($published=true, $inline_responses=true)
Get comments data, append comment HTML data
bool Published (true) or all (false)
bool Inline responses (responses directly follow) or force chronological (false)
return array Associative array of comments
public getUsers()
Get users data and save to object
return array
public getVersions()
Get version data and save to object
return array Array of version data
public getCitations()
Get citation data and save to object
return array Citations
public getTrackbacks()
Get trackback data and save to object
return array Trackbacks
public sendTrackbacks()
Send trackback to original Web site
return bool True if successful
public import($files)
Import files as posts
array $files Full path to post files
return void
public updateCitations()
Update citations
return void