<?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>Fungible Convictions &#187; extensions</title>
	<atom:link href="http://fungibleconvictions.com/tag/extensions/feed/" rel="self" type="application/rss+xml" />
	<link>http://fungibleconvictions.com</link>
	<description>The blog of Andrew Whitacre</description>
	<lastBuildDate>Mon, 06 Feb 2012 20:39:55 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=</generator>
		<item>
		<title>Multiple authors per post in WordPress</title>
		<link>http://fungibleconvictions.com/2007/01/24/multiple-authors-per-post-in-wordpress/</link>
		<comments>http://fungibleconvictions.com/2007/01/24/multiple-authors-per-post-in-wordpress/#comments</comments>
		<pubDate>Wed, 24 Jan 2007 16:43:30 +0000</pubDate>
		<dc:creator>Andrew Whitacre</dc:creator>
				<category><![CDATA[design]]></category>
		<category><![CDATA[tech]]></category>
		<category><![CDATA[extensions]]></category>
		<category><![CDATA[plugins]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://fungibleconvictions.com/2007/01/24/multiple-authors-per-post-in-wordpress/</guid>
		<description><![CDATA[Over on an academic journal site I&#8217;ve been setting up, I needed a way to assign multiple authors for a single post. Tempus Fugit developed a plugin to do just that, except it makes the assumption that anyone who edits a post should be listed as an author&#8212;true for blogs, not true for a site [...]]]></description>
			<content:encoded><![CDATA[<p>Over on an academic journal site I&#8217;ve been setting up, I needed a way to assign multiple authors for a single post. <a href="http://txfx.net/2005/08/16/new-plugin-multiple-authors/">Tempus Fugit</a> developed a plugin to do just that, except it makes the assumption that anyone who edits a post should be listed as an author&#8212;true for blogs, not true for a site with editors posting others&#8217; work. Here&#8217;s a simple fix, though, for anyone using Tempus Fugit&#8217;s multiple authors plugin&#8230;</p>
<p>In the plugin&#8217;s php file, delete the function that equates a post editor as an author:</p>
<p><code>function txfx_oa_add_author($post_ID) {<br />
	global $wpdb, $userdata;</p>
<p>	if ( !$userdata ) get_currentuserinfo(); // shouldn't be needed, but can't hurt</p>
<p>	$main_author = $wpdb->get_var("SELECT `post_author` FROM $wpdb->posts WHERE `ID` = '$post_ID'");</p>
<p>	if ( $userdata->ID == $main_author ) return $post_ID; // the person who created the post is editing it... do nothing</p>
<p>	// if we're still here, it must be a new author, so see if they are already logged as an author on this post<br />
	if ( $wpdb->get_var("SELECT meta_id FROM $wpdb->postmeta WHERE meta_key  = 'other_author' AND post_id = '$post_ID' AND meta_value = '$userdata->user_login'") ) return $post_ID;</p>
<p>	// if we're STILL here, it's time to add this author<br />
	add_post_meta($post_ID, 'other_author', $userdata->user_login);</p>
<p>	//and we're done<br />
	return $post_ID;</p>
<p>}</code></p>
<p>And at the very bottom of the file, to keep the file from breaking, delete the commands to add that now-ignored editor as an author:</p>
<p><code>add_action('edit_post', 'txfx_oa_add_author');<br />
add_action('save_post', 'txfx_oa_add_author');</code></p>
<p>Done and done! Adding an author is manual now&#8212;you just add a custom field called &#8220;other_author&#8221; and type in the second (or third or fourth) author&#8217;s name in the &#8220;Value&#8221; box. And so long as it matches the name of a registered user, that person will be duly added as an author to the post.</p>
]]></content:encoded>
			<wfw:commentRss>http://fungibleconvictions.com/2007/01/24/multiple-authors-per-post-in-wordpress/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
	</channel>
</rss>

