Publishing information on upcoming events is common on the World Wide Web. Event information can be placed into a document in the Hypertext Markup Language (HTML) on any web server.
The K-State web site provides a way to publish event information in a slightly different method which provides several advantages:
To add your information to a calendar, the easiest option is to e-mail the event information to calendar@ksu.edu. Please allow at least three working days before the desired posting date.
However, if you have more than an occasional event, it is better to set up your own calendar. To create a calendar, two files are required:
For these examples, assume that you are providing files for a department with a department code of dept and have chosen to call your calendar events.
The calendar data file is named events.caldata, and it is stored in the department's web space directory, /usr/local/data/www/dept.
The format of the calendar data file is a single HTML definition list:
<DL>
<DT>date1
<DD>description of the event
<DT>date2
<DD>description of the event
</DL>
Several formats are acceptable for the date field:
April 30, 1995 | This is the normal format. |
April 30 | A missing year defaults to the last year specified. |
apr 30, 1995 | Only 3 chars, case insensitive, of strings used. |
Sunday, April 30, 1995 | Day-of-week string is ignored; it doesn't matter even if the day of week is wrong. |
Sunday April 30 1995 | Commas and blanks are equivalent |
April 1, 1995 -- May 2, 1995 | Any two dates separated by '--' are a range. The event is duplicated for each date in the range, inclusive. |
Other notes about the calendar data file:
<DL>
<DT>date
<DD>description of the first event on this date
<DD>description of the second event on this date
The difficult part of creating a calendar file isn't the mechanics of getting the data into the proper HTML format. Instead, the emphasis is on wording the events in a clear, concise, and useful format.
The template file, named events-template.html contains the HTML code that
surrounds the events. It has the title, top bar, etc., and must follow the K-State standards.
Don't get too fancy--remember that the calendar processing will add the calendar table at the top.
This is only used when the calendar is viewed as its own calendar. When the calendar events are put into the master calendar, then the master calendar's template file is used.
To get your calendar added to the list of calendars, and possibly included in the Master Calendar, contact webmaster@ksu.edu.
Suppose your department code is dept, and you are creating a calendar file named events. In the simplest case, you need to create two files: a calendar data file and a template file.
Here is an example calendar data file:
<DL>
<DT> January 1, 2001
<DD> Happy New Year!
<DT> January 16, 2001
<DD> Classes begin.
<DL>
For additional examples, see the existing calendars, most of which are in
/usr/local/data/www/calendar
There can be multiple files that are all put together into one event database.
All files of the form events*.caldata are read.
For example, files named events-fall1996.caldata,
events-regular.caldata,
events-special.caldata,
would all be processed together.
These calendar files must all be in the same directory, typically
/usr/local/data/www/dept.