<?xml version="1.0"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title>Forum posts to 'Archive'</title>
		<link>http://www.silverstripe.org/archive/rss</link>
		<atom:link href="http://www.silverstripe.org/archive/rss" rel="self" type="application/rss+xml" />
		<description></description>

		
		<item>
			<title>Re: gd image resize?</title>
			<link>http://www.silverstripe.org/archive/show/71245?start=0#post158867</link>
			<description>&lt;p&gt;Thank you very much Danger. Now it works fine.&lt;br /&gt;so long BerT&lt;/p&gt;&lt;br&gt;&lt;br&gt;Posted to: gd image resize? &lt;a href=&quot;http://www.silverstripe.org/archive/show/71245?start=0#post158867&quot;&gt;Show Thread&lt;/a&gt; | &lt;a href=&quot;http://www.silverstripe.org/archive/reply/71245?start=0#post158867&quot;&gt;Post Reply&lt;/a&gt;</description>
			<pubDate>Tue, 02 Sep 2008 05:05:16 +1200</pubDate>
			<dc:creator>KingBerT</dc:creator>
			<guid>http://www.silverstripe.org/archive/show/71245?start=0#post158867</guid>
		</item>
		
		<item>
			<title>Re: gd image resize?</title>
			<link>http://www.silverstripe.org/archive/show/71245?start=0#post100167</link>
			<description>&lt;p&gt;Something I learnt the other day is that the field you create in the $has_one array has to use the extended image class. For you, you need to change &quot;Image&quot; to &quot;Page_BannerImage&quot;.&lt;/p&gt;&lt;p&gt;Cheers,&lt;br /&gt;Chris&lt;/p&gt;&lt;br&gt;&lt;br&gt;Posted to: gd image resize? &lt;a href=&quot;http://www.silverstripe.org/archive/show/71245?start=0#post100167&quot;&gt;Show Thread&lt;/a&gt; | &lt;a href=&quot;http://www.silverstripe.org/archive/reply/71245?start=0#post100167&quot;&gt;Post Reply&lt;/a&gt;</description>
			<pubDate>Tue, 17 Jun 2008 09:52:33 +1200</pubDate>
			<dc:creator>Danger</dc:creator>
			<guid>http://www.silverstripe.org/archive/show/71245?start=0#post100167</guid>
		</item>
		
		<item>
			<title>Re: gd image resize?</title>
			<link>http://www.silverstripe.org/archive/show/71245?start=0#post72131</link>
			<description>&lt;p&gt;hi willr&lt;/p&gt;&lt;p&gt;thanks for your reply. it does seem that the database record isn't getting created. i tried adding a field to the $has_one array called PageBanner, but it doesn't auto associate the ID. this has been moved to a low priority as i've fallen back on the setWidth() method which is functioning fine for now.&lt;/p&gt;&lt;p&gt;i would in the future like to understand more about extending the image class. so if anyone has experience with it, i'd appreciate any pointers.&lt;/p&gt;&lt;p&gt;cheers&lt;/p&gt;&lt;br&gt;&lt;br&gt;Posted to: gd image resize? &lt;a href=&quot;http://www.silverstripe.org/archive/show/71245?start=0#post72131&quot;&gt;Show Thread&lt;/a&gt; | &lt;a href=&quot;http://www.silverstripe.org/archive/reply/71245?start=0#post72131&quot;&gt;Post Reply&lt;/a&gt;</description>
			<pubDate>Thu, 15 May 2008 12:53:38 +1200</pubDate>
			<dc:creator>dashiel</dc:creator>
			<guid>http://www.silverstripe.org/archive/show/71245?start=0#post72131</guid>
		</item>
		
		<item>
			<title>Re: gd image resize?</title>
			<link>http://www.silverstripe.org/archive/show/71245?start=0#post71325</link>
			<description>&lt;p&gt;I think it might be failing on $BannerImage.PageBanner.URL. I dont know if it supports this or not. Try&lt;/p&gt;&lt;p&gt;&amp;lt;% control BannerImage %&amp;gt;&lt;br /&gt;$PageBanner.URL&lt;br /&gt;&amp;lt;% end_control %&amp;gt;&lt;/p&gt;&lt;p&gt;Also make sure the image is actually saving in the DB. Check BannerImageID exists in the Page table. then take that ID and look on the File table to make sure theres a file with that ID&lt;/p&gt;&lt;br&gt;&lt;br&gt;Posted to: gd image resize? &lt;a href=&quot;http://www.silverstripe.org/archive/show/71245?start=0#post71325&quot;&gt;Show Thread&lt;/a&gt; | &lt;a href=&quot;http://www.silverstripe.org/archive/reply/71245?start=0#post71325&quot;&gt;Post Reply&lt;/a&gt;</description>
			<pubDate>Wed, 14 May 2008 23:29:14 +1200</pubDate>
			<dc:creator>willr</dc:creator>
			<guid>http://www.silverstripe.org/archive/show/71245?start=0#post71325</guid>
		</item>
		
		<item>
			<title>gd image resize?</title>
			<link>http://www.silverstripe.org/archive/show/71245#post71245</link>
			<description>&lt;p&gt;hi&lt;/p&gt;&lt;p&gt;i went through &lt;a href=&quot;http://doc.silverstripe.com/doku.php?id=imageupload&amp;amp;s=image&quot;&gt;this tutorial&lt;/a&gt; covering image resizing. i initially tried modifying it to work within a dataObject, but when that failed i went back and copied it word for word to no avail.&lt;/p&gt;&lt;p&gt;from what i can gather it seems the BannerImage isn't getting created at all. at least when i look in the assets folder i can other resampled images, CMSThumbnail and a few SetWidth/ResizedImage versions too.&lt;/p&gt;&lt;p&gt;i'm guessing it's something really small, and really dumb that i've overlooked.&lt;/p&gt;&lt;p&gt;&lt;div class=&quot;codesnippet&quot;&gt;&lt;p&gt;class Page extends SiteTree {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;static $db = array(&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;'featuredTitle' =&amp;gt; 'Text'&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;static $has_one = array(&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;'BannerImage' =&amp;gt; 'Image'&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;function getCMSFields() {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$fields = parent::getCMSFields();&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$fields-&amp;gt;addFieldToTab('Root.Content.Main', new TextField('featuredTitle','Headline'));&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$fields-&amp;gt;addFieldToTab('Root.Content.MyBannerImage', new ImageField('BannerImage','Featured Image'));&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;return $fields;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;br /&gt;}&lt;/p&gt;&lt;p&gt;class Page_Controller extends ContentController {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;function init() {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;parent::init();&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;br /&gt;}&lt;/p&gt;&lt;p&gt;class Page_BannerImage extends Image {&lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;function generatePageBanner($gd) {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$gd-&amp;gt;setQuality(100);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;return $gd-&amp;gt;paddedResize(619,154);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/p&gt;&lt;p&gt;}&lt;/p&gt;&lt;/div&gt;&lt;/p&gt;&lt;p&gt;in page.ss i have&lt;/p&gt;&lt;p&gt;&lt;div class=&quot;codesnippet&quot;&gt;&lt;p&gt;&amp;lt;% if BannerImage.PageBanner %&amp;gt;&lt;br /&gt; &amp;lt;img class=&quot;headerImage&quot; src=&quot;$BannerImage.PageBanner.URL&quot; alt=&quot;Header banner&quot; /&amp;gt;&lt;br /&gt;&amp;lt;% else %&amp;gt;&lt;br /&gt; &amp;lt;% control Page(home) %&amp;gt;&lt;br /&gt;  &amp;lt;img class=&quot;headerImage&quot; src=&quot;$BannerImage.PageBanner.URL&quot; alt=&quot;Header banner&quot; /&amp;gt;&lt;br /&gt; &amp;lt;% end_control %&amp;gt;&lt;br /&gt;&amp;lt;% end_if %&amp;gt;&lt;/p&gt;&lt;/div&gt;&lt;/p&gt;&lt;p&gt;thanks in advance&lt;/p&gt;&lt;br&gt;&lt;br&gt;Posted to: gd image resize? &lt;a href=&quot;http://www.silverstripe.org/archive/show/71245#post71245&quot;&gt;Show Thread&lt;/a&gt; | &lt;a href=&quot;http://www.silverstripe.org/archive/show/71245#post71245&quot;&gt;Post Reply&lt;/a&gt;</description>
			<pubDate>Wed, 14 May 2008 19:06:16 +1200</pubDate>
			<dc:creator>dashiel</dc:creator>
			<guid>http://www.silverstripe.org/archive/show/71245#post71245</guid>
		</item>
		

	</channel>
</rss>