[geeklog-cvs] geeklog: Added canonical link for articles
geeklog-cvs at lists.geeklog.net
geeklog-cvs at lists.geeklog.net
Sat Feb 21 04:35:11 EST 2009
details: http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/c019de3f112d
changeset: 6784:c019de3f112d
user: Dirk Haun <dirk at haun-online.de>
date: Sat Feb 21 10:35:01 2009 +0100
description:
Added canonical link for articles
diffstat:
2 files changed, 11 insertions(+), 8 deletions(-)
public_html/article.php | 18 ++++++++++--------
public_html/docs/history | 1 +
diffs (46 lines):
diff -r 7a50517a4ecf -r c019de3f112d public_html/article.php
--- a/public_html/article.php Sat Feb 21 09:47:56 2009 +0100
+++ b/public_html/article.php Sat Feb 21 10:35:01 2009 +0100
@@ -197,21 +197,23 @@
// Set page title
$pagetitle = $story->DisplayElements('title');
- $rdf = '';
+ $headercode = '';
+ $permalink = COM_buildUrl($_CONF['site_url'] . '/article.php?story='
+ . $story->getSid());
+ $headercode .= '<link rel="canonical" href="' . $permalink . '"'
+ . XHTML . '>';
if ($story->DisplayElements('trackbackcode') == 0) {
if ($_CONF['trackback_enabled']) {
- $permalink = COM_buildUrl ($_CONF['site_url']
- . '/article.php?story=' . $story->getSid());
- $trackbackurl = TRB_makeTrackbackUrl ($story->getSid());
- $rdf = '<!--' . LB
- . TRB_trackbackRdf ($permalink, $pagetitle, $trackbackurl)
+ $trackbackurl = TRB_makeTrackbackUrl($story->getSid());
+ $headercode .= LB . '<!--' . LB
+ . TRB_trackbackRdf($permalink, $pagetitle, $trackbackurl)
. LB . '-->' . LB;
}
if ($_CONF['pingback_enabled']) {
- header ('X-Pingback: ' . $_CONF['site_url'] . '/pingback.php');
+ header('X-Pingback: ' . $_CONF['site_url'] . '/pingback.php');
}
}
- $display .= COM_siteHeader ('menu', $pagetitle, $rdf);
+ $display .= COM_siteHeader('menu', $pagetitle, $headercode);
if (isset($_GET['msg'])) {
$msg = COM_applyFilter($_GET['msg'], true);
diff -r 7a50517a4ecf -r c019de3f112d public_html/docs/history
--- a/public_html/docs/history Sat Feb 21 09:47:56 2009 +0100
+++ b/public_html/docs/history Sat Feb 21 10:35:01 2009 +0100
@@ -11,6 +11,7 @@
+ (TBD) Comment moderation and editable comments, by Jared Wenerd
Other changes:
+- Added canonical link for articles [Dirk]
- Moved hard-coded "Reminders" column title to the language file (bug #0000817)
- Hide archive option radiobutton from the story editor when no archive topic
is defined (feature request #0000807) [Dirk]
More information about the geeklog-cvs
mailing list