Created
December 15, 2010 18:38
-
-
Save dmolsen/742389 to your computer and use it in GitHub Desktop.
This shows an example implementation of content adapters at the module level.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Copyright (c) 2008 Massachusetts Institute of Technology | |
* | |
* Licensed under the MIT License | |
* Redistributions of files must retain the above copyright notice. | |
* | |
*/ | |
// various copy includes | |
require_once "../../config.gen.inc.php"; | |
require_once "data/data.inc.php"; | |
// records stats | |
require_once "../page_builder/page_header.php"; | |
// figures out from info.yml which adapter to use and requires it | |
$adapter = ModuleAdapter::find(); | |
require_once "adapters/".$adapter."/adapter.php"; | |
// libs | |
require_once "lib/calendar.lib.php"; | |
require_once "lib/textformat.lib.php"; | |
$id = $_REQUEST['id']; | |
// use the getCategoryEvents() to find all events for this category | |
$eventFeed = CalendarAdapter::getCategoryEvents($calendars[$id]['user']); | |
require "templates/$prefix/category.html"; | |
$page->output(); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment