| <?php | |
| # Set the theme for your project's web pages. | |
| # See the Committer Tools "How Do I" for list of themes | |
| # https://dev.eclipse.org/committers/ | |
| # Largely copied from the RAP team | |
| // ini_set('display_errors', 1); ini_set('error_reporting', E_ALL); | |
| require_once($_SERVER['DOCUMENT_ROOT'] . "/projects/classes/Project.class.php"); | |
| $rtProjects = get_project('rt')->getChildren(); | |
| # $Nav->setLinkList( array() ); | |
| $Nav->addCustomNav("Wiki", "http://wiki.eclipse.org/RT", "_self", 1); | |
| $Nav->addCustomNav("Team", "/rt/team-leaders.php", "_self", 1); | |
| $Nav->addCustomNav("Mailing Lists", "http://www.eclipse.org/mail/", "_self", 1); | |
| $Nav->addCustomNav("EclipseRT Portal", "/eclipsert", "_self", 1); | |
| $Nav->addNavSeparator("Projects", "index.php"); | |
| populateProjectNav($rtProjects, $Nav); | |
| $Nav->addNavSeparator("Other Runtime Technology", "/eclipsert/participate.php"); | |
| $Nav->addCustomNav("RCP", "/home/categories/rcp.php", "_self", 1); | |
| $Nav->addCustomNav("EMF", "/emf", "_self", 1); | |
| $Menu->setMenuItemList( array() ); | |
| $Menu->addMenuItem( "Home", "/RT", "_self" ); | |
| $Menu->addMenuItem( "Get Started", "/eclipsert/gettingstarted.php", "_self" ); | |
| $Menu->addMenuItem( "Resources", "/eclipsert/resources.php", "_self" ); | |
| $Menu->addMenuItem( "Wiki", "http://wiki.eclipse.org/RT", "_self" ); | |
| $App->AddExtraHtmlHeader( '<link rel="stylesheet" type="text/css" href="/rt/rap-layout-fixes.css"/>' ); | |
| $App->AddExtraHtmlHeader( '<!--[if lt IE 8]><link rel="stylesheet" type="text/css" href="/rt/rap-layout-fixes-ie.css"/><![endif]-->' ); | |
| $App->AddExtraHtmlHeader( '<script type="text/javascript" src="http://code.jquery.com/jquery-1.4.2.min.js"></script>' ); | |
| $App->AddExtraHtmlHeader( '<link rel="shortcut icon" href="/rt/images/favicon.ico" />'); | |
| $App->AddExtraHtmlHeader( '<link rel="stylesheet" type="text/css" href="/rt/rap-posts.css"/>' ); | |
| $App->AddExtraHtmlHeader( '<script type="text/javascript" src="/rt/jquery.zrssfeed.min.js"></script>' ); | |
| // $App->Promotion = TRUE; # set true to enable current eclipse.org site-wide promo | |
| function createRapNavigation() { | |
| $html = <<<EOHTML | |
| <div id="rap-small-header"> | |
| <a href="/rt/"><div id="rap-small-logo"></div></a> | |
| </div> | |
| <script type="text/javascript"> | |
| // logo | |
| var logo = $( '#logo:first-child' ); | |
| var newLogo = '<div id="logo"><a href="http://eclipse.org">' | |
| + logo.html() + '</a></div>'; | |
| logo.replaceWith( newLogo ); | |
| </script> | |
| EOHTML; | |
| return $html; | |
| } | |
| function generateRapPage( $App, $Menu, $Nav, $author, $keywords, $title, $html ) | |
| { | |
| $theme = "Nova"; | |
| $pageHtml = createRapNavigation() . $html; | |
| $pageHtml .= file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/rt/right-links.html"); | |
| $App->generatePage( $theme, $Menu, $Nav, $author, $keywords, $title, $pageHtml ); | |
| } | |
| function xslt( $xmlFile, $xslFile ) { | |
| $xslDoc = new DOMDocument(); | |
| $xslDoc->load( $xslFile ); | |
| $xmlDoc = new DOMDocument(); | |
| $xmlDoc->load( $xmlFile ); | |
| $proc = new XSLTProcessor(); | |
| $proc->importStylesheet( $xslDoc ); | |
| return $proc->transformToXML( $xmlDoc ); | |
| } | |
| function populateProjectNav($projects, $navBar) { | |
| if (! $navBar) | |
| return; | |
| foreach ($projects as $project) { | |
| $projectName = $project->getShortName($project); | |
| $projectURL = $project->getProjectURL(); | |
| $navBar->addCustomNav($projectName, $projectURL, "_self", 1); | |
| } | |
| } | |
| ?> |