Have you checked out Stanford's Event Calendar at http://events.stanford.edu? It has featured events, events from departments and student groups, and events by subject or type. It's a great place to find out what's happening around campus.
However, if you're like me, I don't always think to go to the website and check the calendar. Now, through the magic of RSS feeds and Stanford Event Importer 2.x, you can select your favorite event feed and have those events copied on to your website.
John Bickar at Stanford Web Services led the development of this convenient module for Stanford. If your website is on the Stanford Sites service, this module is already installed for you. Otherwise you can download it from Stanford Drupal Features server at: http://drupalfeatures.stanford.edu/project/stanford-events-importer
The Stanford Event Importer takes data from the Stanford Event Calendar feed, and then creates and populates event nodes on your site with the event information. The event information can come from either a category or an organization on the Stanford Event Calendar. Here's how to put the Stanford Event Importer to work on your site.
Create the Stanford Event Importer and import events
To use the Stanford Event Importer you’ll need to create a Stanford Event Importer node, which will define the events to import.
Before starting, be sure to have the following information ready:
- Title of your Event importer
- Category or Organization from which feed to import. The Category corresponds to the “By subject” and “By type” items on events.stanford.edu. Consider visiting events.stanford.edu, and counting approximately the number of items in the feed. Then, when importing items, compare this number to the number of items imported.
Here’s how to create the event importer:
- From the Admin Menu, Navigate to: Content > Add content > Stanford Event Importer
- Enter the title of your importer.
- Select either a category or organization for your importer
- Scroll to the bottom of the page and select “Save”
Upon saving the new event importer, the importer will immediately import the items from the feed.
Check your results:
You may want to make sure that the events imported are the ones you expect:
- Select “Content” from the Admin Menu
- Under “Type” select “Stanford Event.”
- Click on “Apply”
- If necessary, sort by date by clicking on the “Updated” column header.
- Select the most recent event and check that it reflects the information that you expected.
Updating the importer:
Did you forget to add a tag to the events you imported? Maybe you imported the wrong feed? Not to worry. Here’s how to update or change the importer and the items you’ve imported:
- Find the Stanford Event Importer node you originally used to import the items. You can do this by selecting “Content” from the Admin Menu
- Under “Type” select “Stanford Event Importer”
- Click on “Apply”
- Scroll through the list until you find the importer to update.
- Select the importer by clicking on the title
- Select the “Delete Items” tab
- Click on “Delete” on the confirmation page.
- Select “Edit”
- Make your changes to the importer
- Scroll to the bottom of the page and click on “Save” to save your changes.
- After saving, import the events with the new criteria by selecting “Import”
- Select “Import” on the confirmation page
Verify the import:
- Verify the number of nodes created corresponds with what you expect
- Verify your results as described in the section above under “Check your results”
Adding Taxonomy terms to Events
Once you have created your importer, you can add additional information for your particular website to the events as they are imported. For example, to add taxonomy terms to events, add the taxonomy term field to both the Stanford Event content type and to the Stanford Event Importer. On your importer nodes, select the terms:
- Navigate to Structure > Feed Importers
- Select your desired importer
- On the Importer Configuration page under the "Processor" horizontal tab, select "Mapping."
- Scroll to the bottom and from "Select a source," select the taxonomy field on the importer.
- From the "Select a target," select the taxonomy field for the event.
- Click on "Add"
- Scroll to the bottom of the page and click on "Save"
Now when you import your events, they will be tagged with the same terms as the importer.
If you like this module, check out its sister module, Stanford Courses, at https://drupalfeatures.stanford.edu/project/stanford-courses. It will import courses from http://explorecourses.stanford.edu.