<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress/2.3.1" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	>
<channel>
	<title>Comments on: Google Canonical Href - with Mediawiki</title>
	<link>http://www.techyouruniverse.com/wikia/google-canonical-href-with-mediawiki</link>
	<description>Musings about technology from a Geek</description>
	<pubDate>Thu, 11 Mar 2010 20:10:02 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.3.1</generator>
		<item>
		<title>By: Jools</title>
		<link>http://www.techyouruniverse.com/wikia/google-canonical-href-with-mediawiki#comment-4765</link>
		<dc:creator>Jools</dc:creator>
		<pubDate>Tue, 20 Oct 2009 13:50:35 +0000</pubDate>
		<guid>http://www.techyouruniverse.com/wikia/google-canonical-href-with-mediawiki#comment-4765</guid>
		<description>Some discussion has taken place on the bugzilla link above. Seems the support in core only handles canonical urls for redirects, and not for other things, which means your examples above

/wiki/Article_Name
/wiki/index.php/Article_Name
/wiki/index.php?title=Article+Name
/wiki/Article_Name?action=view

still don't contact a canonical url with 1.16. Please add your thoughts and comments to the thread.</description>
		<content:encoded><![CDATA[<p>Some discussion has taken place on the bugzilla link above. Seems the support in core only handles canonical urls for redirects, and not for other things, which means your examples above</p>
<p>/wiki/Article_Name<br />
/wiki/index.php/Article_Name<br />
/wiki/index.php?title=Article+Name<br />
/wiki/Article_Name?action=view</p>
<p>still don&#8217;t contact a canonical url with 1.16. Please add your thoughts and comments to the thread.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jools</title>
		<link>http://www.techyouruniverse.com/wikia/google-canonical-href-with-mediawiki#comment-4743</link>
		<dc:creator>Jools</dc:creator>
		<pubDate>Sun, 18 Oct 2009 19:50:26 +0000</pubDate>
		<guid>http://www.techyouruniverse.com/wikia/google-canonical-href-with-mediawiki#comment-4743</guid>
		<description>I realise this blog is perhaps not the best place to include source. Anyway, I added a bug report to the bugzilla so i could attach a proper diff etc.

Please see

https://bugzilla.wikimedia.org/show_bug.cgi?id=21173</description>
		<content:encoded><![CDATA[<p>I realise this blog is perhaps not the best place to include source. Anyway, I added a bug report to the bugzilla so i could attach a proper diff etc.</p>
<p>Please see</p>
<p><a href="https://bugzilla.wikimedia.org/show_bug.cgi?id=21173" rel="nofollow">https://bugzilla.wikimedia.org/show_bug.cgi?id=21173</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jools</title>
		<link>http://www.techyouruniverse.com/wikia/google-canonical-href-with-mediawiki#comment-4741</link>
		<dc:creator>Jools</dc:creator>
		<pubDate>Sun, 18 Oct 2009 18:29:49 +0000</pubDate>
		<guid>http://www.techyouruniverse.com/wikia/google-canonical-href-with-mediawiki#comment-4741</guid>
		<description>Hi,

this does not work with mediawiki 1.16svn. I played around and this works (and seems a more compatible way to add a link to the template

[code]
$wgHooks['BeforePageDisplay'][] = "canonicalHref";

$wgExtensionCredits['specialpage'][] = array(
	'path' =&#62; __FILE__,
        'name' =&#62; 'Canonical Href',
        'author' =&#62; 'Nick Sullivan nick at wikia-inc.com',
        'description' =&#62; 'This extension prints a link type="canonical" tag with a canonical representation of the url, which is used by Google, MSN, and Yahoo! to funnel PageRank'
);


function canonicalHref(&#38;$out, &#38;$skin){
        $out-&#62;addLink(
            array(
                'rel' =&#62; 'canonical',
                'href' =&#62; $skin-&#62;mTitle-&#62;getFullURL()
                )
        );
        return true;
}
[/code]</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>this does not work with mediawiki 1.16svn. I played around and this works (and seems a more compatible way to add a link to the template</p>
<p>[code]<br />
$wgHooks[&#8217;BeforePageDisplay&#8217;][] = "canonicalHref";</p>
<p>$wgExtensionCredits[&#8217;specialpage&#8217;][] = array(<br />
	&#8216;path&#8217; =&gt; __FILE__,<br />
        &#8216;name&#8217; =&gt; &#8216;Canonical Href&#8217;,<br />
        &#8216;author&#8217; =&gt; &#8216;Nick Sullivan nick at wikia-inc.com&#8217;,<br />
        &#8216;description&#8217; =&gt; &#8216;This extension prints a link type="canonical" tag with a canonical representation of the url, which is used by Google, MSN, and Yahoo! to funnel PageRank&#8217;<br />
);</p>
<p>function canonicalHref(&amp;$out, &amp;$skin){<br />
        $out-&gt;addLink(<br />
            array(<br />
                &#8216;rel&#8217; =&gt; &#8216;canonical&#8217;,<br />
                &#8216;href&#8217; =&gt; $skin-&gt;mTitle-&gt;getFullURL()<br />
                )<br />
        );<br />
        return true;<br />
}<br />
[/code]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: nick</title>
		<link>http://www.techyouruniverse.com/wikia/google-canonical-href-with-mediawiki#comment-4465</link>
		<dc:creator>nick</dc:creator>
		<pubDate>Sun, 23 Aug 2009 23:45:47 +0000</pubDate>
		<guid>http://www.techyouruniverse.com/wikia/google-canonical-href-with-mediawiki#comment-4465</guid>
		<description>It is available in Wikia's public repo:

http://svn.wikimedia.org/svnroot/mediawiki/trunk/extensions/CanonicalHref/CanonicalHref.php

Although I believe it's going to be a in the Mediawiki core soon, if it's not already.

-Nick</description>
		<content:encoded><![CDATA[<p>It is available in Wikia&#8217;s public repo:</p>
<p><a href="http://svn.wikimedia.org/svnroot/mediawiki/trunk/extensions/CanonicalHref/CanonicalHref.php" rel="nofollow">http://svn.wikimedia.org/svnroot/mediawiki/trunk/extensions/CanonicalHref/CanonicalHref.php</a></p>
<p>Although I believe it&#8217;s going to be a in the Mediawiki core soon, if it&#8217;s not already.</p>
<p>-Nick</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rena</title>
		<link>http://www.techyouruniverse.com/wikia/google-canonical-href-with-mediawiki#comment-4463</link>
		<dc:creator>Rena</dc:creator>
		<pubDate>Sun, 23 Aug 2009 16:34:02 +0000</pubDate>
		<guid>http://www.techyouruniverse.com/wikia/google-canonical-href-with-mediawiki#comment-4463</guid>
		<description>Hey Nick! I'm very interested in using this extension, but I can't find it on the listing of MediaWiki's approved extensions. Is there a problem with the extension? Thanks!</description>
		<content:encoded><![CDATA[<p>Hey Nick! I&#8217;m very interested in using this extension, but I can&#8217;t find it on the listing of MediaWiki&#8217;s approved extensions. Is there a problem with the extension? Thanks!</p>
]]></content:encoded>
	</item>
</channel>
</rss>
