Tuesday, April 28, 2009

CMS Recommendation: ExpressionEngine

I just wanted to give a quick recommendation to a Content Management System that we've been using and have found to be really great.  With all due respect to the druple or joomla-lovers, Expression Engine is a much cleaner way to go.  It does come with a premium, but they have a core version for free which is more than enough for most smaller sites.


Check it out.  Like all CMS's there is a learning curve but this CMS gets my recommendation.

Ternary Operator (Short IF Statements) in PHP

This is a cool little 'trick' if you want a quick IF statement in PHP.  You'd use the Ternary Operator which would evaluate similar to the IF operator.

Syntax is like this:

// Example usage for: Ternary Operator
$action = ("john" != "frank") ? 'john isnt frank' 'john is frank';


So in this case, the output 'john isnt frank' would be saved to $action.

The first portion of the before the ? is what is being evaluated.  So we check if the string "john" is not equal to "frank".

Between the ? and the : is what to do if we returned TRUE.

Between the : and the ; is what to do if we returned FALSE.

Since I have $action = at the beginning, the output is saved to that variable.

For more info on this, see the PHP documentation: http://uk2.php.net/operators.comparison (you'll need to scroll down a little)

Wednesday, April 8, 2009

Web-safe Fonts

We stumbled upon a great resource for web safe fonts (okay... we just googled it, but still...).

Take a look at this site, it is a wonderful resource and will help you match your fonts to ones that work on all computers.

CSS Position Help

Most people know this, but for those who are struggling or just need a reminder, the below link is a great resource to understanding positioning in CSS.  Take a look.