Unify Div Heights (using jQuery)
// Make the height of all the innerDivs the same height based on the tallest one.
function unifyHeights()
{
var maxHeight = 0;
$('div#OuterContainer').children('div').each(function(){
var height = $(this).outerHeight();
//alert(height);
if ( height > maxHeight ) { maxHeight = height; }
});
$('div.innerDivs').css('height', maxHeight);
}
Added to JS by Michael D. Noga
PHP switch
switch ($op)
{
case 'op1':
//code to be executed if $op = op1;
break;
case 'op2':
//code to be executed if $op = op2;
break;
default:
//code to be executed
//if expression is different
//from both op1 and op2;
}
Added to PHP by David Reed
Drupal: watchdog
watchdog('type', 'message', null, 'WATCHDOG_NOTICE', 'link');
Added to Drupal by David Reed
Drupal: link
l('label', 'path', array('query' => 'destination=node'));
Added to Drupal by David Reed
Sitemap XML
<?xml version=”1.0” encoding=’UTF-8’?>
<urlset xmlns=’http://www.sitemaps.org/schemas/sitemap/0.9’>
<url>
<loc>http://www.site.com/</loc>
<lastmod>2008-11-04</lastmod>
<changefreq>monthly</changefreq>
<priority>0.9</priority>
</url>
</urlset>
Added to Misc by Nikos Mouratidis
Clearing div
.clearing {clear:both; height:0; overflow:hidden; margin:-1px 0 0 0;}
Added to CSS by Mark Evans