These scripts can be used to display a month of events maintained in a simple database file in month-by-month and week-by-week calendars. Hebrew dates are displayed along with secular dates, and Jewish holidays (according to Reform Jewish practice) are also shown.
The skills required to update and upload the database file are no greater than those of a competent clerk or secretary. However, the webmaster can use his/her HTML skills to customize the appearance of the resulting calendars.
These scripts have been used to implement this congregational calendar and a
Because a week-by-week calendar is invoked from a month-by-month calendar in most applications, this documentation is in terms of month.pl. However, the two scripts month.pl and week.pl have identical parameters.
Whenever month.pl is used, a variable named dir must be provided. (For more information on dir, please see the calendar directory path documentation.) Its value is the path of the directory on the server that contains two files whose names have no "extensions"
head - the top-of-page information to appear on each displayed page tail - the bottom-of-page information to appear on each page
and the line-oriented database file:
[year] or [year].txt- the database of calendar events for year [year]
These files are required to be present in dir.
Four optional input parameters can also appear in a call to month.pl:
color - specifies the calendar frame color scheme: blue, green, or brown
If color is not specified, the default is blue.
month - the month to be displayed (1-12) year - the year in which the month is to be displayed (day - a day in the week (1-7) to be displayed - for week.pl)
Any of these values that is not provided is replaced with those for the current date; that is, by default month.pl begins with the current date.
ymw - specifies navigation capabilities displayed with the calendar. It can contain any combination of y, m, w, s: m displays "next/previous month" w displays "show weeks" s prompts for search of a particular year: "keyword(s)/year/GO" y prompts for display of a particular month: "month/year/GO". (If s is specified, y is ignored.)
If ymw is not specified, the default is mw.
The database of events [year] is formatted as follows:
- Each record begins with the character = (use \= to specify = that is not a record separator)
- Each event record contains 3 or 4 fields, separated by the character #
- Each newline character will be displayed as a space character
- The first field contains the date mm/dd; leading zeros can be omitted; e.g., 3/7 for March 7th
- The second field specifies optional appearance information and is interpreted as follows:
- r -- precede the event text with a red ball ()
- X -- follow the text with a blank line
- R|G|B|D|F|N|P|O|M|K -- display the text in color red|green|blue|dark red|forest green|navy blue|purple|orange|magenta|black [The default is black.]
- The third field contains the event text. Text following the first appearance of the character + is not displayed. (This text is displayed on a new line by the week.pl script.)
- The optional fourth field is the url to which the text is to be linked when the event is displayed, including an optional "#" anchor within the targeted page.
- Any record that does not contain # or whose first field does not contain a vaild date, is ignored and can be used as a comment record.
month.pl constructs and displays a Web page as follows:
- The contents of head is displayed.
- The top of the calendar frame is displayed in the appropriate color and with appropriate control capabilities.
- Appropriate information in the event database is displayed
- The contents of tail is displayed.
Copyright © 2002 Hebrew Union College-Jewish Institute of Religion