[ Index ]
 

Code source de b2evolution 2.1.0-beta

Accédez au Source d'autres logiciels libres

Classes | Fonctions | Variables | Constantes | Tables

title

Body

[fermer]

/blogs/inc/collections/model/ -> _category.funcs.php (sommaire)

This file implements Category handling functions. This file is part of the evoCore framework - {@link http://evocore.net/} See also {@link http://sourceforge.net/projects/evocms/}.

Author: blueyed: Daniel HAHLER.
Author: fplanque: Francois PLANQUE.
Author: jwedgeco: Jason EDGECOMBE (for hire by UNC-Charlotte)
Author: edgester: Jason EDGECOMBE (personal contributions, not for hire)
Copyright: (c)2003-2007 by Francois PLANQUE - {@link http://fplanque.net/}
Version: $Id: _category.funcs.php,v 1.1 2007/06/25 10:59:32 fplanque Exp $
Poids: 497 lignes (15 kb)
Inclus ou requis:0 fois
Référencé: 0 fois
Nécessite: 0 fichiers

Définit 11 fonctions

  cat_create()
  get_the_category_by_ID()
  get_catblog()
  cat_load_cache()
  cat_load_postcats_cache()
  postcats_get_byID()
  cat_children()
  blog_has_cats()
  compile_cat_array()
  cat_req()
  cat_req_dummy()

Fonctions
Fonctions qui ne font pas partie d'une Classe:

cat_create( $cat_name, $cat_parent_ID, $cat_blog_ID = NULL)   X-Ref
Create a new category

This funtion has to handle all needed DB dependencies!

param: string Category name
param: string Category ID ('NULL' as string(!) for root)
param: integer|NULL Blog ID (will be taken from parent cat, if empty)

get_the_category_by_ID( $cat_ID, $die = true )   X-Ref
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

param: integer category ID
param: boolean die() if category does not exist? (default: true)

get_catblog( $cat_ID )   X-Ref
Get blog for a given cat


cat_load_cache()   X-Ref
Load cache for category definitions.


cat_load_postcats_cache()   X-Ref
Load cache for category associations with current posts


postcats_get_byID( $post_ID )   X-Ref
Get category associations with given post


cat_children( $ccats, $blog_ID, $parent_ID, $callback_before_first, $callback_before_each, $callback_after_each, $callback_after_last, $level = 0, $root_call = true )   X-Ref
Taking a recursive walk in the category park...

param: array PHP requires this stupid cloning of the cache_categories array in order to be able to perform foreach on it
param: integer
param: integer
param: string|array Callback for first category
param: string|array Callback before each category
param: string|array Callback after each category
param: string|array Callback after last category
param: integer Caller nesting level, just to keep track of how far we go :)
return: string

blog_has_cats( $blog_ID )   X-Ref
Does a given blog have categories?

param: integer Blog ID
return: boolean

compile_cat_array( $cat, $catsel, & $cat_array, & $cat_modifier, $restrict_to_blog = 0 )   X-Ref
Compiles the cat array from $cat (recursive + optional modifiers) and $catsel[] (non recursive)

param: string
param: array
param: array by ref, will be modified
param: string by ref, will be modified
param: integer blog number to restrict to

cat_req( $parent_cat_ID, $level )   X-Ref
Callback used in compile_cat_array()


cat_req_dummy()   X-Ref
Callback used in compile_cat_array()




Généré le : Thu Nov 29 23:58:50 2007 par Balluche grâce à PHPXref 0.7
  Clicky Web Analytics