UMD Web Site

Page Content   Main Links   Page Links   Utility Links   Search

ColdFusion Development Project

cf_eventslist

[ Learn how to update your events manually]

Description: Includes events from the university's events database on a page. Completely customizable display, from the number of events and what information for each to include to the html that is used to display them.
Syntax:
<cf_eventslist
           Template = "template_name"
           Categories = "categories,to,include"
           SortByColumn = "column_to_sort_by"
           SortByMethod = "ASC" or "DESC"
           NumberOfEvents = "number_to_show"
           AfterDateTime = "date_and_time_events_must_start_after"
           BeforeDateTime = "date_and_time_events_must_end_before"
           DetailsPage = "details_page"
           QueryVariable = "details_page_query_variable"
           DateFormat = "date_format"
           TimeFormat = "time_format"
           ShortDescriptionLength = "short_description_length"
           EventKey = "event_key"
           HoursBetweenUpdates = "number_of_hours"
           ExcludeKeys = "DB_keys_to_exclude"
           Debug = "1 or 0">
See also: cf_newslist
Attributes: The attributes that can be provided for this tag are all optional, but since the Category and the NumberOfEvents attributes both default to 'All', this would include every event in the database! Set some attributes to narrow down the scope of what is included.
Attribute Name Required/
Optional
Default Description
Template optional 'default' The name of the pre-made template file to use
Categories optional 'All' Which categories of events to include - current categories are: Academic Affairs, Academic Calendar, Admissions, African And African-American Studies, Alumni Affairs, Athletics, Athletics - Baseball, Athletics - Basketball, Athletics - Basketball - Men, Athletics - Basketball - Women, Athletics - Cheerleading, Athletics - Cross Country, Athletics - Cross Country - Men, Athletics - Cross Country - Women, Athletics - Equestrian, Athletics - Field Hockey, Athletics - Football, Athletics - Golf, Athletics - Ice Hockey, Athletics - Lacrosse, Athletics - Lacrosse - Men, Athletics - Lacrosse - Women, Athletics - Soccer, Athletics - Soccer - Men, Athletics - Soccer - Women, Athletics - Softball, Athletics - Tennis, Athletics - Tennis - Men, Athletics - Tennis - Women, Athletics - Volleyball, Athletics - Volleyball - Men, Athletics - Volleyball - Women, Bursar, Campus Life, Career Resource Center, Catls, Center For Access & Success, Center For Jewish Culture, Center For Marketing Research, Center For Rehabilitation Engineering, Center For Teaching Excellence, Charlton College Of Business, College Of Arts And Sciences, College Of Engineering, College Of Engineering - Cen, College Of Engineering - Cis, College Of Engineering - Coop, College Of Engineering - Ece, College Of Engineering - Mne, College Of Engineering - Mtx, College Of Engineering - Phy, College Of Nursing, College Of Visual And Performing Arts, Commencement, Community Service & Partnerships, Counseling Center, Cultural, Cultural - On-Campus, Cultural - Regional, Cultural Diversity, Educational, Facilities, Faculty Development, Fall Family Weekend, Final Exams, Foundation, Frederick Douglass Unity House, Health Awareness, Health Services, Housing & Residential Life, Indic Studies, Information Technology, New Student Orientation, Office Of The Chancellor, Presentation, Adv. Technology & Manufacturing Ctr., Professional Services, Public Safety, Registrar, Religious And Spiritual, Seminar, Share Foundation, Smast, Smast Seminars, Social, Speak Up/Speak Out, Student Affairs, Student Organization, Sustainability, Welcome Back Week, Writing & Reading Center, Academic Resource Center, Professional & Continuing Education, School Of Law, Athletics - Indr. Track&Field, Athletics - Indr. Track&Field - Men, Athletics - Indr. Track&Field - Women, Athletics - Outdr. Track&Field, Athletics - Outdr. Track&Field - Men, Cits, Ctr F Univ, School & Commty Ptnrships, Library Services, Info. Res. & Tech., Athletics - Swimming & Diving, Athletics - Swimming & Diving - Men, Athletics - Swimming & Diving - Women, International Exchange & Study Prog., International Students & Scholars Ctr, Athletics - Outdr. Track&Field - Women, Women'S Resource Center, Women'S Studies
SortByColumn optional 'StartDate' 'Title', 'Category', 'Location', 'Contact', or 'StartDate'
SortByMethod optional 'ASC' 'ASC' (ascending order) or 'DESC' (descending order)
NumberOfEvents optional 'All' Either a number, or 'All' which includes all events found
AfterDateTime optional 'none' A date and time that events must start after to be found. Should be in the format 'YYYY-MM-DD HH24:MM:SS'
BeforeDateTime optional 'none' A date and time that events must end before to be found. Should be in the format 'YYYY-MM-DD HH24:MM:SS'
DetailsPage optional 'http://www.umassd.edu/calendar/' This is the page that will be linked to in any link for 'more info' about an event
QueryVariable optional 'ek' This is the query variable that will be used (in combination with the event key) in any link for 'more info' about an event. For example, if an article had a key of 176, with the default settings, the link would point at 'http://www.umassd.edu/calendar/?ek=176', and if 'DetailsPage="myfolder/details.cfm"' and 'QueryVariable="id"', then the link would point at 'myfolder/details.cfm?id=176'.
DateFormat optional 'm/d/yyyy' The formatting that is used for displaying of dates. See Coldfusion date formatting documentation for details.
TimeFormat optional 'h:mm tt' The formatting that is used for displaying of times. See Coldfusion time formatting documentation for details.
ShortDescriptionLength optional 100 The number of characters that is used when displaying a short description. This is approximate, because the end of a sentence is searched for beyond this number.
EventKey optional -1 If this parameter is supplied with a positive number, it is assumed that this number is the database key for an event, and only that event will be shown, if found. This should only be used with links that are generated dynamically.
HoursBetweenUpdates optional 12 The number of hours that this tag will wait between refreshing its data from the database.
ExcludeKeys optional A comma-separated list of database keys to exclude from the search.
Debug optional 0 1 to show debug info, 0 to not.
Returns: Outputs the list of events according to search parameters and specified html.

Also, creates several variables in the calling page. The first is needed to access the rest. A unique string of numbers is created when the tag is called. This string is used to create a file (in the same directory as the calling page) that is simply included when the page is requested. When a certain amount of time has passed, the tag automatically refreshes the data that is displayed.

The variables created are listed below, with #unique# representing the unique string:

eventsList_uniqueString = #unique# (the unique string itself)
eventsList_contentFile_#unique# = path_to_file (the path to the include file that is created)
eventsList_recreatedContentFile_#unique# = true or false (whether or not the file was refreshed this time)
eventsList_queryRecordCount_#unique# = number (how many events were actually displayed by this tag, this time)
eventsList_databaseKeysIncluded_#unique# = list (a comma-separated list of the database keys of the events that were included)

Appearance: The UMASS Dartmouth Web Development team has created / will create a number of pre-set templates for what information is included on the page that calls the tag, and how that information is displayed. A list of these templates with a brief description of how they look follows:

portals-today Shows events that are occurring between the current time and the end of the current day, displaying time and title only.
portals-upcoming Shows events that will occur after the current day, displaying date and title only.
---> The appearance of events displayed with this tag is fully customizable, in that when the tag is called on a page, the html that is used to lay out the information can be provided as the body of the tag. See examples below for an illustration of this. If an html body is provided to the tag, then any value for the Template attribute is ignored. When creating this html, the following variables are used to specify where the event information is inserted:
  • %%_Title_%%
  • %%_Description_Full_%%
  • %%_Description_Short_%%
  • %%_Category_%%
  • %%_Location_%%
  • %%_Frequency_%%
  • %%_StartDate_%%
  • %%_StartDate_Time_Only_%%
  • %%_StartDate_Date_Only_%%
  • %%_EndDate_%%
  • %%_EndDate_Time_Only_%%
  • %%_EndDate_Date_Only_%%
  • %%_Contact_%%
  • %%_ContactEmail_%%
  • %%_ContactPhone_%%
  • %%_Sponsor_%%
  • %%_Admission_%%
  • %%_InfoUrl_%%
  • %%_InfoUrlText_%%
  • %%_Image_%%
  • %%_MapitLink_%% (NOT IMPLEMENTED YET))
  • %%_Details_Page_Link_%%
How to update your events manually:
This custom tag is pre-set to automatically update itself every 12 hours. But you may have a need of manually refreshing the information that appears. In order to do this, you can copy the URL address of your page that shows events, and paste it into the text field below. Click on the 'Update' button, and you will be taken to your page, with the information updated. You can then bookmark that link, and any time you use this bookmark the events on your page will be manually refreshed.
Please enter your URL here, complete with 'http://...':

How it works: The first time that the tag is hit (ie. when the page that it is called from is requested), it generates a unique string of numbers from the attributes that are specified. It then creates a file in the same directory as the page it is called from. The file's name looks something like 'eventslist_134564.cfm'. It will create one file for each time that the tag is called with different attributes on pages in the same directory, but by the same logic, if two pages in the same directory call the tag with the same attributes, they will share a file. Each time after the first, when the page is requested, the tag will check to see when the file was last updated. If it is within a certain specified time limit, the page will just be included. If the time period has passed, then the file will be recreated, and then included.
Examples:

<cf_eventsList categories="All" template="portals-upcoming" sortbycolumn="Location" NumberOfEvents="10" />

There was an error using the specified template:

Could not find the included template template_portals-upcoming.cfm.

Main Links

Page Links

Utility Links

Search

 
Text Only Options

Top of page


Text Only Options

Open the original version of this page.

Usablenet Assistive is a UsableNet product. Usablenet Assistive Main Page.