<?php if (!defined('PmWiki')) exit();
/*  Copyright 2004 Patrick R. Michaud (pmichaud@pobox.com)
    This file is distributed under the terms of the GNU General Public 
    License as published by the Free Software Foundation; either 
    version 2 of the License, or (at your option) any later version.  

    This module enables embedding of Scaleable Vector Grafics (.svg) files into
    wiki pages.  
    The width= and height= Parameter needed to be set to define the painting area.
    The adobve svg-plugin is needed


    To use this module, simply place this file in the cookbook/ directory
    and add the following line into config.php:

        include_once('cookbook/svg.php');

*/

SDV($SwfTagFmt,
   "<object type='image/svg+xml' data='\$LinkUrl'><embed type='image/svg+xml' src='\$LinkUrl' /></object>");

Markup('svg', '<urllink', 
  "/\\b(?>(\\L))([^\\s$UrlExcludeChars]+\\.svg)/e",
  "Keep(\$GLOBALS['LinkFunctions']['$1'](\$pagename,'$1','$2',NULL,'$1$2',
    \$GLOBALS['SwfTagFmt']), 'L')");

SDVA($WikiStyleAttr,array(
  'height' => 'img|object|embed',
  'width' => 'img|object|embed'));

?>
