Hotaru Docs

 [həʊdɒks]

Plugins/SB Base

Social Bookmarking base - provides "list" and "post" templates.

parameters

  • $id = 0;
  • $archived | string | archived Yes or No (Y/N)
  • $author | int | post author
  • $date | string | post submission date
  • $status | string | initial status before database entry
  • $type | string | post type, e.g. news, blog, forum
  • $category | int | default category 'all'
  • $tags | string | tags
  • $title | string | post title
  • $origUrl | string | original url for the submitted post
  • $domain | string | the domain of the submitted url
  • $url | string | post slug (needs BASEURL and category attached)
  • $content | string | post description
  • $contentLength | int | default min characters for content
  • $summary | string | truncated post description
  • $summaryLength | int | default max characters for summary
  • $comments | string | is the comment form open or closed?
  • $subscribe | int | is the post author subscribed to comments?

methods

  • readPost($h, $post_id = 0, $post_row = NULL) | Get all the settings for the current post
  • getPost($h, $post_id = 0) | Gets a single post from the database
  • addPost($h) | Add a post to the database
  • updatePost($h) | Update a post in the database
  • deletePost($h) | Physically delete a post from the database
  • deletePosts($h, $user_id = 0) | Physically delete all posts by a specified user
  • changePostStatus($h, $status = "processing", $post_id = 0) | Update a post's status
  • urlExists($h, $url = ) | Checks for existence of a url, @return array|false - array of posts
  • titleExists($h, $title = ) | Checks for existence of a post title
  • isPostUrl($h, $post_url = ) | Checks for existence of a post with given post_url
  • postsApproved($h, $user_id = 0) | Count how many approved posts a user has had
  • deleteProcessingPosts($h) | Delete posts with "processing" status that are older than 30 minutes
  • countPosts($h, $hours = 0, $minutes = 0, $user_id = 0) | Count posts in the last X hours/minutes for this use
  • getUniqueStatuses($h) | Get Unique Post Statuses
  • stats($h, $stat_type = ) | Post stats

more SB Base Methods

A number of SB Base Methods can also be found in the SBBaseFunctions.php file listed under the class SbBaseFunctions

  • preparelist | Prepare filter and breadcrumbs for social bookmarking pages. Two main types: one for list pages and the other for miscelleneous stuff like Sidebar Posts
  • prepareListFilters | prepare the list filters
  • filter | gets all the posts from the database for the set filters
  • getPosts | gets all the posts from the database for the set filters
  • rssFeed | Publish content as an RSS feed
Getting StartedDesign and LayoutPlugin DevelopmentAdvanced TopicsFunction ReferenceTroubleshooting