Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristopher Guindon2017-09-01 18:45:14 +0000
committerChristopher Guindon2017-09-01 18:45:14 +0000
commite883ef380c478789553c8dc8c2ffa8bf37a3a5da (patch)
tree90e6dc0d49724293fc55ba94bb0672545d22bc05
parente90361e384a77358beec773b59692558277c0d19 (diff)
downloadorg-e883ef380c478789553c8dc8c2ffa8bf37a3a5da.tar.gz
org-e883ef380c478789553c8dc8c2ffa8bf37a3a5da.tar.xz
org-e883ef380c478789553c8dc8c2ffa8bf37a3a5da.zip
Bug 521737 - [feed] Offer shortened version of Eclipse News feed
Signed-off-by: Christopher Guindon <chris.guindon@eclipse-foundation.org>
-rw-r--r--press-release/index.php74
1 files changed, 40 insertions, 34 deletions
diff --git a/press-release/index.php b/press-release/index.php
index 0bc18fdf..4ba54693 100644
--- a/press-release/index.php
+++ b/press-release/index.php
@@ -14,50 +14,56 @@ require_once($_SERVER['DOCUMENT_ROOT'] . "/eclipse.org-common/system/app.class.p
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();
+$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/classes/parser/feedparser.class.php");
# Begin: page-specific settings. Change these.
-$pageTitle = "Eclipse Foundation Press Releases";
-$pageKeywords = "eclipse, foundation , press, release, news about eclipse, Eclipse Announcements";
-$pageAuthor = "Christopher Guindon";
+$pageTitle = "Eclipse Foundation Press Releases";
+$pageKeywords = "eclipse, foundation , press, release, news about eclipse, Eclipse Announcements";
+$pageAuthor = "Christopher Guindon";
ob_start();
+$news = new FeedParser();
+$news->addPath($_SERVER['DOCUMENT_ROOT'] . "/community/news/2005newsarchive.rss");
+$news->addPath($_SERVER['DOCUMENT_ROOT'] . "/community/news/archive/2005newsarchive.rss");
+$news->setPressRelease(TRUE);
+$news->setLimit(500);
+$news->setViewMoreLink('/org/press-release/index.php?archive=true');
+$news->setCount(25);
+
+if (isset($_GET['archive'])) {
+ $pageTitle .= " (Archive)";
+ $news->setCount(5000);
+}
?>
- <div class="col-md-17">
- <h1><?php print $pageTitle; ?></h1>
- <?php
- $news = new FeedParser();
- $news->setUrl($_SERVER['DOCUMENT_ROOT'] . "/community/news/2005newsarchive.rss");
- $news->setPressReleaseFlag(TRUE);
- $news->setLimit(500);
- $news->setCount(5000);
- $news->output();
- ?>
- </div>
-
- <div class="col-md-6 col-md-offset-1">
- <div class="sideitem">
- <h6>Related Links</h6>
- <ul>
- <li><a href="main.html">2001-2005 Archives</a></li>
- <li><a href="2006archive.php">2006 Archive</a></li>
- <li><a href="pressrelease_guidelines.php">Press Release Guidelines</a></li>
-
- </ul>
- </div>
- </div>
+ <div class="col-md-17">
+ <h1><?php print $pageTitle; ?></h1>
+ <?php
+ print $news->output();
+ ?>
+ </div>
+
+ <div class="col-md-6 col-md-offset-1">
+ <div class="sideitem">
+ <h6>Related Links</h6>
+ <ul>
+ <li><a href="main.html">2001-2005 Archives</a></li>
+ <li><a href="2006archive.php">2006 Archive</a></li>
+ <li><a href="pressrelease_guidelines.php">Press Release Guidelines</a></li>
+
+ </ul>
+ </div>
+ </div>
<?php
- $html = ob_get_contents();
- ob_end_clean();
+ $html = ob_get_contents();
+ ob_end_clean();
- # Generate the web page
- $App->generatePage($theme, $Menu, NULL, $pageAuthor, $pageKeywords, $pageTitle, $html);
-?>
+ # Generate the web page
+ $App->generatePage($theme, $Menu, NULL, $pageAuthor, $pageKeywords, $pageTitle, $html);

Back to the top