3 Oct 2006 21:51
Re: Include HTML page
Eagleone schrieb: > On 10/1/06, Šerých Jakub <Serych@...> wrote: ... >>> Is there anyway to include (dinamically) an HTML page inside ... > It seems incredible that there isn't a way for including some HTML code... there is an extension called abshtml its a short extension. so i will post it here HeinzJ <?php # Example WikiMedia extension # with WikiMedia's extension mechanism it is possible to define # new tags of the form # <absHTML> some text </absHTML> # the function registered by the extension gets the text between the # tags as input and can transform it into arbitrary HTML code. # Note: The output is not interpreted as WikiText but directly # included in the HTML output. So Wiki markup is not supported. # To activate the extension, include it from your LocalSettings.php # with: include("extensions/absHTML.php"); $wgExtensionFunctions[] = "wfabsHTMLExtension"; function wfabsHTMLExtension() { global $wgParser; # register the extension with the WikiText parser # the first parameter is the name of the new tag. # In this case it defines the tag <absHTML> ... </absHTML> # the second parameter is the callback function for # processing the text between the tags $wgParser->setHook( "absHTML", "renderHTML" ); } # The callback function for converting the input text to HTML output function renderHTML( $input ) { $output = $input; return $output; } ?
RSS Feed