url|width|height|title where url -- everything in the javascript src= string UP to (not including "&synd=open" width - pixel width of gadget height - pixel height of gadget title = the string that will appear in top of the widget */ // Register extension with WikiText parser $wgExtensionFunctions[] = "doGoogleCSEinsert"; function doGoogleCSEinsert() { global $wgParser; // The first parameter is the name of the new tag. // The second parameter is the callback function for processing text between the tags $wgParser->setHook( "gcse", "embedCSE" ); } # The callback function for converting the input text to HTML output function embedCSE( $input ) { // parse the input string to an array $cse_params = explode("|",$input); // create output $output = ''; //spit it back return $output; } ?>