// a quick hack to create functionality similar to the "blogThis" button // if you update please mail me back at dc3@pikkle.com //// your WIKI url goes here define ('WIKIURL', 'http://wiki.pikkle.com/'); init(); function init() { $vars = $_GET; // or POST $cmd = $vars['cmd']; switch ($cmd) { case 'x': process($vars); break; default: renderForm($vars); break; } } /////////////////////////////////////////////////// // called when you hit submit // create a URL like: // http://wiki.pikkle.com/index.php?title={newItem}&action=edit function process($vars) { $wikiUrl = WIKIURL; $pageName = $vars['pageName']; $targetUrl = WIKIURL . "index.php?title=$pageName&action=edit"; header("location: $targetUrl"); } /////////////////////////////////////////////////// // called first time thru function renderForm($vars) { openHtml(); echo ("
"); closeHtml(); } function openHtml() { ?>