So it is time to check out Zend Framework seeing how powerful everyone says it is. Setup is a bit annoying in comparison to other “funner” frameworks so I am going to document my findings as I learn. Here’s a guide to getting ZF working on your *nix dev box.

Setting up your environment

Using a SSH client such as Putty – connect to your web server and create a directory in your users home named “bin”

$ cd ~
$ mkdir bin
$ cd bin

Next we need to download a stable copy of Zend Framework via subversion using the following command :

$ svn checkout http://framework.zend.com/svn/framework/standard/branches/release-1.10/

If svn (Subversion) is not installed you can download via wget using the following command :

$ wget http://framework.zend.com/releases/ZendFramework-1.10.3/ZendFramework-1.10.3-minimal.tar.gz

Next we need to untar (decompress) the framework :

$ tar -zxvf ZendFramework-1.10.3-minimal.tar.gz

Rename the decompressed folder :

$ mv ZendFramework-1.10.3-minimal Zend

** Note if you used subversion to acquire Zend Framework – you probably have downloaded the release directory – use the command above replacing the first argument with the release directory name.

Move the scripts from the Zend/bin directory into the ~/bin directory; make them executable; rename zf.sh to just zf (for simplicity) :

$ mv Zend/bin/* .
$ chmod +x zf.sh
$ mv zf.sh zf

The next step is to add the zf script to the users include path, this allows us to use the zf command without having to specify the absolute path. Copy and paste the next 6 lines into your shell :

cat << EOF >> ~/.bashrc
if [ -d ~/bin ] ; then
PATH=~/bin:"\${PATH}"
fi
export PATH
EOF

You must now log out and back in to activate this path. Once you are logged back in you can test the zf command by typing :

$ zf show version

If you see “Zend Framework Version: 1.10.3″ you are ready to start your first project.

Creating your first project

Change to your web server document root, assuming you are using a Debian based server you can find it usually in /var/www (RHEL generally defaults to /var/www/html) :

$ cd /var/www

Create a project using the following command :

$ zf create project <project_name>

Where <project_name> is the name of your project in lowercase alpha numeric form (no symbols, spaces, uppercase letters (hyphens and underscores are OK))

Link your Zend library to your projects library directory as such :

$ ln -s ~/bin/Zend /var/www/project_name/library

Where /var/www is your web server document root and project_name is the name of your project.

If all went well – point your browser to your web server hostname or IP / your project name / public ( http://example.com/project_name/public ).

That is all for now – we’ll get into the actually writing some code next time. Leave me some comments below!

Displaying HTML rows with offset background colours is a great way to present large amounts of data in a table – plus it looks nice.

Zebra Table Sample

Here are a few ways I display data in this format :

1. PHP Method (for use with browsers with no JavaScript or CSSv3)

PHP Zebra Table

How it works :

We set a variable (i) to the value of 1. We then add 1 to i until it reaches 10.  Within the loop we determine if there is a remainder when dividing i by 2, this lets us know if the number is even or odd.  We add an odd class to every odd table row – and and even class to every even table row.

Why choose this method :

Choose this method when you know your users will be using older browsers or are unsure if they have javascript enabled.

2. CSSv3 Method (For use with newer browsers)

CSSv3 Zebra Table

How it works :

CSS sets the ‘nth-child’ to use the defined background colour.

Why choose this method :

Simplicity!, however beware of outdated browsers.

3. jQuery (for use with JavaScript enabled browsers)

jQuery Zebra Table

How it works :

Similarly to the CSSv3 method above – however does not require CSSv3 support in the browser.  It adds the class ‘odd’ to every other row in the table.

Why choose this method :

Simple to implement however requires JavaScript – do not forget to load jQuery in your document head!

Haven’t received an invite yet? Read my latest article.

Haven’t read this article yet? Read it!

Update #2 : Got my second invite on Monday October 12, haven’t set it up yet – still deciding what to do with it.
Update #3 : Canadian citizens can now use the free VyprVPN with any Giganews subscription to activate their Google Voice invitations!!

Check out VyprVPN here :

Giganews Newsgroups

Well I just received an invite to Google Voice and I must say I was quite upset to discover that it is not yet available in Canada… nonetheless I had a socks box in Cali so I tunnelled my registration and was ready to rock.

For those of you unfamilliar with Socks – it basically pushes all requests through a secure connection on a remote system and is quite simple to do – take a look at my “How to Watch American TV in Canada” post from a while back.

Once I was in I ran into another little snag, you can not set your call-in number to an international DID (in my case a Canadian DID).  So I just pointed them to my free IPKall number and was really cooking with gas (you too can get a free IPKall DID at ipkall.com).

For those of you anticipating an invite yuo can expect the usual Google UI (thank god (I adore simplicity)), you can also look forward to transcribing your voicemail messages to text – and have them emailed.  This functionality has been lacking in Asterisk which is why I believe this is going to drop a nuke on the Asterisk devs to get this module out – so support your * developers will ya!

I’ve really only done minimal “tire-kicking” but I expect this could have many telcos shaking in their boots.  Not only is it super feature rich, sociable and ridiculously easy to use – it is backed by a company who has provided extremely reliable services since day one.

It is interesting to see the callout function implementation.  There have been plenty of callout scripts for Asterisk (which pretty much work exactly the same – Asteristickies is one of ‘em) but once again Google has made it that much friendlier.  Callout is a dialing function when you input a number to call, it connects to you first – then dials the remote party.

SMS is a joy! I was lucky enough to have my sister visiting this week with her unlimited text messaging plan.  I popped open the SMS box and we were sending messages with ease instantaneously.  I especially love the contact manager.  Being able to maintain a list of contacts with click to call functionality is a very powerful feature.

Anyway, I am very excited to play with my new toy – feel free to give me a ring at

(361)-GEEK-HUT

Heh… or use this thing

Joe Roper has written a spectacular article (and script) for those looking to beef up their Asterisk boxes with a powerful fax server. HylaFax is by no means new – but the simplicity of configuration and minimal effort required now to get an enterprise class fax service in minutes is ground breaking.

I just set it up in less than ten minutes and am sending + receiving faxes over VoiP (your mileage may vary) over my IPKall extension! Heres proof :

So not only can I send and receive at the same time I can also do it using my free IPKall extension! It does not conflict with my other inbound fax service (one at a time) and the web interface is a joy to use – I am quite impressed.
Every day I am amazed at how fast things are moving, even more so by the communities that move them.