1
0
mirror of https://github.com/php/web-php.git synced 2026-03-23 23:02:13 +01:00

Promote the Atom feed

This commit is contained in:
Hannes Magnusson
2007-12-29 15:43:42 +00:00
parent c60f7ebafc
commit 2bfde04771
3 changed files with 10 additions and 8 deletions

View File

@@ -20,11 +20,11 @@ EOT;
unset($RSIDEBAR_DATA);
site_header("PHP Conferences around the world", array("layout_workaround" => $layout_workaround, 'headtags' => '<link rel="alternate" type="application/rss+xml" title="PHP: Conference announcements" href="' . $MYSITE . 'conferences/news.rss" />'));
site_header("PHP Conferences around the world", array("layout_workaround" => $layout_workaround, 'headtags' => '<link rel="alternate" type="application/atom+xml" title="PHP: Conference announcements" href="' . $MYSITE . 'conferences/feed.atom" />'));
print_news($NEWS_ENTRIES["conferences"]);
site_footer(
array("rss" => "/conferences/news.rss") // Add a link to the feed
array("atom" => "/feed.atom") // Add a link to the feed
);

View File

@@ -243,6 +243,9 @@ function site_footer($config = array())
$rsslink = (isset($config["rss"]) ?
"<a href=\"{$config["rss"]}\">RSS</a> |" :
"");
$atomlink = (isset($config["atom"]) ?
"<a href=\"{$config["atom"]}\">Atom</a> |" :
"");
$viewsource = (isset($_SERVER['BASE_PAGE']) ?
"<a href=\"/source.php?url=/{$_SERVER['BASE_PAGE']}\">show source</a> |" :
"");
@@ -262,7 +265,7 @@ function site_footer($config = array())
{$layout_helper}</div>
<div id="footnav">
$rsslink $viewsource
$rsslink $atomlink $viewsource
<a href="/credits.php">credits</a> |$stats
<a href="/sitemap.php">sitemap</a> |
<a href="/contact.php">contact</a> |
@@ -593,7 +596,7 @@ function news_archive_sidebar()
<p>
For the latest news, <a href="/index.php">check the homepage</a>,
or <a href="/news.rss">our RSS feed</a>.
or <a href="/feed.atom">our Atom feed</a>.
</p>
<h3>Archives by year</h3>

View File

@@ -97,8 +97,7 @@ $SIDEBAR_DATA = '
<h3>Syndication</h3>
<p>
You can grab our news as an RSS feed via a daily dump in a file
named <a href="/news.rss">news.rss</a>.
You can grab our news as an <a href="/feed.atom">Atom feed</a>.
</p>';
$MIRROR_IMAGE = '';
@@ -200,7 +199,7 @@ $RSIDEBAR_DATA = $MIRROR_IMAGE . $rel . $RSIDEBAR_DATA;
site_header("Hypertext Preprocessor",
array(
'onload' => 'boldEvents();',
'headtags' => '<link rel="alternate" type="application/rss+xml" title="PHP: Hypertext Preprocessor" href="' . $MYSITE . 'news.rss" />',
'headtags' => '<link rel="alternate" type="application/atom+xml" title="PHP: Hypertext Preprocessor" href="' . $MYSITE . 'feed.atom" />',
'link' => array(
array(
"rel" => "search",
@@ -249,6 +248,6 @@ print_news($NEWS_ENTRIES["frontpage"]);
<?php
site_footer(
array("rss" => "/news.rss") // Add a link to the feed at the bottom
array("atom" => "/feed.atom") // Add a link to the feed at the bottom
);