<?xml version="1.0" encoding="ISO-8859-1"?>
<!-- generator="FeedCreator 1.7.2-ppt (info@mypapit.net)" -->
<rss version="2.0">
    <channel>
        <title>MainelyDesign.com</title>
        <description>A blog mostly about web design and development in Maine</description>
        <link>http://www.mainelydesign.com</link>
        <lastBuildDate>Sun, 15 Mar 2026 23:38:22 +0100</lastBuildDate>
        <generator>FeedCreator 1.7.2-ppt (info@mypapit.net)</generator>
        <image>
            <url>http://www.mainelydesign.com/theme/mainelydesign/img/template/mainely-design-blog-logo.gif</url>
            <title>MainelyDesign.com Logo</title>
            <link>http://www.mainelydesign.com</link>
            <description><![CDATA[Feed provided by MainelyDesign.com. Click to visit.]]></description>
        </image>
        <item>
            <title>Fixing Warning: the ECDSA host key for 'github.com' differs from the key for the IP address</title>
            <link>http://www.mainelydesign.com/blog/view/fixing-warning-ecdsa-host-key-github-com-differs-from-key-ip-address</link>
            <description>&lt;p&gt;Host Key Differs Warning from Github When you run git fetch and you get this warning: Warning: the ECDSA host key for 'github.com' differs from the key for the IP address '140.82.114.3' Offending key for IP in /username/.ssh/known_hosts:7 Matching host key in /username/.ssh/known_hosts:9 This is a pretty simple fix: ssh-keygen -R github.com ssh-keygen -R 140.82.114.3 You may have to do this more than once depending on how many different IP address are cached in your known_hosts file&lt;/p&gt;</description>
            <author>Kevin Wentworth</author>
            <pubDate>Sun, 10 Sep 2023 07:01:00 +0100</pubDate>
        </item>
        <item>
            <title>CakePHP 3 - Getting List of Column Definitions from a Table (like schema())</title>
            <link>http://www.mainelydesign.com/blog/view/cakephp-3-getting-list-column-definitions-from-a-table-like-schema</link>
            <description>&lt;p&gt;You may come from a time when using $this-&amp;gt;ModelName-&amp;gt;schema() would give you the details of a table's column defintions.&amp;nbsp; Not in CakePHP 3.&amp;nbsp; I found this &lt;a href=&quot;https://discourse.cakephp.org/t/solved-cakephp3-get-table-fields-info-schema/3274/3&quot;&gt; manual way &lt;/a&gt; of achieving the same thing: // insert into begin of the controller file use Cake\Datasource\ConnectionManager; $db = ConnectionManager::get('default'); // Create a schema collection. $collection = $db-&amp;gt;schemaCollection(); // Get a single table (instance of Schema\TableSchema) $tableSchema = $collection-&amp;gt;describe('articles');...&lt;/p&gt;</description>
            <author>Kevin Wentworth</author>
            <pubDate>Wed, 26 Dec 2018 14:48:00 +0100</pubDate>
        </item>
        <item>
            <title>Change Order of Loaded Behaviors in CakePHP 3</title>
            <link>http://www.mainelydesign.com/blog/view/change-order-loaded-behaviors-in-cakephp-3</link>
            <description>&lt;p&gt;Turns out it's really easy to change the order of how behaviors are loaded in CakePHP 3.&amp;nbsp; Wait, I'm actually sort of lying.&amp;nbsp; You can't change the order of loaded behaviors. (BOO!).&amp;nbsp; In previous versions of Cake this was a problem... however, with the fully implemented Events subsystem in Cake3, all you need to do is change the priority of the behavior callbacks.&amp;nbsp; What's that, you say? Change Order of Behaviors in Cake3 You actually don't need to worry about the order that behaviors are...&lt;/p&gt;</description>
            <author>Kevin Wentworth</author>
            <pubDate>Fri, 14 Sep 2018 09:33:00 +0100</pubDate>
        </item>
        <item>
            <title>CakePHP 3 - Accept JSON Header Only Working When Debug False</title>
            <link>http://www.mainelydesign.com/blog/view/cakephp-3-accept-json-header-only-working-when-debug-false</link>
            <description>&lt;p&gt;Strange thing... when you have debug disabled you may find that your application works fine when dealing with json routes without the extension.&amp;nbsp; Instead of accessing /posts.json, you would access /posts and send an Accept: application/json header and the same thing is achieved. Debug On - Json View Templates Don't Load - Same Accept Header I came across this &lt;a href=&quot;https://github.com/cakephp/cakephp/issues/6122&quot;&gt; issue &lt;/a&gt; , which seems to imply that if you want the application/json Accept header to be properly parsed, you need to enable router...&lt;/p&gt;</description>
            <author>Kevin Wentworth</author>
            <pubDate>Tue, 29 May 2018 09:20:00 +0100</pubDate>
        </item>
        <item>
            <title>Remove All Events from Google Calendar (Reset Calendar)</title>
            <link>http://www.mainelydesign.com/blog/view/remove-all-events-from-google-calendar-reset-calendar</link>
            <description>&lt;p&gt;I've been doing a lot of programming with the Google Calendar API lately and ran into an issue when I was ready to &quot;go live&quot; with the site.&amp;nbsp; The Google Calendar was loaded with tons of test data!&amp;nbsp; I searched around and found plenty of sites giving the same answer.&amp;nbsp; The problem with the answer- it was incomplete.&amp;nbsp; If you want to reset a calendar (a Google Calendar factory reset of sorts) you need to permanently delete all calendar events using calendar settings, but also you need to empty the...&lt;/p&gt;</description>
            <author>Kevin Wentworth</author>
            <pubDate>Wed, 23 May 2018 21:29:00 +0100</pubDate>
        </item>
        <item>
            <title>Google Tag Manager (GTM) Not Firing Default PageView Event</title>
            <link>http://www.mainelydesign.com/blog/view/google-tag-manager-gtm-not-firing-default-pageview-event</link>
            <description>&lt;p&gt;We had an interesting issue here today regarding Google Tag Manager not firing the default PageView event.&amp;nbsp; Instead it was firing the &lt;strong&gt; /gtm.js &lt;/strong&gt; event.&amp;nbsp; WTF?! Turns out, the system we were using was reading event: 'gtm.js'&amp;nbsp; in the GTM container snippet as a link to a javascript resource.&amp;nbsp; So, it was turning the &quot;url&quot; into an absolute path, like so: event: '/gtm.js'. Google Tag Manager doesn't know what to do with an event named &quot;/gtm.js&quot; How were we going to solve this?&amp;nbsp; A little ASCII magic...&lt;/p&gt;</description>
            <author>Kevin Wentworth</author>
            <pubDate>Wed, 08 Nov 2017 12:21:00 +0100</pubDate>
        </item>
        <item>
            <title>In PHP, how do you get __toString() Magic Method Result without calling echo?</title>
            <link>http://www.mainelydesign.com/blog/view/in-php-how-do-you-get-__tostring-magic-method-result-without-calling-echo</link>
            <description>&lt;p&gt;I knew this answer at one point, then forgot it.&amp;nbsp; So, here it is for memory's sake... How can you get __toString() Magic Method Output WITHOUT using echo statement? $echoed = strval($object-&amp;gt;property); Cheers, - Kevin Wentworth&lt;/p&gt;</description>
            <author>Kevin Wentworth</author>
            <pubDate>Fri, 13 Oct 2017 13:49:00 +0100</pubDate>
        </item>
        <item>
            <title>Getting output from shell_exec() at all times</title>
            <link>http://www.mainelydesign.com/blog/view/getting-output-from-shell_exec-at-all-times</link>
            <description>&lt;p&gt;Sometimes shell_exec() won't output anything.&amp;nbsp; This might be because of an error or a silent success.&amp;nbsp; If you want to see the output, you can always do this: $output = shell_exec('$HOME/aaa/command 2&amp;gt;&amp;amp;1'); echo &quot;&amp;lt;pre&amp;gt;$output&amp;lt;/pre&amp;gt;&quot;;&lt;/p&gt;</description>
            <author>Kevin Wentworth</author>
            <pubDate>Mon, 14 Nov 2016 12:18:00 +0100</pubDate>
        </item>
        <item>
            <title>CORS Middleware in Cakephp 3</title>
            <link>http://www.mainelydesign.com/blog/view/cors-middleware-in-cakephp-3</link>
            <description>&lt;p&gt;I didn't end up needing this (yet) but wanted to post here for future reference.&amp;nbsp; This is CorsMiddleware for CakePHP 3: // Plugin\src\Middleware\CorsMiddleware.php namespace Plugin\Middleware; class CorsMiddleware { public function __invoke($request, $response, $next) { // Calling $next() delegates control to the *next* middleware // In your application's queue. $response = $next($request, $response); // When modifying the response, you should do it // *after* calling next. // Allow from any...&lt;/p&gt;</description>
            <author>Kevin Wentworth</author>
            <pubDate>Tue, 11 Oct 2016 21:44:00 +0100</pubDate>
        </item>
        <item>
            <title>View Layer - Getting count of Entities in View in Cakephp 3</title>
            <link>http://www.mainelydesign.com/blog/view/getting-count-entities-in-cakephp-3</link>
            <description>&lt;p&gt;In my views I'm usually executing code depending on if a variable is empty or not.&amp;nbsp; For example, I'll fetch all the images in a gallery and only want to output the containing divs when the gallery has images.&amp;nbsp; You can't do a simple !empty() or if($img) because it will always be &quot;true&quot; because it will be a non-empty object (like Cake\ORM\Query or similar). So, if you want to find out if a variable (at the view level) is empty or not, use the isEmpty() function. Is that variable empty?...&lt;/p&gt;</description>
            <author>Kevin Wentworth</author>
            <pubDate>Sun, 12 Jun 2016 13:27:00 +0100</pubDate>
        </item>
        <item>
            <title>Changing URL in beforeRedirect() in Component - Cakephp 3</title>
            <link>http://www.mainelydesign.com/blog/view/changing-url-in-beforeredirect-in-component-cakephp-3</link>
            <description>&lt;p&gt;Change the URL redirect location using beforeRedirect() in Cakephp 3 I wanted to change the redirect behavior from within a component in my Cakephp 3 application.&amp;nbsp; The old 1.3 method of returning the new $url didn't work.&amp;nbsp; Turns out that you need to use Response::location() to modify the location of the redirect.&amp;nbsp; See my code below: public function beforeRedirect(Event $event, $url, Response $response) { // need to reload the same page $response-&amp;gt;location($this-&amp;gt;request-&amp;gt;here); return; }...&lt;/p&gt;</description>
            <author>Kevin Wentworth</author>
            <pubDate>Mon, 23 May 2016 12:21:00 +0100</pubDate>
        </item>
        <item>
            <title>Foundation CSS Framework Resources</title>
            <link>http://www.mainelydesign.com/blog/view/foundation-css-framework-resources</link>
            <description>&lt;p&gt;Motion UI Classes (used for animation): &lt;a href=&quot;https://github.com/zurb/motion-ui/blob/master/docs/classes.md&quot;&gt; https://github.com/zurb/motion-ui/blob/master/docs/classes.md &lt;/a&gt;&lt;/p&gt;</description>
            <author>Kevin Wentworth</author>
            <pubDate>Thu, 28 Jan 2016 12:30:00 +0100</pubDate>
        </item>
        <item>
            <title>Change View File from Controller in CakePHP 3</title>
            <link>http://www.mainelydesign.com/blog/view/change-view-file-from-controller-in-cakephp-3</link>
            <description>&lt;p&gt;You can change what view.ctp file you want to use in your controller with the following line of code.&amp;nbsp; I place it at the bottom of my function definition.&amp;nbsp; Useful for having a simple admin interface or a different view template for each language.&amp;nbsp; This doesn't change the &lt;strong&gt; layout &lt;/strong&gt; of your page, just the &lt;strong&gt; view template &lt;/strong&gt; the controller uses when rendering your content. $this-&amp;gt;viewBuilder()-&amp;gt;template('another_view'); // will use another_view.ctp instead of controller_name.ctp Cheers,...&lt;/p&gt;</description>
            <author>Kevin Wentworth</author>
            <pubDate>Wed, 27 Jan 2016 10:37:00 +0100</pubDate>
        </item>
        <item>
            <title>Loading Model/Table Anywhere in Cake3</title>
            <link>http://www.mainelydesign.com/blog/view/loading-model-table-anywhere-in-cake3</link>
            <description>&lt;p&gt;I'm finally off on upgrading to CakePHP 3.0.&amp;nbsp; I'm sick of typing out CakePHP 3.0, so from now on it's just cake3.&amp;nbsp; I'm going to post about my experiences upgrading a large application to cake3. First thing: it's so easy to get access to a model... ANYWHERE (love it!) use Cake\ORM\TableRegistry; $this-&amp;gt;Articles = TableRegistry::get('Articles');&lt;/p&gt;</description>
            <author>Kevin Wentworth</author>
            <pubDate>Wed, 13 Jan 2016 15:56:00 +0100</pubDate>
        </item>
        <item>
            <title>CURL PHP 5.5 Issue on Windows (Using Twilio SDK)</title>
            <link>http://www.mainelydesign.com/blog/view/curl-php-5-5-issue-on-windows-using-twilio-sdk</link>
            <description>&lt;p&gt;You need to install cacert.pem. &lt;a href=&quot;http://curl.haxx.se/docs/caextract.html&quot;&gt; http://curl.haxx.se/docs/caextract.html &lt;/a&gt; Thanks to: &lt;a href=&quot;http://snippets.webaware.com.au/howto/stop-turning-off-curlopt_ssl_verifypeer-and-fix-your-php-config/&quot;&gt; http://snippets.webaware.com.au/howto/stop-turning-off-curlopt_ssl_verifypeer-and-fix-your-php-config/ &lt;/a&gt; You need to add thawte premium CA to cacert.pem for Twilio &lt;a href=&quot;http://stackoverflow.com/a/28545924/5317538&quot;&gt; http://stackoverflow.com/a/28545924/5317538 &lt;/a&gt;&lt;/p&gt;</description>
            <author>Kevin Wentworth</author>
            <pubDate>Tue, 06 Oct 2015 09:29:00 +0100</pubDate>
        </item>
        <item>
            <title>Javascript Charting Library Research</title>
            <link>http://www.mainelydesign.com/blog/view/javascript-charting-library-research</link>
            <description>&lt;p&gt;I'm getting ready to roll out some new graphing functionality and wanted to take a look at the state of JavaScript graphing libraries. Goals: Beautiful Charts - there are a lot of hokey looking charts out there Fast Avoid sending data to a 3rd party No license fees.&amp;nbsp; MIT License is always ideal. Current JavaScript graphing Tools / Approach Coming Soon... Future Approach to JavaScript Charting Gauges / Speedometers - &lt;a href=&quot;http://justgage.com/&quot;&gt; http://justgage.com/ &lt;/a&gt; Charting Library - &lt;a href=&quot;http://www.chartjs.org/&quot;&gt; http://www.chartjs.org/ &lt;/a&gt; HTML...&lt;/p&gt;</description>
            <author>Kevin Wentworth</author>
            <pubDate>Thu, 16 Jul 2015 22:36:00 +0100</pubDate>
        </item>
        <item>
            <title>Command line: Start, Stop and Restart MySQL Server on Mac OS X</title>
            <link>http://www.mainelydesign.com/blog/view/command-line-start-stop-restart-mysql-server-on-mac-os-x</link>
            <description>&lt;p&gt;It's easy to manage mysql from the command line in Mac OS X.&amp;nbsp; Just make sure to remember to run as sudo! Stopping, Restarting and Starting MySQL Server Commands $ sudo /usr/local/mysql/support-files/mysql.server restart Password: ********* Cheers, -Kevin Wentworth&lt;/p&gt;</description>
            <author>Kevin Wentworth</author>
            <pubDate>Thu, 26 Feb 2015 15:18:00 +0100</pubDate>
        </item>
        <item>
            <title>CSS Tools for Web Designers - Best of the Web</title>
            <link>http://www.mainelydesign.com/blog/view/css-tools-web-designers-best-web</link>
            <description>&lt;p&gt;Here are my go-to resources for making all those fancy CSS3 effects on pages: CSS Border Radius Tool CSS Border Radius - &lt;a href=&quot;http://border-radius.com/&quot;&gt; http://border-radius.com/ &lt;/a&gt; CSS Background Gradients Ultimate CSS Gradient Generator - &lt;a href=&quot;http://www.colorzilla.com/gradient-editor/&quot;&gt; http://www.colorzilla.com/gradient-editor/ &lt;/a&gt; CSS Box Shadow Generator CSS Matic Box Shadow CSS Generator - &lt;a href=&quot;http://www.cssmatic.com/box-shadow&quot;&gt; http://www.cssmatic.com/box-shadow &lt;/a&gt; Make Form Buttons look good! CSS Button Generator - &lt;a href=&quot;http://button.csscook.com/&quot;&gt; http://button.csscook.com/ &lt;/a&gt; CSS Tooltips (Floating boxes with little pointy things...) CSS...&lt;/p&gt;</description>
            <author>Kevin Wentworth</author>
            <pubDate>Tue, 17 Feb 2015 11:44:00 +0100</pubDate>
        </item>
        <item>
            <title>GeoTrust Quick SSL Premium Intermediate CA for SHA-2</title>
            <link>http://www.mainelydesign.com/blog/view/geotrust-quick-ssl-premium-intermediate-ca-sha-2</link>
            <description>&lt;p&gt;I just tried to use my handy GeoTrust Intermediate CA cheat and it didn't work.&amp;nbsp; As of today, you'll need to use the following links to get your GeoTrust Intermediate CAs: Intermediate CA Certificate for GeoTrust QuickSSL Premium SHA-2 (under SHA-1 Root) CA Bundle &lt;a href=&quot;https://knowledge.geotrust.com/support/knowledge-base/index?page=content&amp;amp;actp=CROSSLINK&amp;amp;id=SO26454&quot;&gt; https://knowledge.geotrust.com/support/knowledge-base/index?page=content&amp;amp;actp=CROSSLINK&amp;amp;id=SO26454 &lt;/a&gt; For reference: -----BEGIN CERTIFICATE----- MIIERDCCAyygAwIBAgIDAjp4MA0GCSqGSIb3DQEBCwUAMEIxCzAJBgNVBAYTAlVT...&lt;/p&gt;</description>
            <author>Kevin Wentworth</author>
            <pubDate>Fri, 02 Jan 2015 09:23:00 +0100</pubDate>
        </item>
        <item>
            <title>Performing a Speed Test on Linux Server over SSH</title>
            <link>http://www.mainelydesign.com/blog/view/speed-test-ssh-linux</link>
            <description>&lt;p&gt;There have been many times when I've wanted to find out the speed of a server's connection.&amp;nbsp; Running a ping from your workstation to the server accomplishes nothing when you need to determine the speed of your server's connection to the outside world.&amp;nbsp; I came across a &lt;a href=&quot;http://robertjooste.co.za/linux/speed-test-linux-shellssh/&quot;&gt; post &lt;/a&gt; with the perfect recommendation. Use CURL and download a large file Using the command below, will download a 500mb file from a Speedtest server: &lt;strong&gt; curl -o /dev/null...&lt;/strong&gt;&lt;/p&gt;</description>
            <author>Kevin Wentworth</author>
            <pubDate>Fri, 19 Dec 2014 10:18:00 +0100</pubDate>
        </item>
        <item>
            <title>jQuery: Checking If An Object Is Visible On The Screen</title>
            <link>http://www.mainelydesign.com/blog/view/jquery-checking-if-an-object-visible-on-screen</link>
            <description>&lt;p&gt;In the ether known as the internet, people have been going from a static built and styled website, to much more responsive and interactive designs. Knowing this, I felt that it was important to be able to check if an element is currently displayed on the screen. What Is This Useful For? Currently, being able to detect if an element is visible on the screen can yield very promising options for development. Whether you need to check if a popup is already there, or want to be able to detect how...&lt;/p&gt;</description>
            <author>Kevin Wentworth</author>
            <pubDate>Fri, 12 Sep 2014 12:03:00 +0100</pubDate>
        </item>
        <item>
            <title>jQuery Object getClasses System</title>
            <link>http://www.mainelydesign.com/blog/view/jquery-object-getclasses-system</link>
            <description>&lt;p&gt;After having to create a list of classes on an element, I decided that it was time to have a method to pull all of an objects classes into one returnable array. This is extremely useful for class-based tagging and object finding. Requires jQuery v1.2+ The getClasses Method jQuery.fn.getClasses = function() { var classes = []; var objClass = $(this).attr('class'); objClass = objClass.split(' '); $.each(objClass, function(index, value) { if(value !== &quot;&quot;) { classes.push(value); } }); return...&lt;/p&gt;</description>
            <author>Kevin Wentworth</author>
            <pubDate>Fri, 29 Aug 2014 11:04:00 +0100</pubDate>
        </item>
        <item>
            <title>Combatting iFrame issues with Opera and Mobile Devices</title>
            <link>http://www.mainelydesign.com/blog/view/combatting-iframe-issues-with-opera-mobile-devices</link>
            <description>&lt;p&gt;After discovering that Opera automatically downloads a PDF file while using an iFrame to load it into a page, I spent some time looking around on how to avoid this issue. It ended up coming down to a pure JavaScript work-around. What Had To Be Done To fix this issue, I ended up having to remove the content from a static HTML section, and prepare to embed it with JavaScript. if() { $(&quot;div#embedded&quot;).append(' '); } Now, for the logic. All that was required was a check for mobile devices and...&lt;/p&gt;</description>
            <author>Kevin Wentworth</author>
            <pubDate>Wed, 20 Aug 2014 08:11:00 +0100</pubDate>
        </item>
        <item>
            <title>Making CURL SSL Work on Localhost PHP Development in Windows</title>
            <link>http://www.mainelydesign.com/blog/view/making-curl-ssl-work-on-localhost-php-development-in-windows</link>
            <description>&lt;p&gt;I've been here before.&amp;nbsp; Working on a Facebook application on my local development box and none of the access tokens will work.&amp;nbsp; They work on the live server, but not on my sandbox/development server.&amp;nbsp; What gives? CURL is failing to communicate over SSL/HTTPS If you dig into the code and look at the curl error being reported, you'll see this message: &lt;strong&gt; SSL certificate problem, verify that the CA cert is OK. Details: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify...&lt;/strong&gt;&lt;/p&gt;</description>
            <author>Kevin Wentworth</author>
            <pubDate>Fri, 08 Aug 2014 09:52:00 +0100</pubDate>
        </item>
        <item>
            <title>Controlling jQuery's Tooltip</title>
            <link>http://www.mainelydesign.com/blog/view/controlling-jquerys-tooltip</link>
            <description>&lt;p&gt;After watching jQuery's tooltip() slow down a page's loading time by a solid two seconds, it became clear that there had to be a better way to create and control tooltips. The Slow Way The initial use of tooltip() was used to create all of the tooltips on page generation, as such... $(&quot;.tooltip&quot;).tooltip({ position: { my: &quot;center bottom-20&quot;, at: &quot;center top&quot;, using: function( position, feedback ) { $( this ).css( position ); $( &quot; &quot; ) .addClass( &quot;arrow&quot; ) .addClass( feedback.vertical )...&lt;/p&gt;</description>
            <author>Kevin Wentworth</author>
            <pubDate>Fri, 25 Jul 2014 09:40:00 +0100</pubDate>
        </item>
        <item>
            <title>Taking A Step Ahead With jQuery</title>
            <link>http://www.mainelydesign.com/blog/view/taking-a-step-ahead-with-jquery</link>
            <description>&lt;p&gt;After spending a majority of my time developing with JavaScript and jQuery, I've come across many different things that proved very useful, but may not be thought of by most developers. Two things in particular stand out: The notorious &lt;a&gt; download attribute, and &lt;/a&gt; Vertically aligning two DOM elements to their baseline Both of these things have troubled developers across the globe, both new and experienced. However, a large scale problem sometimes has a very simple answer... The Notorious &lt;a&gt;...&lt;/a&gt;&lt;/p&gt;</description>
            <author>Kevin Wentworth</author>
            <pubDate>Fri, 18 Jul 2014 09:24:00 +0100</pubDate>
        </item>
        <item>
            <title>LinkedIn PHP Api - Fixing 401 Unknown Authentication Scheme Error</title>
            <link>http://www.mainelydesign.com/blog/view/linkedin-php-api-fixing-401-unknown-authentication-scheme-error</link>
            <description>&lt;p&gt;If you are a disciplined developer you probably take a lot of time to read the manual and probably also use the examples provided by the vendor, right?&amp;nbsp; This is what I was doing in my attempt to get the LinkedIn PHP API working.&amp;nbsp; LinkedIn recommends using file_get_contents() with a stream context.&amp;nbsp; Looks good to me.&amp;nbsp; After you get your GETs right and your posts POSTed everything was working just fine (love the new Oauth2 authentication scheme by the way!).&amp;nbsp; Yippee!&amp;nbsp; Hooray!&amp;nbsp; LinkedIn...&lt;/p&gt;</description>
            <author>Kevin Wentworth</author>
            <pubDate>Thu, 17 Jul 2014 09:55:00 +0100</pubDate>
        </item>
        <item>
            <title>Debugging 500 errors</title>
            <link>http://www.mainelydesign.com/blog/view/debugging-500-errors</link>
            <description>&lt;p&gt;500 errors are notoriously vague errors that can occur for a number of reasons.&amp;nbsp; Technically the 500 error is defined as an internal server error.&amp;nbsp; This does not tell you much but it does tell you that you NEED MORE INFORMATION. How you get that information is from your error logs.&amp;nbsp; You may look in your application error logs but they will not contain PHP and Apache errors.&amp;nbsp; Because it is Apache that throws the 500 error, you should start by looking at the apache logs. In WHM/Cpanel/CentOS...&lt;/p&gt;</description>
            <author>Kevin Wentworth</author>
            <pubDate>Wed, 25 Jun 2014 14:04:00 +0100</pubDate>
        </item>
        <item>
            <title>Apache Configuration Error</title>
            <link>http://www.mainelydesign.com/blog/view/apache-configuration-error</link>
            <description>&lt;p&gt;While debugging a notorious 500 internal server error, we found by accessing error logs that the default timeout for FastCGI was 40 seconds.&amp;nbsp; This was causing timeout faults on a number of apache processes. These related log entries were found in the apache error log: [Wed Jun 25 12:25:53 2014] [warn] [client 198.255.231.10] mod_fcgid: read data timeout in 40 seconds, referer: &lt;a class=&quot;moz-txt-link-freetext&quot; href=&quot;https://www.cardullos.com/avenger/searches&quot;&gt; https://www.blahblah.com/avenger/searches &lt;/a&gt; [Wed Jun 25 12:25:53 2014] [error] [client 198.255.231.10] Premature end...&lt;/p&gt;</description>
            <author>Kevin Wentworth</author>
            <pubDate>Wed, 25 Jun 2014 13:47:00 +0100</pubDate>
        </item>
        <item>
            <title>Facebook changes to Autoposting Apps</title>
            <link>http://www.mainelydesign.com/blog/view/facebook-changes-to-autoposting-apps</link>
            <description>&lt;p&gt;While troubleshooting difficulties with autoposting applications, we had created a facebook app for a test site. The settings were all exactly the same as all previously established (and fully functional) auto posting apps, except a very annoying setting buried in &amp;ldquo;Canvas Payments&amp;rdquo; that cannot be turned off. This turns out to be a Red Herring. Disregard it. While searching for info on and attempting to disable this Payments Object, we discovered another menu option in the developers tools,&amp;nbsp;...&lt;/p&gt;</description>
            <author>Kevin Wentworth</author>
            <pubDate>Wed, 11 Jun 2014 16:19:00 +0100</pubDate>
        </item>
        <item>
            <title>Remove Duplicate Span Tags from Jquery UI Buttons</title>
            <link>http://www.mainelydesign.com/blog/view/remove-duplicate-span-tags-from-jquery-ui-buttons</link>
            <description>&lt;p&gt;I have a loader function that I call every time I need to update ajax-ed in content.&amp;nbsp; A funny thing was happening: the buttons kept growing bigger and bigger on each run of this function.&amp;nbsp; The culprit: additional span tags that were causing the CSS rules to be applied multiple times.&amp;nbsp; The fix: &lt;a href=&quot;http://api.jquery.com/unwrap/&quot;&gt; unwrap &lt;/a&gt; . Remove Duplicate Spans from Jquery UI Buttons // remove duplicate button spans $('span.ui-button-text').parent('span.ui-button-text').find('span').unwrap(); Cheers, -Kevin...&lt;/p&gt;</description>
            <author>Kevin Wentworth</author>
            <pubDate>Thu, 22 May 2014 22:22:00 +0100</pubDate>
        </item>
        <item>
            <title>Rackspace Cloudfiles PHP API Cookbook</title>
            <link>http://www.mainelydesign.com/blog/view/rackspace-cloudfiles-php-api-cookbook</link>
            <description>&lt;p&gt;I'm working on the latest API of the Rackspace Cloudfiles API (php-opencloud).&amp;nbsp; I've had a bear of a time figuring everything out.&amp;nbsp; I think I was making it too complicated (plus I was starting on an older version of the PHP SDK... but that's another story).&amp;nbsp; Now that I'm figuring out the API, the Rackspace PHP developers have done a really good job of making the functionality work with minimal coding. Basic Rackspace Cloudfiles Container Operations &lt;strong&gt; Get a reference to a Container &lt;/strong&gt; $Container...&lt;/p&gt;</description>
            <author>Kevin Wentworth</author>
            <pubDate>Wed, 19 Mar 2014 22:33:00 +0100</pubDate>
        </item>
        <item>
            <title>Getting Composer to Install on Windows 8 (Wamp / PHP)</title>
            <link>http://www.mainelydesign.com/blog/view/getting-composer-to-install-on-windows-8-wamp-php</link>
            <description>&lt;p&gt;Get the Windows Installer for Composer If you are on Windows and want to install Composer, no worries, there is a quick (and easy) &lt;a href=&quot;https://getcomposer.org/download/&quot;&gt; Windows installer for Composer &lt;/a&gt; . Add PHP Folder to System Path This is supposedly done by the Composer installer, but I couldn't get the darn thing running the first few tries, so I did this manually.&amp;nbsp; I added C:\wamp\bin\PHP\PHPx.x.x\ to my Windows system path. Modify CLI PHP.ini File This is important- do not use the WAMPServer Context menu options (the Wamp...&lt;/p&gt;</description>
            <author>Kevin Wentworth</author>
            <pubDate>Mon, 17 Mar 2014 20:43:00 +0100</pubDate>
        </item>
        <item>
            <title>MySQL - Determine Duplicate Rows Based on Multiple Fields/Columns</title>
            <link>http://www.mainelydesign.com/blog/view/mysql-determine-duplicate-rows-based-on-multiple-fields-columns</link>
            <description>&lt;p&gt;I've been looking for some magical mysql query code to allow me to detect duplicate records, based on multiple columns being the same MySQL Query to Detect Duplicate Rows (based on multiple fields) SELECT * FROM screwed_up_table GROUP BY field1, field2 HAVING count(*) &amp;gt; 1 That's it. Piece of cake. I usually use this code to get the values of the duplicate rows, so I can create a user-level correction tool. -Kevin&lt;/p&gt;</description>
            <author>Kevin Wentworth</author>
            <pubDate>Mon, 17 Mar 2014 11:02:00 +0100</pubDate>
        </item>
        <item>
            <title>CSS To Undo Font Family</title>
            <link>http://www.mainelydesign.com/blog/view/css-to-undo-font-family</link>
            <description>&lt;p&gt;This is a quick note about how to reset the font being applied to a particular CSS selector.&amp;nbsp; I always forget about this, so I wanted to post my answer so I'll remember it. Reset CSS Font-Family Declaration The code is very easy.&amp;nbsp; The only prerequisite is that you have defined the font-family you actually want to use at a higher level (or a less-specific CSS rule). font-family: inherit; Best Practice: Define a Font on the Body Tag If you define a font-family for your body tag, then any rule...&lt;/p&gt;</description>
            <author>Kevin Wentworth</author>
            <pubDate>Tue, 11 Mar 2014 22:55:00 +0100</pubDate>
        </item>
        <item>
            <title>Facebook Conversion Tracking On a Click</title>
            <link>http://www.mainelydesign.com/blog/view/be-wary-vendor-supplied-scripts</link>
            <description>&lt;p&gt;Be Cautious Using Conversion Tracking Scripts Supplied by Vendors We recently experienced a small challenge with the Facebook Conversion Tracking script.&amp;nbsp; We were using the standard boiler plate script as provided to developers by facebook.&amp;nbsp; What's touted as a simple method to integrate conversion tracking may not work if you actually want to track on a click action, instead of on a page load.&amp;nbsp; If you are actually using any JavaScript (particularly jQuery) on your site prior to adding the...&lt;/p&gt;</description>
            <author>Kevin Wentworth</author>
            <pubDate>Mon, 10 Feb 2014 12:36:00 +0100</pubDate>
        </item>
        <item>
            <title>SSH: Trouble Connecting to Web Server? Start here.</title>
            <link>http://www.mainelydesign.com/blog/view/ssh-trouble-connecting-to-web-server-start-here</link>
            <description>&lt;p&gt;Can't' Connect via SSH to Your Web Server?&amp;nbsp; Me too. I just spent too long troubleshooting why I couldn't connect to my web server over SSH (the standard SSH port is 22).&amp;nbsp; I tried everything I could think of.&amp;nbsp; I whitelisted my IP in ControlPanel Hulk and I allowed my IP through the ConfigServer Firewall.&amp;nbsp; Nothing worked.&amp;nbsp; Then, I tried something simple: restarted OpenSSH on the server.&amp;nbsp; As Emeril says: BAM! First, First, First Step of Troubleshooting SSH Connection Issues &lt;strong&gt; Restart the SSH...&lt;/strong&gt;&lt;/p&gt;</description>
            <author>Kevin Wentworth</author>
            <pubDate>Tue, 31 Dec 2013 10:11:00 +0100</pubDate>
        </item>
        <item>
            <title>PHP Curl not Working on Windows 7 or Windows 8 (PHP 64-bit version only)</title>
            <link>http://www.mainelydesign.com/blog/view/php-curl-not-working-on-windows-7-or-windows-8-php-64-bit-version-only</link>
            <description>&lt;p&gt;Download the Fixed Curl Version Short Answer: you need to download and install the corrected version of libCurl for PHP to get it working on 64-bit versions of PHP.&amp;nbsp; &lt;strong&gt; Download from this link: &lt;/strong&gt; &lt;a href=&quot;http://www.anindya.com/php-5-4-3-and-php-5-3-13-x64-64-bit-for-windows/&quot;&gt; http://www.anindya.com/php-5-4-3-and-php-5-3-13-x64-64-bit-for-windows/ &lt;/a&gt; &amp;nbsp; Helpful Hint for those who Already Have PHP Installed &lt;strong&gt; Scroll ALL THE WAY DOWN to the bottom of the page &lt;/strong&gt; and you will see a tiny little heading for &quot; &lt;strong&gt; Fixed curl extensions: &lt;/strong&gt; &quot;.&amp;nbsp; Download ONLY the php_curl.dll file you need.&amp;nbsp;...&lt;/p&gt;</description>
            <author>Kevin Wentworth</author>
            <pubDate>Wed, 18 Dec 2013 11:10:00 +0100</pubDate>
        </item>
        <item>
            <title>Reordering Trees in CakePHP 1.3</title>
            <link>http://www.mainelydesign.com/blog/view/reordering-trees-in-cakephp-1-3</link>
            <description>&lt;p&gt;Every time I add a new record to a tree it was added to the end of the list.&amp;nbsp; This is OK for small lists, but once you get a big list, it's impossible to find things.&amp;nbsp; It would be great if we could sort the tree list by the displayField... and you can: Reorder CakePHP Trees It's easy with the built in &lt;a href=&quot;http://book.cakephp.org/1.3/en/The-Manual/Core-Behaviors/Tree.html&quot;&gt; function &lt;/a&gt; (although it might take a while to run) &lt;strong&gt; $this-&amp;gt;Model-&amp;gt;reorder(); ( &lt;a href=&quot;http://book.cakephp.org/1.3/en/The-Manual/Core-Behaviors/Tree.html&quot;&gt; documentation &lt;/a&gt; ) &lt;/strong&gt; Here is the default settings: $options = array( 'id' =&amp;gt; null, 'field' =&amp;gt; $model-&amp;gt;displayField,...&lt;/p&gt;</description>
            <author>Kevin Wentworth</author>
            <pubDate>Thu, 07 Nov 2013 13:39:00 +0100</pubDate>
        </item>
        <item>
            <title>GeoTrust SSL Intermediate Certificate Bundle</title>
            <link>http://www.mainelydesign.com/blog/view/geotrust-ssl-intermediate-certificate-bundle</link>
            <description>&lt;p&gt;Quick Link to GeoTrust Intermediate Certificate &lt;strong&gt; Update: 1/2/2015 &lt;/strong&gt; - GeoTrust has changed how it signs QuickSSL Premium security certificates, so you need a&amp;nbsp; &lt;a href=&quot;/blog/view/geotrust-quick-ssl-premium-intermediate-ca-sha-2&quot;&gt; new GeoTrust Intermediate CA &lt;/a&gt; (for RSA SHA-2). I'm sick of googling for this:&amp;nbsp; here is the link to the intermediate certificate bundle for GeoTrust security certificates: &lt;a href=&quot;https://knowledge.geotrust.com/library/VERISIGN/ALL_OTHER/geotrust%20ca/QuickSSL_Premium_Intermediate_CA.pem&quot;&gt; https://knowledge.geotrust.com/library/VERISIGN/ALL_OTHER/geotrust%20ca/QuickSSL_Premium_Intermediate_CA.pem &lt;/a&gt;&lt;/p&gt;</description>
            <author>Kevin Wentworth</author>
            <pubDate>Fri, 20 Sep 2013 13:27:00 +0100</pubDate>
        </item>
        <item>
            <title>Turning Off Xdebug on a local web server</title>
            <link>http://www.mainelydesign.com/blog/view/turning-off-xdebug-on-a-local-web-server</link>
            <description>&lt;p&gt;The settings listed below is what you are going to be adding to your php.ini file.&amp;nbsp; The xdebug.profiler_output_dir setting, you want to make sure that this goes to the right tmp directory on your server and xdebug.default_enable = 0 is shutting off the xdebug locally. [xdebug] xdebug.remote_enable = 0 xdebug.profiler_enable = 0 xdebug.profiler_enable_trigger = 0 xdebug.profiler_output_name = cachegrind.out.%t.%p xdebug.profiler_output_dir = &quot;c:/wamp/tmp&quot; xdebug.var_display_max_depth = 15...&lt;/p&gt;</description>
            <author>Kevin Wentworth</author>
            <pubDate>Wed, 28 Aug 2013 13:24:00 +0100</pubDate>
        </item>
        <item>
            <title>CSS to Turn Off Min-Height</title>
            <link>http://www.mainelydesign.com/blog/view/css-to-turn-off-min-height</link>
            <description>&lt;p&gt;I needed to turn off min-height in css.&amp;nbsp; I can't believe it's been this long and I've never had to do it.&amp;nbsp; In case you are wondering: How to turn off min-height in CSS min-height: inherit;&lt;/p&gt;</description>
            <author>Kevin Wentworth</author>
            <pubDate>Tue, 09 Jul 2013 10:03:00 +0100</pubDate>
        </item>
        <item>
            <title>Lessons Learned: Going to Mobile Website Development</title>
            <link>http://www.mainelydesign.com/blog/view/mobile-website-development-resources</link>
            <description>&lt;p&gt;I've recently taken the plunge and learned about CSS Media Queries and Responsive Web Design.&amp;nbsp; We launched a new ordering site and made the whole website, including the checkout process, mobile-friendly.&amp;nbsp; It's really opened up my eyes to the possibilities of mobile web design.&amp;nbsp; I started out wondering why responsive web design was all the rage, now I prefer to order and checkout using the new Site Avenger mobile shopping templates.&amp;nbsp; It's pretty easy to retrofit with an existing Site Avenger...&lt;/p&gt;</description>
            <author>Kevin Wentworth</author>
            <pubDate>Mon, 08 Jul 2013 12:39:00 +0100</pubDate>
        </item>
        <item>
            <title>Making PHP File Uploads Work For Large Files</title>
            <link>http://www.mainelydesign.com/blog/view/php-managing-file-uploads</link>
            <description>&lt;p&gt;Get PHP File Uploads Working The first trick to having any user contributed content these days is to get PHP File Uploads working (especially with big files).&amp;nbsp; Our configuration we use for our Wamp local development and on our Linux server is below. When managing file uploads to a server, there seems to be a lot of confusion regarding optimized PHP settings and configuration. We have had some experience with this that we would like to share. We'll cut to the chase. Verify the following...&lt;/p&gt;</description>
            <author>Kevin Wentworth</author>
            <pubDate>Tue, 18 Jun 2013 13:01:00 +0100</pubDate>
        </item>
        <item>
            <title>Get All Active jQuery UI Dialog Windows, then Close 'Em</title>
            <link>http://www.mainelydesign.com/blog/view/get-all-active-jquery-ui-dialog-windows</link>
            <description>&lt;p&gt;I had a need to close all active jQuery UI dialogs on the page (yes, I have more than 1 open at a time!).&amp;nbsp; You may think it's as easy as calling $('.ui-dialog').dialog('cose') but you'll throw an error.&amp;nbsp; The way I've figured out how to do it (jquery UI 1.10) is pretty simple, really: Close all Active jQuery UI Dialog Windows var $activeDialogs = $(&quot;.ui-dialog:visible&quot;).find('.ui-dialog-content'); $activeDialogs.dialog('close'); Cheers, -Kevin Wentworth&lt;/p&gt;</description>
            <author>Kevin Wentworth</author>
            <pubDate>Thu, 21 Mar 2013 14:36:00 +0100</pubDate>
        </item>
        <item>
            <title>jQuery UI 1.10 Tabs - Getting Index of Current Tab</title>
            <link>http://www.mainelydesign.com/blog/view/jquery-ui-1-10-tabs-getting-index-current-tab</link>
            <description>&lt;p&gt;I remember being able to get the index of the current tab very easily from &lt;a href=&quot;http://jqueryui.com&quot;&gt; jQuery UI &lt;/a&gt; , something like ui.panel.index.&amp;nbsp; I couldn't find it in my code and figured out the way to do it with jQuery UI 1.10 Determining the Current Tab Index Most of the documentation and examples for JQuery UI keep using the same basic code that doesn't really work if you have more than one tabbed-interface on any of your web pages.&amp;nbsp; The &lt;a href=&quot;http://api.jqueryui.com/tabs/&quot;&gt; jQuery UI documentation &lt;/a&gt; tells you to do this: // getter var active = $(...&lt;/p&gt;</description>
            <author>Kevin Wentworth</author>
            <pubDate>Mon, 18 Mar 2013 22:00:00 +0100</pubDate>
        </item>
        <item>
            <title>jQuery UI 1.10 Tabs - Using Aria-Controls to Set the URL of a Tab</title>
            <link>http://www.mainelydesign.com/blog/view/jquery-ui-1-10-tabs-setting-url-using-aria-controls</link>
            <description>&lt;p&gt;I continue to find things that I overlooked on my upgrade to using jQuery UI 1.10.&amp;nbsp; This time it was the tabs API changes that got me.&amp;nbsp; No more show(); Now use activate(); The first change that really did me in (&quot;why aren't any of my tabs executing my show callback function???&quot;) was the elimination of the show() callback.&amp;nbsp; This callback used to be fired-off each time a panel was displayed.&amp;nbsp; The change is easy, just rename your callback to activate: $('#tabContainer', options.scope).tabs({...&lt;/p&gt;</description>
            <author>Kevin Wentworth</author>
            <pubDate>Mon, 18 Mar 2013 13:00:00 +0100</pubDate>
        </item>
        <item>
            <title>Speeding Up Windows 8 for Web Development (using WAMP)</title>
            <link>http://www.mainelydesign.com/blog/view/speeding-up-windows-8-web-development-using-wamp</link>
            <description>&lt;p&gt;Here is my list of optimizations and changes you can make (and I've had to make) in order to get WAMP (and CakePHP) to run faster on my Windows 8 computer. Speed Up WAMP Web Development on Windows 8 The short list, in order of importance (stop once you are happy with your localhost web server response time and speed): &lt;strong&gt; Get the latest version of WAMP. &lt;/strong&gt; Start by downloading the latest wamp.&amp;nbsp; I used the 64 bit version.&amp;nbsp; &lt;a title=&quot;Download Wamp Server&quot; href=&quot;http://www.wampserver.com/en/#download-wrapper&quot;&gt; Download WAMP here &lt;/a&gt; . &lt;strong&gt; Edit your hosts file &lt;/strong&gt; . Make sure it has the proper...&lt;/p&gt;</description>
            <author>Kevin Wentworth</author>
            <pubDate>Mon, 25 Feb 2013 13:33:00 +0100</pubDate>
        </item>
        <item>
            <title>Must Have Tool for Screen Capture: Greenshot</title>
            <link>http://www.mainelydesign.com/blog/view/must-have-tool-greenshot-perfect-ccapturing-screenshots-processing-saving</link>
            <description>&lt;p&gt;I'm attempting to better document some of the tools and utitlites I use on a daily basis to make worklife just a little bit easier.&amp;nbsp; Something I find myself doing more and more (especially with my new focus on documentation) is taking screen shots. First, for &lt;a title=&quot;Capturing your Desktop&quot; href=&quot;http://www.sacodesign.com/blog/view/tech-support-101-how-do-i-capture-my-screen-email-it-to-support&quot;&gt; a primer on capturing your screen &lt;/a&gt; and saving it or emailing it to someone, please read this &lt;a title=&quot;Tech Support 101&quot; href=&quot;http://www.sacodesign.com/blog/view/tech-support-101-how-do-i-capture-my-screen-email-it-to-support&quot;&gt; support post &lt;/a&gt; . Greenshot is Perfect for Capturing, Processing and Saving Screenshots &amp;nbsp; Download Greenshot from SourceForge.net &lt;a href=&quot;http://sourceforge.net/projects/greenshot/files/latest/download&quot;&gt;...&lt;/a&gt;&lt;/p&gt;</description>
            <author>Kevin Wentworth</author>
            <pubDate>Mon, 25 Feb 2013 12:31:00 +0100</pubDate>
        </item>
        <item>
            <title>Free iPod to iTunes Music Transfer on Windows - iBackuper</title>
            <link>http://www.mainelydesign.com/blog/view/free-ipod-to-itunes-music-transfer-on-windows</link>
            <description>&lt;p&gt;My review of iBackuper: &lt;strong&gt; Excellent, Simple and easy to use &lt;/strong&gt; .&amp;nbsp; You can't go wrong when there are only 3 buttons. I can restore my iTunes Library onto a new Computer using my iPod. Sure thing. My Windows music library computer finally crashed.&amp;nbsp; With its demise, all of my music files were safe.&amp;nbsp; Don't worry I said.&amp;nbsp; All my music is safely backed up to my iPod.&amp;nbsp; Common sense, right? Well, to actually import your iPod into iTunes and make your iPod be the actual starting point for the new music...&lt;/p&gt;</description>
            <author>Kevin Wentworth</author>
            <pubDate>Sat, 23 Feb 2013 11:47:00 +0100</pubDate>
        </item>
        <item>
            <title>Avoiding Errors with Zend Lucene Search Results</title>
            <link>http://www.mainelydesign.com/blog/view/avoiding-errors-with-zend-lucene-search-results</link>
            <description>&lt;p&gt;A common, recurring headache and complaint among Zend Lucene search processing is handling the data fields in search results. We all like to be flexible and robust in handling the results, we may want our search to return news articles, blogs or webpage content.&amp;nbsp;&amp;nbsp; Invariably, &amp;nbsp;we run into problems, usually in the form of an exception Fatal error: Uncaught exception 'Zend_Search_Lucene_Exception' with message 'Field name &quot; &lt;em&gt; whatever &lt;/em&gt; &quot; not found in document.'&amp;nbsp; What is frustrating is that the...&lt;/p&gt;</description>
            <author>Kevin Wentworth</author>
            <pubDate>Mon, 14 Jan 2013 14:34:00 +0100</pubDate>
        </item>
        <item>
            <title>Integration of Cakephp Internationalization and GIT</title>
            <link>http://www.mainelydesign.com/blog/view/integration-cakephp-internationalization-git</link>
            <description>&lt;p&gt;We have discovered in a recent implementation of Internationalization that GIT can corrupt the POEdit generated *.po and *.mo files. Upon committing updated files GIT by default will replace the LF with CRLF in these files. &amp;nbsp; These files cannot be tampered with after generation,&amp;nbsp; even viewing the files with most windows based editor may corrupt them.&amp;nbsp; The fix for this problem is to modify the local developers GIT configuration,&amp;nbsp; adding a &quot;.gitattributes&quot; file to the repository. The...&lt;/p&gt;</description>
            <author>Kevin Wentworth</author>
            <pubDate>Fri, 28 Dec 2012 12:33:00 +0100</pubDate>
        </item>
        <item>
            <title>Smooth Gradients in Photoshop</title>
            <link>http://www.mainelydesign.com/blog/view/smooth-gradients-in-photoshop</link>
            <description>&lt;p&gt;Every now and then, when I look really close at a design in Photoshop, I see that one of my color gradient layers looks really bad.&amp;nbsp; I didn't know what this was called, until I searched around for how to get &lt;a title=&quot;Correct Banding in Gradients&quot; href=&quot;http://slodive.com/photoshop/how-to-correct-banding-in-your-gradients-using-photoshop/&quot;&gt; smooth gradients &lt;/a&gt; in Photoshop.&amp;nbsp; Your Gradient's Worst Enemy: Banding Turns out this lovely effect is called &lt;strong&gt; banding &lt;/strong&gt; .&amp;nbsp; This makes complete sense if you look at what is happening to your gradient: the colors aren't feathering or blending into each other.&amp;nbsp; Instead you get what looks...&lt;/p&gt;</description>
            <author>Kevin Wentworth</author>
            <pubDate>Wed, 24 Oct 2012 10:16:00 +0100</pubDate>
        </item>
        <item>
            <title>Best Way To Get Transparent PNGs Without Any Hacks</title>
            <link>http://www.mainelydesign.com/blog/view/best-way-to-get-transparent-pngs-without-any-hacks</link>
            <description>&lt;p&gt;I avoided PNG images for quite a while, mainly because I could accomplish almost every task with transparent GIFs (if not, I could change the design ever so slightly).&amp;nbsp; Fast forward a few years and web designs are far too complex and textured to only use transparent GIFs, plus it's so much cooler to say &quot;ping&quot; than &quot;gif&quot;.&amp;nbsp; Another reason I avoided using transparent PNGs was due to the ability to make IE (Internet Explorer) crash (suprise!).&amp;nbsp; Finally, I avoided using PNG images on my website...&lt;/p&gt;</description>
            <author>Kevin Wentworth</author>
            <pubDate>Sun, 21 Oct 2012 10:27:00 +0100</pubDate>
        </item>
        <item>
            <title>CakePHP Form Security Blackhole on Large Forms</title>
            <link>http://www.mainelydesign.com/blog/view/cakephp-form-security-blackhole-on-large-forms</link>
            <description>&lt;p&gt;I kept getting the White Screen of Death (WSOD).&amp;nbsp; What we at &lt;a title=&quot;Maine Web Design Company in Winterport, ME&quot; href=&quot;http://www.sacodesign.com/&quot;&gt; Saco Design &lt;/a&gt; have appropriately named the behavior of the default blackhole Security Component setting.&amp;nbsp; The weird issue was that I was getting the issue only on the live server.&amp;nbsp; I had recently updated the live server's version of PHP to the latest 5.3.x release.&amp;nbsp; However, I neglected to update my local PHP version, which was still 5.3.5.&amp;nbsp; max_input_vars I was looking through the php.ini file to see if there were any settings...&lt;/p&gt;</description>
            <author>Kevin Wentworth</author>
            <pubDate>Thu, 28 Jun 2012 11:11:00 +0100</pubDate>
        </item>
        <item>
            <title>Calling an Element from a Helper </title>
            <link>http://www.mainelydesign.com/blog/view/calling-an-element-from-a-helper</link>
            <description>&lt;p&gt;This one caused me more than a little headache,&amp;nbsp; turned out it was easily solvable. renderElement() can be used in a helper function. The following example worked nicely for me. In this case I am calling and element &quot;order_form.ctp&quot; &amp;nbsp; &lt;strong&gt; $theView = ClassRegistry::getObject('view'); &lt;/strong&gt; &lt;strong&gt; &lt;/strong&gt; &lt;strong&gt; echo $this-&amp;gt;output($theView-&amp;gt;renderElement('order_form')); &lt;/strong&gt;&lt;/p&gt;</description>
            <author>Kevin Wentworth</author>
            <pubDate>Fri, 24 Feb 2012 14:07:00 +0100</pubDate>
        </item>
        <item>
            <title>Forcing A Single Join in CakePHP Pagination</title>
            <link>http://www.mainelydesign.com/blog/view/forcing-a-single-join-in-cakephp-pagination</link>
            <description>&lt;p&gt;The devil's in the details... I was trying to make a really simple, dreadfully easy, database &lt;a href=&quot;http://book.cakephp.org/view/1047/Joining-tables&quot;&gt; join in my CakePHP &lt;/a&gt; web application.&amp;nbsp; I've forced joins in Cake before, using the 'joins' key in the options array for find calls and paginate calls with no issue.&amp;nbsp; It was late and for the first time I only wanted to use a single join.&amp;nbsp; I copied the join code from a much more complex web app and pasted it into my new 'joins' conditions.&amp;nbsp; And then... I got SQL errors.&amp;nbsp; That query doesn't look...&lt;/p&gt;</description>
            <author>Kevin Wentworth</author>
            <pubDate>Fri, 14 Oct 2011 09:25:00 +0100</pubDate>
        </item>
        <item>
            <title>Inserting NOW() into MySQL Using CakePHP</title>
            <link>http://www.mainelydesign.com/blog/view/inserting-now-into-mysql-using-cakephp</link>
            <description>&lt;p&gt;Great find.&amp;nbsp; If you want to insert NOW() into your query using CakePHP's save() or saveAll() functions, you can use the following expression: $this-&amp;gt;data['Model']['custom_date_field'] = DboSource::expression('NOW()'); Not sure how it works on MSSQL, but I will be testing that soon. Cheers, -Kevin Wentworth&lt;/p&gt;</description>
            <author>Kevin Wentworth</author>
            <pubDate>Thu, 11 Aug 2011 23:16:00 +0100</pubDate>
        </item>
        <item>
            <title>Best PaginateCount for CakePHP - with Group By Support</title>
            <link>http://www.mainelydesign.com/blog/view/best-paginatecount-cakephp-with-group-by-support</link>
            <description>&lt;p&gt;I'm been muddling my way through pagination with multiple joins, and complex filtering.&amp;nbsp; I finally got it all working (more on that later, maybe....) when I noticed that I couldn't paginate my results.&amp;nbsp; Everything was working fine until I added a &quot;group&quot; parameter to the find call.&amp;nbsp; Instead of getting the right count, I got a count of 1!&amp;nbsp; A quick look at my sql log tables (at the bottom of the page) and I saw that I had actually returned all the mysql records that were needed!&amp;nbsp; If only there...&lt;/p&gt;</description>
            <author>Kevin Wentworth</author>
            <pubDate>Sun, 07 Aug 2011 17:03:00 +0100</pubDate>
        </item>
        <item>
            <title>CakePHP Error Messages Not Showing on Form</title>
            <link>http://www.mainelydesign.com/blog/view/cakephp-error-messages-not-showing-on-form</link>
            <description>&lt;p&gt;I ran into an issue today that I've run into before, except I couldn't remember what I did to fix it (hence this article).&amp;nbsp; I was using CakePHP validation rules to validate a user account details.&amp;nbsp; The CakePHP validation was properly failing (the form data wasn't being saved) and I could tell the validate array was set correctly because the required fields were having the class .required added to them.&amp;nbsp; The only problem?&amp;nbsp; No error messages were being output to the form.&amp;nbsp; The form validation...&lt;/p&gt;</description>
            <author>Kevin Wentworth</author>
            <pubDate>Sun, 03 Apr 2011 12:40:00 +0100</pubDate>
        </item>
        <item>
            <title>Sorting Paginated Results Using a Related Model Field in CakePHP</title>
            <link>http://www.mainelydesign.com/blog/view/sorting-paginated-results-using-a-related-model-field-in-cakephp</link>
            <description>&lt;p&gt;Time crunch, so this will be quick.&amp;nbsp; I didn't want to go hunting for how to sort paginated results in CakePHP using a related model field again.&amp;nbsp; I actually found my answer on Stack Overflow.&amp;nbsp; The original poster had it right, so I'm not sure if it was a CakePHP bug or what (I don't have an account or I would correct it... it's on the list of to-dos though). Using a Related Model Field To Sort Paginated Results &amp;lt;th&amp;gt;&amp;lt;?php echo $paginator-&amp;gt;sort('title'); ?&amp;gt;&amp;lt;/th&amp;gt; &amp;lt;th&amp;gt;&amp;lt;?php echo...&lt;/p&gt;</description>
            <author>Kevin Wentworth</author>
            <pubDate>Sun, 06 Feb 2011 22:12:00 +0100</pubDate>
        </item>
        <item>
            <title>Changing CakePHP's Model useTable on the Fly</title>
            <link>http://www.mainelydesign.com/blog/view/changing-cakephps-model-usetable-on-fly</link>
            <description>&lt;p&gt;I finally found an answer to/solution to something I've never been able to get around in CakePHP before: dynamically changing/setting the useTable value in a model.&amp;nbsp; You can't just say $this-&amp;gt;CakePHPModel-&amp;gt;useTable = 'cakephp_table_name';&amp;nbsp; Instead you have to use the following function: Setting CakePHP Model useTable Dynamically $this-&amp;gt;CakePHPModelName-&amp;gt;setSource('table_name'); Thanks to &lt;a href=&quot;http://givemecake.dev-work.com/2010/08/changing-models-usetable-from-controller/&quot;&gt; Give Me Cake &lt;/a&gt; for sharing.&amp;nbsp; This will work from the controller or the model.&amp;nbsp; I'm using it to build an...&lt;/p&gt;</description>
            <author>Kevin Wentworth</author>
            <pubDate>Tue, 02 Nov 2010 17:12:00 +0100</pubDate>
        </item>
        <item>
            <title>The Funniest Error Message Ever - Thank You Eclipse</title>
            <link>http://www.mainelydesign.com/blog/view/funniest-computer-programming-error-message-ever</link>
            <description>&lt;p&gt;In a depature from my [normally] on-topic (i.e. dry) posts I had to post this error message up here. It made me laugh! I was working on the fattest CakePHP controller known to man (over 4,000 lines, I know... not skinny) when &lt;a href=&quot;http://www.eclipse.org/&quot;&gt; Eclipse &lt;/a&gt; ran into issues.&amp;nbsp; Eclipse gave a very descriptive error message, stating that it couldn't, well see for yourself: &lt;strong&gt; Error Processing Dirty Regions?&amp;nbsp; Does that mean Eclipse only got to first base? &lt;/strong&gt; Cheers, -Kevin Wentworth&lt;/p&gt;</description>
            <author>Kevin Wentworth</author>
            <pubDate>Mon, 18 Oct 2010 18:34:00 +0100</pubDate>
        </item>
        <item>
            <title>Upgrading CakePHP Application to 1.3 (from 1.2)</title>
            <link>http://www.mainelydesign.com/blog/view/upgrading-cakephp-application-to-1-3-from-1-2</link>
            <description>&lt;p&gt;I've been waiting to publish a completed article until after I was done with my upgrade to CakePHP 1.3.&amp;nbsp; Well, it's taking a while.&amp;nbsp; I'm not blaming the CakePHP upgrade from 1.2 to 1.3 for taking so long.&amp;nbsp; I'm actually doing several large-scale changes to my code base, my server and my repository structure.&amp;nbsp; Until that time, I'm going to publish some notes I've been making for this article. CakePHP $form-&amp;gt;create() ID Renames Huge Gotcha!&amp;nbsp; We depend on the ID of the form to perform CSS...&lt;/p&gt;</description>
            <author>Kevin Wentworth</author>
            <pubDate>Mon, 27 Sep 2010 21:33:00 +0100</pubDate>
        </item>
        <item>
            <title>Common SSH Commands (An Idiot's Guide)</title>
            <link>http://www.mainelydesign.com/blog/view/common-ssh-commands-an-idiots-guide</link>
            <description>&lt;p&gt;Well, I never thought I would be saying this, but I'm starting to love using SSH to manage certain elements of my server.&amp;nbsp; Now that I'm using ssh bash to make some updates to my server, I find myself constantly hunting for the simple commands.&amp;nbsp; I'm going to put all the commands I need below, because I'm the idiot and it's my guide. Changing Directories / Navigating cd /dir/to/go/to/ cd .. (up a directory; that's a space, then dot-dot) cd - (back to last directory, space-hyphen) dir&amp;nbsp; (list...&lt;/p&gt;</description>
            <author>Kevin Wentworth</author>
            <pubDate>Sat, 25 Sep 2010 09:25:00 +0100</pubDate>
        </item>
        <item>
            <title>Using KDiff3 as Git GUI Merge Tool on Windows XP and Windows 7</title>
            <link>http://www.mainelydesign.com/blog/view/using-kdiff3-as-git-gui-merge-tool-on-windows-xp-windows-7</link>
            <description>&lt;p&gt;I've been looking for the silver bullet solution to using KDiff3 as my git mergetool on Windows (using Git GUI).&amp;nbsp; I've finally got a solution that works in every Windows environment I've tried: Add the KDiff3 directory to your Windows System Path (e.g. C:\Program Files\KDiff3\) Add kdiff3 as your Git mergetool (From Git Bash, run git config --global merge.tool kdiff3) Add kdiff3 complete path to Git Config (From Git Bash, run git config --global meregtool.kdiff3.path &quot;C:/Program...&lt;/p&gt;</description>
            <author>Kevin Wentworth</author>
            <pubDate>Thu, 23 Sep 2010 13:39:00 +0100</pubDate>
        </item>
        <item>
            <title>Getting All ACL Permissions in One Lookup (CakePHP 1.3)</title>
            <link>http://www.mainelydesign.com/blog/view/getting-all-acl-permissions-in-one-lookup-cakephp-1-3</link>
            <description>&lt;p&gt;The biggest hurdle I've had to overcome migrating my CakePHP application from 1.2 to the much improved 1.3 branch involves Plugins and the ACL component.&amp;nbsp; A while back I noticed that my backend was kind of sluggish due to all of the ACL lookups (that happen with each request) so I &lt;a title=&quot;Speeding Up CakePHP's ACL Component with MySQL indexing&quot; href=&quot;/blog/view/speeding-up-cakephp-acl-component&quot;&gt; optimized my ACL database tables &lt;/a&gt; .&amp;nbsp; At that same time, I also discovered an incredible mysql query that would &lt;a href=&quot;http://www.neilcrookes.com/2009/02/26/get-all-acl-permissions/&quot;&gt; lookup all of the ACL permissions &lt;/a&gt; for a particular ARO.&amp;nbsp; This setup worked great... until I started...&lt;/p&gt;</description>
            <author>Kevin Wentworth</author>
            <pubDate>Sun, 19 Sep 2010 11:36:00 +0100</pubDate>
        </item>
        <item>
            <title>CakePHP 1.3 Improvements Over CakePHP 1.2</title>
            <link>http://www.mainelydesign.com/blog/view/cakephp-1-3-improvements-over-cakephp-1-2</link>
            <description>&lt;p&gt;I've been working on upgrading my CakePHP application to cake version 1.3.&amp;nbsp; It's a lot of work.&amp;nbsp; I find myself constantly consulting the CakePHP manual/book for answers.&amp;nbsp; There are many places to look for all of the improvements that were rolled into CakePHP 1.3 (at least coming from the 1.2 version).&amp;nbsp; For my own reference, I'm creating a list of all of the manual pages that reference improvements, new features and/or different ways of doing things in CakePHP 1.3. CakePHP 1.3 Improvements...&lt;/p&gt;</description>
            <author>Kevin Wentworth</author>
            <pubDate>Thu, 09 Sep 2010 14:01:00 +0100</pubDate>
        </item>
        <item>
            <title>CURL on Windows Doesn't Work in PHP 5.2.14 ISAPI</title>
            <link>http://www.mainelydesign.com/blog/view/curl-not-working-windows-php-5-2-14-isapi</link>
            <description>&lt;p&gt;Just a quick post to let everyone know what I just found out- the version of CURL (php_curl.dll) that ships with PHP 5.2.14 for Windows ISAPI doesn't work!&amp;nbsp; That's right- it doesn't work.&amp;nbsp; I tried the MSI PHP installer package, manual installs, moving dll files into Windows and System32 directories all to no avail.&amp;nbsp; The culprit: a bad version of php_curl.dll (at least that's my best guess).&amp;nbsp; The &lt;em&gt; other &lt;/em&gt; culprit: using ISAPI, but I don't have time to figure out FastCGI at this point. Here are...&lt;/p&gt;</description>
            <author>Kevin Wentworth</author>
            <pubDate>Tue, 07 Sep 2010 20:17:00 +0100</pubDate>
        </item>
        <item>
            <title>Global Mysql Find and Replace with CakePHP</title>
            <link>http://www.mainelydesign.com/blog/view/global-mysql-find-replace-with-cakephp</link>
            <description>&lt;p&gt;I'm moving my &lt;a title=&quot;Content Management System for Websites&quot; href=&quot;http://www.siteavenger.com&quot;&gt; Content Management System &lt;/a&gt; over to CakePHP 1.3.&amp;nbsp; I'll post an article about my experiences later.&amp;nbsp; Today I will focus on one and only one issue with the migration from Cake 1.2 to 1.3: the change of webroot/theme/ to webroot/theme/ to serve static content.&amp;nbsp; At first I was a little disapointed/scared at the prospects of making this change, but have since come to see the absolute brilliance in this approach. Files, easy. Content (Mysql data), hard? Moving all of my...&lt;/p&gt;</description>
            <author>Kevin Wentworth</author>
            <pubDate>Tue, 31 Aug 2010 09:03:00 +0100</pubDate>
        </item>
        <item>
            <title>Difference Between Truncate and Empty (Delete From) in Mysql</title>
            <link>http://www.mainelydesign.com/blog/view/difference-between-truncate-empty-delete-from-in-mysql</link>
            <description>&lt;p&gt;I use &lt;a href=&quot;http://www.navicat.com/&quot;&gt; Navicat &lt;/a&gt; for administering all of my MySQL databases.&amp;nbsp; It has a command that I always use- empty table.&amp;nbsp; I noticed today that all along there has been a command right below it for truncate table.&amp;nbsp; Hmmm.&amp;nbsp; I figured this would result in the same outcome and wondered what the difference is between emptying a mysql table and truncating the same table. Use &lt;strong&gt; TRUNCATE TABLE &lt;/strong&gt; to Start Fresh After doing some research I found out that when you truncate a MySQL table, you are actually dropping...&lt;/p&gt;</description>
            <author>Kevin Wentworth</author>
            <pubDate>Wed, 23 Jun 2010 14:30:00 +0100</pubDate>
        </item>
        <item>
            <title>Best Approach to Dynamic Javascript in CakePHP Views</title>
            <link>http://www.mainelydesign.com/blog/view/best-approach-to-dynamic-javascript-in-cakephp-views</link>
            <description>&lt;p&gt;I always knew in the back of my mind that there was a better way of creating dynamic javascript than the method I was using.&amp;nbsp; CakePHP has a great function as part of the $View controller:&amp;nbsp; $View-&amp;gt;addScript($jscript, false) will add a script block to your template header.&amp;nbsp; This is the command I use to send javascript created in a Cake view up to the header, which is where most javascript should live.&amp;nbsp; The best approach to adding dynamic javascript to your CakePHP views is to implement PHP's...&lt;/p&gt;</description>
            <author>Kevin Wentworth</author>
            <pubDate>Sat, 29 May 2010 12:36:00 +0100</pubDate>
        </item>
        <item>
            <title>Speeding Up Cakephp's ACL Component</title>
            <link>http://www.mainelydesign.com/blog/view/speeding-up-cakephp-acl-component</link>
            <description>&lt;p&gt;I came across a posting today that changed the performance of my application tremendously and reinforced a concept I had forgotten about- mysql indices. I didn't realize my app was running slow until I implemented the mysql indexes below- no formal benchmark testing, but I would say speed improved by about 300%.&amp;nbsp; The improvement was most noticeble when you are &lt;a href=&quot;http://book.cakephp.org/complete/641/Simple-Acl-controlled-Application#An-Automated-tool-for-creating-ACOs-647&quot;&gt; building your ACL using the CakePHP suggested method &lt;/a&gt; . MySQL Query to Create CakePHP ACL Indexes This code was originally found at &lt;a href=&quot;http://pastie.org/823086.txt&quot;&gt;...&lt;/a&gt;&lt;/p&gt;</description>
            <author>Kevin Wentworth</author>
            <pubDate>Fri, 28 May 2010 12:12:00 +0100</pubDate>
        </item>
        <item>
            <title>Best Free Mysql Zip code Database</title>
            <link>http://www.mainelydesign.com/blog/view/best-free-mysql-zip-code-database</link>
            <description>&lt;p&gt;I'm sure every developer reaches a point when they will need to use a mysql database of zip codes in the United States.&amp;nbsp; Say you want to make a store locator and show how many miles a customer is from your store, or if you have some custom php logic that uses zip codes, you will inevitably need a mysql database of zipcodes.&amp;nbsp; The Best Free Mysql Zip Code Database So here it is- my vote for the best &lt;a href=&quot;http://federalgovernmentzipcodes.us/&quot;&gt; database of zipcodes &lt;/a&gt; available in native mysql format on the Internet.&amp;nbsp; From my limited...&lt;/p&gt;</description>
            <author>Kevin Wentworth</author>
            <pubDate>Tue, 20 Apr 2010 16:42:00 +0100</pubDate>
        </item>
        <item>
            <title>Controlling CakePHP Error Handling When Debug = 0</title>
            <link>http://www.mainelydesign.com/blog/view/controlling-cakephp-error-handling-when-debug-0</link>
            <description>&lt;p&gt;I finally had a client request a piece of functionality that required me to program CakePHP so I could better control the default error handling when the site is in production mode (i.e. debug is set to 0).&amp;nbsp; By default, CakePHP will throw a 404 page not found header whenever ANY errors occur on a production site with debug equal to zero.&amp;nbsp; This works great, most of the time.&amp;nbsp; But what about when you are having database connectivity issues?&amp;nbsp; Say when there are too many mysql connections to...&lt;/p&gt;</description>
            <author>Kevin Wentworth</author>
            <pubDate>Mon, 19 Apr 2010 16:27:00 +0100</pubDate>
        </item>
        <item>
            <title>Cache Results from Query in CakePHP</title>
            <link>http://www.mainelydesign.com/blog/view/cakephp-cache-query-results</link>
            <description>&lt;p&gt;I have a HUGE query that I wanted to cache.&amp;nbsp; I love CakePHP's caching functionality out of the box, but one thing is missing- you can't cache the results of a query.&amp;nbsp; Let me clarify.&amp;nbsp; You can cache the reults of a query, but only for that instance of a page load.&amp;nbsp; Using &lt;a href=&quot;http://book.cakephp.org/view/445/cacheQueries&quot;&gt; $this-&amp;gt;cacheQueries &lt;/a&gt; only caches the query to memory, which only lasts for the duration of the page load.&amp;nbsp; If you want to &lt;strong&gt; cache query results &lt;/strong&gt; to the file system, listen to &lt;a href=&quot;http://www.milesj.me/blog/read/34/cacheing-each-query-individually&quot;&gt; Miles &lt;/a&gt; . Cache Query Results in CakePHP You'll...&lt;/p&gt;</description>
            <author>Kevin Wentworth</author>
            <pubDate>Wed, 24 Mar 2010 11:18:00 +0100</pubDate>
        </item>
        <item>
            <title>Setting Envelope-From in CakePHP's Email Component</title>
            <link>http://www.mainelydesign.com/blog/view/setting-envelope-from-header-cakephp-email-component</link>
            <description>&lt;p&gt;I've setup a form that allows customers to sign up for an email newsletter and receive a coupon. I wanted to be able to track the bounced messages in case a legitimate customer's coupon was bounced for whatever reason. As I've learned, setting up the &quot;return-path&quot; for an email message isn't as simple as setting $this-&amp;gt;Email-&amp;gt;return = 'email@domain.com';&amp;nbsp; You have to use an as yet undocumented feature... $this-&amp;gt;Email-&amp;gt;additionalParams; Making PHP mail() include your return-path email address...&lt;/p&gt;</description>
            <author>Kevin Wentworth</author>
            <pubDate>Mon, 22 Mar 2010 17:56:00 +0100</pubDate>
        </item>
        <item>
            <title>2 Neat Little PHP Tricks</title>
            <link>http://www.mainelydesign.com/blog/view/two-neat-little-php-tricks</link>
            <description>&lt;p&gt;In writing a function to &lt;a href=&quot;/blog/view/php-function-validate-bank-routing-number-checksum&quot;&gt; validate bank routing numbers &lt;/a&gt; , I came across two simple techniques, that I know I will need to use again: PHP Trick 1: Remove All Characters Except Numbers from a String A simple little regex does the trick: $routingNumber = preg_replace('[\D]', '', $routingNumber); PHP Trick 2: Loop Through a String Character by Character Setting two variables in a for loop does the trick (that could be trick number 3...): for ($i = 0, $j = strlen($routingNumber); $i &amp;lt; $j; $i++ )...&lt;/p&gt;</description>
            <author>Kevin Wentworth</author>
            <pubDate>Tue, 16 Mar 2010 16:15:00 +0100</pubDate>
        </item>
        <item>
            <title>PHP Function to Validate Bank Routing Numbers</title>
            <link>http://www.mainelydesign.com/blog/view/php-function-validate-bank-routing-number-checksum</link>
            <description>&lt;p&gt;I needed to validate that a Bank Routing Number was valid, much like the algorithms out there to check if a Credit Card number is valid.&amp;nbsp; I did a little searching and didn't find a PHP function that would do the trick.&amp;nbsp; I decided to write my own, based on this &lt;a href=&quot;http://www.brainjar.com/js/validation/&quot;&gt; javascript function &lt;/a&gt; , and publish it for anyone who wants to use it: Function to Validate Bank Routing Numbers: function checkRoutingNumber($routingNumber = 0) { $routingNumber = preg_replace('[\D]', '', $routingNumber); //only...&lt;/p&gt;</description>
            <author>Kevin Wentworth</author>
            <pubDate>Tue, 16 Mar 2010 16:10:00 +0100</pubDate>
        </item>
        <item>
            <title>Use a Plugin Element Outside of the Plugin in CakePHP</title>
            <link>http://www.mainelydesign.com/blog/view/use-plugin-element-outside-of-plugin-cakephp</link>
            <description>&lt;p&gt;Quick note- I had an element .ctp file that was part of a plugin.&amp;nbsp; I wanted to render that element across my entire Site Avenger site, including non-plugin layouts and themes.&amp;nbsp; I found out that you can send $this-&amp;gt;element() (formerly $this-&amp;gt;renderElement()) a 'plugin' parameter to accomplish this... otherise CakePHP will only look in the app-wide elements or themed elements folder. Render Plugin Element in Application echo $this-&amp;gt;element('mini_cart', array('plugin'=&amp;gt;'avorders')); Cheers,...&lt;/p&gt;</description>
            <author>Kevin Wentworth</author>
            <pubDate>Sat, 13 Mar 2010 13:03:00 +0100</pubDate>
        </item>
        <item>
            <title>Create a Checklist Group or Related Checkboxes in CakePHP</title>
            <link>http://www.mainelydesign.com/blog/view/create-checklist-group-related-checkboxes-in-cakephp</link>
            <description>&lt;p&gt;This is an interesting one.&amp;nbsp; I needed to create a group of checkboxes.&amp;nbsp; In my mind, it's just like a radio button group, except with checkboxes.&amp;nbsp; The only difference should be that with radio buttons you can only select one, while with a checkbox group you should be able to select as many as you want.&amp;nbsp; To achieve a checklist group in CakePHP is a little convoluted. First Step, Create an Input of type=&amp;gt;'select' That's right, if you want to make a group of checkboxes that are related in...&lt;/p&gt;</description>
            <author>Kevin Wentworth</author>
            <pubDate>Fri, 05 Mar 2010 12:38:00 +0100</pubDate>
        </item>
        <item>
            <title>Export to PDF from Microsoft Publisher</title>
            <link>http://www.mainelydesign.com/blog/view/export-pdf-from-microsoft-publisher</link>
            <description>&lt;p&gt;I have a client that sends me newsletters in Microsoft Publisher format.&amp;nbsp; I wanted to output the newsletter as a PDF, but wanted to keep the text for SEO and so users can copy and paste the text if needed.&amp;nbsp; Microsoft Publisher doesn't have an export to PDF function, so usually I would just do a File &amp;gt; Print and select Adobe PDF as the printer.&amp;nbsp; However, this would just be an &quot;image&quot; of the document, not the actual document with selectable text.&amp;nbsp; This is how you can get a PDF with rendered...&lt;/p&gt;</description>
            <author>Kevin Wentworth</author>
            <pubDate>Fri, 05 Mar 2010 10:54:00 +0100</pubDate>
        </item>
        <item>
            <title>Which Submit Button was Clicked in CakePHP? Use Name.</title>
            <link>http://www.mainelydesign.com/blog/view/getting-name-submit-button-clicked-after-post-cakephp</link>
            <description>&lt;p&gt;If you want to have multiple submit buttons that make a form do different things there's a simple way to do this.&amp;nbsp; The name of the submit button that was clicked by the user will be sent (via POST) with all the other POSTed data.&amp;nbsp; This is very handy if you want to have a cancel button and continue button. In CakePHP the name of the button won't be in $this-&amp;gt;data, but it's easy enough to get... Give the Submit Button a Name echo $form-&amp;gt;submit('Checkout Now',...&lt;/p&gt;</description>
            <author>Kevin Wentworth</author>
            <pubDate>Thu, 04 Mar 2010 12:01:00 +0100</pubDate>
        </item>
        <item>
            <title>PHP Break Out of All Foreach or While Loops</title>
            <link>http://www.mainelydesign.com/blog/view/php-break-out-all-foreach-loops-while-loops</link>
            <description>&lt;p&gt;Let's have some fun with PHP's break command... I didn't think it was possible.&amp;nbsp; I just learned (I've been programming PHP for like 7 years) that you can instruct break how many levels of nesting to break out of!&amp;nbsp; I'm not surprised that break in PHP allows you to specify the number of loops (or switch statements) to break out of, but I am surprised it took me this long to use it! Control How Many Loops PHP's Break Command Breaks Out Of It's easy to control, just add a number after the break...&lt;/p&gt;</description>
            <author>Kevin Wentworth</author>
            <pubDate>Thu, 25 Feb 2010 14:44:00 +0100</pubDate>
        </item>
        <item>
            <title>Changing the Order Sequence of CakePHP Behaviors </title>
            <link>http://www.mainelydesign.com/blog/view/changing-order-sequence-cakephp-behaviors</link>
            <description>&lt;p&gt;For reasons too long to explain in this post, I have two behaviors that are run on the same pieces of data (a translate behavior and a settings import/export behavior).&amp;nbsp; One behavior is attached to the model using var $actsAs, while the other behavior is attached dynamically, during runtime using $this-&amp;gt;attachBehavior();.&amp;nbsp; I needed the &quot;hardcoded&quot; behavior to run after the dynamically attached behavior.&amp;nbsp; Here's what I did: Changing the Order of CakePHP Behaviors via $actsAs First, the...&lt;/p&gt;</description>
            <author>Kevin Wentworth</author>
            <pubDate>Thu, 25 Feb 2010 07:20:00 +0100</pubDate>
        </item>
        <item>
            <title>Getting a List of Database Tables in CakePHP</title>
            <link>http://www.mainelydesign.com/blog/view/getting-database-table-names-from-within-cakephp-controller</link>
            <description>&lt;p&gt;I ran into an interesting problem today.&amp;nbsp; What I wanted to do was know if a table didn't exist in my CakePHP application.&amp;nbsp; What happens- a cakeError is thrown everytime a database table doesn't exist.&amp;nbsp; This is really annoying...I think it would be beneficial to be able to tell Controller::loadModel() to return false instead of an error message.&amp;nbsp; That's not the case.&amp;nbsp; Here's how I got around it (with thanks to &lt;a href=&quot;http://www.milesj.me/blog/read/75/Retrieving-Tables-Within-Your-Cake-Database&quot;&gt; Miles Johnson &lt;/a&gt; ): Use Cake's Database Connection Manager to Return a List of...&lt;/p&gt;</description>
            <author>Kevin Wentworth</author>
            <pubDate>Tue, 23 Feb 2010 12:22:00 +0100</pubDate>
        </item>
        <item>
            <title>Best CSS Method for Using Image as Submit Button</title>
            <link>http://www.mainelydesign.com/blog/view/best-method-using-css-image-for-submit-button</link>
            <description>&lt;p&gt;I came across an interesting issue with web forms and CSS.&amp;nbsp; Surprisingly, the end result is much better than I expected.&amp;nbsp; I knew that using an image instead of a traditional form submit button (&amp;lt;input type=&quot;submit&quot;&amp;gt;; instead of &amp;lt;input type=&quot;image&quot;&amp;gt; or &amp;lt;input type=&quot;button&quot;&amp;gt;) would be a little challenging.&amp;nbsp; I like a challenge, plus I wanted to use the submit button because it's the standard approach to forms and I remember reading somewhere that input's of type image or button do not submit...&lt;/p&gt;</description>
            <author>Kevin Wentworth</author>
            <pubDate>Wed, 03 Feb 2010 12:17:00 +0100</pubDate>
        </item>
        <item>
            <title>Weird Git Error After Upgrade: Repository not found.  Make sure you include the .git</title>
            <link>http://www.mainelydesign.com/blog/view/weird-git-error-repository-not-found-include-dot-git</link>
            <description>&lt;p&gt;This isn't a weird error in that I've never seen it (ususally when I forget to load up Pagaent before attempting Github push/pulls).&amp;nbsp; It's weird because everything was working perfectly and then I couldn't do anything from remote!&amp;nbsp; I upgraded msysgit recently and hadn't tried to do any remote commands until yesterday.&amp;nbsp; And I kept getting the following error in Git Gui: ERROR:&amp;nbsp; site:support.github.com Repository not found.&amp;nbsp; Make sure you include the .git, e.g....&lt;/p&gt;</description>
            <author>Kevin Wentworth</author>
            <pubDate>Tue, 02 Feb 2010 08:18:00 +0100</pubDate>
        </item>
        <item>
            <title>Using Git and Plink for SSH on Windows</title>
            <link>http://www.mainelydesign.com/blog/view/git-plink-for-ssh-on-windows</link>
            <description>&lt;p&gt;Well, I finally had an opportunity to install Git on Windows yet again.&amp;nbsp; It had been quite a while since my last time installing Git on Windows, so I was a little rusty and couldn't figure out how to get Git to use Plink for SSH.&amp;nbsp; It's actually quite simple and dependent on a Windows system variable. Getting Git to use Plink for SSH on Windows You need to create a system variable in Windows for &lt;strong&gt; GIT_SSH &lt;/strong&gt; : Go to System Properties &amp;gt; Advanced Settings Click the button for Environment Variables...&lt;/p&gt;</description>
            <author>Kevin Wentworth</author>
            <pubDate>Mon, 25 Jan 2010 11:11:00 +0100</pubDate>
        </item>
        <item>
            <title>Using Jquery for target=&quot;_blank&quot; and strict xHTML</title>
            <link>http://www.mainelydesign.com/blog/view/using-jquery-for-target-blank-window-strict-xhtml</link>
            <description>&lt;p&gt;If you like to see the little green check mark that &lt;a href=&quot;http://users.skynet.be/mgueury/mozilla/&quot;&gt; HTML Validator &lt;/a&gt; shows when your HTML is 100% valid, you'll love this little trick. Thanks to &lt;a href=&quot;http://www.badlydrawntoy.com/2009/03/03/replacing-target_blank-for-strict-xhtml-using-jquery-redux/&quot;&gt; badlydrawntoy.com &lt;/a&gt; .&amp;nbsp; Target=&quot;_blank&quot; Breaks xHTML Strict Guidelines When you include the target attribute, your HTML will break the standards guideline for xHTML strict.&amp;nbsp; If you are using this doctype, you must use jquery to make your markup valid: &amp;lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Strict//EN&quot;...&lt;/p&gt;</description>
            <author>Kevin Wentworth</author>
            <pubDate>Mon, 28 Dec 2009 15:27:00 +0100</pubDate>
        </item>
        <item>
            <title>12 Essential Photoshop Keyboard Shortcuts</title>
            <link>http://www.mainelydesign.com/blog/view/12-essential-photoshop-keyboard-shortcuts</link>
            <description>&lt;p&gt;I remember about 7 years ago watching my friend use Adobe Illustrator.&amp;nbsp; He was a communications design major and used his keyboard more than his mouse.&amp;nbsp; I was blown away when I realized how much time you could save by learning keyboard shortcuts for Adobe's products.&amp;nbsp; This is my list of the best Adobe Photoshop keyboard shortcuts for web designers. &lt;strong&gt; CTRL + D &lt;/strong&gt; - Deselect (sometimes it's easier than clicking outside of the current selection) &lt;strong&gt; CTRL + H &lt;/strong&gt; - Hide Selection/Guides/Slices. (I use...&lt;/p&gt;</description>
            <author>Kevin Wentworth</author>
            <pubDate>Mon, 21 Dec 2009 17:05:00 +0100</pubDate>
        </item>
        <item>
            <title>CSS Min-Height Hack in Internet Explorer</title>
            <link>http://www.mainelydesign.com/blog/view/css-min-height-hack-internet-explorer-ie</link>
            <description>&lt;p&gt;Another day of web developing with CSS and another day of needing a hack for IE6 and IE7.&amp;nbsp; This isn't really a hack so much as it's a method of ordering statements in your CSS declaration that yields a working min-height declaration in Internet Explorer.&amp;nbsp; Well, I guess it's a hack (but I hate using them). CSS min-height will be used in browsers that support it In web browsers that support the min-height property, it will be used.&amp;nbsp; In browsers that don't support it, height will be used.&amp;nbsp; For...&lt;/p&gt;</description>
            <author>Kevin Wentworth</author>
            <pubDate>Tue, 15 Dec 2009 10:18:00 +0100</pubDate>
        </item>
        <item>
            <title>CakePHP Translate Behavior - Lessons Learned</title>
            <link>http://www.mainelydesign.com/blog/view/cakephp-translate-behavior-lessons-learned</link>
            <description>&lt;p&gt;I've been working on setting up a multi-lingual web site for one of my clients.&amp;nbsp; I was excited at the opportunity to finally use CakePHP's built-in internationalization and locale functions.&amp;nbsp; However, I ran into some issues that I'm sure other newbies to internationaliztion will run into as well.&amp;nbsp; Here's some take-backs of what I learned while using the Translate Behavior in Cake... &lt;em&gt; ( &lt;strong&gt; Author's Note &lt;/strong&gt; : This posting is still a work in progress. I'm still implementing the translate behavior...&lt;/em&gt;&lt;/p&gt;</description>
            <author>Kevin Wentworth</author>
            <pubDate>Tue, 15 Dec 2009 08:29:00 +0100</pubDate>
        </item>
        <item>
            <title>Upgrading Jquery UI Tabs and it Stopped Working</title>
            <link>http://www.mainelydesign.com/blog/view/jquery-ui-tabs-stopped-working-after-upgrade</link>
            <description>&lt;p&gt;I was upgrading the version of Jquery UI that I use with Site Avenger.&amp;nbsp; The last time I was in a rush, nothing seemed to work and I rolled the changes back.&amp;nbsp; This time, I took the time and decided to finally make this Jquery UI upgrade happen.&amp;nbsp; This time everything went swell, except my Jquery UI tabs plugin stopped working.&amp;nbsp; WTF? Read the Jquery UI Upgrade Guide In my search on Google for 'upgrading jquery ui tabs stopped working' I came across a nifty little support document from the...&lt;/p&gt;</description>
            <author>Kevin Wentworth</author>
            <pubDate>Wed, 09 Dec 2009 20:16:00 +0100</pubDate>
        </item>
        <item>
            <title>Viewing Rendered Email Messages in CakePHP</title>
            <link>http://www.mainelydesign.com/blog/view/viewing-rendered-email-messages-debug-cakephp</link>
            <description>&lt;p&gt;For a while it's bugged me that I wasn't able to see the rendered output of my email messages that are sent using the CakePHP email component. I would change my code to use a remote smtp server but I still had to send messages.&amp;nbsp; Well, I finally figured out how to &quot;debug&quot; my emails sent using CakePHP.&amp;nbsp; Thanks to this &lt;a href=&quot;http://debuggable.com/posts/make-your-life-easier-with-these-five-cakephp-quicktips:48170ee5-0cc0-4815-af60-7c264834cda3-af60-7c264834cda3&quot;&gt; posting &lt;/a&gt; for finally putting all the pieces together... Set $this-&amp;gt;Email-&amp;gt;delivery to 'debug' The first step is to tell the CakePHP Email Component to deliver the message using...&lt;/p&gt;</description>
            <author>Kevin Wentworth</author>
            <pubDate>Wed, 09 Dec 2009 12:15:00 +0100</pubDate>
        </item>
        <item>
            <title>Cool Stuff with CakePHP: Cryptable Behavior</title>
            <link>http://www.mainelydesign.com/blog/view/cakephp-cool-stuff-cryptable-behavior</link>
            <description>&lt;p&gt;There is so much cool stuff out there that's already been done with CakePHP.&amp;nbsp; In an attempt to catalog it for my own use later, I'm going to start creating blog posts that highlight cool behaviors, components, etc. for CakePHP.&amp;nbsp; This is the first one. From the &lt;a href=&quot;http://bakery.cakephp.org/articles/view/cryptable-behavior&quot;&gt; Bakery &lt;/a&gt; : &quot;A behavior that will automatically encrypt/decrypt specified fields in a model, using your choice of cipher, key, and IV.&quot; &lt;a href=&quot;http://bakery.cakephp.org/articles/view/cryptable-behavior&quot;&gt; http://bakery.cakephp.org/articles/view/cryptable-behavior &lt;/a&gt;&lt;/p&gt;</description>
            <author>Kevin Wentworth</author>
            <pubDate>Fri, 20 Nov 2009 11:19:00 +0100</pubDate>
        </item>
        <item>
            <title>Jquery Accordion Menu - Expanding UL Menu</title>
            <link>http://www.mainelydesign.com/blog/view/jquery-accordion-menu-expanding-ul-menu</link>
            <description>&lt;p&gt;I looked around and found some &lt;a href=&quot;http://www.learningjquery.com/2007/03/accordion-madness&quot;&gt; interesting examples &lt;/a&gt; and &lt;a href=&quot;http://docs.jquery.com/UI/Accordion&quot;&gt; existing plugins &lt;/a&gt; for creating an accordion menu in Jquery.&amp;nbsp; What I was looking for was a nested unordered list (UL) that would collapse and expand based on which menu item was clicked.&amp;nbsp; If there wasn't a child UL, then the menu link should be clickable, instead of an accordion.&amp;nbsp; Sounds simple right? Semantic HTML Markup I wanted to keep my HTML clean, and for me that means using semantically correct UL/LI for presenting the...&lt;/p&gt;</description>
            <author>Kevin Wentworth</author>
            <pubDate>Tue, 17 Nov 2009 13:25:00 +0100</pubDate>
        </item>
        <item>
            <title>Jquery Direct Descendant Selector (using the &gt;)</title>
            <link>http://www.mainelydesign.com/blog/view/jquery-direct-descendent-selector</link>
            <description>&lt;p&gt;I'd been struggling with a very &lt;a title=&quot;Jquery Accordion Menu Example&quot; href=&quot;/blog/view/jquery-accordion-menu-expanding-ul-menu&quot;&gt; simple accordion menu script &lt;/a&gt; .&amp;nbsp; The problem was that I couldn't stop all of the links from returning false, when I only wanted to top link to return false.&amp;nbsp; Let me show you my code: $('div#sideNav li:has(ul) a').click(function() { return false; }); What was going on (and correctly I might add) was all links contained in an li with a ul would return false, and wouldn't follow the link.&amp;nbsp; I wrote this convoluted function to parse out the href and change the...&lt;/p&gt;</description>
            <author>Kevin Wentworth</author>
            <pubDate>Tue, 17 Nov 2009 13:08:00 +0100</pubDate>
        </item>
        <item>
            <title>What is the Difference Between Oblique and Italic in CSS?</title>
            <link>http://www.mainelydesign.com/blog/view/difference-between-oblique-italic-in-css</link>
            <description>&lt;p&gt;&lt;strong&gt; This answer was located at &lt;a href=&quot;http://www.webmasterworld.com/forum83/5491.htm&quot;&gt; WebMasterWorld.com &lt;/a&gt; on 11/12/09.&amp;nbsp; Answers written by &lt;a href=&quot;http://www.webmasterworld.com/profilev4.cgi?action=view&amp;amp;member=johnl&quot;&gt; johnl &lt;/a&gt; . &lt;/strong&gt; I was reading up on the CSS font-style property, making sure the default value was normal.&amp;nbsp; In case you are wondering, the default font-style value is normal.&amp;nbsp; What struck me was a new value I've never used before: oblique.&amp;nbsp; Now I'm curious... what's the difference between oblique and italic as it pertains to CSS fonts? As it turns out, not much!&amp;nbsp; Based on what I learned (from this excellently...&lt;/p&gt;</description>
            <author>Kevin Wentworth</author>
            <pubDate>Thu, 12 Nov 2009 09:34:00 +0100</pubDate>
        </item>
        <item>
            <title>Auto Columns with Columnizer - My New Favorite Jquery Plugin</title>
            <link>http://www.mainelydesign.com/blog/view/auto-columns-columnizer-my-new-favorite-jquery-plugin</link>
            <description>&lt;p&gt;I was about to start coding a CakePHP helper that would analyze a bulleted list and split it into columns.&amp;nbsp; Starting to think about how I would approach this problem, my head began to hurt.&amp;nbsp; Then I found an awesome jQuery plugin- &lt;a title=&quot;Columnizer Jquery Plugin&quot; href=&quot;http://welcome.totheinter.net/columnizer-jquery-plugin/&quot;&gt; columnizer &lt;/a&gt; . Unobtrusive Javascript Implementation This is a perfect example of unobtrusive javascripting.&amp;nbsp; A browser without javascript sees one long list.&amp;nbsp; A javascript-enabled browser has an improved viewing experience...just the way it should be. So simple to...&lt;/p&gt;</description>
            <author>Kevin Wentworth</author>
            <pubDate>Wed, 30 Sep 2009 10:37:00 +0100</pubDate>
        </item>
        <item>
            <title>CSS Small-Caps Working in IE Not in Firefox</title>
            <link>http://www.mainelydesign.com/blog/view/css-small-caps-not-working-in-firefox-only-ie</link>
            <description>&lt;p&gt;Another IE/FF Inconsistancy? I thought I had ran into an interesting (and new) CSS bug.&amp;nbsp; I was using Trebuchet MS as my font for my H2s.&amp;nbsp; It was rendering perfect in Internet Explorer but not in Firefox.&amp;nbsp; In Firefox, all caps.&amp;nbsp; In IE, small-caps.&amp;nbsp; What gives? C Stands for Cascading... It turns out that I hadn't specifically told the H2 to display text as normal.&amp;nbsp; It was inheriting a style=&quot;text-transform: uppercase&quot; from another CSS style definition.&amp;nbsp; In IE, I guess font-variant trumps...&lt;/p&gt;</description>
            <author>Kevin Wentworth</author>
            <pubDate>Thu, 24 Sep 2009 11:03:00 +0100</pubDate>
        </item>
        <item>
            <title>A Really Good Implementation of Captcha</title>
            <link>http://www.mainelydesign.com/blog/view/example-really-good-implementation-captcha</link>
            <description>&lt;p&gt;&lt;strong&gt; Awesome Captcha Implementation &lt;/strong&gt; I just experienced a version of &lt;a href=&quot;http://en.wikipedia.org/wiki/CAPTCHA&quot;&gt; Captcha &lt;/a&gt; that I actually like.&amp;nbsp; Instead of having to type in jumbled letters and phrases or answering simple questions, &lt;a href=&quot;http://www.cpawebsiteresources.com/app/support/index.asp&quot;&gt; Service2Client &lt;/a&gt; actually asks you to identify the color of the letter in a certain position.&amp;nbsp; Not only does it fool spambots (I would assume anyway) but it's pretty easy to understand. &lt;strong&gt; Solves the Usability Problem &lt;/strong&gt; It stumped me for a second, but once I figured it out, no problem.&amp;nbsp; I would try a different...&lt;/p&gt;</description>
            <author>Kevin Wentworth</author>
            <pubDate>Tue, 22 Sep 2009 14:45:00 +0100</pubDate>
        </item>
        <item>
            <title>Faking Symlinks on Windows 2003</title>
            <link>http://www.mainelydesign.com/blog/view/faking-symlinks-on-windows-2003</link>
            <description>&lt;p&gt;My production server is a LAMP server.&amp;nbsp; I love it.&amp;nbsp; I have one cental location for my CakePHP application and symlink the folders I need to each individual hosting account.&amp;nbsp; It's pretty easy to do and very powerful.&amp;nbsp; I work on another server that is Windows 2003.&amp;nbsp; Everytime I sit down to do work, I bemoan not having the ability to create symlinks.&amp;nbsp; Turns out there is a way... Junction Links are essentially Symlinks in Windows Sweet! I don't care what a symlink is called on Windows, but it's...&lt;/p&gt;</description>
            <author>Kevin Wentworth</author>
            <pubDate>Thu, 17 Sep 2009 16:25:00 +0100</pubDate>
        </item>
        <item>
            <title>Delete Dependent Just Deleted All My Records</title>
            <link>http://www.mainelydesign.com/blog/view/cakephp-delete-dependent-just-deleted-all-my-records</link>
            <description>&lt;p&gt;Oh man! I just deleted all my database records using $model-&amp;gt;del($id) with dependent=&amp;gt;true in the model association.&amp;nbsp; That wasn't supposed to happen!&amp;nbsp; It turns out to be an issue with how I specified my model association.&amp;nbsp; What's weird is that everything works fine except when I go to do the delete with cascade set to true. Use an array for conditions when associating models I was using some older model code and never changed it because everything worked fine.&amp;nbsp; However, the issue came down...&lt;/p&gt;</description>
            <author>Kevin Wentworth</author>
            <pubDate>Thu, 17 Sep 2009 10:12:00 +0100</pubDate>
        </item>
        <item>
            <title>How do I reset the keys in a PHP array?</title>
            <link>http://www.mainelydesign.com/blog/view/how-php-reset-array-keys</link>
            <description>&lt;p&gt;&lt;strong&gt; This answer was located at &lt;a href=&quot;http://www.codingforums.com/showthread.php?t=17794&quot;&gt; CodingForums.com &lt;/a&gt; on 9/11/09.&amp;nbsp; Answers written by &lt;a href=&quot;http://www.codingforums.com/member.php?u=65891&quot;&gt; PHP6 &lt;/a&gt; and &lt;a href=&quot;http://www.codingforums.com/member.php?u=2783&quot;&gt; Fou-Lu &lt;/a&gt; . &lt;/strong&gt; I had been hunting for an answer to the elusive question of how do I reset array keys in PHP.&amp;nbsp; I finally found the perfect (and thorough) answer here. There are 3 ways to reset array keys in PHP.&amp;nbsp; All of these solutions work with numerically indexed arrays only. To recap: PHP Function: array_values() $reset_array_keys = array_values($numerically_indexed_array); PHP Function: array_merge()...&lt;/p&gt;</description>
            <author>Kevin Wentworth</author>
            <pubDate>Fri, 11 Sep 2009 14:00:00 +0100</pubDate>
        </item>
        <item>
            <title>Date Input Using Cakephp Form Helper</title>
            <link>http://www.mainelydesign.com/blog/view/date-input-using-cakephp-form-helper</link>
            <description>&lt;p&gt;I always forget what exactly needs to happen in order for CakePHP's form helper to work with date input fields.&amp;nbsp; I'm sick of tearing through old source code and looking at the &lt;a href=&quot;http://book.cakephp.org&quot;&gt; official CakePHP docementation site &lt;/a&gt; .&amp;nbsp; Here's how to get it to work... Date Inputs Using the Form Helper: $current_year = date('Y'); $max_year = $current_year + 2; echo $form-&amp;gt;input('dateSelectBoxes', array('type'=&amp;gt;'date', 'selected'=&amp;gt;$unix_timestamp, 'empty'=&amp;gt;true, 'minYear'=&amp;gt;2009, 'maxYear'=&amp;gt;$max_year)); It's...&lt;/p&gt;</description>
            <author>Kevin Wentworth</author>
            <pubDate>Wed, 09 Sep 2009 15:29:00 +0100</pubDate>
        </item>
        <item>
            <title>Invalid Date Value Error in MySQL</title>
            <link>http://www.mainelydesign.com/blog/view/invalid-date-value-mysql-error</link>
            <description>&lt;p&gt;I ran into an interesting issue with valid dates and MySQL on Windows.&amp;nbsp; I wrote a CakePHP import function that basically moves MySQL data from one DB to the other.&amp;nbsp; I never thought that I would see an error related to an invalid date, but I did. What determines if a date value is invalid (read: warning) or unacceptable (read: error)? It turns out to be based on the sql_mode you have specified for your MySQL server.&amp;nbsp; I found this extremely thorough description of the different MySQL sql_mode...&lt;/p&gt;</description>
            <author>Kevin Wentworth</author>
            <pubDate>Wed, 09 Sep 2009 14:26:00 +0100</pubDate>
        </item>
        <item>
            <title>Cakephp's Flay Class is Amazing - Examples Included</title>
            <link>http://www.mainelydesign.com/blog/view/cakephp-flay-class-is-amazing</link>
            <description>&lt;p&gt;If you haven't checked out CakePHP's Flay class, &lt;a title=&quot;Flay Class API&quot; href=&quot;http://api.cakephp.org/class/flay/&quot;&gt; check it out &lt;/a&gt; . It's one of the best utility classes for text output in CakePHP. I just noticed that my blog was using the same META description for all of my blog entries- not good for SEO.&amp;nbsp; Instead, I want to pull a fragment of the article copy and use that as my META description.&amp;nbsp; I currently use this convoluted way to get my summaries from the article copy, so I decided to try using the Flay class.&amp;nbsp; I've used it before but I'm glad I...&lt;/p&gt;</description>
            <author>Kevin Wentworth</author>
            <pubDate>Tue, 08 Sep 2009 21:31:00 +0100</pubDate>
        </item>
        <item>
            <title>Manually Installing MySQL on Windows 2003 Server</title>
            <link>http://www.mainelydesign.com/blog/view/manually-installing-mysql-on-windows-2003-server</link>
            <description>&lt;p&gt;I have been trying to install MySQL on a web server running Windows 2003 for quite a while now.&amp;nbsp; I was finally successful! Here's how I did it... Does your server have a hard-coded IP address? If so, you need to make localhost refer to the manually assigned IP address in your hosts file.&amp;nbsp; This file is located in C:\Windows\System32\drivers\etc. Default hosts file will say: 127.0.0.1 localhost Modify your hosts file to reflect the binded IP address (be sure to save your changes!): 10.1.1.x...&lt;/p&gt;</description>
            <author>Kevin Wentworth</author>
            <pubDate>Wed, 02 Sep 2009 12:02:00 +0100</pubDate>
        </item>
        <item>
            <title>Using Exif in PHP on Windows</title>
            <link>http://www.mainelydesign.com/blog/view/using-exif-in-php-on-windows</link>
            <description>&lt;p&gt;I'm trying to use the exif functions in PHP on my Windows XP computer.&amp;nbsp; I want to read the meta data that is recorded by my digital camera (exif - &lt;a href=&quot;http://en.wikipedia.org/wiki/Exchangeable_image_file_format&quot;&gt; exchangeable image file format &lt;/a&gt; ).&amp;nbsp; I like the idea of storing that exif data in the database, so it's searchable. I wasn't having any luck with exif_read_data(), but finally &lt;a href=&quot;http://us3.php.net/manual/en/ref.exif.php#75868&quot;&gt; found this posting &lt;/a&gt; . You need to adjust your php.ini file. Move extension=php_exif.dll below extension=php_mbstring.dll (which needs to be enabled too).&amp;nbsp; Your php.ini...&lt;/p&gt;</description>
            <author>Kevin Wentworth</author>
            <pubDate>Fri, 28 Aug 2009 09:40:00 +0100</pubDate>
        </item>
        <item>
            <title>Making Valid Email (mailto) links in CakePHP</title>
            <link>http://www.mainelydesign.com/blog/view/making-valid-email-mailto-links-in-cakephp</link>
            <description>&lt;p&gt;It's easy to make an email address using the HTML's helper link() function.&amp;nbsp; All you need to do is have an email address appended with the string 'mailto:' (just like in regular ol' HTML). Here's my quick and dirty function to attach it if it doesn't exist: if(stristr($image['link'], '@') and stristr($image['link'], 'mailto') === false) { $address = 'mailto:'. $image['link']; } else { $address = $image['link']; } echo '&amp;lt;p&amp;gt;'. $html-&amp;gt;link($image['link'], $address) . '&amp;lt;/p&amp;gt;'; I hope this helps...&lt;/p&gt;</description>
            <author>Kevin Wentworth</author>
            <pubDate>Tue, 25 Aug 2009 16:59:00 +0100</pubDate>
        </item>
        <item>
            <title>Changing Filetypes Shown in SWF Upload File Browser</title>
            <link>http://www.mainelydesign.com/blog/view/changing-filetypes-shown-in-swf-upload-file-browser</link>
            <description>&lt;p&gt;It's easy to change which file types are allowed to show up (and are displayed) when you browse for files to upload through SWF Upload.&amp;nbsp; &lt;a title=&quot;SWF Upload&quot; href=&quot;http://swfupload.org/&quot;&gt; SWF Upload &lt;/a&gt; makes it easy to upload multiple files in PHP. I just had to hunt through some source files until I found this in my SWF Upload config. (goes in the new SWFUpload() function) &amp;lt;script type=&quot;text/javascript&quot;&amp;gt; var swfu; window.onload = function () { swfu = new SWFUpload({// File Upload Settings file_size_limit : &quot;8 MB&quot;, // 2MB file_types : &quot;*.jpg;...&lt;/p&gt;</description>
            <author>Kevin Wentworth</author>
            <pubDate>Tue, 25 Aug 2009 16:17:00 +0100</pubDate>
        </item>
        <item>
            <title>Can I (Un) Sharpen an Image After Resizing it with GD in PHP?</title>
            <link>http://www.mainelydesign.com/blog/view/sharpen-photos-after-resizing-with-gd-library-php</link>
            <description>&lt;p&gt;&lt;strong&gt; This answer was located at &lt;a href=&quot;http://drupal.org/node/205035&quot;&gt; Drupal Forums &lt;/a&gt; on 8/25/09.&amp;nbsp; Answer written by &lt;a href=&quot;http://drupal.org/user/217068&quot;&gt; dpfiffe &lt;/a&gt; . &lt;/strong&gt; I've been toying with the idea of making my personal image gallery online, so I can tag, etc.&amp;nbsp; I want to store a large file and resize on demand, so I became interested in finding out how to sharpen after resizing an image in PHP, using GD Library. &lt;a href=&quot;http://drupal.org/node/205035&quot;&gt; Read the full answer at Drupal Forums &lt;/a&gt; &amp;nbsp; &lt;strong&gt; Answer written by&amp;nbsp; &lt;a href=&quot;http://drupal.org/user/217068&quot;&gt; dpfiffe &lt;/a&gt; . See &lt;a href=&quot;http://drupal.org/node/205035&quot;&gt; Answer #2 &lt;/a&gt; in context at Drupal Forums. &lt;/strong&gt; &amp;nbsp;&lt;/p&gt;</description>
            <author>Kevin Wentworth</author>
            <pubDate>Tue, 25 Aug 2009 10:19:00 +0100</pubDate>
        </item>
        <item>
            <title>What are the elements of a good landing page?</title>
            <link>http://www.mainelydesign.com/blog/view/elements-of-an-effective-landing-page</link>
            <description>&lt;p&gt;&lt;strong&gt; This answer was located at &lt;a href=&quot;http://forums.seochat.com/google-adwords-more-39/new-website-google-says-landing-page-is-poor-can-t-252050.html&quot;&gt; SEO Chat &lt;/a&gt; on 8/24/09.&amp;nbsp; Answer written &lt;/strong&gt; &lt;strong&gt; by &lt;a href=&quot;http://forums.seochat.com/member.php?userid=33118&quot;&gt; new_seo &lt;/a&gt; . &lt;/strong&gt; This is an excellent example of a thorough forum answer.&amp;nbsp; The specific design elements, and expected user behavior, associated with an effective landing page are discussed.&amp;nbsp; This posting was supposed to be regarding Google's Rating of your landing page, however the author discusses a pretty well rounded approach to maximizing the effectiveness of your landing pages, so it's worth a read. &lt;a href=&quot;http://forums.seochat.com/google-adwords-more-39/new-website-google-says-landing-page-is-poor-can-t-252050.html&quot;&gt; &lt;em&gt; See &lt;/em&gt; &lt;/a&gt; &lt;a href=&quot;http://forums.seochat.com/google-adwords-more-39/new-website-google-says-landing-page-is-poor-can-t-252050.html&quot;&gt; &lt;em&gt; Answer #2 &lt;/em&gt;...&lt;/a&gt;&lt;/p&gt;</description>
            <author>Kevin Wentworth</author>
            <pubDate>Mon, 24 Aug 2009 11:31:00 +0100</pubDate>
        </item>
        <item>
            <title>Network Solutions' Flawed .htaccess and Mod_Rewrite Rules Implementation</title>
            <link>http://www.mainelydesign.com/blog/view/network-solutions-htaccess-mod_rewrite-rewriterule-flawed</link>
            <description>&lt;p&gt;I can't believe it!&amp;nbsp; I spent hours trying to get the mod_rewrite rules working in .htaccess on Network Solutions' servers.&amp;nbsp; Everything I tried didn't work.&amp;nbsp; Using the default .htaccess (from Cake distribution) failed.&amp;nbsp; I've used the distribution on several servers and never had any issue with the rewrite rules.&amp;nbsp; However, Network Solutions's mod_rewrite works differently than [all] other servers. The target and destination file have to exist Wait, the target file has to exist?&amp;nbsp; That's right.&amp;nbsp;...&lt;/p&gt;</description>
            <author>Kevin Wentworth</author>
            <pubDate>Thu, 06 Aug 2009 14:38:00 +0100</pubDate>
        </item>
        <item>
            <title>Cheatsheet for Creating .MOV Files from .VOB files (DVDs)</title>
            <link>http://www.mainelydesign.com/blog/view/cheatsheet-for-extracting-vob-to-mov-files</link>
            <description>&lt;p&gt;Every now and again I need to take a video from a promotional DVD and put it on a client's web site.&amp;nbsp; I use a handy &lt;a title=&quot;Flash Video Creator&quot; href=&quot;http://www.moyea.com/&quot;&gt; utility &lt;/a&gt; that will convert almost any video file into a flash video (.swf/.flv).&amp;nbsp; The hard part usually comes from having to rip the video from the DVD.&amp;nbsp; I use &lt;a title=&quot;MediaCoder Web Site&quot; href=&quot;http://mediacoder.sourceforge.net/&quot;&gt; MediaCoder &lt;/a&gt; .&amp;nbsp; It's Open Source, easy to use, and extremely powerful.&amp;nbsp; The reason for my post, is to remember some settings.&amp;nbsp; These settings are the ones that worked for me.&amp;nbsp; I don't recommend them, but they...&lt;/p&gt;</description>
            <author>Kevin Wentworth</author>
            <pubDate>Thu, 30 Jul 2009 11:38:00 +0100</pubDate>
        </item>
        <item>
            <title>TinyMCE Doesn't Work in IE8</title>
            <link>http://www.mainelydesign.com/blog/view/tinymce-not-working-in-internet-explorer-ie8</link>
            <description>&lt;p&gt;I was training a client how to update their web site using &lt;a title=&quot;Site Avenger Content Management System&quot; href=&quot;http://www.siteavenger.com&quot;&gt; Site Avenger &lt;/a&gt; when the strangest thing happened- no copy was showing in TinyMCE.&amp;nbsp; No matter what I pasted the tiny editor would remain a nice, plain white.&amp;nbsp; I didn't think to try typing directly into TinyMCE.&amp;nbsp; No matter, a click on the HTML button to view the source revealed the content was in fact there, just not being shown within the TinyMCE editor. Tell IE8 to Use Compatibility Mode I found a &lt;a title=&quot;Telling IE8 to use compatibility mode&quot; href=&quot;http://www.ditii.com/2008/08/28/ie8-standards-mode-and-ie7-compatibility-mode/&quot;&gt; link &lt;/a&gt; to a neat snippet of code...&lt;/p&gt;</description>
            <author>Kevin Wentworth</author>
            <pubDate>Fri, 24 Jul 2009 11:54:00 +0100</pubDate>
        </item>
        <item>
            <title>Phantom Whitespace Below Img in Firefox</title>
            <link>http://www.mainelydesign.com/blog/view/phantom-white-space-below-img-in-ff-only</link>
            <description>&lt;p&gt;I've come across this thing a few times before- there's a strange space below images in Firefox, but not in IE.&amp;nbsp; I finally found a nice &lt;a title=&quot;Fixing Whitespace Below Images in FireFox&quot; href=&quot;http://www.webdeveloper.com/forum/archive/index.php/t-68801.html&quot;&gt; explanation &lt;/a&gt; as to why it happens, which I wanted to post here. Images are displayed inline by default.&amp;nbsp; When you are using an image as a block (like when you want an image to take up the entire top half of a page) you'll get some mysterious white space below the image, but only in Firefox.&amp;nbsp; For once, IE actually seems to render the CSS appropriately. The...&lt;/p&gt;</description>
            <author>Kevin Wentworth</author>
            <pubDate>Wed, 22 Jul 2009 10:24:00 +0100</pubDate>
        </item>
        <item>
            <title>Faking min-width CSS style in IE6 and IE7</title>
            <link>http://www.mainelydesign.com/blog/view/faking-min-width-css-style-in-internet-explorer</link>
            <description>&lt;p&gt;It's a hack... but it's needed to make a truly cross-browser fluid layout.&amp;nbsp; It's simple, if you want to implement min-width in IE6 and IE7, use the following CSS code: (I didn't create this originally, sorry, lost the source) /********************* ** IE 6.0 min-width hack ********************/ * html div#contentWrap { width:expression(((document.compatMode &amp;amp;&amp;amp; document.compatMode=='CSS1Compat') ? document.documentElement.clientWidth : document.body.clientWidth) &amp;lt; 1000 ? &quot;840px&quot; : &quot;85%&quot;); }...&lt;/p&gt;</description>
            <author>Kevin Wentworth</author>
            <pubDate>Thu, 16 Jul 2009 13:50:00 +0100</pubDate>
        </item>
        <item>
            <title>Avoiding Flash (.flv) 404 Errors on IIS 6 (Windows 2003)</title>
            <link>http://www.mainelydesign.com/blog/view/fixing-flash-flv-404-errors-iis6</link>
            <description>&lt;p&gt;An interesting thing happens on Windows 2003 Server (IIS 6) when you try and play a .flv file through an embedded shockwave player...nothing.&amp;nbsp; Well, actually you get a 404 error.&amp;nbsp; Fixing the .flv 404 error is simple All you need to do is tell the IIS server that the MIME type for .flv exists.&amp;nbsp; Then, the web server can send the appropriate MIME-TYPE header when needed. Adding the .FLV MIME type to Windowss 2003 / IIS 6&amp;nbsp; You can modify the MIME type on the entire server by editing the...&lt;/p&gt;</description>
            <author>Kevin Wentworth</author>
            <pubDate>Wed, 15 Jul 2009 11:11:00 +0100</pubDate>
        </item>
        <item>
            <title>Using Between with Date Ranges in Proper DB Date Format</title>
            <link>http://www.mainelydesign.com/blog/view/between-date-range-maintaining-proper-date-format</link>
            <description>&lt;p&gt;I need my CakePHP apps to run on both LAMP and Windows IIS using MSSQL Server.&amp;nbsp; Usually this isn't a problem because CakePHP does such a good job of database abstraction and database independence.&amp;nbsp; However, I came across a scenario the other day where I needed to select a date range using the BETWEEN SQL command. Using CakePHP's BETWEEN function for date ranges It's easy, if you only want to use MySQL.&amp;nbsp; Just do the following (note that the &quot;lesser&quot; or older date comes first):...&lt;/p&gt;</description>
            <author>Kevin Wentworth</author>
            <pubDate>Thu, 09 Jul 2009 11:56:00 +0100</pubDate>
        </item>
        <item>
            <title>Adding Anchors to Your CakePHP Generated Urls (#link)</title>
            <link>http://www.mainelydesign.com/blog/view/adding-anchors-to-cakephp-generated-urls</link>
            <description>&lt;p&gt;This may seem simple and trivial, but it took me a little while to figure out.&amp;nbsp; If it saves someone a little trial-and-error then great (I know I won't forget how to do it). I needed to create a redirect in CakePHP that redirected to an inline, on-page anchor- &amp;lt;a name=&quot;destination&quot;&amp;gt;Scroll to Here&amp;lt;/a&amp;gt;.&amp;nbsp; Typing the link directly into the address bar of the browser, it would need to look like this: http://www.mainelydesign.com/blog/view/1219/#destination.&amp;nbsp; The #destination is what I needed to...&lt;/p&gt;</description>
            <author>Kevin Wentworth</author>
            <pubDate>Thu, 02 Jul 2009 09:02:00 +0100</pubDate>
        </item>
        <item>
            <title>Using CakePHP's Set Class to Make Select List Options</title>
            <link>http://www.mainelydesign.com/blog/view/using-cakephp-set-class-for-select-list-options</link>
            <description>&lt;p&gt;If you haven't become familar with any of the functionality of the CakePHP's Set class, I highly recommend you take a &lt;a title=&quot;Set:combine CakePHP documentation&quot; href=&quot;http://book.cakephp.org/view/662/combine&quot;&gt; peak &lt;/a&gt; .&amp;nbsp; I don't know too much about it and really only learn about it as I go.&amp;nbsp; Well, I finally found out how to do something that used to take several lines of code: creating options for a select list that includes the Model.id as the key, but has a concatenated string for the value, like 'Model.name - created by Model.userName'. Using the Set class this is easy.&amp;nbsp; With...&lt;/p&gt;</description>
            <author>Kevin Wentworth</author>
            <pubDate>Fri, 19 Jun 2009 11:22:00 +0100</pubDate>
        </item>
        <item>
            <title>Changing the CakePHP Model Schema on the Fly</title>
            <link>http://www.mainelydesign.com/blog/view/changing-cakephp-model-schema-on-the-fly</link>
            <description>&lt;p&gt;I have an interesting way of dynamically changing a model's validation on the fly.&amp;nbsp; I have a standard approach that involves contact forms, contest entries, etc. using a database to store which fields should be on a form.&amp;nbsp; I tweaked this over time, and recently needed to change the schema from text, which all answers have been up to this point (and IS the DB field type), to a type of date. I kept getting the error 'preg_replace expects parameter 2 to be a string, array given'.&amp;nbsp; Once I got...&lt;/p&gt;</description>
            <author>Kevin Wentworth</author>
            <pubDate>Thu, 11 Jun 2009 10:28:00 +0100</pubDate>
        </item>
        <item>
            <title>Displaying phpinfo() without CSS styles</title>
            <link>http://www.mainelydesign.com/blog/view/displaying-phpinfo-without-css-styles</link>
            <description>&lt;p&gt;I wanted logged in users to be able to see the output from phpinfo(); within Site Avenger.&amp;nbsp; The problem with using phpinfo() is that it outputs a full HTML page, CSS styles and all.&amp;nbsp; In the past this has been fine, but now I wanted to show the phpinfo() within the Site Avenger layout and CSS styles.&amp;nbsp; I came across a simple, yet highly effective solution... Using Output Buffering to Capture PHPINFO() The solution is as simple as turning on output buffering, capturing the echo'ed value of...&lt;/p&gt;</description>
            <author>Kevin Wentworth</author>
            <pubDate>Tue, 09 Jun 2009 10:18:00 +0100</pubDate>
        </item>
        <item>
            <title>Getting the File Path to the Vendor Folder</title>
            <link>http://www.mainelydesign.com/blog/view/getting-file-path-for-vendor-folder</link>
            <description>&lt;p&gt;I'm trying to use a library within my CakePHP application that needs a variable defined that contains the complete file path to the vendors folder.&amp;nbsp; This can be solved one of two ways- modify the library (which I don't want to do) or use the Configure::corePaths() function in CakePHP. Best Option - using Configure::corePaths() This is a great function I had not used until today.&amp;nbsp; If you call it with no parameters, you'll get all of the file paths that Cake will look in when &quot;building&quot; your...&lt;/p&gt;</description>
            <author>Kevin Wentworth</author>
            <pubDate>Mon, 08 Jun 2009 16:47:00 +0100</pubDate>
        </item>
        <item>
            <title>Fixing the Default HP OfficeJet Scanner Settings (which suck)</title>
            <link>http://www.mainelydesign.com/blog/view/fixing-default-hp-officejet-scanner-settings</link>
            <description>&lt;p&gt;The default settings for my OfficeJet L7500 All-In-One Scanner suck!&amp;nbsp; I thought the scanner was junk.&amp;nbsp; Every photo I scanned, espcially glossy finished photos, were coming out looking like they were from a&amp;nbsp;1960s era camera: over-exposed and super high contrast.&amp;nbsp; Not good!&amp;nbsp; I thought I had good Photoshop skills, but even&amp;nbsp;they were no match for the over-exposed mess that HP was sending into Photoshop. How did I improve the quality? Easy (usabilty rant- they should be the default settings, or...&lt;/p&gt;</description>
            <author>Kevin Wentworth</author>
            <pubDate>Thu, 28 May 2009 23:11:00 +0100</pubDate>
        </item>
        <item>
            <title>Distinct vs. Group By in MySQL (and CakePHP)</title>
            <link>http://www.mainelydesign.com/blog/view/using-distinct-or-group-by-mysql-cakephp</link>
            <description>&lt;p&gt;An interesting problem- I am returning a list of files that have already been uploaded, so the user can link to an existing file.&amp;nbsp; This creates a new record (duplicate record).&amp;nbsp; The next time the user goes to select a file, there will now be two entries for the same file.&amp;nbsp; DISTINCT to the rescue, or so I thought. DISTINCT applies to the whole select statement This is confusing in its own right.&amp;nbsp; The &lt;a href=&quot;http://book.cakephp.org/view/73/Retrieving-Your-Data&quot;&gt; CakePHP book &lt;/a&gt; misleadingly demonstrates that you can setup the fields parameter like so:...&lt;/p&gt;</description>
            <author>Kevin Wentworth</author>
            <pubDate>Thu, 21 May 2009 11:27:00 +0100</pubDate>
        </item>
        <item>
            <title>Best Eclipse Feature: Link With Editor</title>
            <link>http://www.mainelydesign.com/blog/view/best-eclipse-feature-link-with-editor</link>
            <description>&lt;p&gt;I use Eclipse for all of my CakePHP development work.&amp;nbsp; I love that you can get code completion, class inheritance, and more by &lt;a title=&quot;CakePHP Bakery - Setting Up Eclipse to work with CakePHP&quot; href=&quot;http://bakery.cakephp.org/articles/view/setting-up-eclipse-to-work-with-cake&quot;&gt; following these steps &lt;/a&gt; .&amp;nbsp; I also loved that I could have 20 something files opened, and when I changed the active document in the editor, my PHP Explorer hierarchy would change in response.&amp;nbsp; So, I upgraded my Eclipse to Ganymede, so I could download the latest PDT and install the Git plugin (which I haven't even tried yet).&amp;nbsp; Long story short, my PHP Explorer...&lt;/p&gt;</description>
            <author>Kevin Wentworth</author>
            <pubDate>Thu, 21 May 2009 09:43:00 +0100</pubDate>
        </item>
        <item>
            <title>Dealing with MySQL Old-Style Passwords</title>
            <link>http://www.mainelydesign.com/blog/view/mysql-old-password-error</link>
            <description>&lt;p&gt;I ran into a problem I've seen before- &lt;em&gt; Client does not support authentication protocol requested by server; consider upgrading MySQL client. &lt;/em&gt; Last time I came across this MySQL error, it was a simple query to fix the issue (from &lt;a href=&quot;http://dev.mysql.com/doc/refman/5.1/en/old-client.html&quot;&gt; dev.mysql.com &lt;/a&gt; ): UPDATE mysql.user SET Password = OLD_PASSWORD('newpwd') WHERE Host = 'some_host' AND User = 'some_user'; FLUSH PRIVILEGES; That didn't work... instead &lt;strong&gt; IT CRASHED THE SERVER &lt;/strong&gt; !&amp;nbsp; I was in a position that I couldn't upgrade the version of PHP...&lt;/p&gt;</description>
            <author>Kevin Wentworth</author>
            <pubDate>Wed, 20 May 2009 16:37:00 +0100</pubDate>
        </item>
        <item>
            <title>Changing Display Options in Model::find('list')</title>
            <link>http://www.mainelydesign.com/blog/view/cakephp-change-display-field-find-list</link>
            <description>&lt;p&gt;I wanted to change the displayed field that Cake automatically returns with a Model::find('list').&amp;nbsp; If you have a database column named title or name (I'm not sure of the full list), CakePHP will automatically return an array index by Model.id =&amp;gt; Model.name.&amp;nbsp; This usually works, but today I'm working with a database table that doesn't use that field- it's a table of uploaded files and uses the columns named 'src' or 'alt' to display information to the user.&amp;nbsp; I forgot how to do this, so I'm...&lt;/p&gt;</description>
            <author>Kevin Wentworth</author>
            <pubDate>Tue, 19 May 2009 10:49:00 +0100</pubDate>
        </item>
        <item>
            <title>Getting the CakePHP Version in Your Code</title>
            <link>http://www.mainelydesign.com/blog/view/getting-cakephp-version-in-code</link>
            <description>&lt;p&gt;I was sick and tired of having to FTP into my accounts and view the VERSION.txt file that comes with the Cake core to figure out what version of Cake I was running.&amp;nbsp; I did a quick search but wasn't finding anything.&amp;nbsp; I was about to dig in and hack something together, but tried the &lt;a title=&quot;CakePHP Application Programming Interface Documentation&quot; href=&quot;http://api.cakephp.org/&quot;&gt; CakePHP API &lt;/a&gt; as a last resort. Bingo! To find out what CakePHP version you are running on, use the following command: Configure::version(); A string of the version will be returned.&amp;nbsp; Simple, huh?&amp;nbsp; Dare I say, easy...&lt;/p&gt;</description>
            <author>Kevin Wentworth</author>
            <pubDate>Thu, 14 May 2009 10:57:00 +0100</pubDate>
        </item>
        <item>
            <title>Naming a Text File .htaccess on Windows</title>
            <link>http://www.mainelydesign.com/blog/view/naming-htaccess-file-on-windows</link>
            <description>&lt;p&gt;A big pain- you can't just name a file .htaccess through Windows Explorer.&amp;nbsp; It complains that you need to supply a name!&amp;nbsp; No problem. Here's how you can name a file .htaccess (only tested on Notepad, though hopefully it will work on more): Load up your file in Notepad or create a new file in Notepad Add your &lt;a title=&quot;Articles Tagged as .htaccess Related&quot; href=&quot;/blog/tags/tag:Htaccess&quot;&gt; .htaccess declarations &lt;/a&gt; File &amp;gt; Save As In the filename text box put &quot;.htaccess&quot; - with the double quotes (&quot;.htaccess&quot; exactly) In the filetype select box choose 'All Files' Save it! I...&lt;/p&gt;</description>
            <author>Kevin Wentworth</author>
            <pubDate>Wed, 13 May 2009 12:15:00 +0100</pubDate>
        </item>
        <item>
            <title>Making Apache Parse .html files as .php Files</title>
            <link>http://www.mainelydesign.com/blog/view/making-apache-parse-html-as-php-files</link>
            <description>&lt;p&gt;When re-designing a site, or somehow being locked into a given web site structure that uses .html (or .htm) file extensions, it's a good idea to keep the file names the same (especially if the site has been around a while and has good search engine visibility).&amp;nbsp; Think you can't use PHP on .html or .htm web pages?&amp;nbsp; Think again.&amp;nbsp; With apache it's as easy as modifying the .htaccess file. On a server with PHP 5, add this line to your .htaccess file: AddHandler application/x-httpd-php5 .html .htm...&lt;/p&gt;</description>
            <author>Kevin Wentworth</author>
            <pubDate>Wed, 13 May 2009 12:09:00 +0100</pubDate>
        </item>
        <item>
            <title>Keep Old Settings When Upgrading Eclipse</title>
            <link>http://www.mainelydesign.com/blog/view/upgrading-eclipse-moving-old-settings</link>
            <description>&lt;p&gt;I decided to upgrade my version of &lt;a href=&quot;http://www.eclipse.org/&quot;&gt; Eclipse &lt;/a&gt; to 3.4 (Ganymede) mainly so I could use the &lt;a href=&quot;http://git.or.cz/gitwiki/EclipsePlugin&quot;&gt; Git plugin &lt;/a&gt; .&amp;nbsp; I wanted to migrate my settings from one install to the other.&amp;nbsp; I know I had done this before, when I upgraded from 3.2 to 3.3, but forgot how.&amp;nbsp; So I don't have to scratch my head so much next time, here is how you can move your settings after you upgrade your version of Eclipse. I'm using Windows XP.&amp;nbsp; Here's what I did: Go into your old version of Eclipse and do a File &amp;gt; Export Choose...&lt;/p&gt;</description>
            <author>Kevin Wentworth</author>
            <pubDate>Tue, 12 May 2009 13:02:00 +0100</pubDate>
        </item>
        <item>
            <title>Avoiding New Line Errors using Git on Windows</title>
            <link>http://www.mainelydesign.com/blog/view/avoid-git-new-line-errors-on-windows</link>
            <description>&lt;p&gt;I'm finally working on moving my code over to a version control system.&amp;nbsp; I've tried several times over the past few years to start using Subversion, but I never quite got into it.&amp;nbsp; After hearing so much about &lt;a title=&quot;Git Homepage&quot; href=&quot;http://git-scm.com/&quot;&gt; Git &lt;/a&gt; , I decided I needed to start using it.&amp;nbsp; Luckily, most people tell you to forget everything about Subversion when using Git- no problem there! I ran into a huge issue.&amp;nbsp; I created a new repository and wanted to add quite a large project (1,200+ files).&amp;nbsp; At the end of adding all the...&lt;/p&gt;</description>
            <author>Kevin Wentworth</author>
            <pubDate>Tue, 12 May 2009 12:27:00 +0100</pubDate>
        </item>
        <item>
            <title>Pagination with MSSQL in CakePHP</title>
            <link>http://www.mainelydesign.com/blog/view/cakephp-pagination-mssql</link>
            <description>&lt;p&gt;One thing, and there are a few, that I can't stand about having to use PHP and MSSQL Server together is the lack of support for pagination.&amp;nbsp; With PHP and MySQL- no problem use limit.&amp;nbsp; MSSQL- can't do it without all these ugly sub-queries.&amp;nbsp; I have to give it to the CakePHP developers though, for the built-in support for pagination in MSSQL.&amp;nbsp; Albeit it is flawed, it works. The problem with the CakePHP support for pagination in MSSQL is that on the last page of results you get a full result set...&lt;/p&gt;</description>
            <author>Kevin Wentworth</author>
            <pubDate>Thu, 07 May 2009 16:36:00 +0100</pubDate>
        </item>
        <item>
            <title>From the Hip - Midcoast Maine User Group</title>
            <link>http://www.mainelydesign.com/blog/view/from-the-hip-midcoast-maine-user-group</link>
            <description>&lt;p&gt;Well, it finally happened! The Midcoast has a web design/interface design user group.&amp;nbsp; Last night was the first meeting of &lt;em&gt; From the Hip &lt;/em&gt; , an informal, agendas-not-allowed, information exchange session.&amp;nbsp; Some people from &lt;a title=&quot;Midcoast Magnet&quot; href=&quot;http://www.midcoastmagnet.com&quot;&gt; Midcoast Magnet &lt;/a&gt; helped organize the event, and now the group finally has legs! &lt;strong&gt; Want to Get Involved? &lt;/strong&gt; For more on &lt;em&gt; From the Hip &lt;/em&gt; , the Midcoast Maine User Group for web and creative professionals, check out: &lt;strong&gt; Google Group / Listserv: &lt;/strong&gt; &lt;a title=&quot;From the Hip Google Group&quot; href=&quot;http://groups.google.com/group/from-the-hip?hl=en&quot;&gt;...&lt;/a&gt;&lt;/p&gt;</description>
            <author>Kevin Wentworth</author>
            <pubDate>Thu, 07 May 2009 11:23:00 +0100</pubDate>
        </item>
        <item>
            <title>A tale of caution: naming CakePHP &quot;view&quot; functions</title>
            <link>http://www.mainelydesign.com/blog/view/properly-naming-cakephp-view-functions</link>
            <description>&lt;p&gt;Spoiler: functions that generate a view must be named using &lt;strong&gt; lower_case_with_underscores() &lt;/strong&gt; I just ran into a very interesting problem.&amp;nbsp; I was testing out some of my plugins to make sure they were still working with Cake version 1.2.2.8120.&amp;nbsp; They worked fine except for one function.&amp;nbsp; I had a form that updates a shopping cart, changing the quantities of products placed in the cart.&amp;nbsp; When I hit the submit button to change the quantities, I was getting redirected to my site root.&amp;nbsp; The first...&lt;/p&gt;</description>
            <author>Kevin Wentworth</author>
            <pubDate>Wed, 06 May 2009 17:13:00 +0100</pubDate>
        </item>
        <item>
            <title>Getting Full Resolution Pictures out of MS Word (almost)</title>
            <link>http://www.mainelydesign.com/blog/view/getting-full-resolution-pictures-from-ms-word</link>
            <description>&lt;p&gt;People use what they know.&amp;nbsp; Most of the time I get photos embedded in an MS Word document for use on a web site.&amp;nbsp; My workaround to date has been to enlarge the picture (in Word) until it is as big as it gets (keeping quality) or the size I need.&amp;nbsp; I would then do a print screen and paste into Photoshop.&amp;nbsp; I knew that there had to be a better way, but at least I was getting as much resolution as possible from the photo/picture.&amp;nbsp; Well I came across an interesting scenario today- I couldn't...&lt;/p&gt;</description>
            <author>Kevin Wentworth</author>
            <pubDate>Wed, 29 Apr 2009 11:14:00 +0100</pubDate>
        </item>
        <item>
            <title>Best Tiny Font for Web Graphics</title>
            <link>http://www.mainelydesign.com/blog/view/best-tiny-font-for-web-graphics</link>
            <description>&lt;p&gt;I finally found the perfect font for making really small, yet readable text in web graphics.&amp;nbsp; I've played around with plenty of fonts and usually arrive at a reasonable result.&amp;nbsp; In the past I would use Eurostyle with enough spacing to make it legible.&amp;nbsp; Now, I have a new go-to font for small typeface.&amp;nbsp; &lt;strong&gt; Introducing &lt;a title=&quot;Silkscreen font download&quot; href=&quot;http://kottke.org/plus/type/silkscreen/&quot;&gt; Silkscreen &lt;/a&gt; . &lt;/strong&gt; Usage Notes (for Photoshop CS2): It fails to render clean with pretty much any point size lower than 8 If the font looks blurry, turn off anti-aliasing You can have...&lt;/p&gt;</description>
            <author>Kevin Wentworth</author>
            <pubDate>Tue, 28 Apr 2009 17:03:00 +0100</pubDate>
        </item>
        <item>
            <title>Preformatted Text in TinyMCE </title>
            <link>http://www.mainelydesign.com/blog/view/performatted-text-tinymce-pre-tag</link>
            <description>&lt;p&gt;Now that I've got my blog up and running, I've been playing around with syntax highlighting of source code.&amp;nbsp; I really appreciate sites that serve up code samples in a nice format, so I've tried to comply with my own version of this best practice. Getting &lt;a title=&quot;GeSHi - Generic Syntax Highlighter&quot; href=&quot;http://qbnz.com/highlighter/&quot;&gt; Geshi &lt;/a&gt; working, for syntax highlighting was one battle (I'll try and post what I came up with later). My real trouble came with using &amp;lt;pre&amp;gt;&amp;lt;/pre&amp;gt; tags for my code samples within &lt;a title=&quot;TinyMCE Homepage&quot; href=&quot;http://tinymce.moxiecode.com/&quot;&gt; TinyMCE &lt;/a&gt; .&amp;nbsp; I absolutely love TinyMCE! I did a lot of...&lt;/p&gt;</description>
            <author>Kevin Wentworth</author>
            <pubDate>Tue, 21 Apr 2009 10:26:00 +0100</pubDate>
        </item>
        <item>
            <title>$paginator-&gt;sort() error?</title>
            <link>http://www.mainelydesign.com/blog/view/cakephp-paginator-sort-error</link>
            <description>&lt;p&gt;I thought there was an error in the paginator view helper.&amp;nbsp; All of a sudden I could only sort a field ascending.&amp;nbsp; I (again) did a little research and came across a great thread on the CakePHP Google Group ( &lt;a title=&quot; $paginator-&amp;gt;link sorting &amp;ndash; Is this a Bug? &quot; href=&quot;http://groups.google.com/group/cake-php/browse_thread/thread/d099dc194f13b6e7&quot;&gt; here &lt;/a&gt; ).&amp;nbsp; Basically, as of 1.2.8120, you need (or should) specify the ModelName in your sort() function.&amp;nbsp; I had only been doing sort('id'), sort('name').&amp;nbsp; Now I am doing sort('ID', 'ModelName.id') and sort('Name', 'ModelName.name').&amp;nbsp; It's a little more work having to specify the label...&lt;/p&gt;</description>
            <author>Kevin Wentworth</author>
            <pubDate>Fri, 17 Apr 2009 13:32:00 +0100</pubDate>
        </item>
        <item>
            <title>Transactional Support in CakePHP</title>
            <link>http://www.mainelydesign.com/blog/view/cakephp-transactional-support</link>
            <description>&lt;p&gt;I just found out that CakePHP has transactional support built-in.&amp;nbsp; It should have been obvious, seeing how the saveAll() function has transaction support built-in too.&amp;nbsp; My first attempt at using it didn't work.&amp;nbsp; In my contoller/model I was doing the following: $this-&amp;gt;Model-&amp;gt;begin(); if(!$this-&amp;gt;Model-&amp;gt;save($this-&amp;gt;data)) { $this-&amp;gt;Model-&amp;gt;rollback(); } else { $this-&amp;gt;Model-&amp;gt;commit(); } Based on the API and my limited knowledge of inheritance, I figured this would work.&amp;nbsp; It didn't.&amp;nbsp; I was a little...&lt;/p&gt;</description>
            <author>Kevin Wentworth</author>
            <pubDate>Fri, 17 Apr 2009 11:50:00 +0100</pubDate>
        </item>
        <item>
            <title>saveAll() to save multiple records in 1 model</title>
            <link>http://www.mainelydesign.com/blog/view/cakephp-saving-multiple-records-one-model</link>
            <description>&lt;p&gt;I ran into another issue on something I thought would be simple: saving multiple records with the saveAll() command.&amp;nbsp; In case you don't know about it, &lt;a title=&quot;Saving Model Data at Cookbook&quot; href=&quot;http://book.cakephp.org/view/75/Saving-Your-Data&quot;&gt; saveAll() &lt;/a&gt; is one of the best functions in CakePHP.&amp;nbsp; It automatically supports transactions, HABTM saves, and certainly saves a lot of typing for almost every type of save you want to do. There are a few gotchas.&amp;nbsp; Here what I ran into: Inserting/creating new rows in the database, don't forget $this-&amp;gt;ModelName-&amp;gt;create() //no duh, right? Well,...&lt;/p&gt;</description>
            <author>Kevin Wentworth</author>
            <pubDate>Fri, 17 Apr 2009 09:58:00 +0100</pubDate>
        </item>
        <item>
            <title>Checkbox - setting the default state</title>
            <link>http://www.mainelydesign.com/blog/view/cakephp-setting-default-checkbox-state</link>
            <description>&lt;p&gt;I ran across a rather simple problem (I thought) that took a little searching to figure out.&amp;nbsp; All I had to do was create a checkbox form input that I wanted to have checked by default.&amp;nbsp; I tried 'default'=&amp;gt;'checked', which didn't work.&amp;nbsp; I also tried 'checked'=&amp;gt;true and 'checked'=&amp;gt;1, but that works every time, even if validation fails and the user had unchecked the checkbox, it will be checked again (Not good usability).&amp;nbsp; The solution lies in a less-than-automagic approach.&amp;nbsp; Too bad this...&lt;/p&gt;</description>
            <author>Kevin Wentworth</author>
            <pubDate>Fri, 17 Apr 2009 08:31:00 +0100</pubDate>
        </item>
        <item>
            <title>Importing an Excel file into CakePHP</title>
            <link>http://www.mainelydesign.com/blog/view/importing-excel-file-into-cakephp</link>
            <description>&lt;p&gt;I needed to be able to upload an excel file, parse the file, and then add each row as a separate database entry.&amp;nbsp; I had this working for a CSV file using the php built-in function &lt;a title=&quot;PHP.net Function Definition&quot; href=&quot;http://php.net/fgetcsv&quot;&gt; fgetcsv() &lt;/a&gt; , but the client switched to using an excel file (instead of direct PHP access to the in-house database, we decided to have the client upload a CSV/Excel file).&amp;nbsp; I did a little research and found the perfect solution- &lt;a title=&quot;PHP-Excel Reader at Sourceforge.net&quot; href=&quot;http://sourceforge.net/projects/phpexcelreader&quot;&gt; PHP-Excel Reader &lt;/a&gt; .&amp;nbsp; I saved this to my CakePHP vendors directory and had to make one...&lt;/p&gt;</description>
            <author>Kevin Wentworth</author>
            <pubDate>Thu, 16 Apr 2009 14:42:00 +0100</pubDate>
        </item>
    </channel>
</rss>
