<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Dev Team Assemble &#187; moss 2007</title>
	<atom:link href="http://www.calvinirwin.net/tag/moss-2007/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.calvinirwin.net</link>
	<description>Evil beware!</description>
	<lastBuildDate>Wed, 28 Jul 2010 12:55:01 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Site Collection Images and ImageFieldValue</title>
		<link>http://www.calvinirwin.net/2009/11/26/site-collection-images-and-imagefieldvalue/</link>
		<comments>http://www.calvinirwin.net/2009/11/26/site-collection-images-and-imagefieldvalue/#comments</comments>
		<pubDate>Fri, 27 Nov 2009 03:33:46 +0000</pubDate>
		<dc:creator>Calvin</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[SharePoint 2007]]></category>
		<category><![CDATA[moss 2007]]></category>
		<category><![CDATA[SharePoint]]></category>

		<guid isPermaLink="false">http://www.calvinirwin.net/?p=237</guid>
		<description><![CDATA[One of the things I was working on today was trying to get an actual image from the library was that initially I was expecting to get a PublishingImage.  All the samples on MSDN and the ones strewn about the web refer to using the ImageFieldValue and getting it from a field in the SPListItem.  [...]]]></description>
			<content:encoded><![CDATA[<p>One of the things I was working on today was trying to get an actual image from the library was that initially I was expecting to get a PublishingImage.  All the samples on MSDN and the ones strewn about the web refer to using the ImageFieldValue and getting it from a field in the SPListItem.  Like outlined on <a href="http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.publishing.fields.imagefieldvalue.aspx">MSDN </a>:</p>
<pre class="csharp">  <span style="color: #008080; font-style: italic;">// Retrieve the current value from an SPListItem with a</span>
  <span style="color: #008080; font-style: italic;">// column of the ImageField type with the name imageFieldName</span>
  ImageFieldValue currentFieldValue =
        listItemWithImageField<span style="color: #000000;">&#91;</span>imageFieldName<span style="color: #000000;">&#93;</span> <span style="color: #0600FF;">as</span> ImageFieldValue;</pre>
<p>The problem is this only works for images that are in a list, like the PublishingRollupImage of a page that links to an image in the Site Collection Images library.  The actual images in the library are stored as documents (Referenced using SPFile) so in order utilize them I need to extract the information out and create an image tag for it...like so:</p>
<pre class="csharp">&nbsp;
     ImageFieldValue imageValue = <a href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color: #008000;">new</span></a> ImageFieldValue<span style="color: #000000;">&#40;</span>
          <span style="color: #FF0000;">string</span>.<span style="color: #0000FF;">Format</span><span style="color: #000000;">&#40;</span><span style="color: #808080;">&quot;&lt;img src=<span style="color: #008080; font-weight: bold;">\&quot;</span>{0}<span style="color: #008080; font-weight: bold;">\&quot;</span> alt=<span style="color: #008080; font-weight: bold;">\&quot;</span>{1}<span style="color: #008080; font-weight: bold;">\&quot;</span> /&gt;&quot;</span>,
          file.<span style="color: #0000FF;">Url</span>, file.<span style="color: #0000FF;">Title</span> == <span style="color: #0600FF;">null</span> ? <span style="color: #FF0000;">string</span>.<span style="color: #0000FF;">Empty</span> : file.<span style="color: #0000FF;">Title</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>;
&nbsp;</pre>
<p>Now that I had the ImageFieldValue it was easy to work with.  I could manipulate many aspects of the image using this object and then save it for rendering using ToString().  Funny thing is for my purposes (ImageGallery xml generation) I didn't even end up needing this code after all...frustrating but a good learning experience.  </p>
<p>Props to <a href="http://vlifeblog.com">Phanat Chan</a> as he did the initial development on this.</p>

<!-- start wp-tags-to-technorati 1.01 -->

<p class='technorati-tags'>Technorati Tags: <a class='technorati-link' href='http://technorati.com/tag/Development' rel='tag' target='_self'>Development</a>, <a class='technorati-link' href='http://technorati.com/tag/moss+2007' rel='tag' target='_self'>moss 2007</a>, <a class='technorati-link' href='http://technorati.com/tag/SharePoint' rel='tag' target='_self'>SharePoint</a></p>

<!-- end wp-tags-to-technorati -->
]]></content:encoded>
			<wfw:commentRss>http://www.calvinirwin.net/2009/11/26/site-collection-images-and-imagefieldvalue/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Variations Failed: An error was encountered performing this operation. You may re-try the operation&#8230;</title>
		<link>http://www.calvinirwin.net/2009/10/30/variations-failed-an-error-was-encountered-performing-this-operation-you-may-re-try-the-operation/</link>
		<comments>http://www.calvinirwin.net/2009/10/30/variations-failed-an-error-was-encountered-performing-this-operation-you-may-re-try-the-operation/#comments</comments>
		<pubDate>Fri, 30 Oct 2009 20:16:27 +0000</pubDate>
		<dc:creator>Calvin</dc:creator>
				<category><![CDATA[Configuration]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[SharePoint 2007]]></category>
		<category><![CDATA[error]]></category>
		<category><![CDATA[moss 2007]]></category>
		<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[variations]]></category>

		<guid isPermaLink="false">http://www.calvinirwin.net/?p=225</guid>
		<description><![CDATA[So I got this error the other day when putting together a dev site collection usign varations:
An error was encountered performing this operation. You may re-try the operation, and you may need to clean up the half-created data first before re-trying. If the problem persists, please contact your system administrator
This was actually a fairly easy [...]]]></description>
			<content:encoded><![CDATA[<p>So I got this error the other day when putting together a dev site collection usign varations:</p>
<p><em>An error was encountered performing this operation. You may re-try the operation, and you may need to clean up the half-created data first before re-trying. If the problem persists, please contact your system administrator</em></p>
<p>This was actually a fairly easy fix for me.  I simply had to enable the publishing features in my site.  Which is funny...because they should have been on but I must have overlooked that.  <img src='http://www.calvinirwin.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>

<!-- start wp-tags-to-technorati 1.01 -->

<p class='technorati-tags'>Technorati Tags: <a class='technorati-link' href='http://technorati.com/tag/Configuration' rel='tag' target='_self'>Configuration</a>, <a class='technorati-link' href='http://technorati.com/tag/error' rel='tag' target='_self'>error</a>, <a class='technorati-link' href='http://technorati.com/tag/moss+2007' rel='tag' target='_self'>moss 2007</a>, <a class='technorati-link' href='http://technorati.com/tag/SharePoint' rel='tag' target='_self'>SharePoint</a>, <a class='technorati-link' href='http://technorati.com/tag/variations' rel='tag' target='_self'>variations</a></p>

<!-- end wp-tags-to-technorati -->
]]></content:encoded>
			<wfw:commentRss>http://www.calvinirwin.net/2009/10/30/variations-failed-an-error-was-encountered-performing-this-operation-you-may-re-try-the-operation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
