/sources/news.php

Description
Functions
add_news (line 136)

Adds a news entry to the database, and send out the news to any RSS cloud listeners.

  • return: The ID of the news just added
AUTO_LINK add_news (SHORT_TEXT $title, LONG_TEXT $news, [?ID_TEXT $author = NULL], [BINARY $validated = 1], [BINARY $allow_rating = 1], [SHORT_INTEGER $allow_comments = 1], [BINARY $allow_trackbacks = 1], [LONG_TEXT $notes = ''], [LONG_TEXT $news_article = ''], [?AUTO_LINK $main_news_category = NULL], [?array $news_category = NULL], [?TIME $time = NULL], [?MEMBER $submitter = NULL], [integer $views = 0], [?TIME $edit_date = NULL], [?AUTO_LINK $id = NULL], [URLPATH $image = ''])
  • SHORT_TEXT $title: The news title
  • LONG_TEXT $news: The news summary (or if not an article, the full news)
  • ?ID_TEXT $author: The news author (possibly, a link to an existing author in the system, but does not need to be) (NULL: current username)
  • BINARY $validated: Whether the news has been validated
  • BINARY $allow_rating: Whether the news may be rated
  • SHORT_INTEGER $allow_comments: Whether comments are allowed (0=no, 1=yes, 2=review style)
  • BINARY $allow_trackbacks: Whether the news may have trackbacks
  • LONG_TEXT $notes: Notes for the news
  • LONG_TEXT $news_article: The news entry (blank means no entry)
  • ?AUTO_LINK $main_news_category: The primary news category (NULL: personal)
  • ?array $news_category: The IDs of the news categories that this is in (NULL: none)
  • ?TIME $time: The time of submission (NULL: now)
  • ?MEMBER $submitter: The news submitter (NULL: current member)
  • integer $views: The number of views the article has had
  • ?TIME $edit_date: The edit date (NULL: never)
  • ?AUTO_LINK $id: Force an ID (NULL: don't force an ID)
  • URLPATH $image: URL to the image for the news entry (blank: use cat image)
add_news_category (line 32)

Add a news category of the specified details.

  • return: The ID of our new news category
AUTO_LINK add_news_category (SHORT_TEXT $title, ID_TEXT $img, LONG_TEXT $notes, [?MEMBER $owner = NULL], [?AUTO_LINK $id = NULL])
  • SHORT_TEXT $title: The news category title
  • ID_TEXT $img: The theme image ID of the picture to use for the news category
  • LONG_TEXT $notes: Notes for the news category
  • ?MEMBER $owner: The owner (NULL: public)
  • ?AUTO_LINK $id: Force an ID (NULL: don't force an ID)
delete_news (line 359)

Delete a news entry.

void delete_news (AUTO_LINK $id)
  • AUTO_LINK $id: The ID of the news to edit
delete_news_category (line 85)

Delete a news category.

void delete_news_category (AUTO_LINK $id)
  • AUTO_LINK $id: The news category to delete
edit_news (line 286)

Edit a news entry.

void edit_news (AUTO_LINK $id, SHORT_TEXT $title, LONG_TEXT $news, ID_TEXT $author, BINARY $validated, BINARY $allow_rating, SHORT_INTEGER $allow_comments, BINARY $allow_trackbacks, LONG_TEXT $notes, LONG_TEXT $news_article, AUTO_LINK $main_news_category, ?array $news_category, SHORT_TEXT $meta_keywords, LONG_TEXT $meta_description, ?URLPATH $image)
  • AUTO_LINK $id: The ID of the news to edit
  • SHORT_TEXT $title: The news title
  • LONG_TEXT $news: The news summary (or if not an article, the full news)
  • ID_TEXT $author: The news author (possibly, a link to an existing author in the system, but does not need to be)
  • BINARY $validated: Whether the news has been validated
  • BINARY $allow_rating: Whether the news may be rated
  • SHORT_INTEGER $allow_comments: Whether comments are allowed (0=no, 1=yes, 2=review style)
  • BINARY $allow_trackbacks: Whether the news may have trackbacks
  • LONG_TEXT $notes: Notes for the news
  • LONG_TEXT $news_article: The news entry (blank means no entry)
  • AUTO_LINK $main_news_category: The primary news category (NULL: personal)
  • ?array $news_category: The IDs of the news categories that this is in (NULL: do not change)
  • SHORT_TEXT $meta_keywords: Meta keywords
  • LONG_TEXT $meta_description: Meta description
  • ?URLPATH $image: URL to the image for the news entry (blank: use cat image) (NULL: don't delete existing)
edit_news_category (line 54)

Edit a news category.

void edit_news_category (AUTO_LINK $id, ?SHORT_TEXT $title, ?SHORT_TEXT $img, ?LONG_TEXT $notes, [?MEMBER $owner = NULL])
  • AUTO_LINK $id: The news category to edit
  • ?SHORT_TEXT $title: The title (NULL: keep as-is)
  • ?SHORT_TEXT $img: The image (NULL: keep as-is)
  • ?LONG_TEXT $notes: The notes (NULL: keep as-is)
  • ?MEMBER $owner: The owner (NULL: public)
nice_get_news (line 463)

Get a nice formatted XHTML list of news.

  • return: The list
tempcode nice_get_news (?AUTO_LINK $it, [?MEMBER $only_owned = NULL], [boolean $editable_filter = false], [boolean $only_in_blog = false])
  • ?AUTO_LINK $it: The selected news entry (NULL: none)
  • ?MEMBER $only_owned: Limit news to those submitted by this member (NULL: show all)
  • boolean $editable_filter: Whether to only show for what may be edited by the current member
  • boolean $only_in_blog: Whether to only show blog posts
nice_get_news_categories (line 403)

Get a nice formatted XHTML list of news categories.

  • return: The tempcode for the news category select list
tempcode nice_get_news_categories ([?mixed $it = NULL], [boolean $show_all_personal_categories = false], [boolean $addable_filter = false], [boolean $only_existing = false], [?boolean $only_blogs = NULL], [boolean $prefer_not_blog_selected = false])
  • ?mixed $it: The selected news category. Array or AUTO_LINK (NULL: personal)
  • boolean $show_all_personal_categories: Whether to add all personal categories into the list (for things like the adminzone, where all categories must be shown, regardless of permissions)
  • boolean $addable_filter: Whether to only show for what may be added to by the current member
  • boolean $only_existing: Whether to limit to only existing cats (otherwise we dynamically add unstarted blogs)
  • ?boolean $only_blogs: Whether to limit to only show blog categories (NULL: don't care, true: blogs only, false: no blogs)
  • boolean $prefer_not_blog_selected: Whether to prefer to choose a non-blog category as the default

Documentation generated on Sun, 02 Jan 2011 23:18:36 +0000 by phpDocumentor 1.4.3