Skip to content

Instantly share code, notes, and snippets.

@yuvipanda
Created April 19, 2010 09:16
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • 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