Procedural File: _item.funcs.php
Source Location: /qp_inc/items/model/_item.funcs.php
Functions
attachment_iframe [line 415]
void attachment_iframe(
Form &$Form, boolean $creating, Item &$edited_Item, Blog &$Blog
)
|
|
Compose screen: display attachment iframe
Parameters:
|
Form |
&$Form: |
|
|
boolean |
$creating: |
|
|
Item |
&$edited_Item: |
|
|
Blog |
&$Blog: |
|
attach_browse_tabs [line 661]
void attach_browse_tabs(
)
|
|
Used by the items & the comments controllers
bpost_count_words [line 322]
integer bpost_count_words(
string $str
)
|
|
Returns the number of the words in a string, sans HTML
Parameters:
API Tags:
Information Tags:
| Todo: | dh> Test if http://de3.php.net/manual/en/function.str-word-count.php#85579 works better/faster (only one preg_* call and no loop). |
void cat_select(
Form $Form, [boolean $form_fields = true]
)
|
|
Allow recursive category selection.
Parameters:
|
Form |
$Form: |
|
|
boolean |
$form_fields: |
true: use form fields, false: display only |
Information Tags:
| Todo: | Allow to use a dropdown (select) to switch between blogs ( CSS / JS onchange - no submit.. ) |
cat_select_after_each [line 644]
void cat_select_after_each(
$cat_ID, $level
)
|
|
callback after each sublist element
Parameters:
cat_select_after_last [line 652]
void cat_select_after_last(
$parent_cat_ID, $level
)
|
|
callback to end sublist
Parameters:
cat_select_before_each [line 570]
void cat_select_before_each(
$cat_ID, $level, $total_count
)
|
|
callback to display sublist element
Parameters:
|
|
$cat_ID: |
|
|
|
$level: |
|
|
|
$total_count: |
|
cat_select_before_first [line 562]
void cat_select_before_first(
$parent_cat_ID, $level
)
|
|
callback to start sublist
Parameters:
cat_select_header [line 546]
echo_publishnowbutton_js [line 831]
void echo_publishnowbutton_js(
string $action
)
|
|
Output JavaScript code to dynamically show or hide the "Publish NOW!" button depending on the selected post status.
This function is used by the simple and expert write screens.
Parameters:
|
string |
$action: |
Are we updating or creating? ('create' or 'update'). |
get_featured_Item [line 95]
Item &get_featured_Item(
)
|
|
Return an Item if an Intro or a Featured item is available for display in current disp.
void get_postdata(
$postid
)
|
|
if global $postdata was not set it will be
Parameters:
void init_MainList(
integer $items_nb_limit
)
|
|
Prepare the MainList object for displaying templates.
Parameters:
|
integer |
$items_nb_limit: |
max # of posts on the page |
issue_date_control [line 760]
void issue_date_control(
Form $Form, [ $break = false]
)
|
|
Selection of the issue date
Parameters:
item_link_by_urltitle [line 793]
void item_link_by_urltitle(
[ $params = array()]
)
|
|
Template tag: Link to an item identified by its url title / slug / name
Note: this will query the database. Thus, in most situations it will make more sense to use a hardcoded link. This tag can be useful for prototyping location independant sites.
Parameters:
statuses_where_clause [line 352]
void statuses_where_clause(
[Array $show_statuses = ''], [ $dbprefix = 'post_'], [ $req_blog = NULL]
)
|
|
Construct the where clause to limit retrieved posts on their status
Parameters:
|
Array |
$show_statuses: |
statuses of posts we want to get |
|
|
$dbprefix: |
|
|
|
$req_blog: |
|
urltitle_validate [line 176]
string urltitle_validate(
string $urltitle, string $title, [integer $post_ID = 0], [boolean $query_only = false], [string $dbSlugFieldName = 'post_urltitle'], [string $dbIDname = 'post_ID'], [string $dbtable = 'T_items__item'], [boolean $urlname_verbose_change = true]
)
|
|
Validate URL title (slug) / Also used for category slugs
Using title as a source if url title is empty. We allow up to 200 chars (which is ridiculously long) for WP import compatibility.
Parameters:
|
string |
$urltitle: |
url title to validate |
|
string |
$title: |
real title to use as a source if $urltitle is empty (encoded in $evo_charset) |
|
integer |
$post_ID: |
ID of post |
|
boolean |
$query_only: |
Query the DB, but don't modify the URL title if the title already exists (Useful if you only want to alert the pro user without making changes for him) |
|
string |
$dbSlugFieldName: |
The prefix of the database column names (e. g. "post_" for post_urltitle) |
|
string |
$dbIDname: |
The name of the post ID column |
|
string |
$dbtable: |
The name of the DB table to use |
|
boolean |
$urlname_verbose_change: |
Whether to notify the user when the url title has been changed. |
API Tags:
| Return: | validated url title |
visibility_select [line 727]
void visibility_select(
&$Form, $post_status
)
|
|
Allow to select status/visibility
Parameters:
|
|