<?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>User Error &#187; Umbraco</title>
	<atom:link href="http://daniel.streefkerkonline.com/category/umbraco/feed/" rel="self" type="application/rss+xml" />
	<link>http://daniel.streefkerkonline.com</link>
	<description>Ramblings of a tinkering SysAdmin</description>
	<lastBuildDate>Fri, 03 Feb 2012 00:41:00 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Umbraco: Set ContinouslyUpdateXmlDiskCache value programatically</title>
		<link>http://daniel.streefkerkonline.com/umbraco-set-continouslyupdatexmldiskcache-value-programatically/</link>
		<comments>http://daniel.streefkerkonline.com/umbraco-set-continouslyupdatexmldiskcache-value-programatically/#comments</comments>
		<pubDate>Tue, 12 Oct 2010 04:11:37 +0000</pubDate>
		<dc:creator>Daniel</dc:creator>
				<category><![CDATA[Umbraco]]></category>

		<guid isPermaLink="false">http://daniel.streefkerkonline.com/umbraco-set-continouslyupdatexmldiskcache-value-programatically/</guid>
		<description><![CDATA[I’m working on a site that requires the synchronisation of around 1000 content nodes to MYOB product data daily. In my quest to speed up the process I saw a post by Richard Soetman, developer of the excellent CMSImport package, &#8230; <a href="http://daniel.streefkerkonline.com/umbraco-set-continouslyupdatexmldiskcache-value-programatically/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I’m working on a site that requires the synchronisation of around 1000 content nodes to MYOB product data daily. In my quest to speed up the process I saw a <a href="http://our.umbraco.org/forum/developers/api-questions/11321-advice-needed-with-performance-problems" target="_blank">post</a> by <a href="http://our.umbraco.org/member/2798" target="_blank">Richard Soetman</a>, developer of the excellent <a href="http://our.umbraco.org/projects/developer-tools/cmsimport" target="_blank">CMSImport</a> package, where he advises to turn off the “ContinouslyUpdateXmlDiskCache” setting in umbracoSettings.config when performing bulk import operations.</p>
<p>I couldn’t find any code on how to do this, and being the .NET newbie that I am, it took me a little while to figure out. Here’s how I did it:</p>
<p>
<div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:f32c3428-b7e9-4f15-a8ea-c502c7ff2e88:e2fc703e-a6fc-40a4-93f3-61abcca57fd9" class="wlWriterEditableSmartContent">
<pre class="brush: c#;">public static void SwitchContinuousUpdateOfXmlCacheState(bool newValue)
{
    if (UmbracoSettings.continouslyUpdateXmlDiskCache == newValue) return;

    var configFilePath = HttpContext.Current.Server.MapPath("~/config/umbracoSettings.config");

    if (File.Exists(configFilePath))
    {
        var umbracoConfig = new XmlDocument();
        umbracoConfig.Load(configFilePath);

        var key = umbracoConfig.SelectSingleNode("//ContinouslyUpdateXmlDiskCache");

        key.InnerText = newValue.ToString();

        umbracoConfig.Save(configFilePath);
    }
}</pre>
</div>
<p>This way, I can toggle this setting off before performing the import, and then back on again after calling umbraco.library.RefreshContent();</p>
<p>I’m hoping this is the right approach. Feel free to let me know if it isn’t.</p>
]]></content:encoded>
			<wfw:commentRss>http://daniel.streefkerkonline.com/umbraco-set-continouslyupdatexmldiskcache-value-programatically/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Umbraco Google Maps datatype, display with jQuery + GMaps API v3.0</title>
		<link>http://daniel.streefkerkonline.com/umbraco-google-maps-datatype-display-with-jquery-gmaps-api-v3-0/</link>
		<comments>http://daniel.streefkerkonline.com/umbraco-google-maps-datatype-display-with-jquery-gmaps-api-v3-0/#comments</comments>
		<pubDate>Sun, 10 Oct 2010 00:46:54 +0000</pubDate>
		<dc:creator>Daniel</dc:creator>
				<category><![CDATA[Umbraco]]></category>

		<guid isPermaLink="false">http://daniel.streefkerkonline.com/umbraco-google-maps-datatype-display-with-jquery-gmaps-api-v3-0/</guid>
		<description><![CDATA[Recently implemented the great Google Maps Datatype by Darren Ferguson in an Umbraco site. I first got the front-end map display working with v2 of the GMaps API and a third party jQuery addon, but I wasn’t happy with the &#8230; <a href="http://daniel.streefkerkonline.com/umbraco-google-maps-datatype-display-with-jquery-gmaps-api-v3-0/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Recently implemented the great <a href="http://our.umbraco.org/projects/backoffice-extensions/google-maps-datatype" target="_blank">Google Maps Datatype</a> by Darren Ferguson in an <a href="http://umbraco.org" target="_blank">Umbraco</a> site. I first got the front-end map display working with v2 of the GMaps API and a third party jQuery addon, but I wasn’t happy with the dependency on API keys as this made it annoying to move/copy files around between production, staging, and local dev PCs.</p>
<p>The setup below will show the map if JS in enabled, or a placeholder image if JS is disabled. If it can’t parse the Google Maps Datatype property name, it will show the map centered on its default coordinates.</p>
<p>To display the map in the front-end, I did the following:</p>
<ol>
<li>Set up the following in its own JS file:<br /> 
<div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:f32c3428-b7e9-4f15-a8ea-c502c7ff2e88:612037f7-afa6-4b36-b12c-db6be66db9e3" class="wlWriterEditableSmartContent">
<pre class="brush: javascript;">$.fn.googleMap = function(location,options) {
    var defaults = {
        lat: -33.302959,
        long: 151.419733,
        zoom: 15,
        mapTypeId: google.maps.MapTypeId.ROADMAP,
        mapTypeControl: false,
        controls: ['GSmallZoomControl3D']
    };

    options = $.extend(defaults, options || {});

    if (location) {
        value = $.trim(location);
        var point = location.split(',');
        options.lat = parseFloat(point[0]);
        options.long = parseFloat(point[1]);
        options.zoom = parseFloat(point[2]);
    };

    var center = new google.maps.LatLng(options.lat, options.long);

    var map = new google.maps.Map(this.get(0), $.extend(options, { center: center }));

    var storeMarker = new google.maps.Marker({
        position: center,
        map: map
    });
};</pre>
</div>
<li>Included this on the page where I showed the map:
<ol>
<li>JS:
<div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:f32c3428-b7e9-4f15-a8ea-c502c7ff2e88:39aa6a1b-54ec-4890-bbf7-301cfa2182d5" class="wlWriterEditableSmartContent">
<pre class="brush: javascript;">&lt;script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"&gt;&lt;/script&gt;
&lt;script type='text/javascript'&gt;
    $(document).ready(function () {
        $('#map_container img').hide();
        $('#map_container').googleMap("&lt;umbraco:Item field="storeLocationMap" runat="server"&gt;&lt;/umbraco:Item&gt;");
    });
&lt;/script&gt;</pre>
</div>
<li>HTML:
<div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:f32c3428-b7e9-4f15-a8ea-c502c7ff2e88:02193ec8-5858-4084-bf7a-6a2c8526296e" class="wlWriterEditableSmartContent">
<pre class="brush: html;">&lt;div class="product_image"&gt;
   &lt;div id="map_container" class="map_placeholder"&gt;
    &lt;img src="../images/NoGoogleMap.png" alt="Could not load store map" style="margin-top:-20px;"/&gt;
  &lt;/div&gt;
&lt;/div&gt;</pre>
</div>
<p></li>
</ol>
</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://daniel.streefkerkonline.com/umbraco-google-maps-datatype-display-with-jquery-gmaps-api-v3-0/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Displaying Google Calendar events in Umbraco</title>
		<link>http://daniel.streefkerkonline.com/displaying-google-calendar-events-in-umbraco/</link>
		<comments>http://daniel.streefkerkonline.com/displaying-google-calendar-events-in-umbraco/#comments</comments>
		<pubDate>Tue, 07 Jul 2009 12:55:02 +0000</pubDate>
		<dc:creator>Daniel</dc:creator>
				<category><![CDATA[Umbraco]]></category>

		<guid isPermaLink="false">http://daniel.streefkerkonline.com/displaying-google-calendar-events-in-umbraco/</guid>
		<description><![CDATA[[12th October 2009 - I've just updated this post with a new version of the macro. It now groups events properly. Sorry to the guys/girls with multilingual sites, I haven't put any effort into using Dictionary Items as I don't &#8230; <a href="http://daniel.streefkerkonline.com/displaying-google-calendar-events-in-umbraco/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><em>[12th October 2009 - I've just updated this post with a new version of the macro. It now groups events properly. Sorry to the guys/girls with multilingual sites, I haven't put any effort into using Dictionary Items as I don't currently require that functionality]</em></p>
<p>I&#8217;ve yet to see a good event calendar in any of the CMSes I&#8217;ve tried that properly handles recurring events and makes it easy for the layman to update calendar events. I&#8217;ve therefore recently implemented a small macro for Umbraco that displays Google Calendar events from a cached XML calendar feed. I did this using the excellent <a href="http://feedcacheforumbraco.codeplex.com/" target="_blank">FeedCache</a> plugin and some XSLT.</p>
<p>My one gripe with FeedCache is that you can&#8217;t edit the feeds.config file using <a href="http://www.nibble.be/?p=53" target="_blank">ConfigTree</a>, but rather need file-level access to it. This is a major bummer, as I wanted to test it on <a href="http://autoumbraco.darren-ferguson.com" target="_blank">Umbraco Trials</a>.</p>
<p>I won&#8217;t post any CSS, but the XSLT caters for styling as it uses bulleted lists and spans around key areas.</p>
<p>The feed will then be displayed similar to below:</p>
<blockquote><p><em>Today</em></p>
<p><em> * Test Event (19:30-21:30) </em></p>
<p><em>Friday 16th October </em></p>
<p><em> * Meeting (19:30-21:30) </em></p>
<p><em>Sunday 18th October</em></p>
<p><em> * Seminar (10:30-12:30)<br />
* Lunch (13:00-14:00)<br />
* Games/Activities (14:30-15:30)<br />
</em></p></blockquote>
<p>Here&#8217;s a screenshot of it working on an Umbraco Trials site. I found a random Google Calendar feed and used that for the demo. Note that I didn&#8217;t put any effort into styling the results:</p>
<p><a href="http://daniel.streefkerkonline.com/uploads/2009/07/image.png"><img style="border-right-width: 0px; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" src="http://daniel.streefkerkonline.com/uploads/2009/07/image-thumb.png" border="0" alt="image" width="508" height="407" /></a></p>
<p>Basically, what you need to do is:</p>
<ol>
<li>Install <a href="http://feedcacheforumbraco.codeplex.com/" target="_blank">FeedCache</a></li>
<li>Install the <a href="http://daniel.streefkerkonline.com/uploads/2009/10/GCal_Events_List_1.2.zip" target="_blank">GCal Events List package</a></li>
<li>Set up the calendar feed in FeedCache&#8217;s feeds.config. The feeds.config entry should look like this:
<pre class="brush: xml; title: ; notranslate">&lt;feed&gt;
 &lt;url&gt;&lt;![CDATA[http://www.google.com/calendar/feeds/calendar@example.org/public/composite?orderby=starttime&amp;sortorder=ascending&amp;futureevents=true&amp;singleevents=true]]&gt; &lt;/url&gt;
 &lt;localFile&gt;GoogleCalendarFeed.xml&lt;/localFile&gt;
&lt;/feed&gt;</pre>
</li>
<li>Insert a macro wherever you need it, and fill out the parameters;
<ol>
<li>numberOfDays &#8211; (integer) how many days worth of events you would like to display</li>
<li>xmlFileName (string) the exact file name of the cached XML file in the umbraco\plugins\FergusonMoriyama\feedcache\ folder. eg. googleEvents.xml</li>
</ol>
</li>
<li>Call FeedCache from your browser to trigger a pull of the feed(s): <a title="http://example.org/umbraco/plugins/FergusonMoriyama/FeedCache/FeedCache.aspx" href="http://example.org/umbraco/plugins/FergusonMoriyama/FeedCache/FeedCache.aspx">http://example.org/umbraco/plugins/FergusonMoriyama/FeedCache/FeedCache.aspx</a></li>
<li>View the page that contains the macro inserted in step 4.</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://daniel.streefkerkonline.com/displaying-google-calendar-events-in-umbraco/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

