b2evolution

Multilingual multiuser multiblog engine

b2evolution Technical Documentation (CVS HEAD) [ class tree: evocore ] [ index: evocore ] [ all elements ]

Procedural File: _item.funcs.php

Source Location: /blogs/inc/items/model/_item.funcs.php

Page Details

This file implements Post handling functions.

This file is part of the evoCore framework - http://evocore.net/ See also http://sourceforge.net/projects/evocms/.

Author:  cafelog (team)
Author:  blueyed: Daniel HAHLER.
Author:  fplanque: Francois PLANQUE.
Author:  tswicegood: Travis SWICEGOOD.
Author:  vegarg: Vegar BERG GULDAL.
Version:  $Id: _item.funcs.php,v 1.93 2010/03/04 19:36:04 fplanque Exp $
Copyright:  

(c)2003-2010 by Francois PLANQUE - http://fplanque.net/ Parts of this file are copyright (c)2004-2006 by Daniel HAHLER - http://thequod.de/contact.

Filesource:  Source Code for this file
Functions
attachment_iframe  [line 465]

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: 


[ Top ]
attach_browse_tabs  [line 742]

void attach_browse_tabs( )

Used by the items & the comments controllers



[ Top ]
bpost_count_words  [line 369]

integer bpost_count_words( string $str  )

Returns the number of the words in a string, sans HTML

Parameters:
string   $str:  The string.

API Tags:
Return:  Number of words.

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).

[ Top ]
cat_select  [line 534]

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.. )

[ Top ]
cat_select_after_each  [line 697]

void cat_select_after_each( $cat_ID, $level  )

callback after each sublist element

Parameters:
   $cat_ID: 
   $level: 


[ Top ]
cat_select_after_last  [line 705]

void cat_select_after_last( $parent_cat_ID, $level  )

callback to end sublist

Parameters:
   $parent_cat_ID: 
   $level: 


[ Top ]
cat_select_before_each  [line 622]

void cat_select_before_each( $cat_ID, $level, $total_count  )

callback to display sublist element

Parameters:
   $cat_ID: 
   $level: 
   $total_count: 


[ Top ]
cat_select_before_first  [line 614]

void cat_select_before_first( $parent_cat_ID, $level  )

callback to start sublist

Parameters:
   $parent_cat_ID: 
   $level: 


[ Top ]
cat_select_header  [line 598]

void cat_select_header( )

Header for cat_select()



[ Top ]
cat_select_new  [line 714]

string cat_select_new( )

new category line for catselect table


API Tags:
Return:  new row code


[ Top ]
check_categories  [line 1224]

void check_categories( &$post_category, &$post_extracats  )
Parameters:
   &$post_category: 
   &$post_extracats: 


[ Top ]
check_perm_posttype  [line 1124]

void check_perm_posttype( array $post_extracats  )

Assert that the supplied post type can be used by the current user in the post's extra categories' context.

Parameters:
array   $post_extracats:  The extra cats of the post.


[ Top ]
create_multiple_posts  [line 1169]

array &create_multiple_posts( object Instance &$Item, [boolean $linebreak = false]  )

Mass create.

Create multiple posts from one post.

Parameters:
object Instance   &$Item:  of Item class (by reference).
boolean   $linebreak:  true if create paragraphs at each line break

API Tags:
Return:  The posts, by reference.


[ Top ]
echo_attaching_files_button_js  [line 1042]

void echo_attaching_files_button_js( )

Output JavaScript code to dynamically show popup files attachment window

This is a part of the process that makes it smoother to "Save & start attaching files".



[ Top ]
echo_link_files_js  [line 1077]

void echo_link_files_js( )

Output JavaScript code for "Add/Link files" link

This is a part of the process that makes it smoother to "Save & start attaching files".



[ Top ]
echo_onchange_newcat  [line 1276]

void echo_onchange_newcat( )


[ Top ]
echo_publishnowbutton_js  [line 1096]

void echo_publishnowbutton_js( )

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.



[ Top ]
echo_publish_buttons  [line 1004]

void echo_publish_buttons( $Form, $creating, $edited_Item  )
Parameters:
   $Form: 
   $creating: 
   $edited_Item: 


[ Top ]
echo_set_is_attachments  [line 1060]

void echo_set_is_attachments( )

Output JavaScript code to set hidden field is_attachments which indicates that we must show attachments files popup window

This is a part of the process that makes it smoother to "Save & start attaching files".



[ Top ]
echo_slug_filler  [line 1299]

void echo_slug_filler( )

Automatically update the slug field when a title is typed.

Variable slug_changed hold true if slug was manually changed (we already do not need autocomplete) and false in other case.



[ Top ]
get_featured_Item  [line 103]

Item &get_featured_Item( )

Return an Item if an Intro or a Featured item is available for display in current disp.



[ Top ]
get_newcategory_link  [line 518]

string get_newcategory_link( )

Creates a link to new category, with properties icon


API Tags:
Return:  link url


[ Top ]
get_postdata  [line 294]

void get_postdata( $postid  )

if global $postdata was not set it will be

Parameters:
   $postid: 


[ Top ]
init_MainList  [line 47]

void init_MainList( integer $items_nb_limit  )

Prepare the MainList object for displaying skins.

Parameters:
integer   $items_nb_limit:  max # of posts on the page


[ Top ]
issue_date_control  [line 928]

void issue_date_control( Form $Form, [ $break = false]  )

Selection of the issue date

Parameters:
Form   $Form: 
   $break: 

Information Tags:
Todo:  dh> should display erroneous values (e.g. when giving invalid date) as current (form) value, too.

[ Top ]
item_link_by_urltitle  [line 975]

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:
   $params: 


[ Top ]
statuses_where_clause  [line 401]

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: 


[ Top ]
urltitle_validate  [line 186]

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'], [NULL|string $post_locale = NULL]  )

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
NULL|string   $post_locale:  The post locale or NULL if there is no specific locale.

API Tags:
Return:  validated url title


[ Top ]
visibility_select  [line 882]

void visibility_select( &$Form, $post_status, [ $mass_create = false]  )

Allow to select status/visibility

Parameters:
   &$Form: 
   $post_status: 
   $mass_create: 


[ Top ]


Documentation generated on Sat, 06 Mar 2010 04:15:13 +0100 by phpDocumentor 1.4.2. This site is hosted and maintained by Daniel HAHLER (Contact).