Functino

My daily struggle with webdevelopment

Andreas

Twitter Api with Rails

In a little app that I recently launched I tried to use Twitters API. Turns out it’s incredible easy to do so if you use Ruby on Rails.
Here are the things that I needed to do to get a first version running:
Create a new Rails application. Then create a Model Twitter that extends Rails’ ActiveResource:

class [...]

Highlight search keywords like google cache does

If you ever clicked on a google cache link you know their highlighting. Some time ago I wrote a prototype.js-based highlighiting script to achieve the same. Whenever someone finds your site in a search engine this scripts highlights the entered keywords. By default there are only a bunch of search engines included but you can [...]

cakePHP cycle-helper: alternating row colors with cake

It’s been a long time since my last posting. Today I’m going to show you my cycle-helper for cakePHP. If you haven’t read my other posts on alternating row colors, do so now: Alternate Table Rows in CakePHP (and ZF, Rails, Smarty)
The cycle-helper is easy to use and install and if your familiar with [...]

Alternate Table Rows in CakePHP (and ZF, Rails, Smarty)

In my last posting I talked about alternating table row colors with plain PHP. But how is this handled in different frameworks like CakePHP, Zend Framework, Rails or Smarty?
[UPDATE: My CakePHP-Cycle-Helper is described here: http://functino.com/2009/07/cakephp-cycle-helper-alternating-row-colors-with-cake/]
I’m going to show you simple examples for each of this tools.
In Smarty you can alternate table row colors (or any [...]

Zebra Tables: How to alternate table row colors

What is a “Zebra Table”? It’s a striped table with alternating row colors like this:
You can achieve this with very different approaches:
CSS only
With CSS 3 you can achieve such a table with the pseudo class nth-child. The rules are extremly simple and no additonal markup is required. Just add these lines to your CSS:

tr:nth-child(even) {background-color: [...]