[ Index ]

PHP Cross Reference of MyBB 1.8.38

title

Body

[close]

/inc/ -> functions_calendar.php (summary)

MyBB 1.8 Copyright 2014 MyBB Group, All Rights Reserved Website: http://www.mybb.com License: http://www.mybb.com/about/license

File Size: 1101 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
return: string The built mini calendar
param: array $calendar The calendar array for the calendar
param: int $month The month of the year
param: int $year The year
param: array $events_cache Optional events cache for this 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
return: array Array of permissions
param: int $cid Optional calendar ID. If none specified, permissions for all calendars are returned

fetch_calendar_permissions($cid, $gid, $calendar_permissions)   X-Ref
Fetch the calendar permissions
return: array|void Array of current permissions or nothing if an error occured
param: int $cid Calendar ID
param: string $gid User group ID, comma seperated
param: array Array of permissions for this calendar and group

build_calendar_jump($selected=0)   X-Ref
Build a calendar select list to jump between calendars
return: string The calendar select
param: int $selected The selected calendar ID

get_next_month($month, $year)   X-Ref
Fetch the next calendar month from a specified month/year
return: array Array of the next month and next year
param: int $month The month
param: int $year The year

get_prev_month($month, $year)   X-Ref
Fetch the previous calendar month from a specified month/year
return: array Array of the previous month and previous year
param: int $month The month
param: int $year The year

get_events($calendar, $start, $end, $unapproved=0, $private=1)   X-Ref
Fetch the events for a specific calendar and date range
return: array Array of events
param: int $calendar The calendar ID
param: int $start Start time stamp
param: int $end End time stmap
param: int $unapproved 1 to fetch unapproved events too
param: int $private The user ID to fetch private events for (0 fetches none)

get_birthdays($months, $day=0)   X-Ref
Fetch the birthdays for one or more months or a specific day
return: array Array of birthdays
param: int|array $months Integer of the month or array of months
param: int $day Day of the specific month (if only one month specified above)

fetch_weekday_structure($week_start)   X-Ref
Fetch an ordered list of weekdays depended on a specified starting day
return: array Ordered list of weekdays dependant on start of week
param: int $week_start The weekday we want to start the week with

fetch_weekday_name($weekday, $short=false)   X-Ref
Fetch a weekday name based on a number
return: string The weekday name
param: int $weekday The weekday number
param: boolean $short True to fetch the short name ('S'), false to fetch full name

fetch_next_occurance($event, $range, $last_occurance, $first=false)   X-Ref
Fetches the next occurance for a repeating event.
return: int The next occurance timestamp
param: array $event The event array
param: array $range The range of start/end timestamps
param: int $last_occurance The last occurance of this event
param: boolean $first True if this is our first iteration of this function (Does some special optimised calculations on false)

fetch_friendly_repetition($event)   X-Ref
Fetch a friendly repetition value for a specific event (Repeats every x months etc)
return: string The friendly repetition string
param: array $event The array of the event

fetch_weekday_monthly_repetition($repeats, $month, $year)   X-Ref
Fetch a timestamp for "the first/second etc weekday" for a month.
return: int The UNIX timestamp
param: array $repeats The repetition array from the event
param: int $month The month of the year
param: int $year The year



2005 - 2021 © MyBB.de | Alle Rechte vorbehalten! | Sponsor: netcup Cross-referenced by PHPXref