Generating Barcodes with PHP

May 14th, 2008

Note: if you are going to use the barcode class I mention check out the comments from Zech below. He found a bug

barcode example
see below for the translation of the barcode

PHP Classes is always my first stop when looking for PHP code, no matter how advanced (or easy to be honest).

I have recently been working on a shopping cart system and implementing barcode generation, as well as allowing a barcode scanner be used as an input device to speed up aspects of order management and data entry.

There are a number of barcode generation classes at PHP Classes. Harish Chauhan’s Barcode Class has been very useful. His class supports a number of barcode standards and allows generation at various sizes. There is a simple form provided to allow generation of barcodes and demonstrate the features of the class.

I will update this when I have finished all the functionality.

The barcode scanner arrives in the morning!

Oh – and the barcode above says “www.createwebsite.info” in the code128 format.

UPDATE: here it is with the font uploaded for the text!

a barcode example with the text embedded

Presentation on Flash and Ajax

May 9th, 2008

Something more uplifting

May 1st, 2008

After the Network Solutions Sucks and Microsoft Sucks articles I feel this is necessary!

Microsoft Outlook 2007 Sucks at HTML email

May 1st, 2008

Microsoft – why don’t you just disable HTML email in Outlook 2007 rather than implement it so badly?

It now uses Microsoft Word’s rendering engine. The interesting thing is what happens when you forward on an email. You can view the source in Outlook which hides the transformations it is applying – but it isn’t until you forward it and view the source of that email that you can see what trash it is converting it too.

Why should I have to revert to using a table to create a simple border round a block of text when this should be able to be achieved with a div and css?

According to this list of what isn’t supported at Sitepoint (Microsoft Breaks HTML Email Rendering in Outlook 2007) …

no support for background images (HTML or CSS)
no support for forms
no support for Flash, or other plugins
no support for CSS floats
no support for replacing bullets with images in unordered lists
no support for CSS positioning
no support for animated GIFs

you can add inconsistent support for most everything else!

Network Solutions Sucks A S S

April 30th, 2008

I have always thought they were overpriced and annoying to deal with – but over the last couple of days I have seen two clients utterly confused by the way Network Solutions tastes names when you check availability. Wonder why when you go to another registrar why you can’t get the domain – that is because Network Solutions has taken it (they release it after 4 days supposedly). Anyway – they are being sued – but they are still doing the practice with the goal of protecting their clients! Or is that confuse – or is that stifle competition?

They are not the only registrar that does this – but they suck the most anyway.

read more | digg story

Great blog on MySQL performance …

April 23rd, 2008

Some great stuff on getting the best performance out of MySQL …
MySQL Performance Blog

I have just been reading this …
ORDER BY … LIMIT Performance Optimization. Pagination is used on just about every site I work on – that article is great on speeding up queries using ORDER BY and LIMIT.

bbPress is easy

April 21st, 2008

In the last month I have had to install two forums, SMF and bbPress, and deal with a forum install using phpBB. By far the easiest to install and configure is bbPress (from the same people as WordPress). The others have pages of configuration options related to all tehir features. Frankly, unless your forum is targeting geeks or a bunch of people familiar with the overblown features of most forum software then go for bbPress. It also integrates easily with a WordPress install. I had the forum up with template and functionality customized in a couple of hours. The plugin architecture allows adding features easily. Development seems to be a bit slower and quieter than most forums but this seems ideal for a simple forum.

Hint: if you want to use this for a private forum for your business check out these plugins …
Force Login to view the forum
Restrict Registration – only allow registration from people with an email address at particular domains (i.e. yourcompany.com)

Having problems importing a large MySQL database? Try this …

April 19th, 2008

Bigdump is a PHP script that staggers the import of a large MySQL dump. It processes a small chunk and then refreshes. This continues until the database is fully imported. This is great for hosts that don’t give you access to ssh or who place restrictions on file uploads or server execution times.

The only thing to configure is the database host, user, and password. Simply upload the dump file to the same directory as the bigdump file (use FTP or the built-in uploader) and then process that file.

The Yahoo! User Interface Library CSS Grid Builder

April 11th, 2008

More goodness from Yahoo! …
YUI: CSS Grid Builder

Faster Web Pages

March 31st, 2008

A fantastic presentation from Yahoo! on multiple ways (including CSS, Javascript and server-side technologies) to speed up page delivery and rendering. I think most developers would learn something from this.

Here is another presentation from Yahoo! which touches on the same issues …