<?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/"
	>

<channel>
	<title>blog.jjhale.com</title>
	<atom:link href="http://blog.jjhale.com/feed" rel="self" type="application/rss+xml" />
	<link>http://blog.jjhale.com</link>
	<description>the blog of Joe Hale, UK</description>
	<pubDate>Sat, 13 Sep 2008 12:54:28 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.7</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Generating a sitemap for MediaWiki hosted on GoDaddy</title>
		<link>http://blog.jjhale.com/archives/28</link>
		<comments>http://blog.jjhale.com/archives/28#comments</comments>
		<pubDate>Sat, 13 Sep 2008 12:50:43 +0000</pubDate>
		<dc:creator>jjh</dc:creator>
		
		<category><![CDATA[Websites]]></category>

		<category><![CDATA[MediaWiki]]></category>

		<category><![CDATA[sitemap]]></category>

		<category><![CDATA[wiki]]></category>

		<guid isPermaLink="false">http://blog.jjhale.com/?p=28</guid>
		<description><![CDATA[I've just got my wiki to automatically generate sitemaps for Google. It was a bit tricky, so I figured I'd write up what I did for you. I describe how I enabled automatic sitemap generation for a MediaWiki 1.12.0 installation hosted on GoDaddy using the generateSitemap.php file and a shell script to correct it.]]></description>
			<content:encoded><![CDATA[<p>I have just managed to get my wiki’s sitemap submitted to google. It was a bit tricky, so I figured I’d write up what I did in case anyone else had similar difficulties. In this post I describe how I enabled automatic sitemap generation for a MediaWiki 1.12.0 installation hosted on GoDaddy. I used the generateSitemap.php file and a shell script to correct the output and a cron job to run it once a day.</p>
<p><span id="more-28"></span><br />
The simplest way to generate a sitemap is just to use a web based <a title="Web based sitemap generator" href="http://www.xml-sitemaps.com/]" target="_blank">sitemap generator</a>. With these generators you just enter the URL of your site and it pokes around and spits out a sitemap.xml file which you can upload to the root of the site. Then you sign up for a google webmaster account and tell google where the sitemap is stored. You can find out about what an XML  sitemap is <a title="Sitemaps on Wikipedia" href="http://en.wikipedia.org/wiki/Site_map">here</a>.</p>
<p>The problem with using a web-based generator is that it needs to be redone whenever your content changes. It also needs to read every page of your site – which could take a while for larger sites. In addition to this, the free versions are often limited to a certain number of pages.</p>
<p>A more elegant solution is to use MediaWiki’s built-in generateSitemap.php script. Having easily installed the <a href="http://www.arnebrachhold.de/projects/wordpress-plugins/google-xml-sitemaps-generator/" target="_blank">sitemap plug-in</a> for Wordpress for my blog, I figure that it would be as easy for MediaWiki. I just needed the generator script to automatically run at regular intervals. However, it turns out there are a couple of extra steps that are need before it is complete. This method is not guaranteed and always make sure that you have everything backed-up before you begin.</p>
<p>Since my site is hosted by GoDaddy, I’ll be describing the process required for people using GoDaddy. I hope it is of some use to people using other hosting providers too. I’ll be describing how you enable the maintenance scripts, to a test run of the generateSitemap.php. Then how to tweak a shell script that will correct the output from generateSitemap.php, and finally how to schedule this script to run at regular intervals.</p>
<h2>Step 0 – Log on</h2>
<div id="attachment_29" class="wp-caption alignright" style="width: 311px"><img class="size-full wp-image-29" title="My Hosting Account" src="http://blog.jjhale.com/wp-content/uploads/2008/09/godaddy_myhosting.png" alt="The &quot;My Hosting Account&quot; on the GoDaddy homepage" width="301" height="251" /><p class="wp-caption-text">The &quot;My Hosting Account&quot; on the GoDaddy homepage</p></div>
<p>Log into goDaddy  and choose “My Hosting Account” from the Hosting &amp; Servers menu.</p>
<p>Select “Manage Account” for the hosting account that you have your wiki installed on. You should now see the Hosting  Control Center. (here I had version 2.8.2).  From here you can start the File Manager and the Cron Manager.</p>
<h2>Step 1 – enable the maintenance scripts.</h2>
<p>By default the maintenance scripts are not enabled. A settings file need to be edited to fix this. In the file manager navigate to the directory in which the wiki is installed and rename “AdminSettings.sample” to AdminSettings.php”. Copy the database username and password from the “LocalSettings.php” in to the ‘AdminSettings.php’ file</p>
<p>$wgDBadminuser      = &#8216;wikiadmin&#8217;;<br />
$wgDBadminpassword  = &#8216;adminpass&#8217;;</p>
<p>Note that this can all be done within the File Manager using the edit button.</p>
<h2>Step 2 – Running generateSitemap.php</h2>
<div id="attachment_30" class="wp-caption alignright" style="width: 219px"><img class="size-full wp-image-30" title="GoDaddy Hosting Control Center" src="http://blog.jjhale.com/wp-content/uploads/2008/09/godaddy_file_cron.png" alt="The File Manager and Cron Manager in the Control Center" width="209" height="374" /><p class="wp-caption-text">The File Manager and Cron Manager in the Control Center</p></div>
<p>On GoDaddy I do not have command line access to the webserver. To run any command you need to set up a cron job. A cron job is a command that is scheduled to run at a certain time. You do this from the Hosting Control Center. Click on “Content” and then on “Cron Manager”</p>
<p>Firstly make sure that you have a valid email address for the output from the job will be sent. This is in the account info panel on the left. All errors, warnings and text output from command will be sent to that address.</p>
<p>Next create a new job by hitting the “Create Cron Job” button<br />
Enter “Test Wiki sitemap” in the Cron Job Title and press the browse button for the command. Then browse to the directory where the wiki is installed and then to the “maintenance” subdirectory. Select the “generateSitemap.php” file and hit “Select”. The command line should be filled with something like:</p>
<pre>/web/cgi-bin/php5 "$HOME/html/jjhalewiki/maintenance/generateSitemap.php"</pre>
<p>Which is getting the php server to run the file “generateSitemap.php”, we will be using these details later so copy the whole command and paste it into an empty text file.</p>
<p>Set the frequency to hourly and choose the minute so that it will run within the next 5 mins (the current server time is in the account info tab.) Hit save and your job should be ready to go. It will be added to the list of cron jobs and will be run at the number of minutes past the hour which you specified. Make sure that its status is set to “enabled”, if it is not just select the tick box corresponding to the Test Wiki sitemap job and press the enable button at the top of the page.</p>
<p>Once the job’s time passes you will get an email from the cron manager letting you know the job ran. A typical email might look like:</p>
<pre>Subject:
Cron /web/cgi-bin/php5 "$HOME/html/jjhalewiki/maintenance/generateSitemap.php"</pre>
<pre>Message:
&lt;br /&gt;
&lt;b&gt;Warning&lt;/b&gt;:  in_array() [&lt;a href='function.in-array'&gt;function.in-array&lt;/a&gt;]:
 Wrong datatype for second argument in
&lt;b&gt;/home/content/s/c/r/scro0874/html/jjhalewiki/maintenance/generateSitemap.php&lt;/b&gt;
on line &lt;b&gt;448&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Warning&lt;/b&gt;:  array_shift()
[&lt;a href='function.array-shift'&gt;function.array-shift&lt;/a&gt;]:
The argument should be an array in
&lt;b&gt;/home/content/s/c/r/scro0874/html/jjhalewiki/maintenance/commandLine.inc&lt;/b&gt;
on line &lt;b&gt;39&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Warning&lt;/b&gt;:  reset() [&lt;a href='function.reset'&gt;function.reset&lt;/a&gt;]:
 Passed variable is not an array or object in
 &lt;b&gt;/home/content/s/c/r/scro0874/html/jjhalewiki/maintenance/commandLine.inc&lt;/b&gt;
on line &lt;b&gt;49&lt;/b&gt;&lt;br /&gt;
0 ()
sitemap-jjh0819204212248-mw_-NS_0-0.xml.gz
4 (wiki.jjhale.com)
sitemap-jjh0819204212248-mw_-NS_4-0.xml.gz
6 (Image)
sitemap-jjh0819204212248-mw_-NS_6-0.xml.gz
10 (Template)
sitemap-jjh0819204212248-mw_-NS_10-0.xml.gz
12 (Help)
sitemap-jjh0819204212248-mw_-NS_12-0.xml.gz
14 (Category)
sitemap-jjh0819204212248-mw_-NS_14-0.xml.gz</pre>
<p>Don’t worry about the warnings. If you get errors, make sure that you have set up the username and password correctly in “AdminSettings.php” and that you are using “php5” rather than “php” in the command line.</p>
<h2>Step 3 Create the script to correct and move the files</h2>
<p>You usually need to fix these files so that they have the website address.<br />
Assuming the command ran ok, you will now have the files listed in your email in the “maintenance” directory. You can download these with your ftp client just to check them. They are gzipped files and once uncompressed you should see a bunch of links mixed in with the xml tags.</p>
<p>The script often fails to find the name of your site properly, using “localhost” instead.</p>
<p>This can be fixed using the following script (based on this <a href="http://dralspire.mobi/node/219)">one</a>). Copy and paste it into a new plain text file. Now a couple of variables need to be replaced:</p>
<ol>
<li>change “$HOME/html/jjhalewiki/maintenance/” on lines 3 and 5 to the path to your maintenance directory (this is the second bit of the command you got from the cron manager before without the generateSitemap.php for line 3).</li>
<li> Do a search and replace for wiki.jjhale.com, replacing it with the url to your wiki without the “http://” bit.
<ul>
<li>If your wikis is at http://www.mySite.com/wiki, use the string www.mySite.com/wiki</li>
</ul>
</li>
<li>Replace “sitemap-index-jjh0819204212248-mw_.xml” with the name of the generated file starting “sitemap-index” and ending “xml.gz”, but remove the “.gz”. You will find this in the maintenance folder after you run the &#8220;Test Wiki sitemap” cron
<ul>
<li>Eg if after generateSitemap.php had been run by the cron manager, look in the maintenance directory (either ftp to it or use the goDaddy file manager) for a file starting “sitemap-index” and ending “xml.gz”. If you found “sitemap-index-myDBusername-mw_.xml.gz” you would replace “sitemap-index-jjh0819204212248-mw_.xml” in the script with “sitemap-index-myDBusername-mw_.xml”, note the lack of “.gz”</li>
</ul>
</li>
<li>Save the script as &#8220;sitemap_fix&#8221;</li>
</ol>
<blockquote><p>#!/bin/sh<br />
echo generating the sitemap&#8230;<br />
cd $HOME/html/jjhalewiki/maintenance/<br />
echo Current Dir<br />
pwd<br />
/web/cgi-bin/php5 $HOME/html/jjhalewiki/maintenance/generateSitemap.php<br />
echo prepping the files&#8230;<br />
mv -f *.gz ../<br />
mv -f *.xml ../<br />
cd ..<br />
gzip -d -f *.xml.gz</p>
<p>mv -f sitemap-index-jjh0819204212248-mw_.xml sitemap.xml</p>
<p>echo repairing the index file&#8230;<br />
sed &#8217;s/&lt;loc&gt;/&lt;loc&gt;http:\/\/wiki.jjhale.com\//g&#8217; sitemap.xml &gt; sitemap.xml.sed<br />
mv sitemap.xml.sed sitemap.xml</p>
<p>echo repairing the files&#8230;<br />
for i in $( ls *.xml ); do<br />
sed &#8217;s/localhost/wiki.jjhale.com/g&#8217; $i &gt; $i.sed<br />
done<br />
ls -d *.sed | sed &#8217;s/\(.*\).sed$/mv &#8220;&amp;&#8221; &#8220;\1&#8243;/&#8217; | sh</p>
<p>echo gzip it all back up&#8230;<br />
gzip -f *.xml<br />
gzip -d -f sitemap.xml.gz</p></blockquote>
<h2>Step 4 Upload the script</h2>
<p>Upload the script that you just saved to the directory that you installed your wiki to.  Go to the File Manager in the GoDaddy and find the file “sitemap_fix”. Check the box next to it and hit the “permissions” button. Check the “executable” box and uncheck the “web visible” box. Then hit OK.</p>
<h2>Step 5 Set the script to run</h2>
<p>Now you need to go back to the cron manager. Edit the job that you previously created by selecting the check box beside the Test Wiki Sitemap and hitting the edit button.<br />
Press the browse button next to the command text box and find the “sitemap_fix” file and hit select. Change the time the job executes so that it will be run soon and press “Save”. (Note it should still be set to run hourly while we test it.)</p>
<h2>Step 6 Check it is working</h2>
<p>After the execution time of the cron job passes you should get a email saying the job has run. There should now be a file called “sitemap.xml” in the root directory of your wiki, eg http://wiki.jjhale.com/sitemap.xml, this lists the other sitemap files which actually contain the urls to your wiki pages. Make sure that the url look right (ie have your web address in them not mine!). If it does not look right, go back and check the sitemap_fix file. If it does not work at all send me a comment with the problem and the version number of your wiki (you can find it in the special pages).  Note that this is only tested on 1.12.0 so far.</p>
<h2>Step 6 Change the frequency of the job and tell google</h2>
<p>Once it is working properly you can change the frequency at which the cron job is run. This will depend on how frequently your site changes. Go back to the Cron manager, select the job and hit edit.</p>
<p>You can then head over to <a href="http://www.google.com/webmasters/">Google webmaster tools</a> and tell them where your “sitemap.xml” file is.</p>
<p>Good Luck!</p>
<p style="text-align: right;"><em>jjh</em></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.jjhale.com/archives/28/feed</wfw:commentRss>
		</item>
		<item>
		<title>Silverfish Surfing sunglasses</title>
		<link>http://blog.jjhale.com/archives/10</link>
		<comments>http://blog.jjhale.com/archives/10#comments</comments>
		<pubDate>Wed, 23 Jul 2008 16:24:47 +0000</pubDate>
		<dc:creator>jjh</dc:creator>
		
		<category><![CDATA[reviews]]></category>

		<category><![CDATA[surf]]></category>

		<category><![CDATA[sunglasses]]></category>

		<guid isPermaLink="false">http://blog.jjhale.com/?p=10</guid>
		<description><![CDATA[A review of Silverfish prescription sunglasses for surfing in. They let you see clearly and stay on even during wipeouts and duck-diving.]]></description>
			<content:encoded><![CDATA[<p>I wear glasses and wanted to be able to see clearly whilst surfing. So I bought prescription (Rx) sunglasses from <a title="Silverfish sunglasses" href="http://www.silverfish.com/" target="_blank">Silverfish</a> which are designed to be worn whilst surfing, wiping out and duck-diving. I&#8217;ve had them for about a week, surfing 5 or 6 times and I think that they are great.</p>
<div id="attachment_19" class="wp-caption alignright" style="width: 260px"><a href="http://blog.jjhale.com/wp-content/uploads/2008/07/silverfish1.jpg"><img class="size-full wp-image-19" title="silverfish1" src="http://blog.jjhale.com/wp-content/uploads/2008/07/silverfish1.jpg" alt="Silverfish Whistler Sunglasses" width="250" height="127" /></a><p class="wp-caption-text">Silverfish Whistler Sunglasses</p></div>
<p>Here I mention a couple of alternatives and then review the Silverfish sunglasses.</p>
<h3><span id="more-10"></span></h3>
<h3>Options</h3>
<p>I considered several options. I used to wear contact lenses (not surfing) but found them uncomfortable. Besides, while surfing, they could get washed out easily. I decided that prescription goggles would be uncomfortable for extended use and did not look cool. I seriously considered corrective laser surgery but it was expensive (£2000) and required that you stayed out of the sea for 6 months.</p>
<p>I read about Silverfish sunglasses on some forums which testified that they stayed on and did the job. The other prescription sunglasses I considerd were the <a href="oakley.com/pd/2044" target="_blank">Oakley Water Jacket</a> (~£364) and <a href="http://www.seaspecs.com/" target="_blank">Seaspecs</a> ($199). The Oakley&#8217;s were too expensive and the Seaspecs could not be worn as regular sunglasses.</p>
<p>I bought the <a title="Silverfish Whistler sunglasses on Silverfish.com" href="http://silverfish.com/optimizer/product/S1001.html" target="_blank">Whistler</a> frames from Silverfish. With polarized prescription lenses they cost a total of $287.95.</p>
<ul>
<li> $149 - Prescription lenses</li>
<li>$49 - Frames</li>
<li>$39 - Polarized tint</li>
<li>$39 - Premium lab (they do it quicker)</li>
<li>$11.97 international shipping</li>
</ul>
<h3>Vision</h3>
<p>I can see normally whilst wearing them and don&#8217;t get blinded by the sun. The improved vision helps with selecting waves, keeping an eye on reference points on the beach as well as figuring out where my friends are in the water. They also help with learning from other (much better) surfers. I&#8217;d read that some people have trouble with the lenses fogging in cold water. I&#8217;ve had no trouble in 20°C water. Out of the water they are great for finding the car. They do not form any kind of seal with your eye, water can flow in and drain out. The nose piece holds the frames further from you face than regular glasses, which aids draining.</p>
<h3>Attachment</h3>
<div id="attachment_21" class="wp-caption alignright" style="width: 260px"><a href="http://blog.jjhale.com/wp-content/uploads/2008/07/silverfish4.jpg"><img class="size-full wp-image-21" title="Leash" src="http://blog.jjhale.com/wp-content/uploads/2008/07/silverfish4.jpg" alt="The leash which clips into the glasses." width="250" height="188" /></a><p class="wp-caption-text">The leash which clips into the glasses.</p></div>
<p>The non-elastic strap securely attaches the glasses to your head through wipeouts and duck-diving. I spend much of my time wiping out while surfing, so the head-strap has been well tested. The glasses have always felt secure and never budged - even after I&#8217;ve been rolling around inside a wave for 10 seconds. The most they move is when a wave breaks on my head. Sometimes when this happens one arm of the glasses folds down my ear a bit - not really a problem.</p>
<p>The strap holding the frames on is not elastic. It clips into the frames so can be removed for dry land. The strap is tightened by a little buckle which is easy to adjust in the water. There is no need to have the strap squeezing your head like a pair of goggles and so is really comfortable for long sessions. The glasses are prevented from lifting up towards your eyebrows by the &#8220;eye socket engager&#8221; nose piece, which is stopped by the top of your eye socket. Again this is completely comfortable - despite its scary name - and definitely does not poke  around in your eye!</p>
<p>A leash provides an extra level of security. This leash connects the key loop inside your wetsuit to the strap. I found that it rubbed a bit the first couple of days but is comfortable now. So far the leash has not been needed but it is nice to have a backup.</p>
<h3>Style</h3>
<div id="attachment_22" class="wp-caption alignright" style="width: 110px"><a href="http://blog.jjhale.com/wp-content/uploads/2008/07/surfhead.jpg"><img class="size-full wp-image-22" title="surfhead" src="http://blog.jjhale.com/wp-content/uploads/2008/07/surfhead.jpg" alt="Checking out the waves." width="100" height="100" /></a><p class="wp-caption-text">Style?</p></div>
<p>The frames are simple wrap around sunnies. The photos on the web shows them with little<br />
&#8220;Silverfish&#8221; logos in the corner of the frame. Mine have no logo on them whatsoever. Some might call them plain. I think that these are more a utilitarian than a fashion product. Having said that I do wear them out of the water with the strap and nose piece removed.</p>
<h3>Silverfish Customer Service</h3>
<p>Silverfish is based in the USA and I ordered the sunglasses from South Africa. They were dispatched just 4 days after I ordered them (and this was over the weekend!) Getting across to South Africa took a while longer. I emailed them to see where they had got to a couple of weeks after ordering. I was told that they had been dispatched but that they did not track international orders. Would have been better if it had a tracking number or something. They eventually got to me about a month after I ordered them. The guy from Silverfish got back to me to make sure they&#8217;d arrived - which was nice.</p>
<h3>Conclusion</h3>
<p>I&#8217;m very happy with the Silverfish sunglasses. They are comfortable and stay on while I&#8217;m surfing. The sun protection is a great bonus. I also wear them as my main prescription sunglasses whilst out of the water.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.jjhale.com/archives/10/feed</wfw:commentRss>
		</item>
		<item>
		<title>Entering the web</title>
		<link>http://blog.jjhale.com/archives/3</link>
		<comments>http://blog.jjhale.com/archives/3#comments</comments>
		<pubDate>Thu, 10 Jul 2008 20:03:13 +0000</pubDate>
		<dc:creator>jjh</dc:creator>
		
		<category><![CDATA[Websites]]></category>

		<guid isPermaLink="false">http://blog.jjhale.com/?p=3</guid>
		<description><![CDATA[After a year of being under construction jjhale.com has got a wiki and a blog.]]></description>
			<content:encoded><![CDATA[<p>After about one year of <a title="Joe Hale's homepage" href="http://jjhale.com" target="_blank">jjhale.com</a> being under construction I have finally started paying it a little attention. I&#8217;ve started throwing money at the problem. My hosting account has been upgraded and I have installed a wiki and this blog. I also got carried away searching for shorter domain names (check out http://j-h.bz  - $30 not well spent I&#8217;m thinking).</p>
<p>I&#8217;ve started to read more about CSS and the separation of presentation and content. Loving the outrage of web developers who don&#8217;t like the learning curve. But these views seem to mostly be about four years old.</p>
<p>So new projects include developing some style and unifying the wiki, blog and site. I also guess that I need something to put in the site part. I suppose it will be nice and simple providing links to the wiki and blog. Still waiting on the latest version of a gallery to host all my amazing photos.</p>
<p>So in the mean time why not add to the wiki? You need to log in to edit pages but just e-mail me and I&#8217;ll set you up an account.</p>
<p><a title="The Wiki of jjhale.com - for all your reference needs" href="http://wiki.jjhale.com" target="_blank">http://wiki.jjhale.com</a></p>
<p>Now should I invest in http://jh.it ?</p>
<p style="text-align: right;"><em>jjh</em></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.jjhale.com/archives/3/feed</wfw:commentRss>
		</item>
	</channel>
</rss>
