Skip to content

Instantly share code, notes, and snippets.

@rmarscher
rmarscher / gist:1279494
Created October 11, 2011 21:24
li3_mustache as default media renderer
// in one of your bootstrap files... possibly config/bootstrap/media.php
use lithium\net\http\Media;
Media::type('default', null, array(
'view' => 'lithium\template\View',
'loader' => 'Mustache',
'renderer' => 'Mustache',
'paths' => array(
'template' => '{:library}/views/{:controller}/{:template}.{:type}',
@rmarscher
rmarscher / Facebook Linter Errors
Created March 21, 2011 20:10
PHP function that automates detecting if an open graph page has errors
/**
* Function to automate detecting if an open graph page has errors
* Requires the dom php extension to be enabled
*
* @param string $url
* @return array with keys 'hasError', 'errorType', and 'errorMessage'
*/
function facebookLinterErrors($url)
{
$errorType = "";