If you have read any of the other posts in this series you know that we have done quite a bit with our PHP ad tracker. In this session, we will look at the HTML form that calls these actions. First, we create the HTML table that will hold the form header: <table border="0" cellpadding="0" cellspacing="0"> <tr> <td><b>Developer Drive Advertisements Administration</b></td> </tr> Next, we specify the operation (add/edit/delete/deactivate) for this...
Custom attributes are among the most significant additions for HTML5, and can play a major role in semantic Web development. In this tutorial we'll go through a practical example of creating and accessing HTML5 custom data attributes, including the necessary JavaScript functions. It was possible before HTML5 to add your own attributes to HTML elements and access them using JavaScript, but if you've ever tried it you'll know you can forget about getting your markup to validate. HTML5 provides the...
CSS3 allows developers to implement a variety of visual and interactive functions most of us would previously have turned to JavaScript for. In this tutorial we will implement a drop-down menu, with background images featuring a gradient and rounded corners, all defined purely in CSS3 code. Our list will be structured using embedded lists in the HTML code, with top-level menu options appearing above their sub-menus, which we will display when users hover the mouse over the top level item. Here is...
Recursion is an age old concept used in mathematics when an object is defined by other objects of the same type. A real life example would be the mirrors in a department store dressing room. If you look in the right spot, you can see both reflections repeating themselves in each other. Each iteration of your image grows smaller and smaller into infinity. In computer science recursion happens when a solution to a problem is resolved by computing smaller instances of the same problem. In JavaScript,...
Underscore.js is a tiny JavaScript utility library that makes working with some of the common data structures used in JavaScript much easier. Minified and GZipped it weighs in at less than 4Kb and where possible it delegates functionality to native browser implementations for performance. It has no other dependencies and so adds very little overhead to your total script assets. It can be used on the client or server with equal ease. Using Underscore is extremely easy; it isn’t tightly bound to the...
If you're reading this post, chances are you're familiar with WordPress and its role in the web world as a blogging platform, content management system, multisite administrator, and much more. While WordPress can be a viable solution for any small business website or blog right out of the box from a fresh install, you can harness the true value of WP by diving into the code and creating Custom Post Types. What Is A Custom Post Type? ... WordPress ships with two default post types, Posts and Pages. By default,...
In our last session, we finished writing the PHP class file that would control all the ad banner functions. This week, we look at the presentation layer for the administration of these functions. The ads_list.php page lists the current banner ads. First, we must include the class file so that the page can instantiate the class call the functions: <?php require_once("class.ads.php"); // instantiate ads class $oAds = new ads; Next, we fill the $aAds array with the data from the ads table and get...
Anyone who has played, watched friends play, or briefly saw video games that were released in the 80’s and 90’s is familiar with parallax scrolling. Think of games like Mario Bros, Streets of Rage, Kung Fu, Turtles in Time, or the original parallax scrolling game, Moon Patrol. Parallax scrolling is when there are multiple layers of images all moving at different speeds, causing a 2D image to have a 3D-like effect. Why am I talking about retro video games on a web development site? Well, the simple...