[ Index ]

PHP Cross Reference of MyBB

title

Body

[close]

/inc/ -> functions_calendar.php (summary)

MyBB 1.6 Copyright 2010 MyBB Group, All Rights Reserved Website: http://mybb.com License: http://mybb.com/about/license

File Size: 1069 lines (27 kb)
Included or required: 2 times
Referenced: 0 times
Includes or requires: 0 files

Defines 14 functions

  build_mini_calendar()
  cache_calendars()
  get_calendar_permissions()
  fetch_calendar_permissions()
  build_calendar_jump()
  get_next_month()
  get_prev_month()
  get_events()
  get_birthdays()
  fetch_weekday_structure()
  fetch_weekday_name()
  fetch_next_occurance()
  fetch_friendly_repetition()
  fetch_weekday_monthly_repetition()

Functions
Functions that are not part of a class:

build_mini_calendar($calendar, $month, $year, &$events_cache)   X-Ref
Build a mini calendar for a specific month

param: array The calendar array for the calendar
param: int The month of the year
param: int The year
param: array Optional events cache for this calendar
return: string The built mini calendar

cache_calendars()   X-Ref
Cache available calendars in to memory or return the cached calendars

return: array Cached calendars

get_calendar_permissions($cid=0)   X-Ref
Fetch the calendar permissions for the current user for one or more calendars

param: int Optional calendar ID. If none specified, permissions for all calendars are returned
return: array Array of permissions

fetch_calendar_permissions($cid, $gid, $calendar_permissions)   X-Ref
No description

build_calendar_jump($selected=0)   X-Ref
Build a calendar select list to jump between calendars

param: int The selected calendar ID
return: string The calendar select

get_next_month($month, $year)   X-Ref
Fetch the next calendar month from a specified month/year

param: int The month
param: int The year
return: array Array of the next month and next year

get_prev_month($month, $year)   X-Ref
Fetch the previous calendar month from a specified month/year

param: int The month
param: int The year
return: array Array of the previous month and previous year

get_events($calendar, $start, $end, $unapproved=0, $private=1)   X-Ref
Fetch the events for a specific calendar and date range

param: int The calendar ID
param: int Start time stamp
param: int End time stmap
param: int 1 to fetch unapproved events too
param: int The user ID to fetch private events for (0 fetches none)
return: array Array of events

get_birthdays($months, $day="")   X-Ref
Fetch the birthdays for one or more months or a specific day

param: mixed Integer of the month or array of months
param: int Day of the specific month (if only one month specified above)
return: array Array of birthdays

fetch_weekday_structure($week_start)   X-Ref
Fetch an ordered list of weekdays depended on a specified starting day

param: int The weekday we want to start the week with
return: array Ordered list of weekdays dependant on start of week

fetch_weekday_name($weekday, $short=false)   X-Ref
Fetch a weekday name based on a number

param: int The weekday number
param: boolean True to fetch the short name ('S'), false to fetch full name
param: string The weekday name

fetch_next_occurance($event, $range, $last_occurance, $first=false)   X-Ref
Fetches the next occurance for a repeating event.

param: array The event array
param: array The range of start/end timestamps
param: int The last occurance of this event
param: boolean True if this is our first iteration of this function (Does some special optimised calculations on false)
return: int The next occurance timestamp

fetch_friendly_repetition($event)   X-Ref
Fetch a friendly repetition value for a specific event (Repeats every x months etc)

param: array The array of the event
return: string The friendly repetition string

fetch_weekday_monthly_repetition($repeats, $month, $year)   X-Ref
Fetch a timestamp for "the first/second etc weekday" for a month.

param: array The repetition array from the event
param: int The month of the year
param: int The year
return: int The UNIX timestamp



Generated: Tue Oct 8 19:19:50 2013 Cross-referenced by PHPXref 0.7.1