Function __global->add_news
Definitions
sources/news2.php
- Adds a news entry to the database, and send out the news to any RSS cloud listeners.
- Is abstract?: No
- Is static?: No
- Is final?: No
- Return: int
Parameters
Name | Type | Default | Set | Range | Description |
---|---|---|---|---|---|
$title | SHORT_TEXT | required parameter | N/A | N/A | The news title |
$news | LONG_TEXT | required parameter | N/A | N/A | The news summary (or if not an article, the full news) |
$author | ?ID_TEXT | Null | N/A | N/A | The news author (possibly, a link to an existing author in the system, but does not need to be) (null: current username) |
$validated | BINARY | 1 | N/A | N/A | Whether the news has been validated |
$allow_rating | BINARY | 1 | N/A | N/A | Whether the news may be rated |
$allow_comments | SHORT_INTEGER | 1 | N/A | N/A | Whether comments are allowed (0=no, 1=yes, 2=review style) |
$allow_trackbacks | BINARY | 1 | N/A | N/A | Whether the news may have trackbacks |
$notes | LONG_TEXT | Blank (empty string) | N/A | N/A | Notes for the news |
$news_article | LONG_TEXT | Blank (empty string) | N/A | N/A | The news entry (blank means no entry) |
$main_news_category | ?AUTO_LINK | Null | N/A | N/A | The primary news category (null: personal) |
$news_categories | array | [] | N/A | N/A | The IDs of the news categories that this is in |
$time | ?TIME | Null | N/A | N/A | The time of submission (null: now) |
$submitter | ?MEMBER | Null | N/A | N/A | The news submitter (null: current member) |
$views | integer | 0 | N/A | N/A | The number of views the article has had |
$edit_date | ?TIME | Null | N/A | N/A | The edit date (null: never) |
$id | ?AUTO_LINK | Null | N/A | N/A | Force an ID (null: don't force an ID) |
$image | URLPATH | Blank (empty string) | N/A | N/A | URL to the image for the news entry (blank: use cat image) |
$meta_keywords | ?SHORT_TEXT | Blank (empty string) | N/A | N/A | Meta keywords for this resource (null: do not edit) (blank: implicit) |
$meta_description | ?LONG_TEXT | Blank (empty string) | N/A | N/A | Meta description for this resource (null: do not edit) (blank: implicit) |
$regions | array | [] | N/A | N/A | The regions (empty: not region-limited) |
Return
- The ID of the news just added
- Type: AUTO_LINK
- Set: N/A
- Range: N/A