Skip to content

Instantly share code, notes, and snippets.

@makotokw
Created November 11, 2009 10:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save makotokw/231844 to your computer and use it in GitHub Desktop.
Save makotokw/231844 to your computer and use it in GitHub Desktop.
PukiWiki gist plugin
<?php
/**
* gist.inc.php - embed gist
*
* Usage:
* #gist(231844)
* &gist(231844);
*
* @author makoto_kw
* @licence http://www.gnu.org/licenses/gpl.html GPLv2
* @link http://gist.github.com/231844
* @link http://code.google.com/p/google-code-prettify/
* @version 1.0
*/
function plugin_gist_convert() {
$args = func_get_args();
$gistid = array_pop($args);
return '<script src="http://gist.github.com/'.$gistid.'.js"></script>';
}
function plugin_gist_inline() {
$args = func_get_args();
array_pop($args);
$gistid = array_pop($args);
return '<script src="http://gist.github.com/'.$gistid.'.js"></script>';
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment