Home / Category / Tutorials

Posts Tagged 'Tutorials'

Tutorials

Check out all of the posts tagged with 'Tutorials' below. If you still can't find what you are looking for, try searching here

9 Mar 2010 | 4 Comments
Give your site an iPhone bookmark icon

I recently configured my site for mobile consumption, by using the WordPress Mobile Edition plugin along with the Carrington Mobile 1.0.2 theme. I noticed when I bookmarked my site using the iPhone that the home screen icon as missing. Today I’m going to run through how to create and setup the home icon for your website.
Create the icon
You will need to produce an image in PNG format that:

Measures 57 x 57 pixels, with square corners the (if the image measures other than this size, …

4 Mar 2010 | 2 Comments
Ketchup jQuery form validation

I recently had the need for some client side form validation and happened to find the jQuery Ketchup plugin. It’s a simple and flexible plugin that can be modified and styled for your own needs, plugin modifications are encouraged although the ‘out of the box’ code will work just fine for your basic needs. You’ll need to download the plugin files to get started. once download follow these simple steps to implement it into your application.
Step 1
include the files in the plugin as shown …

9 Feb 2010 | No Comment
Creating a simple typographical logo

Whilst working on my most recent project ‘We deliver’, I had the need for a simple logo that wasn’t overly fussy but still slick contemporary and simple to design. I thought I’d put the design stages together into a short blog post explaining the simple technique.
The most important part of typographical logo design in my view is the font. A great free resource for fonts is DaFont.com, in fact this is where I found both of these fonts. the main font for the logo is …

4 Feb 2010 | 6 Comments
JSON and JavaScript formatting

I’ve recently been working on a large project that required a lot of JSONP encoding and parsing. To be honest its been a bit of a nightmare because of one simple problem. the formating that JSON spits out onto the page is non-existant its like a printing out a PHP array and viewing it in your web browser, however with an array you can either view the page source and see the formating or simple print_r($array); within pre tags which will format the array visually …

2 Feb 2010 | 4 Comments
jQuery Event Delegation

When I first started using jQuery to make AJAX requests event delegation always caught me out as I never understood what it was or how to use it. If you’re manipulating the DOM you will surely come across the problem of when you dynamically add an element to a page you can’t just go and add an event handler to this new element and expect it to work. For instance say I have a list item which is clickable with the aid of a click …

31 Jan 2010 | 4 Comments
How to create a jQuery category drop down

Every couple of weeks I seem to find myself checking 9rules.com to see if they’re accepting new submissions as I’d like to submit this site. Any how on this occasion I couldn’t help but notice the browse by community section at the top of the page. Clicking the button reveals a section that contains a list of category names. I thought this would be a good example to base this post on, and to show how simple it is to achieve this effect. I’ve …

28 Jan 2010 | 16 Comments
Pretty CSS3 buttons

I’ve come across quite a few sites that explain how to create flexible CSS3 buttons but i’ve never really spent the time to implement one until i found a great little write up courtesy of the guys over at the Zurb blog who have a fantastic post on creating CSS3 buttons. So i’ve taken their example and tweaked it to fit my needs. It’s worth noting that if your using Internet explorer you’re not going to see all these effects as IE still doesn’t support …

27 Jan 2010 | 4 Comments
Useful .htaccess techniques

I wrote a post mid last year about protecting your site images from being hotlinked as I found a site that had word for word scrapped one of my blog posts, you can see the post here, and I really wanted to go back to this and run over a few more things the .htaccess file is useful for. I mainly use the .htaccess file to rewrite URIs for example http://mysite.com/site/pages/contact.php would be accessed by visiting http://mysite.com/contact. So the URI is being re-routed to …

20 Jan 2010 | 6 Comments
Get started with CodeIgniter

I’ve never really got the hang of PHP frameworks and have tended to use my own custom built CMS but even with this I still find myself writing the same code over and over again. In the past I’ve dabbled with CakePHP and the Zend Framework and not really got very far, so a few days ago I downloaded CodeIgniter. Although I’m extremely new to this I was pretty blown away by the simplicity of setting things up and getting an actual webpage that processes …

12 Jan 2010 | 17 Comments
Using Highcharts JavaScript Library

There are some great JavaScript graph libraries out there and one that’s recently come to my attention is Highcharts.com which is compatible with both the jQuery and Mootools frameworks. To get started point your browser here where you can download all the files you need including examples. Highcharts features include slick tooltips to reference points on your charts, it’s compatible with all standard web browsers, the setup for a graph as demonstrated below is simple and uses the JSON data type, there are also …

7 Jan 2010 | 13 Comments
Build a JSON and PHP product gallery

As the title describes we’re going to look at making cross domain ajax requests using JSONP I’m also going to show you how to get data from a MySQL database and encode it into a JSON string which can be parsed using JavaScript. JSON stands for JavaScript Object Notation and essentially its a method which allows us to execute cross domain ajax requests without too much fuss. This post really follows on from my article about scraping content from a page but also allows you …

4 Jan 2010 | 2 Comments
Truncate text with the jTruncate jQuery Plugin

I stumbled across this pretty useful jQuery Plugin the other day that i though some of you would appreciate. It was written by Jeremy Martin a few years back. The plugin solves a big problem in that, if you have too much text you can not truncate it, or split it into two section allowing you to hide and reveal the text when needed. The plugin works well if you have have for example a set of user generated comments where you want to keep …

17 Dec 2009 | 21 Comments
Easy PHP Pagination

I’ve had a few pagination scripts over the years but I thought i’d share the one that i’m currently using as it’s a useful script to have in your toolbox. As a developer you’ll soon find a need to paginate data when displaying contents from the database, and rather than use JavaScript which could require all the data to be loaded into the page on load, we can use PHP to ensure that we’re only requesting the data that we need from the database. For …

14 Dec 2009 | 18 Comments
jQuery image zoom effect

I recently revamped my portfolio as it was looking dreary and completely uninspiring, I wanted to present my work in a way that was both easy to navigate, easy to maintain and most importantly looked smart and un-cluttered. When I was brainstorming for ideas, I initially thought I would break up my portfolio into categories to make it both easier to navigate and more structured in presentation. After much consideration I completely scrapped categories and decided on the simpler approach of having large thumbnails with …

12 Dec 2009 | 5 Comments
JavaScript link tracking with Google Analytics

Google Analytics is great to tracking your site traffic. I started out using Statcounter.com to track my site visits, but over the years i’ve wanted more information so I switched over to using Google Analytics. Google provides an excellent dashboard to monitor and dig into your sites traffic and drill down the information to see exactly what content on your site is popular. For advertising campaigns at MySpace we use a JavaScript technique to track specific clicks on content on a page, with the ability …

7 Dec 2009 | 3 Comments
Win a copy of ‘Easy PHP Websites with the Zend Framework’ Christmas giveaway

“Easy PHP Websites with the Zend Framework” shows you how to use the powerful Zend Framework to build websites with amazing speed and efficiency. Embracing a teaching strategy of learning by doing, showing you how to build website features you’ll actually want to use within your own websites. Among other topics you’ll learn how to manage data submitted through web forms, send e-mail through your website (both text and HTML), manage the user registration, login, and password recovery processes, and even create a simple social …

29 Nov 2009 | 3 Comments
5 SEO tuning tips

If you think you can just build a website and expect it to perform well you can think again. Getting a website to the top of search results is every marketing managers goal. Im going to run through five key points that will put you in good stead to getting the results your site deserves. SEO is often percieved as a dark art. If you start out well and get the basics done the quality of your content should speak for itself. However …

23 Nov 2009 | 8 Comments
Logging processes with PHP

Its sometimes necessary as a developer to log and track data as it is processed either to debug or to keep a simple record of maybe who’s logged in or out of your site. You could easily do this by accessing a MySQL database and adding a row, but you then have to create and maintain that database. So today I’m going to run through the steps to writing and reading a .txt log file.
The Code
In order to write and access our log file we …

18 Nov 2009 | 18 Comments
Use jQuery and PHP to scrape page content

So we have content on another domain that we want to load via AJAX into a page how can we do this?…. This was a question that was put to the other day at work. More experienced web developers will know that JavaScript doesn’t allow cross domain XMLHttpRequest’s or AJAX requests (Asynchronous JavaScript and XML). There is a ‘dirty’ way to get around this using PHP and CURL to pull the HTML of the page you want to get the content from so JavaScript …

10 Nov 2009 | 10 Comments
jQuery and PHP inline editing

Inline editing as it’s known, or being able to edit content directly on a page is a great tool have under your belt. I’m going to run through exactly how it works as well as how to POST the updated text content through to a PHP script for server side processing to put in the database.
The Code
It looks a little complex so i’m going to quickly run through exactly what’s going on.

When you visit the demo page are presented with a block of text. …