Tags are so cool! You think anyone would find it useful if I released my tagging library as open source? It's very easy to plug into another system as long as you create some tables with specific names. Only thing is, it's just a library, and can't possibly include the forms you'd need to integrate it into your system. I could bundle an administration interface, however...
PHP's create_function function is so cumbersome to use that I'm creating shortcuts for the most common cases. Very often all you want to do is a map and return a particular field out of an associative array. So:
<?php
function mapfield($key, $func=null){
return create_function('$a',"return $func(\$a['$key']);");
}
?>
Used as in:
<?php
function tags_join($tags){
#given an array of tags give the canonical space separated listing
return join(' ',array_unique(array_map(mapfield('Name'), $tags)));
}
?>
getElementsByClass function
http://pitfalls.wordpress.com/2008/07/07/querying-it-jquery-way-getelements...
maxgandalf: Jul 7, 5:50am