HTML5 PDF Generator

Normally if you wanted to programmatically create PDFs you would have to use a server side client such as PDFLib, FPDF, TCPDF, DomPDF. Here is a HTML5 client side solution to creating PDFs called jsPDF. This comes with a number of features including: Add images Add different font faces and change font sizes Convert HTML to PDF Add multiple pages Draw shapes Convert page layout from portrait to landscape. Split

Read more...

Create Custom Tables In WordPress

If you are creating your own WordPress plugin you may want to store data inside the WordPress database. There are a few options that you can use for this, you can create a custom settings page using the Settings API, save the data directly in the option table by using set_option() and get_option() or the third option is to create your own database tables and store your data in here.

Read more...

Maintaining Order With MySQL IN Operator

A basic tip in MySQL when you have to make multiple calls to the same table with a number of different ID's is to use the IN operator. If you had a list of ID's which you want to get the record for instead of making multiple calls to the same table I can combine these into one database call by using IN. This will return a recordset of these

Read more...

Troubleshooting: Share Your Code

There are lots of times when you need to share code snippets, a good example is when you are troubleshooting a problem and need to ask for help. Instead of just explaining the problem you have to someone it's 1000 times easier to show them what the problem is. I get a couple emails a day from people asking for help with problems they are having with CSS or Javascript.

Read more...

How To Create Flat Checkboxes

With the trend of flat design I've decided to extend a previous tutorial of How To Style A Checkbox With CSS with two extra code snippets of styling checkboxes with a flat design. The first checkbox will have a rounded background with a button on the background, when you click the button it will slide to the right of the background and change colour. How To Style A Checkbox With

Read more...

Free Premium Files For September 2013

Each month the Envato marketplace brings you free premium standard files. Envato is a web marketplace where you can get premium files for different areas of your website. My favourite marketplaces is the script marketplace CodeCanyon and the theme marketplace ThemeForest. Here are the files which you can get for free for September 2013. Showcase v1.2 160 purchases at the price of $7.

Read more...

Remove Column On Pages Table In WordPress

When you install some plugins they may add additional columns to the posts and pages table. Just like the Yoast SEO plugin, it's a great plugin but I don't need that information to be on the post table. Here is a code snippet that will allow you remove any of the columns you want from the pages and post screen. WordPress has two filters that you can use to manage

Read more...

PHP Template Engines

A PHP template engine is a way of outputting PHP in your HTML, without using PHP syntax or PHP tags. It's suppose to be used by having a PHP class that will send your HTML the variables you want to display and the HTML will simply display this data. This means that you are forced to separate your PHP logic with the HTML output, which is great, separation in your

Read more...

Register Your Own Autoload Functions

PHP has a few in-built magic method __get(), __set(), __sleep(), __toString() etc. These functions are all really useful but they are not used very often in your day-to-day development, but one magic method is really useful this is the __autoload() function. This function is automatically called each time you try to instantiate a class but the class can not be found. When you normally call a class to use in

Read more...

1 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 65