Archive for the ‘PHP’ Category

Cleaning up and wrapping up

Tuesday, March 17th, 2009

Update: Smoc is dead, long live h2octrine!... Read More

Parsing with Zend HTTP Client

Monday, March 9th, 2009

I need to recap today’s adventures in parsing land, I’m currently writing a lot of different parsers that are retrieving information from various pages, sometimes I’m lucky and the info I want is available as CSV or XML, most often not.... Read More

jQuery Galleria with MODx multi-lang snippet

Monday, March 9th, 2009

The other day I wanted to try out jQuery Galleria, it didn’t work out of the box with jQuery 1.3.2. Galleria is using the old style @ syntax which doesn’t work anymore. You basically have to go through the whole plugin and replace lines like this:... Read More

MODx multiple language site with template chunks

Wednesday, March 4th, 2009

After using the stuff in the prior tutorial on the site I’m working on at the moment I quickly realized that I needed to be able to use chunks as templates, just like Ditto, to handle repetitive stuff. It doesn’t make sense having duplicate HTML all over the place.... Read More

Extending Smoc - Check Box Groups, Search and Pagination

Friday, February 27th, 2009

In the prior version we just had the basics, automatic listings of all entries in a table, update/inster forms with text fields, text areas and drop downs through a single Doctrine relation (hasOne). Now we add check box groups which will manage multiple relations (hasMany) through an intermediary relation table, search and pagination of the search results. ... Read More

MODx multiple language site

Monday, February 23rd, 2009

Although it’s fairly easy to create a multi-lingual site with chunks and template variables alone it’s hardly ideal, to say the least. For most pages there will be a lot of unused template variables, the manager area will start to look like a mess. ... Read More

Smarty + Doctrine = Smoc

Wednesday, February 18th, 2009

Update: Since the below piece was written I’ve ported the little framework to H2O instead, H2O is a cleaner alternative to Smarty.... Read More

Simple Doctrine model to MySQL script

Monday, February 16th, 2009

I’m a bit rusty, after scouring the Doctrine manual for the import functions I found a script of my own that I totally had forgotten:... Read More

From Excel XLS to CSV with PHP-ExcelReader

Sunday, November 2nd, 2008

I just had to convert a lot of xls files to csv, too many to even contemplating doing it manually. I started looking for a solution and found a positive evaluation of PHP-ExcelReader.... Read More

PHP Class for working with Directories and Files

Saturday, November 1st, 2008

The code documented here was originally posted as a single page as is. It just didn’t feel right, it felt lazy and not what this site is about, which is some kind of commentary or notes even though it’s not always extensive, so here you are, the verbose version.... Read More