<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:copyright="http://blogs.law.harvard.edu/tech/rss" xmlns:image="http://purl.org/rss/1.0/modules/image/">
    <channel>
        <title>WSS 3.0</title>
        <link>http://www.vitendy.net/category/2.aspx</link>
        <description>Windows Sharepoint Services v 3.0 (Not MOSS)</description>
        <language>en-US</language>
        <copyright>Vitendy</copyright>
        <generator>Subtext Version 2.1.2.2</generator>
        <item>
            <title>Dealing with SPListItemVersion and his cousin SPFileVersion during SPFile or SPListItem copying</title>
            <link>http://www.vitendy.com/archive/2009/10/03/dealing-with-splistitemversion-and-his-cousin-spfileversion-during-spfile-or.aspx</link>
            <description>&lt;p&gt;Since I spent so many hours on this, I figured I'll post this to remember...&lt;/p&gt;
&lt;p&gt;&lt;font size="2"&gt;&lt;strong&gt;When copying SPFiles from one doc library to another, a few things to keep in mind:&lt;/strong&gt;&lt;/font&gt;&lt;/p&gt;
&lt;ul&gt;
    &lt;li&gt;&lt;font size="2"&gt;SPFileVersion will not let you get a reference to the SPFile (per MSDN) so &lt;strong&gt;don't &lt;/strong&gt;do this: SPWeb.GetFile(SPFileVersion.Url) because SPFile.Item will be null&lt;/font&gt;&lt;/li&gt;
    &lt;li&gt;&lt;font size="2"&gt;SPFileVersionCollection (SPFile.Versions) is not in sync with SPListItemVersionCollection. SPFile.Versions actually does NOT return the current version.  So, iterate through all SPFileVersions and use SPFile.Versions.GetVersionFromLabel(SPListItemVersion.VersionLabel)&lt;/font&gt;&lt;/li&gt;
    &lt;li&gt;&lt;font size="2"&gt;To keep the check in comments with each version, use the following method to add a file to the target library: SPList.RootFolder.Files.Add(url,bytes,true,&lt;strong&gt;SPFileVersion.CheckInComments,&lt;/strong&gt;false)&lt;/font&gt;&lt;/li&gt;
    &lt;li&gt;&lt;font size="2"&gt;Iterate through versions via a SortedDictionary by Created date property -- the goal is to use SPListItemVersion information to update the newly created SPFile meta data.&lt;/font&gt;&lt;/li&gt;
    &lt;li&gt;&lt;font size="2"&gt;SPFile.Item.Update() will create a new version; UpdateOverwriteVersion() will not; use the latter with SPFileVersions; use the former when adding a new SPListItem, to set values and incremenet versions.&lt;/font&gt;&lt;/li&gt;
    &lt;li&gt;&lt;font size="2"&gt;Upload the current version of SPFile outside the SPListItemVersions loop&lt;/font&gt;&lt;/li&gt;
    &lt;li&gt;&lt;font size="2"&gt;Be mindful that SPListItemVersion returns Modified and Created values as non-local time, so convert it.&lt;/font&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;font size="2"&gt;Consider disabling item events during copy.&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font size="2"&gt;A good reference:&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font size="2"&gt;&lt;font face="Arial"&gt;&lt;a href="http://www.k2distillery.com/2007/10/copy-version-history-with_5.html"&gt;http://www.k2distillery.com/2007/10/copy-version-history-with_5.html&lt;/a&gt;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font size="2" /&gt;&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;&lt;img src="http://www.vitendy.com/aggbug/27.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Vitendy</dc:creator>
            <guid>http://www.vitendy.com/archive/2009/10/03/dealing-with-splistitemversion-and-his-cousin-spfileversion-during-spfile-or.aspx</guid>
            <pubDate>Sat, 03 Oct 2009 15:23:07 GMT</pubDate>
            <wfw:comment>http://www.vitendy.com/comments/27.aspx</wfw:comment>
            <comments>http://www.vitendy.com/archive/2009/10/03/dealing-with-splistitemversion-and-his-cousin-spfileversion-during-spfile-or.aspx#feedback</comments>
            <wfw:commentRss>http://www.vitendy.com/comments/commentRss/27.aspx</wfw:commentRss>
        </item>
        <item>
            <title>SharePoint Timer Service and custom jobs</title>
            <link>http://www.vitendy.com/archive/2008/10/29/sharepoint-timer-service-and-custom-jobs.aspx</link>
            <description>&lt;p&gt;When deploying custom &lt;font face="Arial"&gt;&lt;strong&gt;SPOneTimeSchedule&lt;/strong&gt; &lt;/font&gt;job definitions sometimes the timer service (OWSTIMER.EXE) just sorta sits there. Your job definition is created, but isn't executed. It will most likely eventually run, but I have better things to do than sit around wait for it. Setting the time for the job in the past seems to move things along faster. &lt;/p&gt;
&lt;p&gt;&lt;font face="Arial"&gt;// Create new job&lt;br /&gt;
CustomJob MyJob = new CustomJob(Constants.JOB_NAME, webApp, properties.Definition.DisplayName);&lt;br /&gt;
MyJob.Title = Constants.JOB_TITLE;&lt;br /&gt;
&lt;/font&gt;&lt;font face="Arial"&gt;&lt;br /&gt;
// Set up the job to run once&lt;br /&gt;
&lt;font style="BACKGROUND-COLOR: #ffff00"&gt;MyJob.Schedule = new SPOneTimeSchedule(DateTime.Now.AddHours(-4));&lt;/font&gt;&lt;br /&gt;
MyJob.Update();&lt;br /&gt;
&lt;/font&gt;&lt;font face="Arial" /&gt;
&lt;/p&gt;&lt;p&gt;&lt;font face="Arial" /&gt;&lt;/p&gt;
&lt;img src="http://www.vitendy.com/aggbug/15.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Vitaly</dc:creator>
            <guid>http://www.vitendy.com/archive/2008/10/29/sharepoint-timer-service-and-custom-jobs.aspx</guid>
            <pubDate>Wed, 29 Oct 2008 16:17:57 GMT</pubDate>
            <wfw:comment>http://www.vitendy.com/comments/15.aspx</wfw:comment>
            <comments>http://www.vitendy.com/archive/2008/10/29/sharepoint-timer-service-and-custom-jobs.aspx#feedback</comments>
            <wfw:commentRss>http://www.vitendy.com/comments/commentRss/15.aspx</wfw:commentRss>
        </item>
        <item>
            <title>New Theme for WSS 3.0</title>
            <link>http://www.vitendy.com/archive/2008/01/25/new-theme-for-wss-3.0.aspx</link>
            <description>&lt;p&gt;Themes are a good way to visually differentiate and/or brand SharePoint sites.  Here is how to install a new theme.&lt;/p&gt;
&lt;p&gt;1. modify an existing theme&lt;/p&gt;
&lt;p&gt;2. add preview image to 12\TEMPLATE\IMAGES &lt;/p&gt;
&lt;p&gt;3. modify the SPTHEMES.XML file in 12\TEMPLATE\LAYOUTS\1033 folder.  &lt;/p&gt;
&lt;p&gt;4. IISRESET&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;References: &lt;/p&gt;
&lt;p&gt;&lt;font face="Arial" size="1"&gt;&lt;a href="http://msdn2.microsoft.com/en-us/library/aa979310.aspx"&gt;http://msdn2.microsoft.com/en-us/library/aa979310.aspx&lt;/a&gt;&lt;/font&gt;&lt;/p&gt;&lt;img src="http://www.vitendy.com/aggbug/6.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Vitaly</dc:creator>
            <guid>http://www.vitendy.com/archive/2008/01/25/new-theme-for-wss-3.0.aspx</guid>
            <pubDate>Fri, 25 Jan 2008 22:17:33 GMT</pubDate>
            <wfw:comment>http://www.vitendy.com/comments/6.aspx</wfw:comment>
            <comments>http://www.vitendy.com/archive/2008/01/25/new-theme-for-wss-3.0.aspx#feedback</comments>
            <wfw:commentRss>http://www.vitendy.com/comments/commentRss/6.aspx</wfw:commentRss>
        </item>
        <item>
            <title>DNN And SharePoint</title>
            <link>http://www.vitendy.com/archive/2008/01/02/post-wedding-dnn-and-sharepoint.aspx</link>
            <description>&lt;p&gt;About a year ago I've started to focus on two technologies to develop websites with. Dot Net Nuke and SharePoint. Both products are .Net based and Microsoft backed. At the end of this post are links to articles that do a good job comparing the two frameworks. Needless to say, as frameworks, these products vary greatly in the way you can accomplish your goals. Nevertheless, having the common thread of .Net makes them similiar in so many ways. &lt;/p&gt;
&lt;p&gt;I'm excited to continue to explore (and amazed at) some of the powerful tools that each product provides out of the box.  As a freelance developer I find myself constantly saving time (and building better websites) by discovering new modules for DNN (thanks to the dev. community) and the power behind lists in SharePoint.  &lt;/p&gt;
&lt;p&gt;The links:&lt;/p&gt;
&lt;p&gt;&lt;font face="Arial"&gt;&lt;a href="http://msdn.microsoft.com/msdnmag/issues/07/12/EndBracket/"&gt;http://msdn.microsoft.com/msdnmag/issues/07/12/EndBracket/&lt;/a&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face="Arial"&gt;&lt;a href="http://www.dotnetnuke.com/community/blogs/tabid/825/entryid/1653/default.aspx"&gt;http://www.dotnetnuke.com/community/blogs/tabid/825/entryid/1653/default.aspx&lt;/a&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;&lt;img src="http://www.vitendy.com/aggbug/1.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Vitaly</dc:creator>
            <guid>http://www.vitendy.com/archive/2008/01/02/post-wedding-dnn-and-sharepoint.aspx</guid>
            <pubDate>Wed, 02 Jan 2008 10:34:30 GMT</pubDate>
            <wfw:comment>http://www.vitendy.com/comments/1.aspx</wfw:comment>
            <comments>http://www.vitendy.com/archive/2008/01/02/post-wedding-dnn-and-sharepoint.aspx#feedback</comments>
            <slash:comments>1</slash:comments>
            <wfw:commentRss>http://www.vitendy.com/comments/commentRss/1.aspx</wfw:commentRss>
        </item>
    </channel>
</rss>