[ Index ]

PHP Cross Reference of Drupal 6 (yi-drupal)

title

Body

[close]

/sites/all/modules/calendar/ -> calendar.module (summary)

(no description)

File Size: 921 lines (33 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 28 functions

  calendar_views_api()
  calendar_help()
  calendar_init()
  calendar_theme()
  calendar_offset()
  calendar_part_is_valid()
  calendar_block()
  calendar_display_types()
  calendar_current_type()
  calendar_node_stripe()
  calendar_node_taxonomy_stripe()
  calendar_node_group_stripe()
  calendar_og_groups()
  calendar_date_select()
  calendar_date_select_form()
  calendar_arg_position()
  calendar_get_node_link()
  calendar_groupby_times()
  calendar_errors()
  calendar_elements()
  calendar_validate_hex_color()
  theme_calendar_colorpicker()
  theme_calendar_colorfield()
  calendar_link()
  calendar_remove()
  calendar_week_header()
  calendar_untranslated_days()
  calendar_build_nodes()

Functions
Functions that are not part of a class:

calendar_views_api()   X-Ref
Implementation of hook_views_api().

This one is used as the base to reduce errors when updating.

calendar_help($section, $arg)   X-Ref
Implementation of hook_help().


calendar_init()   X-Ref
No description

calendar_theme()   X-Ref
No description

calendar_offset($field_name)   X-Ref
TODO need to identify type of timezone handling needed for each date field


calendar_part_is_valid($value, $type)   X-Ref
A function to test the validity of various date parts


calendar_block($op = 'list', $delta = 0)   X-Ref
implementation of hook_block()


calendar_display_types()   X-Ref
Calendar display types


calendar_current_type($view)   X-Ref
Figure out which type of display to use,
based on the current argument.

return: year, month, day, or week.

calendar_node_stripe($view, &$node, $query_name, $delta, $stripe = NULL, $label = '')   X-Ref
Create a stripe.

param: $node - the node object
param: $query_name - the views queryname for this date field
param: $delta - the delta for this field, used to distinguish fields that appear more than once in the calendar
param: $stripe - the hex code for this stripe.
param: $label - the label to give this stripe.

calendar_node_taxonomy_stripe($view, &$node, $query_name, $delta, $stripe = NULL, $label = '')   X-Ref
Create a stripe based on a taxonomy term.

param: $node - the node object
param: $query_name - the views queryname for this date field
param: $delta - the delta for this field, used to distinguish fields that appear more than once in the calendar
param: $stripe - the hex code for this stripe.
param: $label - the label to give this stripe.

calendar_node_group_stripe($view, &$node, $query_name, $delta, $stripe = NULL, $label = '')   X-Ref
Create a stripe based on group.

param: $node - the node object
param: $query_name - the views queryname for this date field
param: $delta - the delta for this field, used to distinguish fields that appear more than once in the calendar
param: $stripe - the hex code for this stripe.
param: $label - the label to give this stripe.

calendar_og_groups($view)   X-Ref
Helper function to figure out a group gid to use in blocks.

return: an array of group nodes that are relevant.

calendar_date_select($view)   X-Ref
A selector to jump to a new date in the calendar.

param: unknown_type $view
return: unknown

calendar_date_select_form(&$form_state, $view)   X-Ref
The date selector form.

param: object $view
return: the form element

calendar_arg_position($view)   X-Ref
No description

calendar_get_node_link($node, $default = NULL)   X-Ref
Get the url for a calendar node.

param: $node - a calendar node object
param: $default - a default url to use when nothing specific is provided.

calendar_groupby_times($type = '')   X-Ref
No description

calendar_errors($error)   X-Ref
Define some error messages.


calendar_elements()   X-Ref
Implementation of hook_elements.

Much of the colorpicker code was adapted from the Colorpicker module.
That module has no stable release yet nor any D6 branch.

TODO Consider dropping the duplicate code and adding a dependency
when that module is more stable, if calendar module customizations will
work in it.

calendar_validate_hex_color($element)   X-Ref
Check to make sure the user has entered a valid 6 digit hex color.


theme_calendar_colorpicker($element)   X-Ref
Format calendar_colorpicker.


theme_calendar_colorfield($element)   X-Ref
Format calendar_color textfield.


calendar_link($type, $object, $teaser = FALSE)   X-Ref
Add link to calendar to nodes.

Controlled by value of 'calendar_date_link' in the view.

calendar_remove($view_name)   X-Ref
Callback to remove a default calendar from the system.


calendar_week_header($view)   X-Ref
Formats the weekday information into table header format

return: array with weekday table header data

calendar_untranslated_days()   X-Ref
Array of untranslated day name abbreviations, forced to lowercase
and ordered appropriately for the site setting for the first day of week.

The untranslated day abbreviation is used in css classes.

calendar_build_nodes(&$view, &$items)   X-Ref
Take the array of items and alter it to an array of
calendar nodes that the theme can handle.

Iterate through each datefield in the view and each item
returned by the query, and create pseudo date nodes.

If there is more than one date field in the node, this will create
multiple nodes, one each with the right calendar date for that
field's value. If a field value has a date range that covers more than
one day, separate nodes will be created for each day in the field's
day range, limited to the minimum and maximum dates for the view.

When we finish, we will have a distinct node for each distinct day
and date field.



Generated: Mon Jul 9 18:01:44 2012 Cross-referenced by PHPXref 0.7