Documentation

Calendar.template.php

Simple Machines Forum (SMF)

Tags
author

Simple Machines https://www.simplemachines.org

copyright

2025 Simple Machines and individual contributors

license

https://www.simplemachines.org/about/smf/license.php BSD

version
3.0

Alpha 2

Table of Contents

Functions

template_main()  : mixed
Our main calendar template, which encapsulates weeks and months.
template_show_upcoming_list()  : void|bool
Display a list of upcoming events, birthdays, and holidays.
template_show_month_grid()  : void|bool
Display a monthly calendar grid.
template_show_week_grid()  : void|bool
Shows a weekly grid
template_calendar_top()  : mixed
Calendar controls under the title
template_event_post()  : mixed
Template for posting a calendar event.
template_bcd()  : mixed
Displays a clock
template_hms()  : mixed
Displays the hours, minutes and seconds for our clock
template_omfg()  : mixed
Displays a binary clock
template_thetime()  : mixed
Displays the time

Functions

template_main()

Our main calendar template, which encapsulates weeks and months.

template_main() : mixed

template_show_upcoming_list()

Display a list of upcoming events, birthdays, and holidays.

template_show_upcoming_list(string $grid_name) : void|bool
Parameters
$grid_name : string

The grid name

Return values
void|bool

Returns false if the grid doesn't exist.

template_show_month_grid()

Display a monthly calendar grid.

template_show_month_grid(string $grid_name[, bool $is_mini = false ]) : void|bool
Parameters
$grid_name : string

The grid name

$is_mini : bool = false

Is this a mini grid?

Return values
void|bool

Returns false if the grid doesn't exist.

template_show_week_grid()

Shows a weekly grid

template_show_week_grid(string $grid_name) : void|bool
Parameters
$grid_name : string

The name of the grid

Return values
void|bool

Returns false if the grid doesn't exist

template_calendar_top()

Calendar controls under the title

template_calendar_top(array<string|int, mixed> $calendar_data) : mixed

Creates the view selector (list, month, week), the date selector (either a select menu or a date range chooser, depending on the circumstances), and the "Post Event" button.

Parameters
$calendar_data : array<string|int, mixed>

The data for the calendar grid that this is for

template_event_post()

Template for posting a calendar event.

template_event_post() : mixed

template_hms()

Displays the hours, minutes and seconds for our clock

template_hms() : mixed

        
On this page

Search results