<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Matt Busse &#187; Wordpress</title>
	<atom:link href="http://mattbusse.com/cat/wordpress/feed/" rel="self" type="application/rss+xml" />
	<link>http://mattbusse.com</link>
	<description>Journalism, technology and Web design</description>
	<lastBuildDate>Tue, 24 Aug 2010 13:59:09 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Fix &#8216;ID &#8220;email&#8221; already defined&#8217; validation error using Sociable plugin for WordPress</title>
		<link>http://mattbusse.com/fix-id-email-already-defined-validation-error-using-sociable-plugin-for-wordpress/</link>
		<comments>http://mattbusse.com/fix-id-email-already-defined-validation-error-using-sociable-plugin-for-wordpress/#comments</comments>
		<pubDate>Fri, 25 Sep 2009 15:30:57 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
				<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://mattbusse.com/?p=323</guid>
		<description><![CDATA[The Sociable plug-in for Wordpress can cause a W3C validation conflict because both the plug-in's "email" button and the Wordpress comment form have elements with the ID "email." Here's how to fix it.]]></description>
			<content:encoded><![CDATA[<p>The <a href="http://yoast.com/wordpress/sociable/">Sociable</a> plug-in for WordPress can cause a <a href="http://validator.w3.org/">W3C validation</a> conflict because both the plug-in&#8217;s e-mail button and the WordPress comment form&#8217;s e-mail field have the ID &#8220;email.&#8221; Here&#8217;s how to fix it.</p>
<p><span id="more-323"></span></p>
<p>Sociable is a great plug-in that adds buttons at the bottom of your posts for readers to print, e-mail or share the posts on social networking sites.</p>
<p>If you use Sociable&#8217;s &#8220;E-mail this story to a friend!&#8221; button, you may get a validation error, &#8220;<strong>ID &#8216;email&#8217; already defined</strong>,&#8221; if the blog post also has the WordPress comment form showing.</p>
<p>This is because both Sociable&#8217;s e-mail button and the comment form&#8217;s e-mail field use the same ID: &#8220;email.&#8221;</p>
<p>The fix is easy. Open up sociable.php and find the following section (it&#8217;s right after a comment that begins &#8220;Start building the link &#8230;&#8221;):</p>
<p><code><br />
$link .= '&lt;a rel="nofollow"';<br />
$link .= ' id="'.esc_attr(strtolower($sitename)).'"';<br />
if (get_option('sociable_usetargetblank')) {<br />
$link .= " target=\"_blank\"";<br />
}<br />
$link .= " href=\"javascript:window.location='".urlencode($url)."';\" title=\"$description\"&gt;";</code></p>
<p>Immediately <strong>before</strong> this section, add the following:</p>
<p><code>if ($sitename=='email') {<br />
$sitename .= '-sociable';<br />
}</code></p>
<p>This will add &#8220;-sociable&#8221; to the ID of the Sociable e-mail button, making it &#8220;email-sociable&#8221; instead of simply &#8220;email.&#8221; Because the name is different, there will be no more &#8220;ID &#8216;email&#8217; already defined&#8221; validation error.</p>
]]></content:encoded>
			<wfw:commentRss>http://mattbusse.com/fix-id-email-already-defined-validation-error-using-sociable-plugin-for-wordpress/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
