This week we'll be extending WordPress by adding a custom shortcode. This shortcode will allow us to add a Google Map to a post using a simple piece of text in a post or page. Shortcodes are a quick and easy way to add functionality to a post in WordPress. They look something like this: [ gallery ids="1,2,3,4"] We'll also using PHP based Object Orientated Programming (OOP) to create our shortcode. We'll create a basic class, that has some static functions with in. We'll be using static methods because we...
This week in part 4 of creating our simple to-do application we'll be learning how to send email notifications/reminders. To do this we'll be using the PHP mail method and learning how to schedule repeatable tasks on Linux using cron. The equivalent process for Windows is the task scheduler and it is pretty self explanatory. WordPress has what it calls the wp-cron alternative, but it's use is limited as it requires someone to actually use the site. Cron ... Cron is the Unix/Linux schedule process, it...
Plugins play a great part in the success of jQuery. There are hundreds of them out there, and having the ability to create your own is a great skill to have. With all of the interest in Pinterest (no pun intended), I thought it would be a good idea to do up a quick and simple Pinterest sharing plugin for jQuery. Getting started ... First we need to grab the jQuery plugin boilerplate (function( $ ) { $.fn.pinterest = function(options) { var settings = $.extend( { }, options); return this.each(function() { });...
So far we've created some basic PHP pages and added some simple authentication. Today we're going to going to build on that by adding database support. This will allow us to add proper authentication to our application and start saving tasks. I should also note that I am currently writing PHP in-line and not using functions (or object orientated PHP) I will tidy this up in the next tutorial and spend more time explaining it and what it's benefits are. Last week ... Last week we installed XAMPP, so you should...
Please note that this tutorial has now been superseded by a later, more in-depth tutorial available here Continuing on with our to-do application, in this weeks snippet we're going to be using PHP's require_once function. The require_once function is similar to the require function, in that it will execute and include any php code with the calling file but with one vital difference. It will only execute once. This is important for us in this tutorial as we are going to use it to validate our user. There...
Continuing on from last weeks tutorial (Creating a simple to-do application – Part 1) and the short snippet (Turning a form element into JSON and submiting it via jQuery ), this week we'll be writing a PHP page to accept and process the form submit and return a JSON response. Installing PHP on your web server ... There are several ways to install PHP to your web server, but each is dependent on what web server you are running. The two main ones I will deal with are Microsoft's Internet Information Services...
Continuing on with our work on creating a To Do Application, this weeks snippet is on how to submit a form using jQuery. This snippet expands on what was covered in the previous tutorial, so if you've just joined us you might want to read it first. JSON - JavaScript Object Notation ... Last week we saw how to intercept the submit event of a form, this week we're going to complete that method and use jQuery to perform the submit for us. There are several ways to send data back, we're going to focus on JSON. JSON stands...
This is the first part of a series of tutorials that aim at to cover all aspects of web development. Each part in this series will build on the previous one, covering topics such as: HTML5 CSS3 jQuery We'll also be covering slightly more advanced topics such as: AJAX PHP MySQL Email Security/Authentication Where required I will go into the basics of getting a development environment installed and configured. I will also cover basic design methodologies and best practice. The Application ... To start...