Archive for January, 2008

HTML entity encoding everything in PHP

Wednesday, January 30th, 2008

The standard htmlentities() function will encode special characters so that they display OK in the browser. However, sometimes you might want to encode different languages to entities too. I just found a script that will do that in the form of an html encode application. The source is browsable but a little bit impenetrable so I fixed it up a little:... Read More

Sorting with jQuery sortable

Tuesday, January 29th, 2008

Update (2010-08): There is now a newer tutorial on jQuery UI’s sortable, using a much simpler GUI than in this tutorial.... Read More

PostgreSQL on Ubuntu with phpPgAdmin

Thursday, January 24th, 2008

Setting up default installations of Apache, PHP and PostgreSQL is really easy, I’m using a Gutsy setup and writing this in a terminal:... Read More

Writing a CMS/Community with Smarty and the Zend Framework: Part 9

Tuesday, January 22nd, 2008

This piece covers creating a proper folder structure so that we can have a skin system. I’ve also created a folder for the admin section which is fully contained with it’s own controllers folder and so on. Another unrelated change that has happened since the last part is sub menu logic which we will also take a look at.... Read More

Uncommon Web vs Weblocks

Monday, January 21st, 2008

Update: Since writing this I’ve instead opted to work with Pico Lisp, this is not really a criticism of Weblocks per se, it has more to do with a general frustration with Common Lisp. ... Read More

Speedlinking 19 Jan 2008

Friday, January 18th, 2008

Time for some nice links again, as usual most links are from Dzone.... Read More

Merb and Datamapper on Ubuntu with XAMPP

Monday, January 14th, 2008

The process of setting up Merb and Datamapper can easily derail, these are my experiences of setting them up on Ubuntu with XAMPP.... Read More

Writing a CMS/Community with Smarty and the Zend Framework: Part 8

Wednesday, January 9th, 2008

The blog saga continues, we still don’t have any fancy Wordpress style filtering of the content. You know, creating these nice looking quotes and filtering potentially nasty html and stuff. Sure enough, TinyMCE has some function for allowing only certain tags and discarding others but I haven’t had time to look at that yet, I will though… Fancy filtering is not in the requirements for this project either however. But changing and deleting blog posts are necessary actions though, so is some kind of search for articles. Let’s begin by looking at what’s been added to the desktop menu:... Read More

Sorting 2D-arrays in PHP - anectodes and reflections

Sunday, January 6th, 2008

Update Aug 4, 2008: The below 2D sorting stuff has been superseded by the sorting section in the fluent article. The below example should be seen as something merely anecdotal and not be taken as a good example of how to sort 2D arrays by column. Alternatively, if you’re fine with a really simple approach see the end of the below article.... Read More

From dual boot to virtual machine with Ubuntu and Windows

Tuesday, January 1st, 2008

I just shut down my dual boot by reformatting the Linux partition and running Ubuntu in a virtual machine instead. This is the walkthrough:... Read More