I was just looking at the Google Map API and noticed that they added turn by turn directions since the last time I looked at it. This is really exciting news and something that I really could have used a year ago.
In this article I’m going to lay out a bare bones example of getting map directions. We’ll start with some basic HTML and CSS. Then we’ll work our way into the scripts that will drive the interface. Keep in mind that this is intended as a bare example with only the necessary elements to get things functioning. In other words… it ain’t gonna be real pretty.
(more…)
Code Igniter does a pretty good job of creating pretty urls by default. The basic Code Ignitor address will look like this:
http://www.example.com/index.php/controller/method/parameter
What we want to do is get that index.php out of there. We’ll accomplish this by creating an .htaccess file in our root directory and use it to rewrite the address with Apache’s Mod Rewrite Engine.
(more…)
Code Igniter offers many ways of adding functionality to your application… Libraries, Helpers, Plugins… However, there are times when you need a function to operate directly in your controller. In these cases it can be useful to create a parent class for your controllers.
One case where this makes sense is when you want all your controllers to respond to a particular message in the same way. For example you have a login form on every page and you want the user to stay on the same page once they login successfully. With a parent class you can have the login method in the parent and then send the user back to the page they were just on or just to the index.
(more…)
I’ve been using MySQL for quite some time and, I’ve gotten used to managing data integrity via php code. But, regardless how careful you are there are some conditions that can cause invalid data.
One of the most common issues that arises is orphaned records. This can occur when you delete a parent record and for some reason the child records don’t get removed. It can also occur if the parent record has it’s primary key field updated and it’s child records don’t have their foreign keys updated. With MySQL 5 that doesn’t have to happen anymore. Using a constraint with cascading your data is kept synchronized.
(more…)
NASA’s Phoenix Mars Lander survives descent to planet’s surface.
read more | digg story
Recently I had a friend who’s server was compromised. Although I haven’t had trouble with my server, I thought that I’d see if there were any security issues I had overlooked. That’s when I came across mod security. I hadn’t used it before and so the first thing I looked for was some documentation. The official documentation is located at: http://www.modsecurity.org/ and had this to say about it’s purpose:
(more…)
I’ve just begun a project that involves extending Drupal in several ways. It appears that I’ll have to create at least two modules and possibly a filter or two.
I began by laying out the data structure that I’ll need to support one of my new modules. I started with the simplest of the two, to ease into things and get my feet wet. Once my database was setup, I spent a couple of hours reading through Drupal online docs and looking at some existing custom node modules. After a few false starts I found some bare bones code to begin work from.
(more…)
The best websites are constantly improving. These sites build on their successes and rebuild the less effective areas. So, when considering a redesign of your existing site, you should take an inventory. Create a list of the things that your site does well and the things that it does less well. Some things to consider are navigation, graphics and text copy.
(more…)
If you’re a PHP developer, you gotta try out Code Igniter. It’s a fairly complete MVC framework with support for features such as Active Record, Pagination, Scaffolding, and much more. It’s a great base to start from and I use it on every project I can.
(more…)
The primary issues that face the world today (climate change, economy, renewable energy) are all science issues. That being the case… Why aren’t our presidential candidates talking about science. We keep hearing all the same old campaign promises, but where is the SUBSTANCE?
That’s why I support the Science Debate 2008 initiative. If you haven’t heard about this great organization, head over to their website and learn some more.
www.sciencedebate2008.com