bracket.module File Reference

Functions

if(module_exists('views')) bracket_perm ()
 bracket_node_info ()
 bracket_access ($op, $node, $account)
 bracket_menu ()
 bracket_menu_load ($nid)
 bracket_round_menu_load ($roundid, $nid)
 bracket_theme ()
 bracket_settings ()
 bracket_settings_form ($form_state)
 bracket_settings_form_validate ($form_id, &$form_state)
 bracket_settings_form_submit ($form_id, &$form_state)
 bracket_view ($node, $teaser=FALSE, $page=FALSE)
 theme_bracket_view (&$node, $teaser=FALSE, $page=FALSE)
 bracket_prepare (&$node)
 bracket_load ($node)
 bracket_form (&$node)
 bracket_validate ($node)
 bracket_validate_color ($color)
 bracket_check_image_type ($path)
 bracket_form_validate ($form_id, &$form_state)
 bracket_form_process_image ($upload_field, $path_field, $delete_field, &$form_state)
 bracket_insert ($node)
 bracket_update ($node)
 bracket_delete ($node, $log=TRUE)
 bracket_clone ($node)
 bracket_clone_form ($form_state, $node)
 bracket_clone_form_submit ($form_id, &$form_state)
 bracket_clear ($node)
 bracket_clear_form ($form_state, $node)
 bracket_clear_form_submit ($form_id, &$form_state)
 bracket_export ($node)
 bracket_export_form ($form_state, $node)
 bracket_export_form_submit ($form_id, &$form_state)
 bracket_import ($node)
 bracket_import_form ($form_state, $node)
 bracket_import_form_submit ($form_id, &$form_state)
 bracket_admin_content ()
 theme_bracket_admin_content ($nodes)
 bracket_create (&$node)
 bracket_image ($node)
 bracket_pdf ($node)
 bracket_html2rgb ($color)

Variables

global $bracket_bg_color_default = '#FFFFFF'
global $bracket_fg_color_default = '#000000'
global $bracket_bar_bg_color_default = '#404080'
global $bracket_bar_fg_color_default = '#FFFFFF'

Detailed Description

This module provides a method for creating and maintaining tournament brackets.

Author:
Jim Bullington <jimb@jrbcs.com>

Function Documentation

bracket_access ( op,
node,
account 
)

Implementation of hook_access

bracket_admin_content (  ) 

Display bracket list for admin/content/bracket

bracket_check_image_type ( path  ) 

Check that a given path is a supported image type (jpg or png) based on file extension

Parameters:
$path the path of the image file
Returns:
true if path is supported image type or is empty, otherwise false if extension is not valid
bracket_create ( &$  node  ) 

Create a bracket

Parameters:
$node the node containing the bracket
bracket_delete ( node,
log = TRUE 
)

Implementation of hook_delete

bracket_form ( &$  node  ) 

Implementation of hook_form().

bracket_form_process_image ( upload_field,
path_field,
delete_field,
&$  form_state 
)

process image uploads and deletes

Parameters:
$upload_field the name of the file field containing the upload
$path_field the name of the text field containing the image path
$delete_field the name of the checkbox field containing the delete option
bracket_form_validate ( form_id,
&$  form_state 
)

validation hook of bracket form - handles image uploads and deletes

bracket_html2rgb ( color  ) 

Convert an HTML color to decimal RGB parts

Adapted from code at: http://www.anyexample.com/programming/php/php_convert_rgb_from_to_html_hex_color.xml

Parameters:
$color the HTML color to convert
Returns:
an array containing the RGB values
bracket_image ( node  ) 

Output a bracket image

Parameters:
$node the node containing the bracket
bracket_insert ( node  ) 

Implementation of hook_insert

bracket_load ( node  ) 

Implementation of hook_load().

bracket_menu (  ) 

Implementation of hook_menu().

bracket_menu_load ( nid  ) 

Menu loader callback; Load a bracket node if the given nid is a bracket

bracket_node_info (  ) 

Implementation of hook_node_info().

bracket_pdf ( node  ) 

Output a bracket pdf

Parameters:
$node the node containing the bracket
if (module_exists('views')) bracket_perm (  ) 

Implementation of hook_perm().

bracket_prepare ( &$  node  ) 

Implementation of hook_load().

bracket_round_menu_load ( roundid,
nid 
)

Menu loader callback; Load a bracket node and return the round object if valid

bracket_theme (  ) 

Implementation of hook_theme().

bracket_update ( node  ) 

Implementation of hook_update

bracket_validate ( node  ) 

Implementation of hook_validate().

bracket_validate_color ( color  ) 

Return true if the given color is a valid HTML color code in the format of : RRGGBB

Parameters:
$color the path of the image file
Returns:
TRUE if color is valid, otherwise FALSE
bracket_view ( node,
teaser = FALSE,
page = FALSE 
)

Implementation of hook_view

theme_bracket_admin_content ( nodes  ) 

Theme the list of brackets

theme_bracket_view ( &$  node,
teaser = FALSE,
page = FALSE 
)

Theming function for bracket_view

 All Data Structures Files Functions Variables
Generated on Sat Jul 10 15:07:39 2010 by  doxygen 1.6.3