<?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: the_thumb</title>
	<atom:link href="http://marcelomesquita.com/the_thumb/feed/" rel="self" type="application/rss+xml" />
	<link>http://marcelomesquita.com/the_thumb/</link>
	<description>Desenvolvedor Web</description>
	<lastBuildDate>Thu, 19 Apr 2012 13:57:52 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: Marcelo Mesquita</title>
		<link>http://marcelomesquita.com/the_thumb/#comment-604</link>
		<dc:creator>Marcelo Mesquita</dc:creator>
		<pubDate>Fri, 01 Oct 2010 16:32:53 +0000</pubDate>
		<guid isPermaLink="false">http://www.marcelomesquita.com/?p=141#comment-604</guid>
		<description>Thiago,
tem uma solução mais simples para utilizar os thunbnails, dá uma lida nesse artigo que explica tudo certinho: http://imasters.uol.com.br/artigo/15597

Abraço.</description>
		<content:encoded><![CDATA[<p>Thiago,<br />
tem uma solução mais simples para utilizar os thunbnails, dá uma lida nesse artigo que explica tudo certinho: <a  href="http://imasters.uol.com.br/artigo/15597" rel="nofollow">http://imasters.uol.com.br/artigo/15597</a></p>
<p>Abraço.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Thiago</title>
		<link>http://marcelomesquita.com/the_thumb/#comment-603</link>
		<dc:creator>Thiago</dc:creator>
		<pubDate>Thu, 30 Sep 2010 20:59:45 +0000</pubDate>
		<guid isPermaLink="false">http://www.marcelomesquita.com/?p=141#comment-603</guid>
		<description>Prezados Senhores:
Em functions.php, depois ou antes de qual frase devo incluir esse código?
Os dados já incluídos no meu arquvio function.php e que aguardo um breve retorno de você, por favor, é o seguinte:
 &#039;&#039;, &#039;after_widget&#039; =&gt; &#039;&#039;,	&#039;before_title&#039; =&gt; &#039;&#039;, &#039;after_title&#039; =&gt; &#039;&#039;, ));	function popular_posts($no_posts = 6, $before = &#039;&#039;, $after = &#039;&#039;, $show_pass_post = false, $duration=&#039;&#039;) {global $wpdb;$request = &quot;SELECT ID, post_title, COUNT($wpdb-&gt;comments.comment_post_ID) AS &#039;comment_count&#039; FROM $wpdb-&gt;posts, $wpdb-&gt;comments&quot;;$request .= &quot; WHERE comment_approved = &#039;1&#039; AND $wpdb-&gt;posts.ID=$wpdb-&gt;comments.comment_post_ID AND post_status = &#039;publish&#039;&quot;;if(!$show_pass_post) $request .= &quot; AND post_password =&#039;&#039;&quot;;if($duration !=&quot;&quot;) { $request .= &quot; AND DATE_SUB(CURDATE(),INTERVAL &quot;.$duration.&quot; DAY) comments.comment_post_ID ORDER BY comment_count DESC LIMIT $no_posts&quot;;$posts = $wpdb-&gt;get_results($request);$output = &#039;&#039;;if ($posts) {foreach ($posts as $post) {$post_title = stripslashes($post-&gt;post_title);$comment_count = $post-&gt;comment_count;$permalink = get_permalink($post-&gt;ID);$output .= $before . &#039; &lt;a href=&quot;&#039; . $permalink . &#039;&quot; title=&quot;&#039; . $post_title.&#039;&quot; rel=&quot;nofollow&quot;&gt;&#039; . $post_title . &#039;&lt;/a&gt; &#039; . $after;}} else {$output .= $before . &quot;N�o Encontrado&quot; . $after;}echo $output;} 	?&gt;</description>
		<content:encoded><![CDATA[<p>Prezados Senhores:<br />
Em functions.php, depois ou antes de qual frase devo incluir esse código?<br />
Os dados já incluídos no meu arquvio function.php e que aguardo um breve retorno de você, por favor, é o seguinte:<br />
 &#8221;, &#8216;after_widget&#8217; =&gt; &#8221;,	&#8216;before_title&#8217; =&gt; &#8221;, &#8216;after_title&#8217; =&gt; &#8221;, ));	function popular_posts($no_posts = 6, $before = &#8221;, $after = &#8221;, $show_pass_post = false, $duration=&#8221;) {global $wpdb;$request = &#8220;SELECT ID, post_title, COUNT($wpdb-&gt;comments.comment_post_ID) AS &#8216;comment_count&#8217; FROM $wpdb-&gt;posts, $wpdb-&gt;comments&#8221;;$request .= &#8221; WHERE comment_approved = &#8217;1&#8242; AND $wpdb-&gt;posts.ID=$wpdb-&gt;comments.comment_post_ID AND post_status = &#8216;publish&#8217;&#8221;;if(!$show_pass_post) $request .= &#8221; AND post_password =&#8221;&#8221;;if($duration !=&#8221;") { $request .= &#8221; AND DATE_SUB(CURDATE(),INTERVAL &#8220;.$duration.&#8221; DAY) comments.comment_post_ID ORDER BY comment_count DESC LIMIT $no_posts&#8221;;$posts = $wpdb-&gt;get_results($request);$output = &#8221;;if ($posts) {foreach ($posts as $post) {$post_title = stripslashes($post-&gt;post_title);$comment_count = $post-&gt;comment_count;$permalink = get_permalink($post-&gt;ID);$output .= $before . &#8216; <a href="' . $permalink . '" title="' . $post_title.'" rel="nofollow">&#8216; . $post_title . &#8216;</a> &#8216; . $after;}} else {$output .= $before . &#8220;N�o Encontrado&#8221; . $after;}echo $output;} 	?&gt;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Thumbnail sem custom fields no wordpress - Difluir</title>
		<link>http://marcelomesquita.com/the_thumb/#comment-601</link>
		<dc:creator>Thumbnail sem custom fields no wordpress - Difluir</dc:creator>
		<pubDate>Thu, 20 May 2010 19:37:05 +0000</pubDate>
		<guid isPermaLink="false">http://www.marcelomesquita.com/?p=141#comment-601</guid>
		<description>[...] vi esse código no blog do Marcelo Mesquita e só adicionei no final do código o else pra mostrar uma imagem caso o post não tenha nenhuma.   [...] </description>
		<content:encoded><![CDATA[<p>[...] vi esse código no blog do Marcelo Mesquita e só adicionei no final do código o else pra mostrar uma imagem caso o post não tenha nenhuma.   [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Thumbnail sem custom fields e plugins - Tutorials - Sinopse</title>
		<link>http://marcelomesquita.com/the_thumb/#comment-600</link>
		<dc:creator>Thumbnail sem custom fields e plugins - Tutorials - Sinopse</dc:creator>
		<pubDate>Mon, 08 Feb 2010 20:03:49 +0000</pubDate>
		<guid isPermaLink="false">http://www.marcelomesquita.com/?p=141#comment-600</guid>
		<description>[...] vi esse código no blog do Marcelo Mesquita e só adicionei no final do código o else pra mostrar uma imagem caso o post não tenha nenhuma.   [...] </description>
		<content:encoded><![CDATA[<p>[...] vi esse código no blog do Marcelo Mesquita e só adicionei no final do código o else pra mostrar uma imagem caso o post não tenha nenhuma.   [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Marcelo Mesquita</title>
		<link>http://marcelomesquita.com/the_thumb/#comment-599</link>
		<dc:creator>Marcelo Mesquita</dc:creator>
		<pubDate>Mon, 08 Feb 2010 15:22:46 +0000</pubDate>
		<guid isPermaLink="false">http://www.marcelomesquita.com/?p=141#comment-599</guid>
		<description>Denny,
  a partir da versão 2.9 o WordPress adicionou o suporte aos thumbs. Tem um &lt;a href=&quot;http://imasters.uol.com.br/artigo/15597&quot; rel=&quot;nofollow&quot;&gt;artigo do Leandro Vieira&lt;/a&gt; explicando com utilizar esse novo recurso que atende a sua necessidade de utilizar a imagem independente do post.

 Abraço.</description>
		<content:encoded><![CDATA[<p>Denny,<br />
  a partir da versão 2.9 o WordPress adicionou o suporte aos thumbs. Tem um <a  href="http://imasters.uol.com.br/artigo/15597" rel="nofollow">artigo do Leandro Vieira</a> explicando com utilizar esse novo recurso que atende a sua necessidade de utilizar a imagem independente do post.</p>
<p> Abraço.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Denny</title>
		<link>http://marcelomesquita.com/the_thumb/#comment-598</link>
		<dc:creator>Denny</dc:creator>
		<pubDate>Sat, 06 Feb 2010 00:31:27 +0000</pubDate>
		<guid isPermaLink="false">http://www.marcelomesquita.com/?p=141#comment-598</guid>
		<description>Boa noite, estou com um problema pareciso, que é: quando uma imagem está já em outro post, não consigo aproveitar a mesma para um outro post, tenho que carregar a mesma imagem novamente ou outra, e acontece que isso vai duplicando imagens na biblioteca, tenho 10 15 cópias de uma mesma imagem.. tem alguma solução pra isso</description>
		<content:encoded><![CDATA[<p>Boa noite, estou com um problema pareciso, que é: quando uma imagem está já em outro post, não consigo aproveitar a mesma para um outro post, tenho que carregar a mesma imagem novamente ou outra, e acontece que isso vai duplicando imagens na biblioteca, tenho 10 15 cópias de uma mesma imagem.. tem alguma solução pra isso</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Flavio Henrique</title>
		<link>http://marcelomesquita.com/the_thumb/#comment-597</link>
		<dc:creator>Flavio Henrique</dc:creator>
		<pubDate>Sun, 10 Jan 2010 17:11:26 +0000</pubDate>
		<guid isPermaLink="false">http://www.marcelomesquita.com/?p=141#comment-597</guid>
		<description>Para quem teve problemas na versão 2.7 do Wordpress, segue uma pequena alteração:

WHERE ID = ($post-&gt;ID - 1)

O que ocorre que nesta versão o campo &quot;post_parent&quot; fica com valor 0, assim não retornando nenhuma resultado.

A alteração é buscar o ID do post -1, que é o ID correspondente ao anexo da imagem. Ex, o ID do seu post é o 21, ele irá buscar pelo ID 20 que correspondem a imagem. Segue código completo:

function the_thumb($size = &quot;medium&quot;, $add = &quot;&quot;)
{
  global $wpdb, $post;

  $thumb = $wpdb-&gt;get_row(&quot;SELECT ID, post_title FROM {$wpdb-&gt;posts} WHERE ID = ({$post-&gt;ID} - 1) AND post_mime_type LIKE &#039;image%&#039; ORDER BY menu_order&quot;);

  if(!empty($thumb))
  {
    $image = image_downsize($thumb-&gt;ID, $size);

    print &quot;post_title}&#039; {$add} /&gt;&quot;;
  }
}</description>
		<content:encoded><![CDATA[<p>Para quem teve problemas na versão 2.7 do WordPress, segue uma pequena alteração:</p>
<p>WHERE ID = ($post-&gt;ID &#8211; 1)</p>
<p>O que ocorre que nesta versão o campo &#8220;post_parent&#8221; fica com valor 0, assim não retornando nenhuma resultado.</p>
<p>A alteração é buscar o ID do post -1, que é o ID correspondente ao anexo da imagem. Ex, o ID do seu post é o 21, ele irá buscar pelo ID 20 que correspondem a imagem. Segue código completo:</p>
<p>function the_thumb($size = &#8220;medium&#8221;, $add = &#8220;&#8221;)<br />
{<br />
  global $wpdb, $post;</p>
<p>  $thumb = $wpdb-&gt;get_row(&#8220;SELECT ID, post_title FROM {$wpdb-&gt;posts} WHERE ID = ({$post-&gt;ID} &#8211; 1) AND post_mime_type LIKE &#8216;image%&#8217; ORDER BY menu_order&#8221;);</p>
<p>  if(!empty($thumb))<br />
  {<br />
    $image = image_downsize($thumb-&gt;ID, $size);</p>
<p>    print &#8220;post_title}&#8217; {$add} /&gt;&#8221;;<br />
  }<br />
}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Marcelo Mesquita</title>
		<link>http://marcelomesquita.com/the_thumb/#comment-595</link>
		<dc:creator>Marcelo Mesquita</dc:creator>
		<pubDate>Mon, 30 Nov 2009 03:54:06 +0000</pubDate>
		<guid isPermaLink="false">http://www.marcelomesquita.com/?p=141#comment-595</guid>
		<description>Hi Drew,
to use the big size image, use &#039;high&#039; as the first parameter of the function. Example:
the_thumb(&#039;high&#039;);

Regards.</description>
		<content:encoded><![CDATA[<p>Hi Drew,<br />
to use the big size image, use &#8216;high&#8217; as the first parameter of the function. Example:<br />
the_thumb(&#8216;high&#8217;);</p>
<p>Regards.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Drew</title>
		<link>http://marcelomesquita.com/the_thumb/#comment-594</link>
		<dc:creator>Drew</dc:creator>
		<pubDate>Sun, 29 Nov 2009 22:36:44 +0000</pubDate>
		<guid isPermaLink="false">http://www.marcelomesquita.com/?p=141#comment-594</guid>
		<description>Hey Marcelo,
Great function. Is there a way to get it to return the full size image rather than the thumbnail? Thanks!</description>
		<content:encoded><![CDATA[<p>Hey Marcelo,<br />
Great function. Is there a way to get it to return the full size image rather than the thumbnail? Thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Denis Forigo</title>
		<link>http://marcelomesquita.com/the_thumb/#comment-593</link>
		<dc:creator>Denis Forigo</dc:creator>
		<pubDate>Tue, 17 Nov 2009 15:33:53 +0000</pubDate>
		<guid isPermaLink="false">http://www.marcelomesquita.com/?p=141#comment-593</guid>
		<description>Oi Marcelo!

estou tentando adicionar essa função ao thematic, através dos &quot;theme filters&quot; dele, mas sem sucesso... tem alguma idéia de como fazer isso? Conhece o Thematic?

abraços,</description>
		<content:encoded><![CDATA[<p>Oi Marcelo!</p>
<p>estou tentando adicionar essa função ao thematic, através dos &#8220;theme filters&#8221; dele, mas sem sucesso&#8230; tem alguma idéia de como fazer isso? Conhece o Thematic?</p>
<p>abraços,</p>
]]></content:encoded>
	</item>
</channel>
</rss>

