<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="bbPress/1.0.2" -->
<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">
	<channel>
		<title>Support Forum - Topic: Custom fields for thumbnails</title>
		<link>http://www.kriesi.at/support/topic/custom-fields-for-thumbnails</link>
		<description>Support Forum - Topic: Custom fields for thumbnails</description>
		<language>en-US</language>
		<pubDate>Tue, 21 May 2013 12:11:27 +0000</pubDate>
		<generator>http://bbpress.org/?v=1.0.2</generator>
		<textInput>
			<title><![CDATA[Search]]></title>
			<description><![CDATA[Search all topics from these forums.]]></description>
			<name>q</name>
			<link>http://www.kriesi.at/support/search.php</link>
		</textInput>
		<atom:link href="http://www.kriesi.at/support/rss/topic/custom-fields-for-thumbnails" rel="self" type="application/rss+xml" />

		<item>
			<title>Dude on "Custom fields for thumbnails"</title>
			<link>http://www.kriesi.at/support/topic/custom-fields-for-thumbnails#post-24814</link>
			<pubDate>Sun, 14 Aug 2011 07:11:00 +0000</pubDate>
			<dc:creator>Dude</dc:creator>
			<guid isPermaLink="false">24814@http://www.kriesi.at/support/</guid>
			<description>&#60;p&#62;Glad that you found the solution :)
&#60;/p&#62;</description>
		</item>
		<item>
			<title>owlconcept on "Custom fields for thumbnails"</title>
			<link>http://www.kriesi.at/support/topic/custom-fields-for-thumbnails#post-24804</link>
			<pubDate>Sat, 13 Aug 2011 19:42:53 +0000</pubDate>
			<dc:creator>owlconcept</dc:creator>
			<guid isPermaLink="false">24804@http://www.kriesi.at/support/</guid>
			<description>&#60;p&#62;topic resolved ;)
&#60;/p&#62;</description>
		</item>
		<item>
			<title>owlconcept on "Custom fields for thumbnails"</title>
			<link>http://www.kriesi.at/support/topic/custom-fields-for-thumbnails#post-24803</link>
			<pubDate>Sat, 13 Aug 2011 19:42:08 +0000</pubDate>
			<dc:creator>owlconcept</dc:creator>
			<guid isPermaLink="false">24803@http://www.kriesi.at/support/</guid>
			<description>&#60;p&#62;And got the last part :D&#60;/p&#62;
&#60;p&#62;All i did was to comment this portion of code from the single.php file and bingo. Now the theme is fully working for me and my old site .. hehe&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;$preview_image = kriesi_post_thumb($post-&#38;gt;ID, array(&#38;#39;size&#38;#39;=&#38;gt; array(&#38;#39;M&#38;#39;),
	&#38;#39;display_link&#38;#39; =&#38;gt; array(&#38;#39;lightbox&#38;#39;), 	// &#38;#39;_prev_image_link&#38;#39; or array(&#38;#39;lightbox&#38;#39;)
	&#38;#39;linkurl&#38;#39; =&#38;gt; array (&#38;#39;fullscreen&#38;#39;,&#38;#39;_preview_big&#38;#39;),
	&#38;#39;wh&#38;#39; =&#38;gt; $k_option[&#38;#39;custom&#38;#39;][&#38;#39;imgSize&#38;#39;][&#38;#39;M&#38;#39;]
));&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;Thanks for your help ;)
&#60;/p&#62;</description>
		</item>
		<item>
			<title>owlconcept on "Custom fields for thumbnails"</title>
			<link>http://www.kriesi.at/support/topic/custom-fields-for-thumbnails#post-24801</link>
			<pubDate>Sat, 13 Aug 2011 19:29:22 +0000</pubDate>
			<dc:creator>owlconcept</dc:creator>
			<guid isPermaLink="false">24801@http://www.kriesi.at/support/</guid>
			<description>&#60;p&#62;Hey. Me again.&#60;/p&#62;
&#60;p&#62;I was able to solve the link problem :)&#60;/p&#62;
&#60;p&#62;at very bottom of the file, i switched this code:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;$defaultimage = $linkwrap[0].&#38;quot;&#38;lt;img src=&#38;#39;&#38;quot;.$image_URL.&#38;quot;&#38;#39; alt=&#38;#39;&#38;#39; title=&#38;#39;&#38;quot;.get_the_title().&#38;quot;&#38;#39; /&#38;gt;&#38;quot;.$linkwrap[1];
return $defaultimage;&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;For this code:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;if (!isset($option[&#38;#39;size&#38;#39;][1]))
{
	$linkwrap[0] = &#38;#39;&#38;lt;a href=&#38;quot;&#38;#39;.get_permalink().&#38;#39;&#38;quot; title=&#38;quot;&#38;#39;.get_the_title().&#38;#39;&#38;quot;&#38;gt;&#38;#39;;
	$linkwrap[1] = &#38;#39;&#38;lt;/a&#38;gt;&#38;#39;;
        }

$defaultimage = $linkwrap[0].&#38;quot;&#38;lt;img src=&#38;#39;&#38;quot;.$image_URL.&#38;quot;&#38;#39; alt=&#38;#39;&#38;#39; title=&#38;#39;&#38;quot;.get_the_title().&#38;quot;&#38;#39; /&#38;gt;&#38;quot;.$linkwrap[1];
return $defaultimage;&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;Now i only need to figure out the square at the top of the posts :)&#60;br /&#62;
See this screeshot: &#60;a href=&#34;http://awesomescreenshot.com/0edijwf20&#34; rel=&#34;nofollow&#34;&#62;http://awesomescreenshot.com/0edijwf20&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;Almost there ... lol
&#60;/p&#62;</description>
		</item>
		<item>
			<title>owlconcept on "Custom fields for thumbnails"</title>
			<link>http://www.kriesi.at/support/topic/custom-fields-for-thumbnails#post-24799</link>
			<pubDate>Sat, 13 Aug 2011 18:58:25 +0000</pubDate>
			<dc:creator>owlconcept</dc:creator>
			<guid isPermaLink="false">24799@http://www.kriesi.at/support/</guid>
			<description>&#60;p&#62;Ups. I Just remembered, maintenance mode is on.&#60;br /&#62;
Can i send the login credentials to your email?
&#60;/p&#62;</description>
		</item>
		<item>
			<title>owlconcept on "Custom fields for thumbnails"</title>
			<link>http://www.kriesi.at/support/topic/custom-fields-for-thumbnails#post-24798</link>
			<pubDate>Sat, 13 Aug 2011 18:52:58 +0000</pubDate>
			<dc:creator>owlconcept</dc:creator>
			<guid isPermaLink="false">24798@http://www.kriesi.at/support/</guid>
			<description>&#60;p&#62;Sure. Here you go:&#60;br /&#62;
&#60;a href=&#34;http://joiasdavida.com/&#34; rel=&#34;nofollow&#34;&#62;http://joiasdavida.com/&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;;)
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Dude on "Custom fields for thumbnails"</title>
			<link>http://www.kriesi.at/support/topic/custom-fields-for-thumbnails#post-24796</link>
			<pubDate>Sat, 13 Aug 2011 18:15:34 +0000</pubDate>
			<dc:creator>Dude</dc:creator>
			<guid isPermaLink="false">24796@http://www.kriesi.at/support/</guid>
			<description>&#60;p&#62;Can you post a link to your website please - it helps me to investigate the issues.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>owlconcept on "Custom fields for thumbnails"</title>
			<link>http://www.kriesi.at/support/topic/custom-fields-for-thumbnails#post-24794</link>
			<pubDate>Sat, 13 Aug 2011 18:04:02 +0000</pubDate>
			<dc:creator>owlconcept</dc:creator>
			<guid isPermaLink="false">24794@http://www.kriesi.at/support/</guid>
			<description>&#60;p&#62;Thanks Dude !! :)&#60;/p&#62;
&#60;p&#62;Your suggestion does work. Images show up in the site But with some problems:&#60;/p&#62;
&#60;p&#62;- Timthumb doesn't work for images generated this way&#60;br /&#62;
- The images doesn't get a permalink to the post&#60;br /&#62;
- There are still a square at the very top of each post's single content&#60;/p&#62;
&#60;p&#62;I managed to figure out the first problem myself, by adding a small modification to your code. So i did it like this:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;if (isset($option[&#38;#39;size&#38;#39;][1]))
	{
		$image_customfield = get_post_meta($this_post, $option[&#38;#39;size&#38;#39;][1], true);
	}
if(empty($image_customfield) &#124;&#124; get_post_meta($this_post, &#38;#39;image&#38;#39;, true)){
	$image_url = get_post_meta($this_post, &#38;#39;image&#38;#39;, true);
	if($k_option[&#38;#39;custom&#38;#39;][&#38;#39;resizing&#38;#39;] )
	{
		$parameters .= &#38;#39;&#38;amp;zc=1&#38;#39;;
		if($option[&#38;#39;wh&#38;#39;][&#38;#39;height&#38;#39;] != &#38;#39;&#38;#39;) 	$parameters .= &#38;#39;&#38;amp;h=&#38;#39;.$option[&#38;#39;wh&#38;#39;][&#38;#39;height&#38;#39;] ;
				if($option[&#38;#39;wh&#38;#39;][&#38;#39;width&#38;#39;] != &#38;#39;&#38;#39;) 	$parameters .= &#38;#39;&#38;amp;w=&#38;#39;.$option[&#38;#39;wh&#38;#39;][&#38;#39;width&#38;#39;] ;
				//check if domain should be included in timthumb output
				if($option[&#38;#39;domain&#38;#39;] == false)
				{
					$uri_array = parse_url($image_src[0]);
					$image_src[0] = $uri_array[&#38;#39;path&#38;#39;];
					$image_customfield = $option[&#38;#39;script&#38;#39;].$image_url.$parameters;
				}
			}
}&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;Now timthumb works great, but i'm still facing the 2 other problems.&#60;br /&#62;
Any suggestion?&#60;/p&#62;
&#60;p&#62;Thanks for all your hard work dude. Really appreciate it. Your the Man!! :)
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Dude on "Custom fields for thumbnails"</title>
			<link>http://www.kriesi.at/support/topic/custom-fields-for-thumbnails#post-24785</link>
			<pubDate>Sat, 13 Aug 2011 17:20:28 +0000</pubDate>
			<dc:creator>Dude</dc:creator>
			<guid isPermaLink="false">24785@http://www.kriesi.at/support/</guid>
			<description>&#60;p&#62;Hey,&#60;br /&#62;
the easiest way is to replace following code in kriesi_post_thumb.php:&#60;br /&#62;
&#60;pre&#62;&#60;code&#62;if (isset($option[&#38;#39;size&#38;#39;][1]))
	{
		$image_customfield = get_post_meta($this_post, $option[&#38;#39;size&#38;#39;][1], true);
	}&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;with:&#60;br /&#62;
&#60;pre&#62;&#60;code&#62;if (isset($option[&#38;#39;size&#38;#39;][1]))
	{
		$image_customfield = get_post_meta($this_post, $option[&#38;#39;size&#38;#39;][1], true);
	}

	if(empty($image_customfield) &#124;&#124; get_post_meta($this_post, &#38;#39;custom_image&#38;#39;, true)){
		$image_customfield = get_post_meta($this_post, &#38;#39;custom_image&#38;#39;, true);
	}&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;and instead of &#34;custom_image&#34; use your own key :)
&#60;/p&#62;</description>
		</item>
		<item>
			<title>owlconcept on "Custom fields for thumbnails"</title>
			<link>http://www.kriesi.at/support/topic/custom-fields-for-thumbnails#post-24759</link>
			<pubDate>Sat, 13 Aug 2011 15:11:23 +0000</pubDate>
			<dc:creator>owlconcept</dc:creator>
			<guid isPermaLink="false">24759@http://www.kriesi.at/support/</guid>
			<description>&#60;p&#62;Hi.&#60;/p&#62;
&#60;p&#62;How can i modify the kriesi_post_thumb.php file to load images from a custom field instead of the wordpress featured image function?&#60;/p&#62;
&#60;p&#62;I need to do this because i have a very old website with hundreds of posts, built before wordpress launch of the featured image function, so all the &#34;featured images&#34; urls are stored on a custom field called &#34;image&#34;&#60;/p&#62;
&#60;p&#62;on my previous theme, i used to get the image url using this:&#60;br /&#62;
&#60;code&#62;get_post_meta($this_post, &#34;image&#34;, $single = true);&#60;/code&#62;&#60;/p&#62;
&#60;p&#62;So i tried using this code on your file kriesi_post_thumb.php:&#60;/p&#62;
&#60;p&#62;&#60;code&#62;&#60;br /&#62;
if(!has_post_thumbnail())&#60;br /&#62;
{&#60;br /&#62;
	$image_src[0] = get_post_meta($this_post, &#34;image&#34;, $single = true);&#60;br /&#62;
	$image_src2[0] = get_post_meta($this_post, &#34;image&#34;, $single = true);&#60;br /&#62;
}&#60;br /&#62;
else&#60;br /&#62;
{&#60;br /&#62;
	$image_src = wp_get_attachment_image_src($thumbnail_id, $option['size'][0]);&#60;br /&#62;
	$image_src2 = wp_get_attachment_image_src($thumbnail_id, NULL);&#60;br /&#62;
	}&#60;br /&#62;
&#60;/code&#62;&#60;/p&#62;
&#60;p&#62;But no success. The images do show up on the site, and the work perfectly on the homepage accordion slider. But on the post thumbnails they are not being resized by timthumb. Plus, an image square gets added to very top of each post content on single.php, which is awful :p&#60;/p&#62;
&#60;p&#62;Can you please help me out???&#60;/p&#62;
&#60;p&#62;Thanks in advance
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
