| <?php |
| /******************************************************************************* |
| * Copyright (c) 2014, 2016 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://eclipse.org/legal/epl-v10.html |
| * |
| * Contributors: |
| * Christopher Guindon (Eclipse Foundation) - Initial implementation |
| * Eric Poirier (Eclipse Foundation) |
| *******************************************************************************/ |
| |
| require_once($_SERVER['DOCUMENT_ROOT'] . "/eclipse.org-common/system/app.class.php"); |
| require_once($_SERVER['DOCUMENT_ROOT'] . "/eclipse.org-common/classes/downloads/downloads.class.php"); |
| |
| $App = New App(); |
| $Downloads = new Downloads(); |
| |
| //Adding a 100% counter for the downloads page |
| $impression = new CampaignImpression('DOWNLOADPAGE', $_SERVER['REQUEST_URI'], @gethostbyaddr($_SERVER['REMOTE_ADDR'])); |
| $impression->recordImpression(); |
| |
| // This hide/show the banner ad from being displayed |
| $Downloads->hideBannerAd(FALSE); |
| |
| // @todo: We should probably move these functions to Theme(). |
| $App->Promotion = TRUE; |
| $App->PageRSS = "/downloads/rss.php"; |
| $App->PageRSSTitle = "Eclipse Releases"; |
| |
| // Getting the version of the page |
| $version = filter_var($_GET['version'], FILTER_VALIDATE_INT); |
| |
| $App->AddExtraJSFooter('<script type="text/javascript" src="/downloads/assets/public/javascript/downloads.min.js"></script>'); |
| |
| $Theme = $App->getThemeClass($theme); |
| |
| $App->setThemeVariables(array('hide_breadcrumbs' => TRUE)); |
| if ($version == "1") { |
| $App->setThemeVariables(array('hide_breadcrumbs' => FALSE)); |
| } |
| |
| // @todo: There seems to be a bug with the Breadcrumbs. |
| // The download links does not get added automatically if $pageTitle |
| // is not set. |
| $pageTitle = 'Eclipse Downloads'; |
| |
| //$Theme->setBreadcrumb($Breadcrumb); |
| //$Theme->setNav($Nav); |
| //$Theme->setMenu($Menu); |
| $Theme->setPageAuthor('Eclipse Foundation'); |
| $Theme->setPageKeywords('eclipse, download, downloads, mirror, project, plug-ins, plugins, java, ide, swt, refactoring, free java ide, tools, platform, open source, development environment, development, ide'); |
| $Theme->setPageTitle($pageTitle); |
| |
| $App->Promotion = FALSE; |
| |
| // Custom theme variables |
| $variables = array(); |
| $variables['main_container_classes'] = 'container-full breadcrumbs-offset footer-offset downloads-container'; |
| // CFA Link - Big orange button in header |
| $variables['btn_cfa'] = array( |
| 'hide' => TRUE, // Optional - Hide the CFA button. |
| ); |
| $App->setThemeVariables($variables); |
| |
| // Place your html content in a file called content/en_pagename.php |
| ob_start(); |
| include("content/en_index.php"); |
| $html = ob_get_clean(); |
| |
| $Theme->setHtml($html); |
| $Theme->setExtraHeaders('<link href="/downloads/assets/public/stylesheets/downloads.min.css" media="screen" rel="stylesheet" type="text/css"/>'); |
| $Theme->generatePage(); |