<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: Media Tags 2.2 plugin for WordPress Released</title>
	<atom:link href="http://www.codehooligans.com/2009/08/17/media-tags-2-2-plugin-for-wordpress-released/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.codehooligans.com/2009/08/17/media-tags-2-2-plugin-for-wordpress-released/</link>
	<description>I'm the Devil in the code!</description>
	<lastBuildDate>Fri, 05 Mar 2010 02:52:47 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: noponies</title>
		<link>http://www.codehooligans.com/2009/08/17/media-tags-2-2-plugin-for-wordpress-released/comment-page-2/#comment-48884</link>
		<dc:creator>noponies</dc:creator>
		<pubDate>Sat, 27 Feb 2010 13:26:11 +0000</pubDate>
		<guid isPermaLink="false">http://www.codehooligans.com/?p=443#comment-48884</guid>
		<description>Hi Paul,

Is there anyway to exclude a particular media tag from the list returned by get_attachments_by_media_tags. I&#039;ve tried the usual wordpress &#039;exclude&#039; and &#039;tag__not_in&#039; etc, but come up short. I can get around is using array methods on the returned list, but a simple exclude command would be handy.</description>
		<content:encoded><![CDATA[<p>Hi Paul,</p>
<p>Is there anyway to exclude a particular media tag from the list returned by get_attachments_by_media_tags. I&#8217;ve tried the usual wordpress &#8216;exclude&#8217; and &#8216;tag__not_in&#8217; etc, but come up short. I can get around is using array methods on the returned list, but a simple exclude command would be handy.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ross Beyeler</title>
		<link>http://www.codehooligans.com/2009/08/17/media-tags-2-2-plugin-for-wordpress-released/comment-page-2/#comment-48806</link>
		<dc:creator>Ross Beyeler</dc:creator>
		<pubDate>Thu, 25 Feb 2010 21:53:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.codehooligans.com/?p=443#comment-48806</guid>
		<description>My last comment removed all the html from my function, so it probably looks broken. Hopefully this works:

&lt;code&gt;
function list_attachments_by_user_tags() {
	global $wpdb, $current_user; 
	$user_id = $current_user-&gt;ID; 
	$catQuery = $wpdb-&gt;get_results(&quot;
		SELECT * 
		FROM $wpdb-&gt;terms AS wterms INNER JOIN $wpdb-&gt;term_taxonomy AS wtaxonomy ON ( wterms.term_id = wtaxonomy.term_id )
		WHERE wtaxonomy.taxonomy = &#039;media-tags&#039; 
		AND wtaxonomy.parent = 0 
		AND wtaxonomy.count &gt; 0&quot;);
	foreach ($catQuery as $category) {
		echo &#039;&lt;li&gt;&lt;h3&gt;&#039; . $category-&gt;name . &#039;&lt;/h3&gt;&#039;;
			$media_items = get_attachments_by_media_tags(&#039;media_tags=&#039;.$category-&gt;slug);
			if ($media_items) {
				echo &#039;&lt;ul&gt;&#039;; 
   				foreach ($media_items as $media_item) {
					if ($media_item-&gt;post_author == $user_id) {
						echo &#039;&lt;li&gt;&#039;;
           						echo &#039;&lt;a href=&quot;&#039; . wp_get_attachment_url($media_item-&gt;ID) . &#039;&quot;&gt;&#039; . $media_item-&gt;post_title .&#039;&lt;/a&gt;&#039;;
						echo &#039;&lt;/li&gt;&#039;;
         				}
         			}
				echo &#039;&lt;/ul&gt;&#039;; 
     			}
	}
}
&lt;/code&gt;</description>
		<content:encoded><![CDATA[<p>My last comment removed all the html from my function, so it probably looks broken. Hopefully this works:</p>
<div class="codecolorer-container text twitlight" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br />15<br />16<br />17<br />18<br />19<br />20<br />21<br />22<br />23<br />24<br />25<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">function list_attachments_by_user_tags() {<br />
&nbsp; &nbsp; global $wpdb, $current_user; <br />
&nbsp; &nbsp; $user_id = $current_user-&gt;ID; <br />
&nbsp; &nbsp; $catQuery = $wpdb-&gt;get_results(&quot;<br />
&nbsp; &nbsp; &nbsp; &nbsp; SELECT * <br />
&nbsp; &nbsp; &nbsp; &nbsp; FROM $wpdb-&gt;terms AS wterms INNER JOIN $wpdb-&gt;term_taxonomy AS wtaxonomy ON ( wterms.term_id = wtaxonomy.term_id )<br />
&nbsp; &nbsp; &nbsp; &nbsp; WHERE wtaxonomy.taxonomy = 'media-tags' <br />
&nbsp; &nbsp; &nbsp; &nbsp; AND wtaxonomy.parent = 0 <br />
&nbsp; &nbsp; &nbsp; &nbsp; AND wtaxonomy.count &gt; 0&quot;);<br />
&nbsp; &nbsp; foreach ($catQuery as $category) {<br />
&nbsp; &nbsp; &nbsp; &nbsp; echo '&lt;li&gt;&lt;h3&gt;' . $category-&gt;name . '&lt;/h3&gt;';<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $media_items = get_attachments_by_media_tags('media_tags='.$category-&gt;slug);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if ($media_items) {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; echo '&lt;ul&gt;'; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; foreach ($media_items as $media_item) {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if ($media_item-&gt;post_author == $user_id) {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; echo '&lt;li&gt;';<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; echo '&lt;a href=&quot;' . wp_get_attachment_url($media_item-&gt;ID) . '&quot;&gt;' . $media_item-&gt;post_title .'&lt;/a&gt;';<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; echo '&lt;/li&gt;';<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; echo '&lt;/ul&gt;'; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; }<br />
}</div></td></tr></tbody></table></div>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ross Beyeler</title>
		<link>http://www.codehooligans.com/2009/08/17/media-tags-2-2-plugin-for-wordpress-released/comment-page-2/#comment-48805</link>
		<dc:creator>Ross Beyeler</dc:creator>
		<pubDate>Thu, 25 Feb 2010 21:50:39 +0000</pubDate>
		<guid isPermaLink="false">http://www.codehooligans.com/?p=443#comment-48805</guid>
		<description>I built a custom function that would query the database for all existing mediatags and list attachments for each mediatag underneath. It also filters out the attachments to only display those that were uploaded by the currently logged in user. This is something we needed to build for a client looking to setup a file management type system. The code isn&#039;t pretty and displays all mediatags whether the currently logged in user has attachments in them or not:

function list_attachments_by_user_tags() {
	global $wpdb, $current_user; 
	$user_id = $current_user-&gt;ID; 
	$catQuery = $wpdb-&gt;get_results(&quot;
		SELECT * 
		FROM $wpdb-&gt;terms AS wterms INNER JOIN $wpdb-&gt;term_taxonomy AS wtaxonomy ON ( wterms.term_id = wtaxonomy.term_id )
		WHERE wtaxonomy.taxonomy = &#039;media-tags&#039; 
		AND wtaxonomy.parent = 0 
		AND wtaxonomy.count &gt; 0&quot;);
	foreach ($catQuery as $category) {
		echo &#039;&#039; . $category-&gt;name . &#039;&#039;;
			$media_items = get_attachments_by_media_tags(&#039;media_tags=&#039;.$category-&gt;slug);
			if ($media_items) {
				echo &#039;&#039;; 
   				foreach ($media_items as $media_item) {
					if ($media_item-&gt;post_author == $user_id) {
						echo &#039;&#039;;
           						echo &#039;&lt;a&gt;ID) . &#039;&quot;&gt;&#039; . $media_item-&gt;post_title .&#039;&lt;/a&gt;&#039;;
						echo &#039;&#039;;
         				}
         			}
				echo &#039;&#039;; 
     			}
	}
}

I&#039;d love to hear some feedback.</description>
		<content:encoded><![CDATA[<p>I built a custom function that would query the database for all existing mediatags and list attachments for each mediatag underneath. It also filters out the attachments to only display those that were uploaded by the currently logged in user. This is something we needed to build for a client looking to setup a file management type system. The code isn&#8217;t pretty and displays all mediatags whether the currently logged in user has attachments in them or not:</p>
<p>function list_attachments_by_user_tags() {<br />
	global $wpdb, $current_user;<br />
	$user_id = $current_user-&gt;ID;<br />
	$catQuery = $wpdb-&gt;get_results(&#8221;<br />
		SELECT *<br />
		FROM $wpdb-&gt;terms AS wterms INNER JOIN $wpdb-&gt;term_taxonomy AS wtaxonomy ON ( wterms.term_id = wtaxonomy.term_id )<br />
		WHERE wtaxonomy.taxonomy = &#8216;media-tags&#8217;<br />
		AND wtaxonomy.parent = 0<br />
		AND wtaxonomy.count &gt; 0&#8243;);<br />
	foreach ($catQuery as $category) {<br />
		echo &#8221; . $category-&gt;name . &#8221;;<br />
			$media_items = get_attachments_by_media_tags(&#8216;media_tags=&#8217;.$category-&gt;slug);<br />
			if ($media_items) {<br />
				echo &#8221;;<br />
   				foreach ($media_items as $media_item) {<br />
					if ($media_item-&gt;post_author == $user_id) {<br />
						echo &#8221;;<br />
           						echo &#8216;<a>ID) . &#8216;&#8221;&gt;&#8217; . $media_item-&gt;post_title .&#8217;</a>&#8216;;<br />
						echo &#8221;;<br />
         				}<br />
         			}<br />
				echo &#8221;;<br />
     			}<br />
	}<br />
}</p>
<p>I&#8217;d love to hear some feedback.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tom</title>
		<link>http://www.codehooligans.com/2009/08/17/media-tags-2-2-plugin-for-wordpress-released/comment-page-2/#comment-48664</link>
		<dc:creator>Tom</dc:creator>
		<pubDate>Tue, 23 Feb 2010 15:28:28 +0000</pubDate>
		<guid isPermaLink="false">http://www.codehooligans.com/?p=443#comment-48664</guid>
		<description>Around line 83 of media_tags.php looks like this:

if ((isset($_REQUEST[&#039;activate&#039;])) &#124;&#124; ($_REQUEST[&#039;activate&#039;] == true))
{
$this-&gt;mediatags_activate_plugin();
}

This does not look like it is logically correct (and kicks up a warning &#039;Undefined index: activate&#039;). Should a logical AND ?</description>
		<content:encoded><![CDATA[<p>Around line 83 of media_tags.php looks like this:</p>
<p>if ((isset($_REQUEST['activate'])) || ($_REQUEST['activate'] == true))<br />
{<br />
$this-&gt;mediatags_activate_plugin();<br />
}</p>
<p>This does not look like it is logically correct (and kicks up a warning &#8216;Undefined index: activate&#8217;). Should a logical AND ?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Brandon</title>
		<link>http://www.codehooligans.com/2009/08/17/media-tags-2-2-plugin-for-wordpress-released/comment-page-2/#comment-48608</link>
		<dc:creator>Brandon</dc:creator>
		<pubDate>Mon, 22 Feb 2010 16:47:17 +0000</pubDate>
		<guid isPermaLink="false">http://www.codehooligans.com/?p=443#comment-48608</guid>
		<description>Hi Paul,

  I&#039;m attempting to create an intranet site and wanted to have a page of PDF links using your plugin so users could just tag their media uploads and have them appear on the proper page.  I&#039;m attempting to use the shortcode to inject the PDF&#039;s into the page; but all I see are the appropriate number of bullets with no link to the PDF.  I&#039;m using WP 2.9.2, is there some example code somewhere?  Shouldn&#039;t [media-tags media_tags=&quot;downloads&quot;] just display all the PDF&#039;s with the &#039;downloads&#039; tag or is it necessary to modify one of the template files to use the shortcode?</description>
		<content:encoded><![CDATA[<p>Hi Paul,</p>
<p>  I&#8217;m attempting to create an intranet site and wanted to have a page of PDF links using your plugin so users could just tag their media uploads and have them appear on the proper page.  I&#8217;m attempting to use the shortcode to inject the PDF&#8217;s into the page; but all I see are the appropriate number of bullets with no link to the PDF.  I&#8217;m using WP 2.9.2, is there some example code somewhere?  Shouldn&#8217;t [media-tags media_tags="downloads"] just display all the PDF&#8217;s with the &#8216;downloads&#8217; tag or is it necessary to modify one of the template files to use the shortcode?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: chris</title>
		<link>http://www.codehooligans.com/2009/08/17/media-tags-2-2-plugin-for-wordpress-released/comment-page-2/#comment-48321</link>
		<dc:creator>chris</dc:creator>
		<pubDate>Mon, 15 Feb 2010 05:57:54 +0000</pubDate>
		<guid isPermaLink="false">http://www.codehooligans.com/?p=443#comment-48321</guid>
		<description>Paul, great plugin. I&#039;m using it in xmlrpc to pass data into Flash for cms purposes.

One question : I&#039;m confused as to why this method does not pass back a param that is tag name? This seems like an essential piece. Is there another way to get this?</description>
		<content:encoded><![CDATA[<p>Paul, great plugin. I&#8217;m using it in xmlrpc to pass data into Flash for cms purposes.</p>
<p>One question : I&#8217;m confused as to why this method does not pass back a param that is tag name? This seems like an essential piece. Is there another way to get this?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Carlos R</title>
		<link>http://www.codehooligans.com/2009/08/17/media-tags-2-2-plugin-for-wordpress-released/comment-page-2/#comment-47835</link>
		<dc:creator>Carlos R</dc:creator>
		<pubDate>Tue, 02 Feb 2010 13:36:21 +0000</pubDate>
		<guid isPermaLink="false">http://www.codehooligans.com/?p=443#comment-47835</guid>
		<description>In addition to the previous, what should I do to link the gallery thumbnails to the images?</description>
		<content:encoded><![CDATA[<p>In addition to the previous, what should I do to link the gallery thumbnails to the images?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Carlos R</title>
		<link>http://www.codehooligans.com/2009/08/17/media-tags-2-2-plugin-for-wordpress-released/comment-page-2/#comment-47830</link>
		<dc:creator>Carlos R</dc:creator>
		<pubDate>Tue, 02 Feb 2010 11:26:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.codehooligans.com/?p=443#comment-47830</guid>
		<description>Ok, I got it! It goes like this:

&lt;code&gt;
		[?php $tagArgs = array(
			&#039;media_tags&#039;	=]	$post-&gt;post_name,
			&#039;orderby&#039;		=]	&#039;date&#039;,
			&#039;order&#039;		=]	&#039;DESC&#039;,
			&#039;numberposts&#039;	=]	&#039;6&#039;,
			&#039;return_type&#039;	=]	&#039;li&#039;
			&#039;size&#039;			=]	&#039;thumb&#039; ); ?]
		
		[?php $mediaTags = get_attachments_by_media_tags($tagArgs); echo $mediaTags; ?]
&lt;/code&gt;

But now I can&#039;t get the &quot;size&quot; parameter to work. How can I get a list of thumbnails instead of full images? Thanks in advance.</description>
		<content:encoded><![CDATA[<p>Ok, I got it! It goes like this:</p>
<div class="codecolorer-container text twitlight" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">&nbsp; &nbsp; &nbsp; &nbsp; [?php $tagArgs = array(<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 'media_tags'&nbsp; &nbsp; =]&nbsp; $post-&gt;post_name,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 'orderby' &nbsp; &nbsp; &nbsp; =]&nbsp; 'date',<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 'order' &nbsp; &nbsp; =]&nbsp; 'DESC',<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 'numberposts' &nbsp; =]&nbsp; '6',<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 'return_type' &nbsp; =]&nbsp; 'li'<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 'size'&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; =]&nbsp; 'thumb' ); ?]<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; [?php $mediaTags = get_attachments_by_media_tags($tagArgs); echo $mediaTags; ?]</div></td></tr></tbody></table></div>
<p>But now I can&#8217;t get the &#8220;size&#8221; parameter to work. How can I get a list of thumbnails instead of full images? Thanks in advance.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Carlos R</title>
		<link>http://www.codehooligans.com/2009/08/17/media-tags-2-2-plugin-for-wordpress-released/comment-page-2/#comment-47785</link>
		<dc:creator>Carlos R</dc:creator>
		<pubDate>Mon, 01 Feb 2010 15:25:37 +0000</pubDate>
		<guid isPermaLink="false">http://www.codehooligans.com/?p=443#comment-47785</guid>
		<description>My real problem is that I don&#039;t know PHP :) Could you please tell me how to pass the variable into the array?

I also have the code outside the loop, so should I open a new query?

Thanks again!</description>
		<content:encoded><![CDATA[<p>My real problem is that I don&#8217;t know PHP <img src='http://www.codehooligans.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  Could you please tell me how to pass the variable into the array?</p>
<p>I also have the code outside the loop, so should I open a new query?</p>
<p>Thanks again!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Paul Menard</title>
		<link>http://www.codehooligans.com/2009/08/17/media-tags-2-2-plugin-for-wordpress-released/comment-page-2/#comment-47782</link>
		<dc:creator>Paul Menard</dc:creator>
		<pubDate>Mon, 01 Feb 2010 14:41:51 +0000</pubDate>
		<guid isPermaLink="false">http://www.codehooligans.com/?p=443#comment-47782</guid>
		<description>@Carlos R: This is totally doable. On a page or the single.php template within the look you have access to the WP post variable post -&gt; post_name. The &#039;post_name is the Page/Post slug. So you just need to pass that into the &#039;media_tags&#039; array parameter.</description>
		<content:encoded><![CDATA[<p>@Carlos R: This is totally doable. On a page or the single.php template within the look you have access to the WP post variable post -> post_name. The &#8216;post_name is the Page/Post slug. So you just need to pass that into the &#8216;media_tags&#8217; array parameter.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
