<?php | |
/******************************************************************************* | |
* Copyright (c) 2010, 2018 Eclipse Foundation and others. | |
* All rights reserved. This program and the accompanying materials | |
* are made available under the terms of the Eclipse Public License v1.0 | |
* which accompanies this distribution, and is available at | |
* http://www.eclipse.org/legal/epl-v10.html | |
* | |
* Contributors: | |
* Benoit Langlois (Thales) | |
*******************************************************************************/ | |
require_once($_SERVER['DOCUMENT_ROOT'] . "/eclipse.org-common/system/app.class.php"); require_once($_SERVER['DOCUMENT_ROOT'] . "/eclipse.org-common/system/nav.class.php"); require_once($_SERVER['DOCUMENT_ROOT'] . "/eclipse.org-common/system/menu.class.php"); $App = new App(); $Nav = new Nav(); $Menu = new Menu(); include($App->getProjectCommon()); # All on the same line to unclutter the user's desktop' | |
require_once($_SERVER['DOCUMENT_ROOT'] . "/eclipse.org-common/system/app.class.php"); require_once($_SERVER['DOCUMENT_ROOT'] . "/eclipse.org-common/system/nav.class.php"); require_once($_SERVER['DOCUMENT_ROOT'] . "/eclipse.org-common/system/menu.class.php"); $App = new App(); $Nav = new Nav(); $Menu = new Menu(); include($App->getProjectCommon()); | |
$localVersion = false; | |
# Define these here, or in _projectCommon.php for site-wide values | |
$pageKeywords = "eclipse,emf,emft,egf"; | |
$pageAuthor = "benoit langlois"; | |
$pageTitle = "EGF"; | |
function getEgfNews(){ | |
$xsl = new Xsltprocessor(); | |
$xsldoc = new DomDocument(); | |
$xsldoc->load("news/news.xsl"); | |
$xsl->importStyleSheet($xsldoc); | |
$xmldoc = new DomDocument(); | |
$xmldoc->load("news/egfNewsArchive.rss"); | |
return $xsl->transformToXML($xmldoc); | |
} | |
function getTwitter(){ | |
$xsl = new Xsltprocessor(); | |
$xsldoc = new DomDocument(); | |
$xsldoc->load("news/twitter.xsl"); | |
$xsl->importStyleSheet($xsldoc); | |
$xmldoc = new DomDocument(); | |
$xmldoc->load("http://search.twitter.com/search.atom?q=egf"); | |
return $xsl->transformToXML($xmldoc); | |
} | |
$html = file_get_contents('_index.html'); | |
$news = getEgfNews(); | |
# TODO $twitter = getTwitter(); | |
$html = str_replace("%%HEADLINES%%", $news, $html); | |
$App->AddExtraHtmlHeader('<link rel="stylesheet" type="text/css" href="/default/style.css"/>' . "\n\t"); | |
$App->AddExtraHtmlHeader('<link rel="stylesheet" type="text/css" href="egf.css"/>' . "\n\t"); | |
$App->AddExtraHtmlHeader("<link rel='alternate' type='application/rss+xml' title='EGF News' href='news/egfNewsArchive.rss'>"); | |
$App->AddExtraHtmlHeader('<link rel="stylesheet" type="text/css" href="//www.eclipse.org/eclipse.org-common/themes/solstice/public/stylesheets/vendor/cookieconsent/cookieconsent.min.css" />'); | |
$App->AddExtraHtmlHeader('<script src="//www.eclipse.org/eclipse.org-common/themes/solstice/public/javascript/vendor/cookieconsent/default.min.js"></script>'); | |
$App->AddExtraHtmlHeader('<link rel="stylesheet" href="/eclipse.org-common/themes/solstice/public/stylesheets/quicksilver.min.css?v1.0">'); | |
$pageKeywords="MDA,MDE,egf,software factories,EMF,EMFT,modeling,Eclipse"; | |
// Initialize $variables. | |
$variables = array(); | |
$links = array(); | |
$links[] = array( | |
'icon' => 'fa-download', // Required | |
'url' => 'http://wiki.eclipse.org/EGF_Installation/', // Required | |
'title' => 'Download', // Required | |
//'target' => '_blank', // Optional | |
'text' => 'Eclipse Distribution, Update Site, Dropins' // Optional | |
); | |
$links[] = array( | |
'icon' => 'fa-book', // Required | |
'url' => 'http://wiki.eclipse.org/EGF_Tutorial_and_Use_Cases', // Required | |
'title' => 'Documentation', // Required | |
//'target' => '_blank', // Optional | |
'text' => 'Tutorials, Examples, Videos, Online Reference' // Optional | |
); | |
$links[] = array( | |
'icon' => 'fa-support', // Required | |
'url' => 'http://wiki.eclipse.org/EGF', // Required | |
'title' => 'Support', // Required | |
//'target' => '_blank', // Optional | |
'text' => 'Bug Tracker, Newsgroup, Professional Support' // Optional | |
); | |
$variables['header_nav'] = array( | |
'links' => $links, // Required | |
'logo' => array( // Required | |
'src' => 'images/Logo_EGF.png', // Required | |
'alt' => 'The Eclipse Foundation', // Optional | |
'url' => 'http://www.eclipse.org', // Optional | |
//'target' => '_blank' // Optional | |
), | |
); | |
// Set Solstice theme variables (Array) | |
$App->setThemeVariables($variables); | |
$App->generatePage($theme, $Menu, null, $pageAuthor, $pageKeywords, $pageTitle, $html); | |
?> |