Skip to main content
summaryrefslogtreecommitdiffstats
blob: ad60ba304aeb4b6f16aa3647e35258a0058acc11 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
<?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);
?>

Back to the top