Web Design & Development Blog • Page 2

MySQL: Convert Column From One Timezone to Another

It’s a pretty common thing to find an app that doesn’t specify to MySQL the timezone that should be used when storing dates and times. Once you’ve fixed that, you may still have a bunch of dates and times that need to be converted.

Read More …

Posted February 14th, 2015 in

Website Forms Taken Offline

Today I finally had time to take my forms offline. I’m too busy to take on new customers, and trying to estimate a time when I can schedule a new project is unreasonable. I have mixed feelings about this, but what else can I do?

Read More …

Posted February 6th, 2015 in

Accidently Removed Myself From Sudoers!

I’ve used Linux for years, primarily Ubuntu Desktop and Server. Recently I had been purchasing computer parts, anticipating the building of my next computer. Last Monday I put it all together, and started in on loading my operating system of choice, Ubuntu 14.04. Moving forward, I then started installing the essential programs that I use. I really didn’t run into any problems, until I made a stupid mistake while adding myself to a group.

Read More …

Posted October 16th, 2014 in , ,

Search a Multi-dimensional Array for a Key

It’s not every day that one needs to search a multi-dimensional array for a key, and return the associated value, but a simple recursive function allows such an action. In a project I was working on recently, I needed to check the status of a record, but the status array was segmented into three main categories.

So I wrote a quick recursive function to handle the task. Please note, the function will only work if all keys are different. No two keys in the multi-dimensional array can be the same! Yes, I said it twice, but to emphasize that it matters.

Read More …

Posted May 20th, 2014 in

PHP Framework Side-by-Side with WordPress

I was working on a website this week where I wanted to use WordPress so the client could benefit from its CMS and blogging capabilites, but also wanted to use a PHP framework to handle some custom programming. Compared to WordPress, almost any PHP framework is going to be easier to do custom programming with. But what about routing? How will the website know what to route to the framework, and what to route to WordPress?

Read More …

Posted May 11th, 2014 in ,

Rename WordPress Default Post Type

If you want to rename the WordPress default post type, I wrote a super simple plugin to handle this. Before installing and activating the plugin, all you need to do is change the value of the $singular and $plural class properties. Use whatever you want. For instance, if you want “Posts” to be “News”, you would change both values to “News”. If you want “Posts” to be “Articles”, then I’ve already done that for you in the sample code below.

Read More …

Posted April 16th, 2014 in

WordPress Unpacker Script

Downloading WordPress, unzipping it on your computer, then using FTP to send it to your website hosting environment is slow. This whole process, even with a very fast internet connection, can take 10 minutes. If you’ve got a slow internet connection, you might as well go to lunch.

Read More …

Posted March 22nd, 2014 in ,

« Older PostsNewer Posts »