[geeklog-cvs] geeklog: Added canonical link for static pages

geeklog-cvs at lists.geeklog.net geeklog-cvs at lists.geeklog.net
Sat Feb 21 09:53:23 EST 2009


details:   http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/000c9fe7852b
changeset: 6786:000c9fe7852b
user:      Dirk Haun <dirk at haun-online.de>
date:      Sat Feb 21 12:41:05 2009 +0100
description:
Added canonical link for static pages

diffstat:

2 files changed, 8 insertions(+), 2 deletions(-)
plugins/staticpages/functions.inc |    9 +++++++--
public_html/docs/history          |    1 +

diffs (33 lines):

diff -r d6c9bb40e6ff -r 000c9fe7852b plugins/staticpages/functions.inc
--- a/plugins/staticpages/functions.inc	Sat Feb 21 11:55:21 2009 +0100
+++ b/plugins/staticpages/functions.inc	Sat Feb 21 12:41:05 2009 +0100
@@ -272,11 +272,16 @@
 
     $retval = '';
 
+    $sp_url = COM_buildUrl($_CONF['site_url'] . '/staticpages/index.php?page='
+                           . $page);
+    $headercode = '<link rel="canonical" href="' . $sp_url . '"' . XHTML . '>'
+                . LB;
+
     if ($A['sp_format'] == 'allblocks' OR $A['sp_format'] == 'leftblocks') {
-        $retval .= COM_siteHeader('menu', $A['sp_title']);
+        $retval .= COM_siteHeader('menu', $A['sp_title'], $headercode);
     } else {
         if ($A['sp_format'] <> 'blankpage') {
-            $retval .= COM_siteHeader('none', $A['sp_title']);
+            $retval .= COM_siteHeader('none', $A['sp_title'], $headercode);
         }
     }
     if ($msg > 0) {
diff -r d6c9bb40e6ff -r 000c9fe7852b public_html/docs/history
--- a/public_html/docs/history	Sat Feb 21 11:55:21 2009 +0100
+++ b/public_html/docs/history	Sat Feb 21 12:41:05 2009 +0100
@@ -73,6 +73,7 @@
 
 Static Pages plugin
 -------------------
+- Added canonical link [Dirk]
 - Added auto installation support [Dirk]
 - Added support for PLG_getItemInfo, PLG_itemSaved, PLG_itemDeleted [Dirk]
 - The printable.thtml template file uses the HTML Strict doctype and print.css



More information about the geeklog-cvs mailing list