Articles > Tutorial

PHP

Using wp_cron to disable commenting on old posts

One of the little known, but incredibly useful functions of WordPress is wp_cron. It allows you to schedule tasks for execution at a later time, the tasks can also be repeatable. It's not perfect and does have one serious problem, in that it is only executed while users are actually navigating the site. But on a popular site this won't make a difference, but it's still worth noting. Something I see regularly been asked for is the ability to disable commenting on or delete/hide older posts, generally for...

Creating a Google Maps shortcode for WordPress

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...

Creating a simple to-do application – Part 4

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...

Creating a simple to-do application – Part 3

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...
CSS

Creating a simple to-do application – Part 2

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...
CSS

Creating a simple to-do application – Part 1

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...
CSS

A Continuous CSS3 Animation

Introduction ... Static headers with boring backgrounds are everywhere... why don't you try and spice yours up with a simple CSS animation? I'd like you to meet Bob, he's my friendly static image and he'd really like to wave hello to you! Let's give him the chance. First up we'll need to do a quick operation and temporarily remove his arm (Sorry Bob!) Then we're going to rotate his arm (very gently) by 45 degrees. Now we can start re-assemble him using some simple HTML <div class="logo"> <div class="arm"></div>...
CSS

Recreating the Developer Drive logo with just CSS, no Javascript or Images

I quite like the developer drive logo animation. I remember seeing it a when I first found the site and thought it was simple, yet effective. I also wondered if it would be possible to replicate it using just CSS. In this snippet we'll cover CSS3 transitions and using @font-face to import some custom fonts. The first thing we need to do is import out fonts, I wasn't sure what the current 'd' font is so I have a similar font. The best place to go is www.fontsquirrel.com, you can pick from a wide selection of fonts...
Load more
Home CSS Deals DesignBombs HTML HTML5 JavaScript jQuery Miscellaneous Mobile MySQL News PHP Resources Security Snippet Tools Tutorial Web Development Web Services WordPress