Author Archives: jjmontgo

Testing IE 7 AND IE 8 with IETester

Recently I’ve been having some problems with IE. They are usually with CSS layouts and javascript which work in IE 8 and not in IE 7.
I found a nice application which runs the IE rendering and javascript engines from IE 5.5, 6, 7 and 8. It crashes a lot, but it allows me [...]

Symfony prints your titles twice

I recently received a request from an SEO / online marketing company to remove the extra title from one of our sites. Symfony was displaying the title information for every page twice; once in the title tag, and again in as a meta tag with name=”title”.
Google was not displaying the title they had given [...]

Giving your symfony apps better urls

I love pretty URLs. I don’t like file name extensions unless they end with .html.
All versions of symfony save me from address bar ugliness, but only for the first application I create. Everything else is ass.php/backwards.
I’m going to give you two ways of beautifying your second, third, and forth applications so you can [...]

Disabling the submit button with jQuery to prevent extra submissions

It happens.
Not often, but once in a while a user submits the same thing. Twice, maybe three times, and each just a second or two apart.
It’s easy to understand why. They click the submit button and then … nothing happens. If it doesn’t work right away, we assume it’s not working. [...]

Country codes in YAML format

Here are all the country codes in YAML format for your downloading pleasure! You may place them in your app.yml (for symfony users) and call the list with sfConfig::get(‘app_countries’).

all:
.lists:
countries:
CA: Canada
US: United States of America
[...]

Securing multi-user CRUD operations through the myUser class in Symfony

Symfony has automated the process of creating a CRUD application, and even has built-in CSRF protection.
However, for a site with multiple users, the generated CRUD code just won’t do.
In my schema, each row of a model is owned by a user, according to their user_id. In the dashboard application I am building, each user [...]

Create a dynamic CSS module in Symfony 1.2 fast

I’m sure there are a number of ways you can handle this. There are also tons of modifications you can do to make it more useful, or better adapted to your particular needs. This post will quickly illustrate one way to create a dynamic stylesheet in Symfony 1.2.
I just finished writing a module [...]

How to add image uploading to your forms with Symfony 1.2 and Doctrine, from beginning to end

I’m still very new to Symfony 1.2 and its form framework. Reading through documentation, discussion forums and blog posts, I couldn’t find a tutorial which had everything I needed in an image upload. Having finished an image upload for the first time, I decided to write such a tutorial.
This tutorial requires Symfony 1.2, [...]

Table-level behaviors will remove global behaviors in Doctrine schemas

Here is something to watch out for. If you define global behaviors in your schema, and then define table-level behaviors, the global behavior will be removed (unless you declare it again on the table level).
Here is a quick example:

actAs: [Timestampable]

Program:
actAs:
Sluggable:
fields: [name]
[...]

Using Symfony filters and CSS to present a design in-context

This post assumes you have some experience with Symfony 1.0.
At my work I needed to create several different versions of the same site. This mainly entailed changing background images to get a slightly different look and feel, and changing the content category, depending on a request parameter.
For this tutorial, I will use the company [...]