<?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: WordPress hacks and tips: Media</title>
	<atom:link href="http://sltaylor.co.uk/blog/wordpress-hacks-tips-media/feed/" rel="self" type="application/rss+xml" />
	<link>http://sltaylor.co.uk/blog/wordpress-hacks-tips-media/</link>
	<description>Freelance WordPress developer in London - XHTML, CSS &#38; design</description>
	<lastBuildDate>Sat, 04 Sep 2010 19:30:38 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
	<item>
		<title>By: Lewis</title>
		<link>http://sltaylor.co.uk/blog/wordpress-hacks-tips-media/#comment-7154</link>
		<dc:creator>Lewis</dc:creator>
		<pubDate>Wed, 23 Jun 2010 09:33:11 +0000</pubDate>
		<guid isPermaLink="false">http://sltaylor.co.uk/?p=138#comment-7154</guid>
		<description>Not sure if this helps Timothy nor how clean it is but this displays links to the image sizes and just the links for documents:
&lt;code&gt;function muc_column( $cols ) {  
	$cols[&quot;media_url&quot;] = &quot;View&quot;;  
	return $cols;  
}  
function muc_value( $column_name, $id ) {  
	if ( $column_name == &quot;media_url&quot; ) { 
			$full =  wp_get_attachment_image_src( $id, &#039;full&#039;, &#039;&#039; ); 
			if (is_array($full)) { 
				$medium = wp_get_attachment_image_src( $id, &#039;medium&#039;, &#039;&#039; );
				$thumb = wp_get_attachment_image_src( $id );
				echo &quot;&lt;a href=&#039;&quot;.$full[0].&quot;&#039; title=&#039;Large&#039;&gt;Large&lt;/a&gt; &#124; &quot;;
				echo &quot;&lt;a href=&#039;&quot;.$medium[0].&quot;&#039; title=&#039;Medium&#039;&gt;Medium&lt;/a&gt; &#124; &quot;;
				echo &quot;&lt;a href=&#039;&quot;.$thumb[0].&quot;&#039; title=&#039;Thumbnail&#039;&gt;Thumbnail&lt;/a&gt;&quot;; 			
			}  else {
				echo &quot;&lt;a href=&#039;&quot;.wp_get_attachment_url( $id ).&quot;&#039; title=&#039;Large&#039;&gt;&quot;.wp_get_attachment_url( $id ).&quot;&lt;/a&gt; &quot;;				
			}  
	}
}  
add_filter( &#039;manage_media_columns&#039;, &#039;muc_column&#039; );  
add_action( &#039;manage_media_custom_column&#039;, &#039;muc_value&#039;, 10, 2 );  &lt;/code&gt;</description>
		<content:encoded><![CDATA[<p>Not sure if this helps Timothy nor how clean it is but this displays links to the image sizes and just the links for documents:<br />
<code>function muc_column( $cols ) {<br />
	$cols["media_url"] = "View";<br />
	return $cols;<br />
}<br />
function muc_value( $column_name, $id ) {<br />
	if ( $column_name == "media_url" ) {<br />
			$full =  wp_get_attachment_image_src( $id, 'full', '' );<br />
			if (is_array($full)) {<br />
				$medium = wp_get_attachment_image_src( $id, 'medium', '' );<br />
				$thumb = wp_get_attachment_image_src( $id );<br />
				echo "<a href='".$full[0]."' title='Large'>Large</a> | ";<br />
				echo "<a href='".$medium[0]."' title='Medium'>Medium</a> | ";<br />
				echo "<a href='".$thumb[0]."' title='Thumbnail'>Thumbnail</a>";<br />
			}  else {<br />
				echo "<a href='".wp_get_attachment_url( $id )."' title='Large'>".wp_get_attachment_url( $id )."</a> ";<br />
			}<br />
	}<br />
}<br />
add_filter( 'manage_media_columns', 'muc_column' );<br />
add_action( 'manage_media_custom_column', 'muc_value', 10, 2 );  </code></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Steve Taylor</title>
		<link>http://sltaylor.co.uk/blog/wordpress-hacks-tips-media/#comment-1053</link>
		<dc:creator>Steve Taylor</dc:creator>
		<pubDate>Fri, 14 Aug 2009 20:15:51 +0000</pubDate>
		<guid isPermaLink="false">http://sltaylor.co.uk/?p=138#comment-1053</guid>
		<description>Lex, not had the need for that before. To keep the resized versions but not the original? I guess I can see the use if you don&#039;t want to store anything larger than the largest size you set. But I imagine ditching the original might be tricky. Maybe look for a plugin to control the max size of uploads, if storage space is the concern? Still, it&#039;d be nice to allow the upload to get the smaller versions AND not use up loads of space. Well, good luck!</description>
		<content:encoded><![CDATA[<p>Lex, not had the need for that before. To keep the resized versions but not the original? I guess I can see the use if you don&#8217;t want to store anything larger than the largest size you set. But I imagine ditching the original might be tricky. Maybe look for a plugin to control the max size of uploads, if storage space is the concern? Still, it&#8217;d be nice to allow the upload to get the smaller versions AND not use up loads of space. Well, good luck!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: lex</title>
		<link>http://sltaylor.co.uk/blog/wordpress-hacks-tips-media/#comment-1052</link>
		<dc:creator>lex</dc:creator>
		<pubDate>Fri, 14 Aug 2009 20:09:22 +0000</pubDate>
		<guid isPermaLink="false">http://sltaylor.co.uk/?p=138#comment-1052</guid>
		<description>Great post! Very handy...however, I was on the search for something similar: how get the media library NOT to store the original file? Any suggestions?

Cheers!</description>
		<content:encoded><![CDATA[<p>Great post! Very handy&#8230;however, I was on the search for something similar: how get the media library NOT to store the original file? Any suggestions?</p>
<p>Cheers!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Steve Taylor</title>
		<link>http://sltaylor.co.uk/blog/wordpress-hacks-tips-media/#comment-618</link>
		<dc:creator>Steve Taylor</dc:creator>
		<pubDate>Wed, 05 Aug 2009 20:26:30 +0000</pubDate>
		<guid isPermaLink="false">http://sltaylor.co.uk/?p=138#comment-618</guid>
		<description>&lt;code&gt;%22&lt;/code&gt; seems to be the &lt;a href=&quot;http://www.aptana.com/docs/index.php/URL_Escape_Codes&quot; rel=&quot;nofollow&quot;&gt;URL escape code&lt;/a&gt; for a quote mark. I&#039;m not sure how it&#039;s getting into your URL output. What code are you actually using to output the links? (Remember to escape angle brackets in HTML posted!)</description>
		<content:encoded><![CDATA[<p><code>%22</code> seems to be the <a href="http://www.aptana.com/docs/index.php/URL_Escape_Codes">URL escape code</a> for a quote mark. I&#8217;m not sure how it&#8217;s getting into your URL output. What code are you actually using to output the links? (Remember to escape angle brackets in HTML posted!)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Timothy</title>
		<link>http://sltaylor.co.uk/blog/wordpress-hacks-tips-media/#comment-617</link>
		<dc:creator>Timothy</dc:creator>
		<pubDate>Wed, 05 Aug 2009 20:19:25 +0000</pubDate>
		<guid isPermaLink="false">http://sltaylor.co.uk/?p=138#comment-617</guid>
		<description>Well I figured out what I wanted to do, but I&#039;m getting an annoying URL: /wp-content/uploads/2009/08/timothy.jpg%22
How do I remove the &quot;%22&quot; at the end??
&lt;code&gt;// Media Library URL column	
	function muc_column( $cols ) {
	$cols[&quot;media_url&quot;] = &quot;URL&quot;;
	return $cols;
}
function muc_value( $column_name, $id ) {
	if ( $column_name == &quot;media_url&quot; ) 
	echo &#039;&lt;a&gt;Fullsize Link&lt;/a&gt;&lt;a&gt;Thumbnail Link&lt;/a&gt;&#039;;
}
add_filter( &#039;manage_media_columns&#039;, &#039;muc_column&#039; );
add_action( &#039;manage_media_custom_column&#039;, &#039;muc_value&#039;, 10, 2 );&lt;/code&gt;</description>
		<content:encoded><![CDATA[<p>Well I figured out what I wanted to do, but I&#8217;m getting an annoying URL: /wp-content/uploads/2009/08/timothy.jpg%22<br />
How do I remove the &#8220;%22&#8243; at the end??<br />
<code>// Media Library URL column<br />
	function muc_column( $cols ) {<br />
	$cols["media_url"] = "URL";<br />
	return $cols;<br />
}<br />
function muc_value( $column_name, $id ) {<br />
	if ( $column_name == "media_url" )<br />
	echo '<a>Fullsize Link</a><a>Thumbnail Link</a>';<br />
}<br />
add_filter( 'manage_media_columns', 'muc_column' );<br />
add_action( 'manage_media_custom_column', 'muc_value', 10, 2 );</code></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Steve Taylor</title>
		<link>http://sltaylor.co.uk/blog/wordpress-hacks-tips-media/#comment-616</link>
		<dc:creator>Steve Taylor</dc:creator>
		<pubDate>Wed, 05 Aug 2009 20:15:51 +0000</pubDate>
		<guid isPermaLink="false">http://sltaylor.co.uk/?p=138#comment-616</guid>
		<description>Tim, good question. I guess &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_get_attachment_thumb_url&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;wp_get_attachment_thumb_url&lt;/code&gt;&lt;/a&gt; could help you out in adapting the above code snippet to your purposes. Though &lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wp_get_attachment_image_src&quot; rel=&quot;nofollow&quot;&gt;&lt;code&gt;wp_get_attachment_image_src&lt;/code&gt;&lt;/a&gt; might be more flexible if you&#039;re just concerned with images and need to output the URL to various sizes of the original.

As to your second point, adapting the &lt;code&gt;muc_value&lt;/code&gt; function above should easily allow this.</description>
		<content:encoded><![CDATA[<p>Tim, good question. I guess <a href="http://codex.wordpress.org/Function_Reference/wp_get_attachment_thumb_url"><code>wp_get_attachment_thumb_url</code></a> could help you out in adapting the above code snippet to your purposes. Though <a href="http://codex.wordpress.org/Function_Reference/wp_get_attachment_image_src"><code>wp_get_attachment_image_src</code></a> might be more flexible if you&#8217;re just concerned with images and need to output the URL to various sizes of the original.</p>
<p>As to your second point, adapting the <code>muc_value</code> function above should easily allow this.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Timothy</title>
		<link>http://sltaylor.co.uk/blog/wordpress-hacks-tips-media/#comment-615</link>
		<dc:creator>Timothy</dc:creator>
		<pubDate>Wed, 05 Aug 2009 19:35:51 +0000</pubDate>
		<guid isPermaLink="false">http://sltaylor.co.uk/?p=138#comment-615</guid>
		<description>Steve, I&#039;ve been looking everywhere for a way to output the URL for the full size and thumbnail images in the media library. So you&#039;ve gotten me halfway there!  Is there a way to add the thumbnail URL?  It might also look nicer to have the URL linked to a line of text like &quot;Full image URL&quot; instead of outputting the whole URL.</description>
		<content:encoded><![CDATA[<p>Steve, I&#8217;ve been looking everywhere for a way to output the URL for the full size and thumbnail images in the media library. So you&#8217;ve gotten me halfway there!  Is there a way to add the thumbnail URL?  It might also look nicer to have the URL linked to a line of text like &#8220;Full image URL&#8221; instead of outputting the whole URL.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
