<?php
# Minseong Extension # # Tag : # <anyweb>website</anyweb> # Ex : # from url http://aurora1.sourceforge.net # <anyweb>http://aurora1.sourceforge.net</anyweb> # # Enjoy ! $wgExtensionFunctions[] = 'wfanyweb'; $wgExtensionCredits['parserhook'][] = array( 'name' => 'anysite extension', 'description' => 'Display sites', 'author' => 'Minseong Kim', 'url' => 'http://minseongkim.tistory.com' ); function wfanyweb() { global $wgParser; $wgParser->setHook('anyweb', 'renderanyweb'); } # The callback function for converting the input text to HTML output function renderanyweb($input) { $width = 800; $height = 500; $output= '<iframe name="anyweb" src="'.htmlspecialchars($input) .'" width="'.$width.'" height="'.$height.'" frameborder="0">'.'</iframe>'; return $output; }
?>