Skip to content

Instantly share code, notes, and snippets.

@yuvipanda
Created April 19, 2010 09:16
Show Gist options
  • Save yuvipanda/370863 to your computer and use it in GitHub Desktop.
Save yuvipanda/370863 to your computer and use it in GitHub Desktop.
<?php
/**
* Gist Command - Easy way to embed a gist in Dokuwiki
* Usage: %gist(gist_id)%
* @license Three Clause BSD
* @author Yuvi Panda (http://yuvi.in)
*/
class CommandPluginExtension_gist extends CommandPluginExtension
{
function getCachedData($embedding, $params, $paramHash, $content, &$errorMessage)
{
return '<script src="http://gist.github.com/' . $content . '.js"></script>';
}
}
?>
@marceloxp
Copy link

I got message: "Failed to load resource: the server responded with a status of 406 (Not Acceptable)"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment