Calendar Plugin Help File for Version 1.2.6
Originally developped by Michael Svarrer, modified by Tory, Bob, Svasti, Holger
For CMSimple_XH (UTF-8) and CMSimple (ANSI)
Upgrading from an earlier version
- Save your content folder and your css file
- Install new version and put back your old content file. The css file has been changed a bit, you may want to reinsert some items from your old css.
- Upgrading from v. 1.2.x you may be able to re-use your old config file.
- All the old function calls still work.
Integrating Calendar plugin into your CMSimple-website
- Extract the zip-file and put the calendar folder with all subfolders into the CMSimple plugins folder. Some websites require writing rights (646) for config.php, stylesheet.php, content folder with all files, and language file.
- To display the calendar in the template use
<?php echo calendar();?>
- To display the calendar on a specific page use
#CMSimple $output.=calendar();#
or {{{PLUGIN:calendar();}}}
- To display your events on a specific page use
#CMSimple $output.=events();#
or {{{PLUGIN:events();}}}
- You have to enter the name of your event page in the language config of the plugin. Look for the field
event page
(fairly down in the list) and enter the name of the page that shows the event list. If your event page is on the second or third level, you have to give the names of all higher level pages first followed by a colon, e.g. name-of-firstlevel-page:name-of-secondlevel-page:name-of-event-page
- Calendar save its event files in the plugin folder. You can however specify a different folder in config setting
filepath data
.
Configuring display of events
- In plugin config field
show number of future months
you can enter how many months the display of events goes into the future. Default is "1" which will show the present month only. Entering "2" will show the present month and the next, etc.
- In plugin config field
show number of previous months
you can give the number of months showing past events. Default is no past events.
- If you don't need all fields you can switch off display of time, location, link in the event list. This also happens in the event input tables.
- Via css you can control the event display. The provided css file is only an example for the standard XH template. Adjustment of css is recommanded.
date delimiter
: You can choose as sign between day, month and year ".", "-". "/". Changes will take effect only after saving the event file. Before this no events will be listed if you changes the date delimiter. After saving events will be sorted chronologically.
Configuring input of events
- There are 2 ways to enter events: (1) via the plugin backend or (2) you can place the event input form on a page, e.g. in a members area. To put it on a page use
#CMSimple $output.=editevents();#
or {{{PLUGIN:editevents();}}}
.
- There are 3 different input layouts: narrow, medium, wide. Just try it out. You can choose the width for the plugin backend in
event-input backend narrow medium or wide
. The layout of the event input form (in members pages) is set via event-input memberpages narrow medium or wide
. Both layouts can be different.
- Using the narrow or medium style you may have to adjust the width of the input fields via css. This can be done for the narrow and medium style independently.
- As mentioned above, the fields link, location, time can be suppressed.
Entering new events
- A click on the green
will result in a new event line. Click on calendar icon
and choose a date. Enter a name for your event in the event field. Always finish with save. Saving will sort entries chronologically
- For uncertain events you can enter as day -, --, ?, ??. Month and year have to be entered as usual.
- Starting time, end of event, and ending time are optional, as well as a link to give further explanation of your event. External links start with
ext:
and look like: www.cmsimple-xh.com
(no "http://"), internal start with int:
and look like this: int:firstlevel-page:secondlevel-page:linked-page
- Even without a link one can enter any text in the field for the link text, e.g. as additional information to the event.
- The red
will delete an event entry.
- For birthdays enter date of birth in the date field, name of the person in event field and
###
in the location field. Calendar will calculate the age of the person and display the birthday in the event list and calendar display. Via css you can give birthdays in event list a special color.
You may wonder why there a 3 fields in language config for the age of a person. This was added by Tory so that birthday display works well for slavic languages. age singular text
= year (Text displayed for 1 year olds), age plural1 text
= years (Text displayed 2 to 4 year olds), age plural2 text
= years (Text displayed for at least 5 year olds).
Display of Next Coming Event
- This function uses Microsoft marquee and does not validate. However it works with all modern browsers.
- You can display the next coming event inside a page by entering
#CMSimple $output.=nextevent();#
or {{{PLUGIN:nextevent();}}}
. You will have to adjust the css of .nextevent_date, marquee, .nextevent_event, .nextevent_location, as the css is now set for use of nextevent in the template.
- For the display of the next coming event in the template, e.g. under the calendar, use
<?php echo nextevent();?>
. This will display the next coming event on all pages. If you want it on certain pages only, and under the calendar, put this code in the template: <?php echo calendar(); if ($nextevent) echo nextevent(); ?>
. Activate the display of next doming event by adding #CMSimple $nextevent="show";#
on a page.
- If there is no next event, nothing will be shown, unless you have specified a notice in language config setting
notice no next event sceduled
.
Configuring display of calendar
- If you want Monday as first day of the week, enter
true
in plugin config field week starts mon
. Otherwise Sunday will be first day of the week.
- Enter in plugin config which days you want to have colored as weekend days.
- Concerning events lasting several days, if you enter
true
in config field show days between dates
all event days will be colored in the calendar. Otherwise only the first and the last day of the event will be colored.
Written by Svasti 4/2011, edited 8/2011