b2evolution

Multilingual multiuser multiblog engine

b2evolution Technical Documentation (0.9.x) [ class tree: evocore ] [ index: evocore ] [ all elements ]

Procedural File: _functions_cats.php

Source Location: /blogs/b2evocore/_functions_cats.php

Page Details

Category handling

b2evolution - http://b2evolution.net/ Released under GNU GPL License - http://b2evolution.net/about/license.html

Copyright:  (c)2003-2005 by Francois PLANQUE - http://fplanque.net/
Filesource:  Source Code for this file
Functions
blog_has_cats  [line 506]

void blog_has_cats( $blog_ID  )
Parameters:
   $blog_ID: 


[ Top ]
cat_children  [line 470]

void cat_children( $ccats, $blog_ID, $parent_ID, $callback_before_first, $callback_before_each, $callback_after_each, $callback_after_last, [ $level = 0]  )
Parameters:
   $ccats: 
   $blog_ID: 
   $parent_ID: 
   $callback_before_first: 
   $callback_before_each: 
   $callback_after_each: 
   $callback_after_last: 
   $level: 


[ Top ]
cat_create  [line 21]

void cat_create( $cat_name, $cat_parent_ID, [ $cat_blog_ID = NULL]  )

cat_create(-)

Create a new category This funtion has to handle all needed DB dependencies!

fplanque: created

Parameters:
   $cat_name: 
   $cat_parent_ID: 
   $cat_blog_ID: 


[ Top ]
cat_delete  [line 79]

void cat_delete( $cat_ID  )
Parameters:
   $cat_ID: 


[ Top ]
cat_load_cache  [line 290]

void cat_load_cache( )


[ Top ]
cat_load_postcats_cache  [line 402]

void cat_load_postcats_cache( )


[ Top ]
cat_query  [line 538]

void cat_query( )


[ Top ]
cat_update  [line 52]

void cat_update( $cat_ID, $cat_name, [ $cat_parent_ID = 0], [ $cat_blog_ID = '']  )
Parameters:
   $cat_ID: 
   $cat_name: 
   $cat_parent_ID: 
   $cat_blog_ID: 


[ Top ]
get_catblog  [line 249]

void get_catblog( $cat_ID  )
Parameters:
   $cat_ID: 


[ Top ]
get_catname  [line 274]

void get_catname( $cat_ID  )
Parameters:
   $cat_ID: 


[ Top ]
get_catparent  [line 262]

void get_catparent( $cat_ID  )
Parameters:
   $cat_ID: 


[ Top ]
get_the_category  [line 234]

void get_the_category( )


[ Top ]
get_the_category_by_ID  [line 206]

void get_the_category_by_ID( integer $cat_ID, [ $die = true], boolean die()  )

get_the_category_by_ID(-)

Get category name+blog_id for specified cat ID

fplanque: reused "R. U. Serious" optimization here fplanque: added blog ID stuff TODO: move. dis is not a template tag

Parameters:
boolean   die():  if category does not exist? (default: true)
integer   $cat_ID:  category ID
   $die: 


[ Top ]
postcats_get_byID  [line 449]

void postcats_get_byID( $post_ID  )
Parameters:
   $post_ID: 


[ Top ]
single_cat_title  [line 563]

void single_cat_title( [string $prefix = '#'], [mixed $display = 'htmlbody']  )

Display currently filtered categories names

This tag is out of the b2 loop. It outputs the title of the category when you load the page with

  1. ?cat=
When the weblog page is loaded without ?cat=, this tag doesn't display anything. Generally, you could use this as a page title.

fplanque: multiple category support (so it's not really 'single' anymore!)

Parameters:
string   $prefix:  Prefix to be displayed if something is going to be displayed
mixed   $display:  Output format, see format_to_output() or false to return value instead of displaying it


[ Top ]
the_categories  [line 625]

void the_categories( [ $link_title = '#'], [ $before_main = '<strong>'], [ $after_main = '</strong>'], [ $before_other = ''], [ $after_other = ''], [ $before_external = '<em>'], [ $after_external = '</em>'], [ $separator = ', '], [ $format_each = 'raw'], [ $format_list = 'htmlbody']  )

the_categories(-)

lists all the category names

fplanque: created fplanque: 0.8.3: changed defaults

Parameters:
   $link_title: 
   $before_main: 
   $after_main: 
   $before_other: 
   $after_other: 
   $before_external: 
   $after_external: 
   $separator: 
   $format_each: 
   $format_list: 

API Tags:
Deprecated:  deprecated by Item::categories()


[ Top ]
the_categories_IDs  [line 716]

void the_categories_IDs( )


[ Top ]
the_category  [line 608]

void the_category( [ $format = 'htmlbody']  )

the_category(-)

echoes the main category name the name of the main category the post belongs to. you can as an admin add categories, and rename them if needed. default category is 'General', you can rename it too.

Parameters:
   $format: 

API Tags:
Deprecated:  deprecated by Item::main_category()


[ Top ]
the_category_head  [line 736]

void the_category_head( [ $before = ''], [ $after = '']  )
Parameters:
   $before: 
   $after: 


[ Top ]
the_category_ID  [line 703]

void the_category_ID( )


[ Top ]


Documentation generated on Tue, 20 May 2008 01:54:43 +0200 by phpDocumentor 1.4.2