<?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>Manely</title>
	<atom:link href="https://manelycreative.com/feed/" rel="self" type="application/rss+xml" />
	<link>https://manelycreative.com</link>
	<description>Brighter Worlds</description>
	<lastBuildDate>Fri, 27 Feb 2015 07:00:40 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>

<image>
	<url>https://manelycreative.com/wp-content/uploads/2021/08/cropped-favicon-1-32x32.png</url>
	<title>Manely</title>
	<link>https://manelycreative.com</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Having Trouble with a VirtualBox shared folder showing old content in Apache?</title>
		<link>https://manelycreative.com/uncategorized/having-trouble-with-a-virtualbox-shared-folder-showing-old-content-in-apache/2015/02/27/</link>
					<comments>https://manelycreative.com/uncategorized/having-trouble-with-a-virtualbox-shared-folder-showing-old-content-in-apache/2015/02/27/#respond</comments>
		
		<dc:creator><![CDATA[Dave]]></dc:creator>
		<pubDate>Fri, 27 Feb 2015 07:00:40 +0000</pubDate>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[virtualbox]]></category>
		<guid isPermaLink="false">http://dave.lyonmania.com/?p=2486</guid>

					<description><![CDATA[OK, that&#8217;s an awfully specific problem, but it&#8217;s pretty maddening if you run into it. In my setup I have a folder with my web app that&#8217;s on a normal Windows partition. In order to have an environment very close to our production webservers, I run a Linux VM with that Windows folder mounted within [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>OK, that&#8217;s an awfully specific problem, but it&#8217;s pretty maddening if you run into it. In my setup I have a folder with my web app that&#8217;s on a normal Windows partition. In order to have an environment very close to our production webservers, I run a Linux VM with that Windows folder mounted within VirtualBox as a shared folder. Recently, several times, a static css or javascript file would be returning an old or cached version rather than reflecting my edits, which were done on the Windows side.</p>
<p>Fortunately, I found <a href="https://forums.virtualbox.org/viewtopic.php?f=3&amp;t=33201">this post</a> which led me to the description of <a href="http://httpd.apache.org/docs/2.0/mod/core.html#enablesendfile">the EnableSendfile directive for Apache</a>. There was even a commented version of it in my httpd.conf file. As soon as I set that to</p>
<blockquote><p>EnableSendfile off</p></blockquote>
<p>and restarted Apache, and cleared the browser cache, all was working as I would hope. Happy day!</p>
]]></content:encoded>
					
					<wfw:commentRss>https://manelycreative.com/uncategorized/having-trouble-with-a-virtualbox-shared-folder-showing-old-content-in-apache/2015/02/27/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Finally Got Firefox and Thunderbird&#8217;s Crazy Windows Under Control</title>
		<link>https://manelycreative.com/tinker/finally-got-firefox-and-thunderbirds-crazy-windows-under-control/2014/08/05/</link>
					<comments>https://manelycreative.com/tinker/finally-got-firefox-and-thunderbirds-crazy-windows-under-control/2014/08/05/#respond</comments>
		
		<dc:creator><![CDATA[Dave]]></dc:creator>
		<pubDate>Tue, 05 Aug 2014 23:21:06 +0000</pubDate>
				<category><![CDATA[Tinker Blog]]></category>
		<category><![CDATA[14.04]]></category>
		<category><![CDATA[firefox]]></category>
		<category><![CDATA[focus]]></category>
		<category><![CDATA[mozilla]]></category>
		<category><![CDATA[thunderbird]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[unclutter]]></category>
		<category><![CDATA[window management]]></category>
		<guid isPermaLink="false">http://dave.lyonmania.com/?p=2422</guid>

					<description><![CDATA[For a long time I&#8217;ve noticed that if I have two separate Firefox windows open (not tabs- windows), one will be in the foreground and the other can&#8217;t be clicked or changed. One has the focus, the other is untouchable until the first has been closed. I&#8217;ve put up with the issue, but then when [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>For a long time I&#8217;ve noticed that if I have two separate Firefox windows open (not tabs- windows), one will be in the foreground and the other can&#8217;t be clicked or changed. One has the focus, the other is untouchable until the first has been closed. I&#8217;ve put up with the issue, but then when I started using Thunderbird again ran into the same issue. I was writing an email and suddenly the main window had focus and nothing I could do would change it and allow me to type my message. So I started looking for others with the same problem.</p>
<p>I found <a href="https://forum.kde.org/viewtopic.php?f=111&amp;t=117704&amp;start=15#p295330">a solution on the KDE forums</a>. I know- maybe you&#8217;re not using KDE. Even someone there mentions it should probably be posted elsewhere- it&#8217;s not a KDE issue. It&#8217;s a problem with an app installed in Ubuntu and probably its derivatives called unclutter, which simply hides the mouse cursor if you&#8217;re not using the cursor. Somehow this well meaning app was killing my window management!</p>
<p>The fix is simple. You&#8217;re going to edit the file /etc/default/unclutter and change</p>
<pre>EXTRA_OPTS="-idle 2 -root"</pre>
<p>to</p>
<pre>EXTRA_OPTS="-idle 2 -root -noevents"</pre>
<p>You will have to restart the X11 server- I just rebooted. Haven&#8217;t run into the problem since and the unclutter app still works.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://manelycreative.com/tinker/finally-got-firefox-and-thunderbirds-crazy-windows-under-control/2014/08/05/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Trouble Connecting to Your Phone via MTP?</title>
		<link>https://manelycreative.com/uncategorized/trouble-connecting-to-your-phone-via-mtp/2014/08/04/</link>
					<comments>https://manelycreative.com/uncategorized/trouble-connecting-to-your-phone-via-mtp/2014/08/04/#comments</comments>
		
		<dc:creator><![CDATA[Dave]]></dc:creator>
		<pubDate>Mon, 04 Aug 2014 15:22:03 +0000</pubDate>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[14.04]]></category>
		<category><![CDATA[mtp]]></category>
		<category><![CDATA[ubuntu]]></category>
		<guid isPermaLink="false">http://dave.lyonmania.com/?p=2420</guid>

					<description><![CDATA[I kept getting errors about the system being unable to mount an MTP device and have resorted to some ridiculous things trying to get content off devices. Under KDE, Dolphin never seemed to work to get things via MTP (Media Transfer Protocol), but Konqueror did so I just used that. Yesterday I did a search [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>I kept getting errors about the system being unable to mount an MTP device and have resorted to some ridiculous things trying to get content off devices. Under KDE, Dolphin never seemed to work to get things via MTP (Media Transfer Protocol), but Konqueror did so I just used that. Yesterday I did a search for &#8216;<em>ubuntu unable to mount nokia unable to open mtp device</em>&#8216; hoping to find something that would help and <a href="http://askubuntu.com/a/463921/95754">I did on AskUbuntu</a>!</p>
<pre>sudo apt-get install mtpfs</pre>
]]></content:encoded>
					
					<wfw:commentRss>https://manelycreative.com/uncategorized/trouble-connecting-to-your-phone-via-mtp/2014/08/04/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
			</item>
		<item>
		<title>Skype Being Ugly in Linux is (Probably) Not Microsoft&#8217;s Fault</title>
		<link>https://manelycreative.com/tinker/skype-being-ugly-in-linux-is-probably-not-microsofts-fault/2014/08/04/</link>
					<comments>https://manelycreative.com/tinker/skype-being-ugly-in-linux-is-probably-not-microsofts-fault/2014/08/04/#respond</comments>
		
		<dc:creator><![CDATA[Dave]]></dc:creator>
		<pubDate>Mon, 04 Aug 2014 15:17:39 +0000</pubDate>
				<category><![CDATA[Tinker Blog]]></category>
		<category><![CDATA[14.04]]></category>
		<category><![CDATA[skype]]></category>
		<category><![CDATA[ubuntu]]></category>
		<guid isPermaLink="false">http://dave.lyonmania.com/?p=2418</guid>

					<description><![CDATA[This morning I was sickened for the last time at how ugly Skype looked when I opened it. While I was a KDE user I rationalized it away thinking that like many proprietary vendors, the Skype developers had targeted GTK and their support in KDE just failed. Or that they didn&#8217;t care at all how [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>This morning I was sickened for the last time at how ugly Skype looked when I opened it. While I was a KDE user I rationalized it away thinking that like many proprietary vendors, the Skype developers had targeted GTK and their support in KDE just failed. Or that they didn&#8217;t care at all how it looked. Face it, sometimes commercial software vendors don&#8217;t for some reason. But now that I&#8217;m back in &#8216;plain&#8217; Ubuntu, I was surprised that it didn&#8217;t look, I don&#8217;t know, <strong>better</strong>.</p>
<p>So I did a search for &#8216;<em>skype style gtk+ ubuntu ugly</em>&#8216; and found <a href="http://shantanucse.blogspot.com/2013/12/how-to-fix-ugly-skype-theme-harsh.html">this great tip</a>. It turns out that Skype just needs the 32-bit theme engines to look nice. Happy day!</p>
<pre>sudo apt-get install libcanberra-gtk-module:i386 gtk2-engines-murrine:i386</pre>
]]></content:encoded>
					
					<wfw:commentRss>https://manelycreative.com/tinker/skype-being-ugly-in-linux-is-probably-not-microsofts-fault/2014/08/04/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Disk Display Settings in Nautilus</title>
		<link>https://manelycreative.com/tinker/disk-display-settings-in-nautilus/2014/08/01/</link>
					<comments>https://manelycreative.com/tinker/disk-display-settings-in-nautilus/2014/08/01/#respond</comments>
		
		<dc:creator><![CDATA[Dave]]></dc:creator>
		<pubDate>Fri, 01 Aug 2014 08:17:38 +0000</pubDate>
				<category><![CDATA[Tinker Blog]]></category>
		<category><![CDATA[14.04]]></category>
		<category><![CDATA[nautilus]]></category>
		<category><![CDATA[ubuntu]]></category>
		<guid isPermaLink="false">http://dave.lyonmania.com/?p=2413</guid>

					<description><![CDATA[I&#8217;m not a big fan of the Nautilus file app, but it&#8217;s ok. On the left side it shows certain folders, location bookmarks, and mounted disks. If you want to hide or change the way they&#8217;re displayed, open up the Disks app. Find and select the partition you&#8217;re adjusting and click the gear button and [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>I&#8217;m not a big fan of the Nautilus file app, but it&#8217;s ok. On the left side it shows certain folders, location bookmarks, and mounted disks. If you want to hide or change the way they&#8217;re displayed, open up the Disks app. Find and select the partition you&#8217;re adjusting and click the gear button and choose &#8220;Edit Mount Options&#8221;. On the dialog that pops up, disable &#8220;Automatic Mount Options&#8221; at the top. Then look for the checkbox that says &#8220;Show in user interface&#8221;- uncheck that to hide the disk in Nautilus. You can also adjust what the disk&#8217;s label will be under &#8220;Display Name&#8221;. When you&#8217;re done, click OK to apply the changes.</p>
<p>Thanks to <a href="http://askubuntu.com/a/232754/95754">http://askubuntu.com/a/232754/95754</a> for the tip.</p>
<p>Due to <a href="https://bugs.launchpad.net/ubuntu/+source/gnome-disk-utility/+bug/1011257">a bug in the Disks app</a>, you should not use the &#8220;Show in user interface&#8221; checkbox to <em>start</em> having a disk show up. If you do, it adds a mount option</p>
<pre> x-gvfs-show</pre>
<p>to /etc/fstab which at least in the current version of Ubuntu will throw errors when mounting. What it actually needs to be for now is:</p>
<pre>comment=x-gvfs-show</pre>
]]></content:encoded>
					
					<wfw:commentRss>https://manelycreative.com/tinker/disk-display-settings-in-nautilus/2014/08/01/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Setting the Terminal Unity Will Use</title>
		<link>https://manelycreative.com/tinker/setting-the-terminal-unity-will-use/2014/08/01/</link>
					<comments>https://manelycreative.com/tinker/setting-the-terminal-unity-will-use/2014/08/01/#respond</comments>
		
		<dc:creator><![CDATA[Dave]]></dc:creator>
		<pubDate>Fri, 01 Aug 2014 08:04:25 +0000</pubDate>
				<category><![CDATA[Tinker Blog]]></category>
		<category><![CDATA[14.04]]></category>
		<category><![CDATA[terminal]]></category>
		<category><![CDATA[ubuntu]]></category>
		<guid isPermaLink="false">http://dave.lyonmania.com/?p=2410</guid>

					<description><![CDATA[I just switched back from Kubuntu to Ubuntu recently and was annoyed that CTRL+ALT+T continued to open Konsole in Ubuntu rather than Gnome Terminal. The keyboard shortcuts in the System Settings just showed that it would open the default Terminal program. According to http://askubuntu.com/a/124718/95754 you can change that on the terminal like this: &#160; sudo [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>I just switched back from Kubuntu to Ubuntu recently and was annoyed that CTRL+ALT+T continued to open Konsole in Ubuntu rather than Gnome Terminal. The keyboard shortcuts in the System Settings just showed that it would open the default Terminal program.</p>
<p>According to <a href="http://askubuntu.com/a/124718/95754">http://askubuntu.com/a/124718/95754</a> you can change that on the terminal like this:</p>
<p>&nbsp;</p>
<pre><code>sudo update-alternatives --config x-terminal-emulator</code></pre>
]]></content:encoded>
					
					<wfw:commentRss>https://manelycreative.com/tinker/setting-the-terminal-unity-will-use/2014/08/01/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Tweaking LightDM</title>
		<link>https://manelycreative.com/tinker/tweaking-lightdm/2014/08/01/</link>
					<comments>https://manelycreative.com/tinker/tweaking-lightdm/2014/08/01/#respond</comments>
		
		<dc:creator><![CDATA[Dave]]></dc:creator>
		<pubDate>Fri, 01 Aug 2014 07:59:29 +0000</pubDate>
				<category><![CDATA[Tinker Blog]]></category>
		<category><![CDATA[14.04]]></category>
		<category><![CDATA[lightdm]]></category>
		<category><![CDATA[ubuntu]]></category>
		<guid isPermaLink="false">http://dave.lyonmania.com/?p=2407</guid>

					<description><![CDATA[By default Ubuntu 14.04 has a &#8216;Guest Session&#8217; option on the login screen. I don&#8217;t like that and also in my tinkering (and for work) I have an extra user account for a service I need to run. I want to hide that option. To disable the Guest Session, see http://askubuntu.com/a/451537/95754 which has you add [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>By default Ubuntu 14.04 has a &#8216;Guest Session&#8217; option on the login screen. I don&#8217;t like that and also in my tinkering (and for work) I have an extra user account for a service I need to run. I want to hide that option.</p>
<p>To disable the Guest Session, see <a href="http://askubuntu.com/a/451537/95754">http://askubuntu.com/a/451537/95754</a> which has you add a new line to /usr/share/lightdm/lightdm.conf.d/50-ubuntu.conf</p>
<pre>allow-guest=false</pre>
<p>All set.</p>
<p>The other fix is from <a href="http://askubuntu.com/a/97248/95754">http://askubuntu.com/a/97248/95754</a> which requires an edit to /etc/lightdm/users.conf</p>
<p>Just add the username you want to hide to the line starting with &#8220;hidden-users&#8221;.</p>
<p>&nbsp;</p>
]]></content:encoded>
					
					<wfw:commentRss>https://manelycreative.com/tinker/tweaking-lightdm/2014/08/01/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>My Mouse from Microsoft</title>
		<link>https://manelycreative.com/tinker/my-mouse-from-microsoft/2014/08/01/</link>
					<comments>https://manelycreative.com/tinker/my-mouse-from-microsoft/2014/08/01/#respond</comments>
		
		<dc:creator><![CDATA[Dave]]></dc:creator>
		<pubDate>Fri, 01 Aug 2014 07:44:36 +0000</pubDate>
				<category><![CDATA[Tinker Blog]]></category>
		<category><![CDATA[14.04]]></category>
		<category><![CDATA[hardware]]></category>
		<category><![CDATA[mouse]]></category>
		<category><![CDATA[ubuntu]]></category>
		<guid isPermaLink="false">http://dave.lyonmania.com/?p=2404</guid>

					<description><![CDATA[As far as tools go, I am really picky. Really, really picky. For a long time I had the Logitech Touch Mouse M600 which is a lot like a wireless mouse with a touchpad on top of it. But it&#8217;s mouse shaped and full size. I liked it just fine. Unfortunately the little bumpers on [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>As far as tools go, I am really picky. Really, really picky. For a long time I had the <a href="www.amazon.com/Logitech-910-002667-Touch-Mouse-M600/dp/B006MBP7T0/">Logitech Touch Mouse M600</a> which is a lot like a wireless mouse with a touchpad on top of it. But it&#8217;s mouse shaped and full size. I liked it just fine. Unfortunately the little bumpers on the bottom wore off and it started dragging on surfaces. Logitech promptly responded to my warranty claim but I was on a campout with the kids and didn&#8217;t research my options well enough (the Touch Mouse wasn&#8217;t available any more). So they sent me the <a href="http://www.amazon.com/Logitech-Ultrathin-Touch-Windows-Gestures/dp/B00DR8LA6U/">Logitech Ultrathin Touch Mouse T630</a>. I hated it. It&#8217;s meant to be a &#8216;mobile&#8217; mouse for use with laptops and such. But I have big hands (I think they&#8217;re normal size) and this felt like moving a pink eraser around on my desk- Ultrathin isn&#8217;t an exagerration. It&#8217;s so thin that it doesn&#8217;t have space for batteries. You have to <em>plug it in via usb</em> just to charge it. Words fail me.</p>
<p>So I set off for in search of a better mouse. And I ended up with a mouse that I really love. It&#8217;s the <a href="http://www.amazon.com/Microsoft-Sculpt-Ergonomic-Mouse-L6V-00001/dp/B00D68ZVY8/">Microsoft Sculpt Ergonomic Mouse</a>.</p>
<p><a href="https://manelycreative.com/wp-content/uploads/2014/08/mk_SEM_large.jpg"><img decoding="async" class="aligncenter size-full wp-image-2405" src="https://manelycreative.com/wp-content/uploads/2014/08/mk_SEM_large.jpg" alt="Sculpt Ergonomic Mouse" width="540" height="310" srcset="https://manelycreative.com/wp-content/uploads/2014/08/mk_SEM_large.jpg 540w, https://manelycreative.com/wp-content/uploads/2014/08/mk_SEM_large-480x276.jpg 480w" sizes="(min-width: 0px) and (max-width: 480px) 480px, (min-width: 481px) 540px, 100vw" /></a>It has a physical scroll wheel which annoyed me after the Touch Mouse. But I got used to it. For maybe a day it felt odd. But it really does feel natural. My hand feels relaxed when I use it- it&#8217;s just the right shape. Now to be clear, this is <strong>not</strong> the Sculpt Comfort mouse- accept no substitutes! Sculpt Ergonomic mouse is what you want.</p>
<p>Of course, I&#8217;m using it with Ubuntu. That blue Windows button on it activates the Dash just like a regular Windows key. The other button works too. The only thing that occasionally goes wrong is that the scrolling gets weird- scrolling way too many lines at a time. It feels like you&#8217;re jumping to a completely different part of the document. Dual-booting to Windows might be what sets this off. Anyway, the fix is really simple. <a href="http://ubuntuforums.org/showthread.php?t=1793317">Just unplug the USB dongle. </a>Not the mouse power- just unplug the dongle, wait for a bit, and plug it back in. The scroll settings will be reset and you&#8217;re back to work.</p>
<p>&nbsp;</p>
]]></content:encoded>
					
					<wfw:commentRss>https://manelycreative.com/tinker/my-mouse-from-microsoft/2014/08/01/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Getting FamilySearch Indexing to work in Ubuntu 14.04</title>
		<link>https://manelycreative.com/tinker/getting-familysearch-indexing-to-work-in-ubuntu-14-04/2014/07/21/</link>
					<comments>https://manelycreative.com/tinker/getting-familysearch-indexing-to-work-in-ubuntu-14-04/2014/07/21/#respond</comments>
		
		<dc:creator><![CDATA[Dave]]></dc:creator>
		<pubDate>Mon, 21 Jul 2014 05:13:21 +0000</pubDate>
				<category><![CDATA[Tinker Blog]]></category>
		<category><![CDATA[indexing]]></category>
		<guid isPermaLink="false">http://dave.lyonmania.com/?p=2398</guid>

					<description><![CDATA[If you, like myself, are an avid family history researcher or simply good person, you might be participating in FamilySearch&#8217;s indexing effort. Basically it&#8217;s crowdsourcing the indexing of billions, probably trillions, of family history related images and records so that anyone looking for those records can find them. Pretty important! But if you go to [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>If you, like myself, are an avid family history researcher or simply good person, you might be participating in FamilySearch&#8217;s indexing effort. Basically it&#8217;s crowdsourcing the indexing of billions, probably trillions, of family history related images and records so that anyone looking for those records can find them. Pretty important!</p>
<p>But if you go to install the app in Ubuntu 14.04 you may get an error which says:</p>
<p>java.lang.NoClassDefFoundError: java.awt.Container</p>
<p>Most of the help you&#8217;ll find for the error is for a prior version. Skip to the true help: <a href="http://software-ninja-ninja.blogspot.com/2013/11/stupid-java-error-javalangnoclassdeffou.html">http://software-ninja-ninja.blogspot.com/2013/11/stupid-java-error-javalangnoclassdeffou.html</a></p>
<p>To sum up, you have to add these packages:</p>
<pre>sudo apt-get install libgtk2.0-0:i386 libxtst6:i386 libxtst6:i386 libx11-dev:i386  lib32z1 lib32ncurses5 lib32bz2-1.0 libxi6 libxtst6 libxrender1</pre>
<p>And run the installer with these flags:</p>
<pre>./Indexing_unix.sh -J-Djava.awt.headless=true</pre>
<p>That will run it on the command line rather than a window. Note that you may get a window that opens and complains about something. Just cancel that and ignore. Look back at the terminal and proceed.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://manelycreative.com/tinker/getting-familysearch-indexing-to-work-in-ubuntu-14-04/2014/07/21/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Export Silverstripe Comments to WXR</title>
		<link>https://manelycreative.com/uncategorized/export-silverstripe-comments-to-wxr/2014/04/14/</link>
					<comments>https://manelycreative.com/uncategorized/export-silverstripe-comments-to-wxr/2014/04/14/#respond</comments>
		
		<dc:creator><![CDATA[Dave]]></dc:creator>
		<pubDate>Mon, 14 Apr 2014 21:20:17 +0000</pubDate>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[disqus]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[silverstripe]]></category>
		<guid isPermaLink="false">http://dave.lyonmania.com/?p=2362</guid>

					<description><![CDATA[I recently had to migrate a Silverstripe installation&#8217;s comments to use the Disqus comment system. Here&#8217;s the script I wrote to grab and format the Silverstripe comments into the WXR xml structure Disqus can import. No doubt there&#8217;s an easier way. You&#8217;ll have to append this code to something else like a working Silverstripe task [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>I recently had to migrate a Silverstripe installation&#8217;s comments to use the <a href="http://disqus.com/">Disqus</a> comment system. Here&#8217;s the script I wrote to grab and format the Silverstripe comments into the WXR xml structure Disqus can import. No doubt there&#8217;s an easier way. You&#8217;ll have to append this code to something else like a working Silverstripe task so you can run it from the commandline.</p>
<p>&nbsp;</p>
<pre>$site = 'http://example.com/blog/'; //url prefix</pre>
<pre>$output_file = '/tmp/rss.xml'; //where to put the xml

$dom = new DOMDocument("1.0");
$top = $dom-&gt;appendChild($dom-&gt;createElement("rss"));
$top-&gt;setAttribute("version","2.0");
$top-&gt;setAttribute("xmlns:content","http://purl.org/rss/1.0/modules/content/");
$top-&gt;setAttribute("xmlns:dsq","http://www.disqus.com/");
$top-&gt;setAttribute("xmlns:dc","http://purl.org/dc/elements/1.1/");
$top-&gt;setAttribute("xmlns:wp","http://wordpress.org/export/1.0/");
$channel = $top-&gt;appendChild($dom-&gt;createElement("channel"));

$comments = Comment::get()-&gt;sort(array('ParentID'=&gt;'ASC', 'Created'=&gt;'ASC'));
$cnt = 0;
$currblog = 0;
foreach($comments as $comment)
{
    $cnt++;
    $page = SiteTree::get()-&gt;byID($comment-&gt;ParentID);

    if($comment-&gt;ParentID!=$currblog)
    {
        $currblog = $comment-&gt;ParentID;

        $item = $channel-&gt;appendChild($dom-&gt;createElement("item"));
        $title = $item-&gt;appendChild($dom-&gt;createElement("title"));
        $title-&gt;appendChild($dom-&gt;createTextNode($page-&gt;Title));
        $link = $item-&gt;appendChild($dom-&gt;createElement("link"));
        $link-&gt;appendChild($dom-&gt;createTextNode($site.$page-&gt;URLSegment."/"));
        $content = $item-&gt;appendChild($dom-&gt;createElement("content:encoded"));
        $content-&gt;appendChild($dom-&gt;createCDATASection($page-&gt;Content));
        $content = $item-&gt;appendChild($dom-&gt;createElement("dsq:thread_identifier"));
        $content-&gt;appendChild($dom-&gt;createTextNode($page-&gt;ID));
        $date = $item-&gt;appendChild($dom-&gt;createElement("wp:post_date_gmt"));
        $date-&gt;appendChild($dom-&gt;createTextNode($page-&gt;Created));
        $open = $item-&gt;appendChild($dom-&gt;createElement("wp:comment_status"));
        $open-&gt;appendChild($dom-&gt;createTextNode('open'));
    }

    $icomment = $item-&gt;appendChild($dom-&gt;createElement("wp:comment"));
    $node = $icomment-&gt;appendChild($dom-&gt;createElement("wp:comment_id"));
    $node-&gt;appendChild($dom-&gt;createTextNode($comment-&gt;ID));
    $node = $icomment-&gt;appendChild($dom-&gt;createElement("wp:comment_author"));
    $node-&gt;appendChild($dom-&gt;createTextNode($comment-&gt;Name));
    $node = $icomment-&gt;appendChild($dom-&gt;createElement("wp:comment_author_email"));
    $node-&gt;appendChild($dom-&gt;createTextNode($comment-&gt;Email));
    $node = $icomment-&gt;appendChild($dom-&gt;createElement("wp:comment_author_url"));
    $node-&gt;appendChild($dom-&gt;createTextNode($comment-&gt;URL));
    $node = $icomment-&gt;appendChild($dom-&gt;createElement("wp:comment_author_IP"));
    $node-&gt;appendChild($dom-&gt;createTextNode(''));
    $node = $icomment-&gt;appendChild($dom-&gt;createElement("wp:comment_date_gmt"));
    $node-&gt;appendChild($dom-&gt;createTextNode($comment-&gt;Created));
    $node = $icomment-&gt;appendChild($dom-&gt;createElement("wp:comment_content"));
    $node-&gt;appendChild($dom-&gt;createCDATASection($comment-&gt;Comment));
    $node = $icomment-&gt;appendChild($dom-&gt;createElement("wp:comment_approved"));
    $node-&gt;appendChild($dom-&gt;createTextNode($comment-&gt;Moderated));
    $node = $icomment-&gt;appendChild($dom-&gt;createElement("wp:comment_parent"));
    $node-&gt;appendChild($dom-&gt;createTextNode(0));
}

$xml = $dom-&gt;saveXML();

file_put_contents($output_file, $xml);</pre>
]]></content:encoded>
					
					<wfw:commentRss>https://manelycreative.com/uncategorized/export-silverstripe-comments-to-wxr/2014/04/14/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
