Installing a PHP that can do symfony+doctrine on Dreamhost

Lately I’ve been experimenting with Doctrine on a few projects. It does have some requirements, including the PDO layer of PHP 5.2. Things didn’t work right off the bat on Dreamhost (which I still use for non-critical things), so I opted to build my own php.

Read full post
Boosting terms in Zend Search Lucene

[tags]Zend, Zend Search Lucene, Search, Lucene, php, symfony, zsl[/tags]

Read full post
Finding things using Zend Search Lucene in symfony

[tags]Zend, Zend Search Lucene, Search, Lucene, php, symfony, zsl[/tags]

Read full post
Equal height columns with jQuery

[tags]css, jQuery, layout, javascript, equal, columns, equal columns[/tags]

I’ve seen a few examples of how to equalize column heights using javascript, and none of them seem appealing:

  • jquery.equalizecols.js
    • This required a few other libraries, and I wanted more flexibility (e.g. where the column should grow in order to equalize)
  • Project 7
    • The Project 7 approach was the most interesting, but the code seemed a bit messy and not so open source friendly (even thought it might have been). It would let you specify which element was to grow inside a column.
  • Nifty Corners
    • I had trouble with the syntax, but I liked how it just created a new element out of thin air…

So I wrote my own:

$("#col1, #col2").equalizeCols();

will equalize the columns as expected

$("#col1, #col2").equalizeCols("p,p");

will equalize the columns and add the extra space after the p tag in #col1 or #col2 (whichever is shorter).

Here’s our function:

This requires jQuery of course, and it hasn’t been tested much.

Read full post
Debugging yaml configuration with the symfony web debugger

[tags]symfony, yaml, configuration, web debug, debug[/tags] [symfony]: http://symfony-project.com/

Read full post
Flat means you're walking home ;)

[tags]flat, biking[/tags]

Read full post
Textmate Snippets for YUI em calculations

[tags]yui, yahoo, css, snippet, textmate, ems, px[/tags]

If you use YUI grid layouts you’ll notice that ems are the preferred units and for good reason. But ems don’t make sense to people like us who want to be super precise down to the pixel… pixels make sense.

So type in a number select it and run this ruby script as a TextMate command (that outputs as a snippet):

You’ll have the proper tab stops to change the newly calculated ems from width to margin-left or margin-right or whatever it is you desire.

Read full post
Adventures in stupidity... strip_comments and SF_DEBUG

[tags]symfony, media temple, fast cgi, anomalies, SNAFU, php, configuration[tags]

Read full post
TextMate + YUI = YUI snippets!

I do a lot of YUI grid layouts and I love the nestable grids:

<div class="yui-g$1"> 
	<div class="yui-u first">
		$2
	</div>
	<div class="yui-u">
		$3
	</div>
</div>

There’s a tab stop after yui-g in case you want to use one of the variants (yui-gb, yui-gc, etc).

I’m working on a site that uses two equal width columns… a lot… so this comes in quite handy. So long tables.

Read full post