# Calendarjp Plugin

Events and the calendar used to be an integral part of the Geeklog core code, but have been moved to a plugin as of Geeklog 1.4.1.

The Calendarjp plugin is the localized version of the Calendar plugin for Japanese users.

## Configuration

The calendarjp's configuration can be changed from the Configuration admin panel:

### General Calendarjp Settings

Variable | Default Value | Description
--- | --- | ---
calendarloginrequired | 0 | When set to 1, only registered users can access the calendar Please note that `$_CONF['loginrequired']` in Geeklog's main configuration takes precedence over this setting. So when `'loginrequired'` is set to 1, anonymous users can not access the calendar even when `'calendarloginrequired'` is set to 0.
addeventloginrequired | 0 | When set to 1, only registered users can add an event Please note that `$_CONF['loginrequired']` in Geeklog's main configuration takes precedence over this setting. So when `'loginrequired'` is set to 1, anonymous users can not add an event even when `'addeventloginrequired'` is set to 0.
hidecalendarmenu | 0 | Whether to hide the "Calendarjp" entry from Geeklog's menu bar (when set to 1) or to show it (when set to 0).
personalcalendars | 0 | Allow account holders to have a personal calendar
eventsubmission | 1 | Whether events submitted by users will have to be approved by an admin first (when set = 1) or show up immediately (when set = 0).
showupcomingevents | 1 | Whether to show upcoming events (0 = no, 1 = yes) in a separate block.
upcomingeventsrange | 14 | Number of days that the "Upcoming Events" block will look ahead.
hour_mode | 12 | Which format to use when submitting or editing an event. Can be 12 (for the 12 hours am/pm format) or 24 (for the 24 hours format). Uses the same value as $_CONF['hour_mode'] by default.
event_types | Anniversary, Appointment, Birthday, Business, Education, Holiday, Meeting, Miscellaneous, Personal, Phone Call, Special Occasion, Travel, Vacation | The set of event types that are used both on the public calendar and the user's personal calendar.
notification | 0 | Whether to send an email notification when a new event was submitted for the site's calendar (when set to = 1) or not (when set to = 0). No notification is ever sent for events in personal calendars.
delete_event | 0 | Defines what to do when a user is deleted that is the owner of an event. When set to 0, all events owned by the deleted user will be assigned to a user of the "Root" group (e.g. the site admin). When set to 1, the events are deleted. This only applies to site events - a user's personal events are always deleted.
aftersave | 'list' | Which page to go to after an event has been saved: 'item': display the event details 'list': show admin's list of events (default) 'plugin': display the calendar 'home': display the site's homepage 'admin': go to the "Admin Home" page, i.e. Command & Control
advanced_editor | true | Enable (if set to true) a WYSIWYG editor for edit events.
wikitext_editor | false | Allow using wiki syntax with edit events.
postmode | plaintext | Sets the default submission mode to 'html' or 'plaintext'

### Events Block

Variable | Default Value | Description
--- | --- | ---
block_enable | true | Enable block.
block_isleft | 1 | Whether to display the block on the left (when set to 1) or right (when set to 0).
block_order | 50 | The order the block appears in the column.
block_topic_option | 'all' | Set to 'All' for block to appear on all pages. Set to 'Homepage Only' for block to appear on just the homepage. Set to 'Selected Topics' for block to appear only in Topics selected in the Topic setting.
block_topic |  | The topics the block will appear for if the Topic Options is set to 'Select Topics'.
block_group_id | Calendar Admin | The group used by permissions.

## Other Options

Please note that some of the options from Geeklog's main configuration are also relevant for the calendarjp plugin:

- Times and dates are formatted according to the current language and the locale settings from Geeklog's main configuration.

## Autotags

The Calendarjp Plugin provides one autotag, `[event:]`. You can use this autotag to link to an event in the calendar without having to type out the URL. Simply add the event's ID after the colon. It will then create a link to that event and use the event's title as the link text. Alternatively, you can add your own link text after the ID (but before the closing bracket).

For example, on geeklog.net:

- `[event:20090805065311513]` will be translated to: `<a href="http://www.geeklog.net/calendarjp/event.php?eid=20090805065311513">FrOSCon - Free and Open Source Software Conference</a>`
- `[event:20090805065311513 FrOSCon 2009]` will be translated to: `<a href="http://www.geeklog.net/calendarjp/event.php?eid=20090805065311513">FrOSCon 2009</a>`