<?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>The Black Hills Web Works blog</title>
	<atom:link href="http://www.blackhillswebworks.com/blog/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.blackhillswebworks.com/blog</link>
	<description>News, tutorials, and opinions from Black Hills Web Works</description>
	<lastBuildDate>Tue, 07 Sep 2010 14:30:39 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Staying focused</title>
		<link>http://www.blackhillswebworks.com/blog/2010/09/07/staying-focused/</link>
		<comments>http://www.blackhillswebworks.com/blog/2010/09/07/staying-focused/#comments</comments>
		<pubDate>Tue, 07 Sep 2010 14:30:39 +0000</pubDate>
		<dc:creator>John Sundberg</dc:creator>
				<category><![CDATA[Business]]></category>
		<category><![CDATA[time]]></category>

		<guid isPermaLink="false">http://www.blackhillswebworks.com/blog/?p=1014</guid>
		<description><![CDATA[A couple weeks ago I was approached by a sales team from a large company about adding a potentially profitable, tech-related service to what Black Hills Web Works is already doing. There is a definite need for the service I&#8217;m referring to.  Having additional &#8220;revenue streams&#8221; is an attractive idea.  But in the end I [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignright size-full wp-image-1015" title="stay focused" src="http://www.blackhillswebworks.com/blog/wp-content/uploads/2010/09/focus.jpg" alt="" width="216" height="216" />A couple weeks ago I was approached by a sales team from a large company about adding a potentially profitable, tech-related service to what <a href="http://www.blackhillswebworks.com/">Black Hills Web Works</a> is already doing.</p>
<p>There is a definite need for the service I&#8217;m referring to.  Having additional &#8220;revenue streams&#8221; is an attractive idea.  But in the end I turned it down (for the time being, anyway) because of time, which is only available in limited quantity, at least for me.  I decided that Black Hills Web Works is still deserving of and needing as much time as I can give it, and to take on another business opportunity at this point would not be wise.</p>
<p>Now that the dust has settled and I can focus again on what I need to be focusing on, I can&#8217;t help but feel that I passed some sort of test &#8211; the sort of test known really well by &#8220;bootstrappers&#8221; and entrepreneurs.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.blackhillswebworks.com/blog/2010/09/07/staying-focused/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Spending Labor Day with The Bootstrapper&#8217;s Bible (a manifesto) by Seth Godin</title>
		<link>http://www.blackhillswebworks.com/blog/2010/09/06/spending-labor-day-with-the-bootstrappers-bible-a-manifesto-by-seth-godin/</link>
		<comments>http://www.blackhillswebworks.com/blog/2010/09/06/spending-labor-day-with-the-bootstrappers-bible-a-manifesto-by-seth-godin/#comments</comments>
		<pubDate>Mon, 06 Sep 2010 18:58:03 +0000</pubDate>
		<dc:creator>John Sundberg</dc:creator>
				<category><![CDATA[Business]]></category>
		<category><![CDATA[bootstrapper]]></category>
		<category><![CDATA[entrepreneur]]></category>

		<guid isPermaLink="false">http://www.blackhillswebworks.com/blog/?p=1024</guid>
		<description><![CDATA[While doing some research for the now-in-process redesign of the Black Hills Web Works website I ran across a blog post by another website agency that mentioned The Bootstrapper&#8217;s Bible in passing.  I&#8217;m familiar with Seth Godin and have read several of his books, in whole or in part, but I hadn&#8217;t encountered this one [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://changethis.com/manifesto/download/8.BootstrappersBible" target="_blank"><img class="alignright size-full wp-image-1026" title="The Bootstrapper's Bible manifesto" src="http://www.blackhillswebworks.com/blog/wp-content/uploads/2010/09/bootstrappers-bible-manifesto-cover.jpg" alt="" width="400" height="309" /></a>While doing some research for the now-in-process redesign of the Black Hills Web Works website I ran across <a href="http://www.eliasinteractive.com/blog/how-to-jeopardize-your-business-with-ecommerce-and-what-to-do-when-youre-in-trouble" target="_blank">a blog post by another website agency</a> that mentioned <em>The Bootstrapper&#8217;s Bible</em> in passing.  I&#8217;m familiar with Seth Godin and have read several of his books, in whole or in part, but I hadn&#8217;t encountered this one yet.  As it turns out the book has been distilled into <a href="http://changethis.com/manifesto/download/8.BootstrappersBible" target="_blank">this manifesto</a> that I discovered this morning.  Seeing how <em>this is</em> Labor Day, I thought it worth my time to spend an hour or two reading through the 103 pages in this PDF, and I wasn&#8217;t mistaken.</p>
<p>I&#8217;m not going to attempt to &#8220;wax eloquent&#8221; about <em>The Bootstrapper&#8217;s Bible</em>, or even toss out any highlights, other than to repeat Godin&#8217;s purpose for writing this manifesto:</p>
<blockquote><p>You can use the information in this manifesto to make any company more focused, more efficient, and more grassroots.  Throughout this manifesto, though, I&#8217;ll be primarily addressing the classic bootstrapper: entrepreneurs who are working their butts off to start a great business from scratch with no (or almost no) money.</p>
</blockquote>
<p>I am going to recommend that you do yourself a favor and read it &#8211; for yourself.  I&#8217;m pretty sure you won&#8217;t be disappointed.  And if you&#8217;re a &#8220;bootstrapper&#8221; who is still in the process of pulling up the bootstraps of your very own company or small business venture, it may be just what you need to hear at this time in your life.</p>
<p>You can <a href="http://changethis.com/manifesto/download/8.BootstrappersBible" target="_blank">download a free copy at this link</a> or by clicking on the image above.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.blackhillswebworks.com/blog/2010/09/06/spending-labor-day-with-the-bootstrappers-bible-a-manifesto-by-seth-godin/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Burning candles and multitasking on a business level is a definite cure for boredom!</title>
		<link>http://www.blackhillswebworks.com/blog/2010/07/31/burning-candles-and-multitasking-on-a-business-level-is-a-definite-cure-for-boredom/</link>
		<comments>http://www.blackhillswebworks.com/blog/2010/07/31/burning-candles-and-multitasking-on-a-business-level-is-a-definite-cure-for-boredom/#comments</comments>
		<pubDate>Sat, 31 Jul 2010 19:33:40 +0000</pubDate>
		<dc:creator>John Sundberg</dc:creator>
				<category><![CDATA[Life in General]]></category>

		<guid isPermaLink="false">http://www.blackhillswebworks.com/blog/?p=959</guid>
		<description><![CDATA[Earlier this spring my other company had an opportunity to build a pretty big remodel project, and so we did.  I knew it was going to be somewhat hectic running two businesses at one time, but I didn&#8217;t realize just how crazy it would be.  One expression that comes to mind is &#8220;burning the candle [...]]]></description>
			<content:encoded><![CDATA[<p>Earlier this spring <a href="http://www.sundbergbuilders.com/" target="_blank">my other company</a> had an opportunity to build a pretty big remodel project, and so we did.  I knew it was going to be somewhat hectic running two businesses at one time, but I didn&#8217;t realize just how crazy it would be.  One expression that comes to mind is &#8220;burning the candle at both ends&#8221;&#8230;but this was more like burning multiple candles simultaneously at both ends!</p>
<p>What ended up happening to Black Hills Web Works is that I put it on autopilot for the last three months with little to no blogging and no new projects.  We continued to maintain the websites for our current clients, finished up <a href="http://www.parkviewefc.org/" target="_blank">a church website project</a> and did some on-site training with their staff, and helped our current clients with any issues or problems that came up, but for the most part my time and energy were committed to the remodel project for Sundberg Builders.</p>
<p>A nice side-benefit of taking an active break from a project or task is that you can let your mind do some subconscious work on whatever that is, and in this case, it was Black Hills Web Works.  So I&#8217;ve got some ideas and plans for the company, this website, and future projects that I&#8217;m looking forward to working on and implementing.  As for my other company, I think it&#8217;s time to start winding it down so I can focus on Black Hills Web Works exclusively.  Time will tell how that works out in reality.</p>
<p>In the meantime, I thought I&#8217;d post some before and after photos from the previously mentioned remodel project.  If you&#8217;re interested in this type of thing, enjoy!</p>
<h3>Before</h3>
<a rel="rokbox[640 427]"  href="http://www.blackhillswebworks.com/blog/wp-content/uploads/2010/07/2010_04_19_0030.jpg"><img class="rokbox-thumb" src="http://www.blackhillswebworks.com/blog/wp-content/uploads/2010/07/2010_04_19_00301.jpg" alt="" /></a>
<a rel="rokbox[640 427]"  href="http://www.blackhillswebworks.com/blog/wp-content/uploads/2010/07/2010_04_19_0037.jpg"><img class="rokbox-thumb" src="http://www.blackhillswebworks.com/blog/wp-content/uploads/2010/07/2010_04_19_00371.jpg" alt="" /></a>
<a rel="rokbox[640 427]"  href="http://www.blackhillswebworks.com/blog/wp-content/uploads/2010/07/2010_04_19_0039.jpg"><img class="rokbox-thumb" src="http://www.blackhillswebworks.com/blog/wp-content/uploads/2010/07/2010_04_19_00391.jpg" alt="" /></a>
<h3>After</h3>
<a rel="rokbox[640 427]"  href="http://www.blackhillswebworks.com/blog/wp-content/uploads/2010/07/2010_07_07_0498.jpg"><img class="rokbox-thumb" src="http://www.blackhillswebworks.com/blog/wp-content/uploads/2010/07/2010_07_07_04981.jpg" alt="" /></a>
<a rel="rokbox[640 427]"  href="http://www.blackhillswebworks.com/blog/wp-content/uploads/2010/07/2010_07_07_0545.jpg"><img class="rokbox-thumb" src="http://www.blackhillswebworks.com/blog/wp-content/uploads/2010/07/2010_07_07_05451.jpg" alt="" /></a>
<a rel="rokbox[640 427]"  href="http://www.blackhillswebworks.com/blog/wp-content/uploads/2010/07/2010_07_07_0485.jpg"><img class="rokbox-thumb" src="http://www.blackhillswebworks.com/blog/wp-content/uploads/2010/07/2010_07_07_04851.jpg" alt="" /></a>
]]></content:encoded>
			<wfw:commentRss>http://www.blackhillswebworks.com/blog/2010/07/31/burning-candles-and-multitasking-on-a-business-level-is-a-definite-cure-for-boredom/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>New Joomla website launched for Parkview Evangelical Free Church in Rapid City, SD</title>
		<link>http://www.blackhillswebworks.com/blog/2010/05/29/new-joomla-website-launched-for-parkview-evangelical-free-church-in-rapid-city-sd/</link>
		<comments>http://www.blackhillswebworks.com/blog/2010/05/29/new-joomla-website-launched-for-parkview-evangelical-free-church-in-rapid-city-sd/#comments</comments>
		<pubDate>Sat, 29 May 2010 18:20:37 +0000</pubDate>
		<dc:creator>John Sundberg</dc:creator>
				<category><![CDATA[Website Projects]]></category>
		<category><![CDATA[churches]]></category>
		<category><![CDATA[websites]]></category>

		<guid isPermaLink="false">http://www.blackhillswebworks.com/blog/?p=918</guid>
		<description><![CDATA[Our latest project at Black Hills Web Works is a new website for Parkview Evangelical Free Church in Rapid City, South Dakota.  Parkview recently changed the name of their church and moved into a brand new building, and the new website was timed, more or less, to coincide with these significant changes. The Parkview website, [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.parkviewefc.org/" target="_blank"><img class="alignright size-full wp-image-924" title="Parkview Evangelical Free Church" src="http://www.blackhillswebworks.com/blog/wp-content/uploads/2010/05/parkview-screenshot.jpg" alt="" width="300" height="300" /></a>Our latest project at Black Hills Web Works is a new website for <a href="http://www.parkviewefc.org/" target="_blank">Parkview Evangelical Free Church</a> in Rapid City, South Dakota.  Parkview recently changed the name of their church <span style="text-decoration: underline;">and</span> moved into a brand new building, and the new website was timed, more or less, to coincide with these significant changes.</p>
<p>The Parkview website, <a href="http://www.parkviewefc.org/" target="_blank">www.parkviewefc.org</a>, is powered by the Joomla CMS (Content Management System) and was built using the <a href="http://www.rockettheme.com/joomla-templates/crystalline" target="_blank">Crystalline template from RocketTheme</a>.  Crystalline is built on <a href="http://gantry-framework.org/" target="_blank">the Gantry Framework</a> and I have to say that I am impressed with the flexibility and power of this framework for building websites.</p>
<p><span id="more-918"></span></p>
<h3>An Online Resource</h3>
<p>The website is designed to be the &#8220;go to&#8221; place for resources and information about Parkview, keeping church members and visitors alike informed about what&#8217;s happening at Parkview.</p>
<p>Some key features of the website are:</p>
<ul>
<li>an embedded online sermon audio player hosted by <a href="http://sermon.net/" target="_blank">Sermon.net</a></li>
<li>an embedded Google map for directions to the church</li>
<li>embedded Google calendars displaying schedules for the church and its ministries</li>
<li>an integrated sign-up form for church email newsletters <a href="http://www.mailchimp.com/" target="_blank">powered by MailChimp</a></li>
<li>multiple slide shows for displaying photos of various church ministries, activities, and trips</li>
<li>a pull-down Quick Menu which serves as a site map on every page</li>
<li>weekly bulletins in PDF format</li>
<li>archives of forms and newsletters as PDFs for the Student Ministry</li>
</ul>
<h3>Client-managed Content</h3>
<p>Parkview really wanted a website that would enable them to manage and update their content on a regular basis, and Joomla CMS is a perfect solution for this requirement.  Of course, like most technologies, using Joomla does involve a learning curve, and this project includes on-site training and a custom User&#8217;s Manual to help the Parkview staff become familiar with how to use their new website.  That training is scheduled for this coming week, and after that we&#8217;ll be &#8220;handing them the keys&#8221; to their website and its content.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.blackhillswebworks.com/blog/2010/05/29/new-joomla-website-launched-for-parkview-evangelical-free-church-in-rapid-city-sd/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Seth Godin on the value of the very small business</title>
		<link>http://www.blackhillswebworks.com/blog/2010/04/03/seth-godin-on-the-value-of-the-very-small-business/</link>
		<comments>http://www.blackhillswebworks.com/blog/2010/04/03/seth-godin-on-the-value-of-the-very-small-business/#comments</comments>
		<pubDate>Sat, 03 Apr 2010 14:45:35 +0000</pubDate>
		<dc:creator>John Sundberg</dc:creator>
				<category><![CDATA[Business]]></category>

		<guid isPermaLink="false">http://www.blackhillswebworks.com/blog/?p=912</guid>
		<description><![CDATA[I brought Seth Godin&#8217;s book Small is the New Big home this week and have been doing some reading.  Not all at once, of course, since that&#8217;s what he advised in his &#8220;Warning&#8221; preface: &#8220;Don&#8217;t read this book all at once.  It took eight years to write, and if you read it in one sitting, [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignright size-medium wp-image-914" title="Small is the New Big" src="http://www.blackhillswebworks.com/blog/wp-content/uploads/2010/04/small-is-the-new-big-198x300.jpg" alt="Small is the New Big" width="198" height="300" />I brought Seth Godin&#8217;s book <a href="http://www.amazon.com/Small-New-Big-Remarkable-Business/dp/1591841267/ref=sr_1_1?ie=UTF8&amp;s=books&amp;qid=1270305630&amp;sr=8-1" target="_blank"><em>Small is the New Big</em></a> home this week and have been doing some reading.  Not all at once, of course, since that&#8217;s what he advised in his &#8220;Warning&#8221; preface: &#8220;Don&#8217;t read this book all at once.  It took eight years to write, and if you read it in one sitting, it&#8217;ll give you a headache.&#8221;  And so I&#8217;m taking his advice.</p>
<p>One chapter towards the end of the book is called &#8220;Start Now &#8211; Hurry!&#8221;, and though I haven&#8217;t read the entire book yet it seems to me that several paragraphs out of this chapter capture the essence of his message, or close to it.  Here they are:</p>
<blockquote><p>Here&#8217;s the crux of the matter: Organizations where the people doing the work are the very same people who are making the decisions are more likely to succeed in the long run.  Just about all the sins of American business (from environmental despoliation to accounting fraud) can be pinned on the anonymous bureaucracy.  Entrepreneurs can&#8217;t be anonymous &#8212; it&#8217;s your decision, your policy, your work, your business &#8212; and so you&#8217;re fast and honest, or you&#8217;re out.  There&#8217;s nowhere else to pass the buck.</p>
<p>Is it scary?  Well, just for a second, consider the alternative.  You could work for Motorola or Adelphia or even AT&amp;T, always wondering when the company is going to downsize at the same time that you are busy doing whatever the boss asked just to be sure you&#8217;ll be the last to get fired.</p>
<p>Sounds to me like running a tiny business is totally safe in comparison.</p>
</blockquote>
<p>I&#8217;ve been &#8220;running a tiny business&#8221; or two for the last ten years, and even though there are plenty of challenges and hardships, when he puts it like that, I&#8217;m going to have to agree with him.  Here&#8217;s to all the &#8220;tiny businesses&#8221; and one-man (or woman) shows out there in the business world!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.blackhillswebworks.com/blog/2010/04/03/seth-godin-on-the-value-of-the-very-small-business/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Fixing the &#8220;Invalid Token&#8221; error for Joomla contact forms</title>
		<link>http://www.blackhillswebworks.com/blog/2010/04/02/fixing-the-invalid-token-error-for-joomla-contact-forms/</link>
		<comments>http://www.blackhillswebworks.com/blog/2010/04/02/fixing-the-invalid-token-error-for-joomla-contact-forms/#comments</comments>
		<pubDate>Fri, 02 Apr 2010 17:23:57 +0000</pubDate>
		<dc:creator>John Sundberg</dc:creator>
				<category><![CDATA[Joomla!]]></category>
		<category><![CDATA[Tutorials]]></category>

		<guid isPermaLink="false">http://www.blackhillswebworks.com/blog/?p=889</guid>
		<description><![CDATA[I recently noticed that sometimes the Joomla core contact form will give an &#8220;Invalid Token&#8221; error page when a website visitor uses the contact form to send a message to the owner of the website.  This screen is unmistakable, and somewhat shocking to the unsuspecting website visitor, as it is completely blank except for the [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignright size-full wp-image-906" title="tools" src="http://www.blackhillswebworks.com/blog/wp-content/uploads/2010/04/j0432556.png" alt="" width="180" height="180" />I recently noticed that <em>sometimes</em> the Joomla core contact form will give an &#8220;Invalid Token&#8221; error page when a website visitor uses the contact form to send a message to the owner of the website.  This screen is unmistakable, and somewhat shocking to the unsuspecting website visitor, as it is completely blank except for the words &#8220;Invalid Token&#8221; in the upper-left corner of the browser window.</p>
<p>What also happens, and this is the really frustrating part, is that their message does not make it to its intended recipient, the sender of the message probably won&#8217;t try again, and it makes you and your website look rather incompetent.  What&#8217;s also frustrating is that you may not know your website is doing this unless you try your own submission form several times in a row.</p>
<p>I discovered the problem by checking <a href="http://www.blackhillswebworks.com/blog/2009/12/03/fighting-spam-with-moovur-and-mollom/">the Moovur/Mollom log</a> of <a href="http://aheartforjustice.com/" target="_blank">one website we&#8217;ve built</a>.  This log keeps track of all contact form submissions, both spam and ham.  What&#8217;s recorded is the date, the name, email address, message subject, and a brief excerpt from the message.  What clued me in is that there were messages listed in that log that the owner of the website had not received.  (How did I know they hadn&#8217;t been received?  I happen to know the website owner very well &#8211; she&#8217;s my wife!)</p>
<p>Here&#8217;s how to fix it&#8230;</p>
<h3><span id="more-889"></span>The Fix</h3>
<p>I googled this issue and what I found were more problems listed than solutions, but you only need one solution to fix a problem, and the one I found was posted on <a href="http://joomlacode.org/gf/" target="_blank">the JoomlaCode website</a> a few months ago at <a href="http://joomlacode.org/gf/project/joomla/tracker/?action=TrackerItemEdit&amp;tracker_item_id=19435" target="_blank">this thread</a>.  The patch you need to fix this issue is found at the bottom of that page.  Download the patch, open it in your favorite text editor (I recommend <a href="http://notepad-plus.sourceforge.net/uk/site.htm" target="_blank">Notepad++</a>), copy and paste it in the correct place in the <code>controller.php</code> file found in your <code>components/com_contact</code> directory, clean your website cache, and go to your contact form on your website to make sure it&#8217;s still working.  Oh yeah, don&#8217;t forget to backup your site first!</p>
<p>The status on this bug is &#8220;Fixed in SVN&#8221;, so it should be included in the next Joomla 1.5 maintenance release (1.5.16).  Until then, and if for some unknown reason you don&#8217;t want to update your Joomla website to the latest version, this blog post is for you.</p>
<h3>The Fix in greater detail</h3>
<p>I&#8217;ve listed the contents of the patch file here, to point out that <strong>you need to remove the plus signs at the beginning of each line</strong> or your contact form won&#8217;t work or even load in your browser.  The plus signs indicate which lines have been added to the original code.</p>
<div id="wpshdo_1" class="wp-synhighlighter-outer"><div id="wpshdt_1" class="wp-synhighlighter-expanded"><table border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_1"></a><a id="wpshat_1" class="wp-synhighlighter-title" href="#codesyntax_1"  onClick="javascript:wpsh_toggleBlock(1)" title="Click to show/hide code block">Contact form Invalid Token patch</a></td><td align="right"><a href="#codesyntax_1" onClick="javascript:wpsh_code(1)" title="Show code only"><img border="0" style="border: 0 none" src="http://www.blackhillswebworks.com/blog/wp-content/plugins/wp-synhighlight/themes/default/images/code.png" /></a>&nbsp;<a href="#codesyntax_1" onClick="javascript:wpsh_print(1)" title="Print code"><img border="0" style="border: 0 none" src="http://www.blackhillswebworks.com/blog/wp-content/plugins/wp-synhighlight/themes/default/images/printer.png" /></a>&nbsp;<a href="http://www.blackhillswebworks.com/blog/wp-content/plugins/wp-synhighlight/About.html" target="_blank" title="Show plugin information"><img border="0" style="border: 0 none" src="http://www.blackhillswebworks.com/blog/wp-content/plugins/wp-synhighlight/themes/default/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_1" class="wp-synhighlighter-inner" style="display: block;"><pre class="php" style="font-family:monospace;"><span class="kw1">if</span> <span class="br0">&#40;</span><span class="re0">$user</span><span class="sy0">-&gt;</span><span class="me1">get</span><span class="br0">&#40;</span><span class="st_h">'id'</span><span class="br0">&#41;</span> <span class="sy0">||</span> <span class="br0">&#40;</span><span class="re0">$viewnow</span> <span class="sy0">==</span> <span class="st_h">'category'</span> <span class="sy0">&amp;&amp;</span> <span class="re0">$viewcache</span> <span class="sy0">==</span> 0<span class="br0">&#41;</span><span class="br0">&#41;</span> <span class="br0">&#123;</span>
 			<span class="re0">$view</span><span class="sy0">-&gt;</span><span class="me1">display</span><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="sy0">;</span>
 		<span class="br0">&#125;</span> <span class="kw1">else</span> <span class="br0">&#123;</span>
<span class="sy0">+</span>
<span class="sy0">+</span>			<span class="co1">// Workaround for token caching</span>
<span class="sy0">+</span>			<span class="kw1">if</span> <span class="br0">&#40;</span><span class="re0">$viewName</span> <span class="sy0">==</span> <span class="st_h">'contact'</span><span class="br0">&#41;</span>
<span class="sy0">+</span>			<span class="br0">&#123;</span>
<span class="sy0">+</span>				<a href="http://www.php.net/ob_start"><span class="kw3">ob_start</span></a><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="sy0">;</span>
<span class="sy0">+</span>			<span class="br0">&#125;</span>
<span class="sy0">+</span>
 			<span class="re0">$option</span> <span class="sy0">=</span> JRequest<span class="sy0">::</span><span class="me2">getCmd</span><span class="br0">&#40;</span><span class="st_h">'option'</span><span class="br0">&#41;</span><span class="sy0">;</span>
 			<span class="re0">$cache</span> <span class="sy0">=&amp;</span> JFactory<span class="sy0">::</span><span class="me2">getCache</span><span class="br0">&#40;</span><span class="re0">$option</span><span class="sy0">,</span> <span class="st_h">'view'</span><span class="br0">&#41;</span><span class="sy0">;</span>
 			<span class="re0">$cache</span><span class="sy0">-&gt;</span><span class="me1">get</span><span class="br0">&#40;</span><span class="re0">$view</span><span class="sy0">,</span> <span class="st_h">'display'</span><span class="br0">&#41;</span><span class="sy0">;</span>
<span class="sy0">+</span>
<span class="sy0">+</span>			<span class="co1">// Workaround for token caching</span>
<span class="sy0">+</span>			<span class="kw1">if</span> <span class="br0">&#40;</span><span class="re0">$viewName</span> <span class="sy0">==</span> <span class="st_h">'contact'</span><span class="br0">&#41;</span>
<span class="sy0">+</span>			<span class="br0">&#123;</span>
<span class="sy0">+</span>				<span class="re0">$contents</span> <span class="sy0">=</span> <a href="http://www.php.net/ob_get_contents"><span class="kw3">ob_get_contents</span></a><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="sy0">;</span>
<span class="sy0">+</span>				<a href="http://www.php.net/ob_end_clean"><span class="kw3">ob_end_clean</span></a><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="sy0">;</span>
<span class="sy0">+</span>
<span class="sy0">+</span>				<span class="re0">$token</span>			<span class="sy0">=</span> JUtility<span class="sy0">::</span><span class="me2">getToken</span><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="sy0">;</span>
<span class="sy0">+</span>				<span class="re0">$search</span> 		<span class="sy0">=</span> <span class="st_h">'#&lt;input type=&quot;hidden&quot; name=&quot;[0-9a-f]{32}&quot; value=&quot;1&quot; /&gt;#'</span><span class="sy0">;</span>
<span class="sy0">+</span>				<span class="re0">$replacement</span> 	<span class="sy0">=</span> <span class="st_h">'&lt;input type=&quot;hidden&quot; name=&quot;'</span><span class="sy0">.</span><span class="re0">$token</span><span class="sy0">.</span><span class="st_h">'&quot; value=&quot;1&quot; /&gt;'</span><span class="sy0">;</span>
<span class="sy0">+</span>
<span class="sy0">+</span>				<span class="kw1">echo</span> <a href="http://www.php.net/preg_replace"><span class="kw3">preg_replace</span></a><span class="br0">&#40;</span><span class="re0">$search</span><span class="sy0">,</span> <span class="re0">$replacement</span><span class="sy0">,</span> <span class="re0">$contents</span><span class="br0">&#41;</span><span class="sy0">;</span>
<span class="sy0">+</span>			<span class="br0">&#125;</span>
 		<span class="br0">&#125;</span>
 	<span class="br0">&#125;</span></pre></div></div>
<p>I suppose it goes without saying, but I&#8217;m going to say it anyway, that you need to insert the patch in the right place or it&#8217;s not going to work.  The code you&#8217;re replacing is the following, found at lines 78-85 (in 1.5.15, at least):</p>
<div id="wpshdo_2" class="wp-synhighlighter-outer"><div id="wpshdt_2" class="wp-synhighlighter-expanded"><table border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_2"></a><a id="wpshat_2" class="wp-synhighlighter-title" href="#codesyntax_2"  onClick="javascript:wpsh_toggleBlock(2)" title="Click to show/hide code block">Contact Form original lines of code (78-85)</a></td><td align="right"><a href="#codesyntax_2" onClick="javascript:wpsh_code(2)" title="Show code only"><img border="0" style="border: 0 none" src="http://www.blackhillswebworks.com/blog/wp-content/plugins/wp-synhighlight/themes/default/images/code.png" /></a>&nbsp;<a href="#codesyntax_2" onClick="javascript:wpsh_print(2)" title="Print code"><img border="0" style="border: 0 none" src="http://www.blackhillswebworks.com/blog/wp-content/plugins/wp-synhighlight/themes/default/images/printer.png" /></a>&nbsp;<a href="http://www.blackhillswebworks.com/blog/wp-content/plugins/wp-synhighlight/About.html" target="_blank" title="Show plugin information"><img border="0" style="border: 0 none" src="http://www.blackhillswebworks.com/blog/wp-content/plugins/wp-synhighlight/themes/default/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_2" class="wp-synhighlighter-inner" style="display: block;"><pre class="php" style="font-family:monospace;"><span class="kw1">if</span> <span class="br0">&#40;</span><span class="re0">$user</span><span class="sy0">-&gt;</span><span class="me1">get</span><span class="br0">&#40;</span><span class="st_h">'id'</span><span class="br0">&#41;</span> <span class="sy0">||</span> <span class="br0">&#40;</span><span class="re0">$viewnow</span> <span class="sy0">==</span> <span class="st_h">'category'</span> <span class="sy0">&amp;&amp;</span> <span class="re0">$viewcache</span> <span class="sy0">==</span> 0<span class="br0">&#41;</span><span class="br0">&#41;</span> <span class="br0">&#123;</span>
			<span class="re0">$view</span><span class="sy0">-&gt;</span><span class="me1">display</span><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="sy0">;</span>
		<span class="br0">&#125;</span> <span class="kw1">else</span> <span class="br0">&#123;</span>
			<span class="re0">$option</span> <span class="sy0">=</span> JRequest<span class="sy0">::</span><span class="me2">getCmd</span><span class="br0">&#40;</span><span class="st_h">'option'</span><span class="br0">&#41;</span><span class="sy0">;</span>
			<span class="re0">$cache</span> <span class="sy0">=&amp;</span> JFactory<span class="sy0">::</span><span class="me2">getCache</span><span class="br0">&#40;</span><span class="re0">$option</span><span class="sy0">,</span> <span class="st_h">'view'</span><span class="br0">&#41;</span><span class="sy0">;</span>
			<span class="re0">$cache</span><span class="sy0">-&gt;</span><span class="me1">get</span><span class="br0">&#40;</span><span class="re0">$view</span><span class="sy0">,</span> <span class="st_h">'display'</span><span class="br0">&#41;</span><span class="sy0">;</span>
		<span class="br0">&#125;</span>
	<span class="br0">&#125;</span></pre></div></div>
<p><br class="spacer_" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.blackhillswebworks.com/blog/2010/04/02/fixing-the-invalid-token-error-for-joomla-contact-forms/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>A gnat&#8217;s toot in a hurricane</title>
		<link>http://www.blackhillswebworks.com/blog/2010/03/03/a-gnats-toot-in-a-hurricane/</link>
		<comments>http://www.blackhillswebworks.com/blog/2010/03/03/a-gnats-toot-in-a-hurricane/#comments</comments>
		<pubDate>Wed, 03 Mar 2010 16:39:14 +0000</pubDate>
		<dc:creator>John Sundberg</dc:creator>
				<category><![CDATA[Business]]></category>
		<category><![CDATA[Dilbert]]></category>

		<guid isPermaLink="false">http://www.blackhillswebworks.com/blog/?p=877</guid>
		<description><![CDATA[If nothing else, this strip shows the importance of business systems and the challenge of keeping things, such as vendor contracts, organized and current.  Beyond that, I thought it was pretty funny.]]></description>
			<content:encoded><![CDATA[<p>If nothing else, this strip shows the importance of business systems and the challenge of keeping things, such as vendor contracts, organized and current.  Beyond that, I thought it was pretty funny.</p>
<p><br class="spacer_" /></p>
<p><a title="Dilbert.com" href="http://dilbert.com/strips/comic/2009-01-18/" target="_blank"><img src="http://dilbert.com/dyn/str_strip/000000000/00000000/0000000/000000/30000/8000/500/38519/38519.strip.sunday.gif" border="0" alt="Dilbert.com" /></a></p>
<p><br class="spacer_" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.blackhillswebworks.com/blog/2010/03/03/a-gnats-toot-in-a-hurricane/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Managing your WordPress post revisions</title>
		<link>http://www.blackhillswebworks.com/blog/2010/03/01/managing-your-wordpress-post-revisions/</link>
		<comments>http://www.blackhillswebworks.com/blog/2010/03/01/managing-your-wordpress-post-revisions/#comments</comments>
		<pubDate>Mon, 01 Mar 2010 14:00:43 +0000</pubDate>
		<dc:creator>John Sundberg</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://www.blackhillswebworks.com/blog/?p=852</guid>
		<description><![CDATA[If you&#8217;re using a self-hosted version of WordPress you may have noticed that WordPress is keeping copies of every post revision you make.  While this can be helpful in rolling a post back to an earlier version, the number of revisions can quickly get out of hand.  These revisions are stored in your database, and [...]]]></description>
			<content:encoded><![CDATA[<p>If you&#8217;re using a self-hosted version of WordPress you may have noticed that WordPress is keeping copies of every post revision you make.  While this can be helpful in rolling a post back to an earlier version, the number of revisions can quickly get out of hand.  These revisions are stored in your database, and once a post is published you probably don&#8217;t need them anymore.  There are a few plugins that can help you manage these revisions, but in my opinion, if you can do this without adding another plugin, so much the better.</p>
<p>There&#8217;s a lot of information on the web about this topic, and I filtered through it recently and came up with this solution.<span id="more-852"></span></p>
<h3>Backup your database</h3>
<p>First, backup your database.  I use a plugin called <a href="http://wordpress.org/extend/plugins/wp-dbmanager/" target="_blank">WP-DBManager</a><strong> </strong> to manage my database.  If you don&#8217;t have a working solution for backing up, restoring, and managing your database, you really should look into using this plugin or something similar.</p>
<h3>Modify your wp-config.php file</h3>
<p>Next, open your <code>wp-config.php</code> file in <a href="http://notepad-plus.sourceforge.net/uk/site.htm" target="_blank">your favorite text editor</a> and add the following code:</p>
<p><br class="spacer_" /></p>
<div id="wpshdo_3" class="wp-synhighlighter-outer"><div id="wpshdt_3" class="wp-synhighlighter-expanded"><table border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_3"></a><a id="wpshat_3" class="wp-synhighlighter-title" href="#codesyntax_3"  onClick="javascript:wpsh_toggleBlock(3)" title="Click to show/hide code block">Add this to wp-config.php</a></td><td align="right"><a href="#codesyntax_3" onClick="javascript:wpsh_code(3)" title="Show code only"><img border="0" style="border: 0 none" src="http://www.blackhillswebworks.com/blog/wp-content/plugins/wp-synhighlight/themes/default/images/code.png" /></a>&nbsp;<a href="#codesyntax_3" onClick="javascript:wpsh_print(3)" title="Print code"><img border="0" style="border: 0 none" src="http://www.blackhillswebworks.com/blog/wp-content/plugins/wp-synhighlight/themes/default/images/printer.png" /></a>&nbsp;<a href="http://www.blackhillswebworks.com/blog/wp-content/plugins/wp-synhighlight/About.html" target="_blank" title="Show plugin information"><img border="0" style="border: 0 none" src="http://www.blackhillswebworks.com/blog/wp-content/plugins/wp-synhighlight/themes/default/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_3" class="wp-synhighlighter-inner" style="display: block;"><pre class="php" style="font-family:monospace;"><span class="co4">/** Added the following to limit the number of post revisions */</span>
<a href="http://www.php.net/define"><span class="kw3">define</span></a><span class="br0">&#40;</span><span class="st_h">'WP_POST_REVISIONS'</span><span class="sy0">,</span> 3<span class="br0">&#41;</span><span class="sy0">;</span></pre></div></div>
<p><br class="spacer_" /></p>
<p>I used &#8220;3&#8243; in this example, which will limit the number of revisions to 3, but you can change that to any number you like.  Also, I added the code at line 36, after the lines referring to &#8220;Database Collate.&#8221;</p>
<p>When you&#8217;re finished, save the file and FTP it back to your site.</p>
<h3>Delete existing post revisions</h3>
<p>Modifying your <code>wp-config.php</code> only works for future posts, not existing ones.  If you want to remove all the revisions that are still in your database you can do that with the following SQL query.  Note: I am not a database or SQL expert, and this information is readily available elsewhere on the web if you would like to verify it.  I do know that this query worked for me.</p>
<p>Login to your cpanel and open &#8220;phpMyAdmin&#8221; by clicking on the &#8220;phpMyAdmin&#8221; icon in the Databases section.  Once &#8220;phpMyAdmin&#8221; opens, click on the name of the database that WordPress is using.  Near the top of the screen click on the tab labeled &#8220;SQL&#8221; and you should see an empty textbox.  In this textbox paste the following code:</p>
<p><br class="spacer_" /></p>
<div id="wpshdo_4" class="wp-synhighlighter-outer"><div id="wpshdt_4" class="wp-synhighlighter-expanded"><table border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_4"></a><a id="wpshat_4" class="wp-synhighlighter-title" href="#codesyntax_4"  onClick="javascript:wpsh_toggleBlock(4)" title="Click to show/hide code block">SQL query to delete existing post revisions</a></td><td align="right"><a href="#codesyntax_4" onClick="javascript:wpsh_code(4)" title="Show code only"><img border="0" style="border: 0 none" src="http://www.blackhillswebworks.com/blog/wp-content/plugins/wp-synhighlight/themes/default/images/code.png" /></a>&nbsp;<a href="#codesyntax_4" onClick="javascript:wpsh_print(4)" title="Print code"><img border="0" style="border: 0 none" src="http://www.blackhillswebworks.com/blog/wp-content/plugins/wp-synhighlight/themes/default/images/printer.png" /></a>&nbsp;<a href="http://www.blackhillswebworks.com/blog/wp-content/plugins/wp-synhighlight/About.html" target="_blank" title="Show plugin information"><img border="0" style="border: 0 none" src="http://www.blackhillswebworks.com/blog/wp-content/plugins/wp-synhighlight/themes/default/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_4" class="wp-synhighlighter-inner" style="display: block;"><pre class="php" style="font-family:monospace;">DELETE a<span class="sy0">,</span>b<span class="sy0">,</span>c
FROM wp_posts a
LEFT <a href="http://www.php.net/join"><span class="kw3">JOIN</span></a> wp_term_relationships b ON <span class="br0">&#40;</span>a<span class="sy0">.</span>ID <span class="sy0">=</span> b<span class="sy0">.</span>object_id<span class="br0">&#41;</span>
LEFT <a href="http://www.php.net/join"><span class="kw3">JOIN</span></a> wp_postmeta c ON <span class="br0">&#40;</span>a<span class="sy0">.</span>ID <span class="sy0">=</span> c<span class="sy0">.</span>post_id<span class="br0">&#41;</span>
WHERE a<span class="sy0">.</span>post_type <span class="sy0">=</span> <span class="st_h">'revision'</span></pre></div></div>
<p><br class="spacer_" /></p>
<p>If you&#8217;ve changed the default database prefixes to something other than &#8220;wp_&#8221; you will need to change that text in the three places where it occurs in the above example. <strong> If you haven&#8217;t changed the default database prefix, you really should for security reasons, but that&#8217;s a topic for another post.</strong></p>
<p>When you&#8217;ve made any necessary changes to the code, click on the &#8220;Go&#8221; button at the bottom right of the SQL query textbox, and your existing post revisions will cease to exist and your database will be smaller &#8211; perhaps significantly smaller.</p>
<p>If you set your post revisions to &#8220;3&#8243; like I did, eventually those are going to add up as well.  My plan is to run this SQL query every so often in the future.  It&#8217;s not a &#8220;set it and forget it&#8221; solution, but it&#8217;s not all that difficult either.</p>
<p>You can read more about this in <a href="http://codex.wordpress.org/Editing_wp-config.php" target="_blank">the WordPress codex</a> and in <a href="http://wordpress.org/support/topic/360091?replies=12" target="_blank">the WordPress forums</a>.</p>
<p><br class="spacer_" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.blackhillswebworks.com/blog/2010/03/01/managing-your-wordpress-post-revisions/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Essential Joomla extensions for any Joomla website</title>
		<link>http://www.blackhillswebworks.com/blog/2010/02/27/essential-joomla-extensions-for-any-joomla-website/</link>
		<comments>http://www.blackhillswebworks.com/blog/2010/02/27/essential-joomla-extensions-for-any-joomla-website/#comments</comments>
		<pubDate>Sat, 27 Feb 2010 15:50:24 +0000</pubDate>
		<dc:creator>John Sundberg</dc:creator>
				<category><![CDATA[Joomla Extensions]]></category>
		<category><![CDATA[Joomla extensions]]></category>

		<guid isPermaLink="false">http://www.blackhillswebworks.com/blog/?p=828</guid>
		<description><![CDATA[After you&#8217;ve built one or more Joomla websites you will start to realize that there are a handful of Joomla extensions that, in your opinion, should have been included with the standard Joomla package.  As it is, you&#8217;ll need to assemble your personal collection of tools and add them to your website.  Everybody has their [...]]]></description>
			<content:encoded><![CDATA[<p><img class="size-full wp-image-837 alignright" title="toolbox" src="http://www.blackhillswebworks.com/blog/wp-content/uploads/2010/02/toolbox.png" alt="" width="206" height="205" />After you&#8217;ve built one or more <a href="http://www.joomla.org/" target="_blank">Joomla</a> websites you will start to realize that there are a handful of Joomla extensions that, in your opinion, should have been included with the standard Joomla package.  As it is, you&#8217;ll need to assemble your personal collection of tools and add them to your website.  Everybody has their own list . . . here&#8217;s mine:<span id="more-828"></span></p>
<ol>
<li><a href="http://www.joomlacontenteditor.net/" target="_blank">JCE</a> &#8211; TinyMCE, the WYSIWYG editor that is included with Joomla just doesn&#8217;t cut it.  JCE (Joomla Content Editor) works, and works well.  Install it, set it as your default editor in Global Configuration → Site, and then disable the TinyMCE plugin under Extensions → Plugin Manager.</li>
<li><a href="http://www.akeebabackup.com/" target="_blank">JoomlaPack</a> &#8211; Having <em>and using</em> a dependable backup utility is essential to Joomla website security and your peace of mind.  More than that, you can also use JoomlaPack to move a Joomla website from your local machine to your web server after you&#8217;ve built the site, or vice versa.  Want to run scheduled backups?  Use <a href="http://www.akeebabackup.com/download/akeeba-remote-control-25/index.html" target="_blank">JoomlaPack Remote</a> to &#8220;set it and forget it.&#8221;
<ol>
<li>As of Friday, February 26, 2010, JoomlaPack is now known as  AkeebaBackup.  You can <a href="http://www.akeebabackup.com/releases/akeeba-backup-3-0-alpha-released.html" target="_blank">read about that change here</a>.</li>
</ol>
</li>
<li> <a href="http://moovum.com/" target="_blank">Moovur</a> &#8211; I&#8217;ve <a href="http://www.blackhillswebworks.com/blog/2009/12/03/fighting-spam-with-moovur-and-mollom/">written about this before</a>, but Moovur is a Joomla extension that allows you to use <a href="http://mollom.com/" target="_blank">Mollom</a> on your Joomla website to filter spam out of your comments and forms.</li>
<li><a href="http://extensions.joomla.org/extensions/core-enhancements/installers/9332" target="_blank">Joomla Update Manager</a> &#8211; With Joomla 1.6 on the horizon, I don&#8217;t know how many more updates to Joomla 1.5 there will be.  Still, this is a good extension to know about and use if your Joomla website isn&#8217;t running the current version of Joomla, which is 1.5.15 as of the date of this writing.  <a href="http://docs.joomla.org/Upgrade_Instructions" target="_blank">Updating Joomla manually</a> is not an easy task, but this extension makes it nearly so.</li>
<li><a href="http://extensions.joomla.org/extensions/core-enhancements/file-management/2630" target="_blank">eXtplorer</a> &#8211; According to the JED, eXtplorer is &#8220;a web-based File Management Component.&#8221;  While it won&#8217;t replace your FTP client, I have found it to be a quick and convenient way to manage files from within Joomla&#8217;s backend once the site is up and running. </li>
</ol>
<p>There are some other extensions that are in my &#8220;optional&#8221; category.  Whether or not they are added to a website depends on the website and its goals and purpose.</p>
<ol>
<li><a href="http://getk2.org/" target="_blank">K2</a> &#8211; K2 is a content component that really expands Joomla&#8217;s potential.  K2 was developed by <a href="http://www.joomlaworks.gr/" target="_blank">Joomlaworks</a>, who produce some other great extensions that I&#8217;ve used as well, like <a href="http://www.joomlaworks.gr/content/view/24/42/" target="_blank">Frontpage Slideshow</a> and <a href="http://www.joomlaworks.gr/content/view/25/42/" target="_blank">Simple Image Gallery Pro</a>.</li>
<li><a href="http://www.nonumber.nl/extensions/advancedmodulemanager" target="_blank">Advanced Module Manager</a> &#8211; Need more control over your Joomla modules?  With this extension you can set a module to publish and unpublish by date, edit module settings in a modal window, and lots of other cool things.  Advanced Module Manager was developed by Peter van Westen of <a href="http://www.nonumber.nl/" target="_blank">NoNumber!</a>, and he has many other Joomla extensions you may find very useful.</li>
</ol>
<p>All of these extensions, and many more, can be found in the <a href="http://extensions.joomla.org/" target="_blank">Joomla Extensions Directory</a>, or JED.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.blackhillswebworks.com/blog/2010/02/27/essential-joomla-extensions-for-any-joomla-website/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Creating a custom Joomla 404 error page</title>
		<link>http://www.blackhillswebworks.com/blog/2010/02/20/creating-a-custom-joomla-404-error-page/</link>
		<comments>http://www.blackhillswebworks.com/blog/2010/02/20/creating-a-custom-joomla-404-error-page/#comments</comments>
		<pubDate>Sat, 20 Feb 2010 22:12:41 +0000</pubDate>
		<dc:creator>John Sundberg</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Joomla!]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://www.blackhillswebworks.com/blog/?p=766</guid>
		<description><![CDATA[Let&#8217;s face it: the default Joomla 404 error page, while useful and perhaps necessary, is one of the uglier web pages in existence.  The shock value of seeing one of these pages for the first time is memorable, and diminishes only slowly over time. Creating a custom 404 error page for your Joomla website isn&#8217;t [...]]]></description>
			<content:encoded><![CDATA[<p><span style="float: right; margin-left: 15px; border: 1px solid black;"><a rel="rokbox[614 331]" title="Default Joomla 404 error page" href="http://www.blackhillswebworks.com/blog/wp-content/uploads/2010/02/Joomla-404-page.jpg"><img class="rokbox-thumb" src="http://www.blackhillswebworks.com/blog/wp-content/uploads/2010/02/Joomla-404-page-thumb.jpg" alt="Default Joomla 404 error page" /></a></span>Let&#8217;s face it: the default Joomla 404 error page, while useful and perhaps necessary, is one of the uglier web pages in existence.  The shock value of seeing one of these pages for the first time is memorable, and diminishes only slowly over time.</p>
<p>Creating a custom 404 error page for your Joomla website isn&#8217;t all that difficult, though there are several different approaches to making it work, and this blog post explains the process I&#8217;m using on this website and a few others I&#8217;ve built.  I should also add that inspiration for this method came from <a href="http://forum.joomla.org/viewtopic.php?f=199&amp;t=251089&amp;sid=f459a05d1edb0ae135ba5b60022a82f2" target="_blank">this lengthy thread on the Joomla forums</a>.</p>
<h3>Creating a custom Joomla 404 error page &#8211; the process</h3>
<p><span style="float: left; margin-right: 15px; margin-bottom: 15px; border: 1px solid black;"><a rel="rokbox[961 890]" title="Custom Joomla 404 error page" href="http://www.blackhillswebworks.com/blog/wp-content/uploads/2010/02/404page.jpg"><img class="rokbox-thumb" src="http://www.blackhillswebworks.com/blog/wp-content/uploads/2010/02/404page-thumb.jpg" alt="Custom Joomla 404 error page" /></a></span>The image to the left is a screenshot of the custom 404 error page I came up with, and you can see a full-size version of the page by clicking on the image.</p>
<p>For more ideas and to see what other web designers have come up with, <a href="http://www.smashingmagazine.com/" target="_blank">Smashing Magazine</a> has put together <a href="http://www.smashingmagazine.com/2009/01/29/404-error-pages-one-more-time/" target="_blank">a collection of some of the best 404 pages on the web</a>, with links to some other collections as well.</p>
<p>If you&#8217;re going to be making these changes to a &#8216;live&#8217; site, then I recommend that you make them in roughly the following order.  Also, as a general rule-of-thumb, make a backup of your website <strong>before</strong> making any significant changes.<span id="more-766"></span></p>
<p><strong>First</strong>, create an article and call it &#8220;<strong>404 &#8211; Error: 404</strong>&#8221; or something to that effect.  I chose that title because that&#8217;s what appears in the browser title bar for the default Joomla 404 page.  Insert your desired text and/or an image and format the article&#8217;s content as you normally would.  You can say whatever you want in the article, but your site visitors who end up seeing the 404 page will probably find it helpful if you tell them what happened and what they could or should do next.  If you don&#8217;t want this article (page) to be indexed, and you probably don&#8217;t, then add &#8220;<strong>no index, no follow</strong>&#8221; (without the quotes) to the Robots text box under Metadata Information on the right side of the Article editor screen.</p>
<p><strong>Second</strong>, add a menu item to one of your menus, preferably not your main menu or one of your other visible menus &#8211; you don&#8217;t want your site visitors clicking on a link that takes them directly to your 404 page.  In fact, now that I think about it, you could create a new menu for this purpose and call it &#8220;Error pages&#8221; or something similar.  When you create the menu item, link it to the article you created in the first step, give it &#8220;<strong>404</strong>&#8221; as a title, and publish it.</p>
<p><strong>Third</strong>, locate the default <code>error.php</code> file which creates the Joomla 404 error page.  This file should be located in your<strong> &#8220;</strong>templates/system/&#8221; directory.  Once you&#8217;ve found the <code>error.php</code> file, make a copy of the file and add the copy to the directory for the active template you&#8217;re using for your website.  Joomla will look for the <code>error.php</code> file in that directory first before looking in the default location.</p>
<p><strong>Fourth</strong>, open the new <code>error.php</code> file in your favorite text editor (I recommend <a href="http://notepad-plus.sourceforge.net/uk/site.htm" target="_blank">Notepad++</a>) and find the code at the beginning of the file (around line 13) that looks like this:</p>
<p><br class="spacer_" /></p>
<div id="wpshdo_5" class="wp-synhighlighter-outer"><div id="wpshdt_5" class="wp-synhighlighter-expanded"><table border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_5"></a><a id="wpshat_5" class="wp-synhighlighter-title" href="#codesyntax_5"  onClick="javascript:wpsh_toggleBlock(5)" title="Click to show/hide code block">Default code in error.php</a></td><td align="right"><a href="#codesyntax_5" onClick="javascript:wpsh_code(5)" title="Show code only"><img border="0" style="border: 0 none" src="http://www.blackhillswebworks.com/blog/wp-content/plugins/wp-synhighlight/themes/default/images/code.png" /></a>&nbsp;<a href="#codesyntax_5" onClick="javascript:wpsh_print(5)" title="Print code"><img border="0" style="border: 0 none" src="http://www.blackhillswebworks.com/blog/wp-content/plugins/wp-synhighlight/themes/default/images/printer.png" /></a>&nbsp;<a href="http://www.blackhillswebworks.com/blog/wp-content/plugins/wp-synhighlight/About.html" target="_blank" title="Show plugin information"><img border="0" style="border: 0 none" src="http://www.blackhillswebworks.com/blog/wp-content/plugins/wp-synhighlight/themes/default/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_5" class="wp-synhighlighter-inner" style="display: block;"><pre class="php" style="font-family:monospace;"><a href="http://www.php.net/defined"><span class="kw3">defined</span></a><span class="br0">&#40;</span> <span class="st_h">'_JEXEC'</span> <span class="br0">&#41;</span> or <a href="http://www.php.net/die"><span class="kw3">die</span></a><span class="br0">&#40;</span> <span class="st_h">'Restricted access'</span> <span class="br0">&#41;</span><span class="sy0">;</span>
<span class="sy1">?&gt;</span></pre></div></div>
<p><br class="spacer_" /></p>
<p>and change it to this:</p>
<p><br class="spacer_" /></p>
<div id="wpshdo_6" class="wp-synhighlighter-outer"><div id="wpshdt_6" class="wp-synhighlighter-expanded"><table border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_6"></a><a id="wpshat_6" class="wp-synhighlighter-title" href="#codesyntax_6"  onClick="javascript:wpsh_toggleBlock(6)" title="Click to show/hide code block">Modified code in error.php</a></td><td align="right"><a href="#codesyntax_6" onClick="javascript:wpsh_code(6)" title="Show code only"><img border="0" style="border: 0 none" src="http://www.blackhillswebworks.com/blog/wp-content/plugins/wp-synhighlight/themes/default/images/code.png" /></a>&nbsp;<a href="#codesyntax_6" onClick="javascript:wpsh_print(6)" title="Print code"><img border="0" style="border: 0 none" src="http://www.blackhillswebworks.com/blog/wp-content/plugins/wp-synhighlight/themes/default/images/printer.png" /></a>&nbsp;<a href="http://www.blackhillswebworks.com/blog/wp-content/plugins/wp-synhighlight/About.html" target="_blank" title="Show plugin information"><img border="0" style="border: 0 none" src="http://www.blackhillswebworks.com/blog/wp-content/plugins/wp-synhighlight/themes/default/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_6" class="wp-synhighlighter-inner" style="display: block;"><pre class="php" style="font-family:monospace;"><a href="http://www.php.net/defined"><span class="kw3">defined</span></a><span class="br0">&#40;</span> <span class="st_h">'_JEXEC'</span> <span class="br0">&#41;</span> or <a href="http://www.php.net/die"><span class="kw3">die</span></a><span class="br0">&#40;</span> <span class="st_h">'Restricted access'</span> <span class="br0">&#41;</span><span class="sy0">;</span>
<span class="kw1">if</span> <span class="br0">&#40;</span><span class="br0">&#40;</span><span class="re0">$this</span><span class="sy0">-&gt;</span><span class="me1">error</span><span class="sy0">-&gt;</span><span class="me1">code</span><span class="br0">&#41;</span> <span class="sy0">==</span> <span class="st_h">'404'</span><span class="br0">&#41;</span> <span class="br0">&#123;</span>
<a href="http://www.php.net/header"><span class="kw3">header</span></a><span class="br0">&#40;</span><span class="st_h">'Location: http://blackhillswebworks.com/404'</span><span class="br0">&#41;</span><span class="sy0">;</span>
<a href="http://www.php.net/exit"><span class="kw3">exit</span></a><span class="sy0">;</span>
<span class="br0">&#125;</span>
<span class="sy1">?&gt;</span></pre></div></div>
<p><br class="spacer_" /></p>
<p><strong>Don&#8217;t forget to change the &#8220;Location:&#8221; URL in that code to the menu item you created in the second step</strong>; otherwise, your visitors will be redirected to my website, which probably won&#8217;t help you at all!</p>
<p><strong>Finally</strong>, save the file, FTP it back to the template directory, open your website in a web browser, and test it to see if it works.  At the end of any legitimate URL for your website add one or more letters or numbers and hit the &#8220;enter&#8221; key.  Your new 404 page should be what appears on your screen, set in the helpful context of your website, which is where it should be, in my opinion.</p>
<p><br class="spacer_" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.blackhillswebworks.com/blog/2010/02/20/creating-a-custom-joomla-404-error-page/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>
