Procedural File: _functions_bposts.php
Source Location: /blogs/b2evocore/_functions_bposts.php
Functions
bpost_count_words [line 1585]
void bpost_count_words(
$string
)
|
|
Parameters:
void bpost_create(
$author_user_ID, $post_title, $post_content, $post_timestamp, [ $main_cat_ID = 1], [ $extra_cat_IDs = array()], [ $post_status = 'published'], [ $post_locale = '#'], [ $post_trackbacks = ''], [ $autobr = 0], [ $pingsdone = true], [ $post_urltitle = ''], [ $post_url = ''], [ $post_comments = 'open'], [ $post_renderers = array('default')]
)
|
|
Create a new post
This funtion has to handle all needed DB dependencies!
Parameters:
|
|
$author_user_ID: |
|
|
|
$post_title: |
|
|
|
$post_content: |
|
|
|
$post_timestamp: |
|
|
|
$main_cat_ID: |
|
|
|
$extra_cat_IDs: |
|
|
|
$post_status: |
|
|
|
$post_locale: |
|
|
|
$post_trackbacks: |
|
|
|
$autobr: |
|
|
|
$pingsdone: |
|
|
|
$post_urltitle: |
|
|
|
$post_url: |
|
|
|
$post_comments: |
|
|
|
$post_renderers: |
|
void bpost_delete(
$post_ID
)
|
|
Delete a post
This funtion has to handle all needed DB dependencies!
Parameters:
void bpost_update(
$post_ID, $post_title, $post_content, [ $post_timestamp = ''], [ $main_cat_ID = 1], [ $extra_cat_IDs = array()], [ $post_status = 'published'], [ $post_locale = '#'], [ $post_trackbacks = ''], [ $autobr = 0], [ $pingsdone = true], [ $post_urltitle = ''], [ $post_url = ''], [ $post_comments = 'open'], [ $post_renderers = array()]
)
|
|
Update a post
This funtion has to handle all needed DB dependencies!
Parameters:
|
|
$post_ID: |
|
|
|
$post_title: |
|
|
|
$post_content: |
|
|
|
$post_timestamp: |
|
|
|
$main_cat_ID: |
|
|
|
$extra_cat_IDs: |
|
|
|
$post_status: |
|
|
|
$post_locale: |
|
|
|
$post_trackbacks: |
|
|
|
$autobr: |
|
|
|
$pingsdone: |
|
|
|
$post_urltitle: |
|
|
|
$post_url: |
|
|
|
$post_comments: |
|
|
|
$post_renderers: |
|
bpost_update_status [line 185]
void bpost_update_status(
$post_ID, [ $post_status = 'published'], [ $pingsdone = true], [ $post_timestamp = '']
)
|
|
Update a post's status
This funtion has to handle all needed DB dependencies!
Parameters:
|
|
$post_ID: |
|
|
|
$post_status: |
|
|
|
$pingsdone: |
|
|
|
$post_timestamp: |
|
gen_permalink [line 1425]
void gen_permalink(
$file, $id, [ $use_anchor_mode = ''], [ $use_destination = ''], [ $use_more = NULL], [ $use_comments = NULL], [ $use_trackback = NULL], [ $use_pingback = NULL]
)
|
|
gen_permalink(-)
generate permalink
TODO: archives modes in clean mode
Parameters:
|
|
$file: |
|
|
|
$id: |
|
|
|
$use_anchor_mode: |
|
|
|
$use_destination: |
|
|
|
$use_more: |
|
|
|
$use_comments: |
|
|
|
$use_trackback: |
|
|
|
$use_pingback: |
|
API Tags:
| Deprecated: | deprecated by Item::gen_permalink(-) |
get_lastpostdate [line 248]
void get_lastpostdate(
[ $blog = 1], [ $show_statuses = array()], [ $cat = ''], [ $catsel = array()], [ $timestamp_min = ''], [ $timestamp_max = 'now']
)
|
|
Parameters:
|
|
$blog: |
|
|
|
$show_statuses: |
|
|
|
$cat: |
|
|
|
$catsel: |
|
|
|
$timestamp_min: |
|
|
|
$timestamp_max: |
|
void get_postdata(
$postid
)
|
|
Parameters:
get_the_title(-)
API Tags:
*** // Permalink tags ****
Item_get_by_ID [line 427]
Item Item_get_by_ID(
integer $post_ID
)
|
|
Get an Item by its ID
Parameters:
|
integer |
$post_ID: |
post ID |
API Tags:
| Return: | requested object or false |
Information Tags:
Item_get_by_title [line 463]
Item Item_get_by_title(
string $urltitle
)
|
|
Get an Item by its urltitle
Parameters:
|
string |
$urltitle: |
url title of Item |
API Tags:
| Return: | requested object or false |
Information Tags:
void link_pages(
[ $before = '#'], [ $after = '#'], [ $next_or_number = 'number'], [ $nextpagelink = '#'], [ $previouspagelink = '#'], [ $pagelink = '%d'], [ $more_file = '']
)
|
|
Parameters:
|
|
$before: |
|
|
|
$after: |
|
|
|
$next_or_number: |
|
|
|
$nextpagelink: |
|
|
|
$previouspagelink: |
|
|
|
$pagelink: |
|
|
|
$more_file: |
|
void next_post(
[ $format = '%'], [ $next = '#'], [ $title = 'yes'], [ $in_same_cat = 'no'], [ $limitnext = 1], [ $excluded_categories = '']
)
|
|
Parameters:
|
|
$format: |
|
|
|
$next: |
|
|
|
$title: |
|
|
|
$in_same_cat: |
|
|
|
$limitnext: |
|
|
|
$excluded_categories: |
|
void next_posts(
[ $max_page = 0], [ $page = '']
)
|
|
Parameters:
next_posts_link [line 1043]
void next_posts_link(
[ $label = '#'], [ $max_page = 0], [ $page = '']
)
|
|
next_posts_link(-)
Parameters:
|
|
$label: |
|
|
|
$max_page: |
|
|
|
$page: |
|
permalink_anchor [line 1400]
void permalink_anchor(
[ $mode = 'id']
)
|
|
permalink_anchor(-)
generate anchor for permalinks to refer to
TODO: archives modes in clean mode
Parameters:
API Tags:
permalink_link [line 1524]
void permalink_link(
[ $file = ''], [ $mode = 'id'], [ $post_ID = '']
)
|
|
permalink_link(-)
Display permalink
Parameters:
API Tags:
| Deprecated: | deprecated by (Item::permalink()) but still used by _archives.php |
permalink_single [line 1539]
void permalink_single(
[ $file = '']
)
|
|
permalink_single(-)
Permalink forced to a single post
Parameters:
API Tags:
posts_nav_link [line 1093]
void posts_nav_link(
[ $sep = ' :: '], [ $prelabel = '#'], [ $nxtlabel = '#'], [ $page = '']
)
|
|
Links to previous/next page
posts_nav_link(-)
Parameters:
|
|
$sep: |
|
|
|
$prelabel: |
|
|
|
$nxtlabel: |
|
|
|
$page: |
|
void preview_title(
[ $string = '#'], [ $before = ' '], [ $after = '']
)
|
|
Parameters:
|
|
$string: |
|
|
|
$before: |
|
|
|
$after: |
|
void previous_post(
[ $format = '%'], [ $previous = '#'], [ $title = 'yes'], [ $in_same_cat = 'no'], [ $limitprev = 1], [ $excluded_categories = '']
)
|
|
Parameters:
|
|
$format: |
|
|
|
$previous: |
|
|
|
$title: |
|
|
|
$in_same_cat: |
|
|
|
$limitprev: |
|
|
|
$excluded_categories: |
|
previous_posts [line 1017]
void previous_posts(
[ $page = '']
)
|
|
Parameters:
previous_posts_link [line 1071]
void previous_posts_link(
[ $label = '#'], [ $page = '']
)
|
|
previous_posts_link(-)
Parameters:
single_post_title [line 655]
void single_post_title(
[ $prefix = '#'], [ $display = 'htmlhead']
)
|
|
Parameters:
Information Tags:
statuses_where_clause [line 1617]
void statuses_where_clause(
[Array $show_statuses = '']
)
|
|
Construct the where clause to limit retrieved posts on their status
Parameters:
|
Array |
$show_statuses: |
statuses of posts we want to get |
void the_author(
[ $format = 'htmlbody']
)
|
|
***
Author tags ***
Parameters:
the_author_aim [line 1347]
void the_author_aim(
[ $format = 'raw']
)
|
|
Parameters:
the_author_email [line 1318]
void the_author_email(
[ $format = 'raw']
)
|
|
Parameters:
the_author_firstname [line 1280]
void the_author_firstname(
[ $format = 'htmlbody']
)
|
|
Parameters:
the_author_icq [line 1338]
void the_author_icq(
[ $format = 'raw']
)
|
|
Parameters:
the_author_ID [line 1309]
the_author_lastname [line 1289]
void the_author_lastname(
[ $format = 'htmlbody']
)
|
|
Parameters:
the_author_level [line 1260]
the_author_login [line 1271]
void the_author_login(
[ $format = 'htmlbody']
)
|
|
Parameters:
the_author_msn [line 1365]
void the_author_msn(
[ $format = 'raw']
)
|
|
Parameters:
the_author_nickname [line 1298]
void the_author_nickname(
[ $format = 'htmlbody']
)
|
|
Parameters:
the_author_posts [line 1374]
the_author_url [line 1329]
void the_author_url(
[ $format = 'raw']
)
|
|
Parameters:
the_author_yim [line 1356]
void the_author_yim(
[ $format = 'raw']
)
|
|
Parameters:
void the_content(
[ $more_link_text = '#'], [ $stripteaser = 0], [ $more_file = ''], [ $more_anchor = '#'], [ $before_more_link = '#'], [ $after_more_link = '#'], [ $format = 'htmlbody'], [ $cut = 0], [ $dispmore = '#'], [ $disppage = '#']
)
|
|
the_content(-)
Parameters:
|
|
$more_link_text: |
|
|
|
$stripteaser: |
|
|
|
$more_file: |
|
|
|
$more_anchor: |
|
|
|
$before_more_link: |
|
|
|
$after_more_link: |
|
|
|
$format: |
|
|
|
$cut: |
|
|
|
$dispmore: |
|
|
|
$disppage: |
|
API Tags:
void the_date(
[ $d = ''], [ $before = ''], [ $after = ''], [ $echo = 1]
)
|
|
the_date(-)
Parameters:
|
|
$d: |
|
|
|
$before: |
|
|
|
$after: |
|
|
|
$echo: |
|
API Tags:
void the_link(
[ $before = ''], [ $after = ''], [ $format = 'htmlbody']
)
|
|
Parameters:
|
|
$before: |
|
|
|
$after: |
|
|
|
$format: |
|
the_permalink [line 1552]
API Tags:
| Deprecated: | deprecated by $Item::permalink() |
void the_status(
[ $raw = true]
)
|
|
Parameters:
void the_time(
[ $d = ''], [ $echo = 1], [ $useGM = 0]
)
|
|
the_time(-)
Parameters:
API Tags:
| Deprecated: | deprecated by Item::time() / Item::date() |
void the_title(
[ $before = ''], [ $after = ''], [ $add_link = true], [ $format = 'htmlbody'], [ $disp = true]
)
|
|
Parameters:
|
|
$before: |
|
|
|
$after: |
|
|
|
$add_link: |
|
|
|
$format: |
|
|
|
$disp: |
|
the_weekday_date [line 1191]
void the_weekday_date(
[ $before = ''], [ $after = '']
)
|
|
Parameters:
urltitle_validate [line 290]
string urltitle_validate(
string $urltitle, string $title, [integer $post_ID = 0], [ $query_only = false]
)
|
|
Validate URL title
Using title as a source if url title is empty
Parameters:
|
string |
$urltitle: |
url title to validate |
|
string |
$title: |
real title to use as a source if $urltitle is empty |
|
integer |
$post_ID: |
ID of post |
|
|
$query_only: |
|
API Tags:
| Return: | validated url title |