'Upcoming conferences',
'cfp' => 'Calling for papers',
);
$announcements = '
';
foreach ($CONF_TEASER as $category => $events) {
if (is_array($events) && $events) {
$announcements .= ''.$teaser_categories[$category].': ';
$links = array();
foreach (array_slice($events, 0, 4) as $url => $title) {
$title = preg_replace("'([A-Za-z0-9])([\s\:\-\,]*?)call for(.*?)$'i", "$1", $title);
$announcements .= "$title ";
}
$announcements .= ' ';
}
}
$announcements .= ' ';
} else {
$announcements = '';
}
require_once './Gateway/NewsFileSystemGateway.php';
$NewsGateway = new NewsFileSystemGateway();
$RecentNews = $NewsGateway->getArticlesForCategories(new ArrayIterator(array(
"frontpage"
)), 2);
ob_start();
require_once './View/HomepageNewsView.php';
$RecentNewsView = new HomepageNewsView($RecentNews);
echo $RecentNewsView->render();
$news = ob_get_clean();
// Wrap announcements and features in a content element
$content = "
$news
";
// Write out common header
site_header("Hypertext Preprocessor",
array(
'current' => 'home',
'onload' => 'boldEvents();',
'headtags' => array(
' ',
''
),
'link' => array(
array(
"rel" => "search",
"type" => "application/opensearchdescription+xml",
"href" => $MYSITE . "phpnetimprovedsearch.src",
"title" => "Add PHP.net search"
),
array(
"rel" => "alternate",
"type" => "application/atom+xml",
"href" => $MYSITE . "releases.atom",
"title" => "PHP Release feed"
),
)
)
);
// Print body of home page.
print_view('homepage/sidebar.php', array(
'announcements' => $announcements
));
print $content;
$thanksTo = <<
Thanks To
THANKS;
// Print the common footer.
site_footer(
array(
"atom" => "/feed.atom", // Add a link to the feed at the bottom
'elephpants' => true,
'spanning-content' => $thanksTo
)
);