800,
'height'=>400,
'name'=>'',
'mode'=>'java'
);
/**
* Plugin Info
*/
function getInfo()
{
return array (
'author'=>'Jürgen A. Lamers',
'email'=>'jaloma.ac [at] googlemail [dot] com',
'date'=>@file_get_contents(DOKU_PLUGIN . 'panorama/VERSION'),
'name'=>'panorama',
'desc'=>'Panorama-Picture Plugin ',
'url'=>'http://www.dokuwiki.org/plugin:panorama',
);
}
/**
* Typology?
*/
function getType()
{
return 'substition';
}
/**
* Sort Code?
*/
function getSort()
{
return 316;
}
/**
* Pattern Matching?
*/
function connectTo($mode)
{
$this->Lexer->addSpecialPattern('', $mode, 'plugin_panorama_panorama');
}
function matchLength()
{
return strlen("matchLength(), -2));
$gmap = $this->_extract_params($match);
return $gmap;
}
/**
* extract parameters for the googlemap from the parameter string
*
* @param string $str_params string of key="value" pairs
* @return array associative array of parameters key=>value
*/
function _extract_params($str_params)
{
$param = array ();
preg_match_all('/(\w*)="(.*?)"/us', $str_params, $param, PREG_SET_ORDER);
if (sizeof($param) == 0)
{
preg_match_all("/(\w*)='(.*?)'/us", $str_params, $param, PREG_SET_ORDER);
}
// parse match for instructions, break into key value pairs
$gmap = $this->dflt;
foreach ($param as $kvpair)
{
list ($match, $key, $val) = $kvpair;
if ( isset ($gmap[$key]))$gmap[$key] = $val;
}
return $gmap;
}
/**
* Rendering
*/
function render($mode, & $renderer, $data)
{
if ($mode == 'xhtml')
{
global $conf;
$mode = $data['mode'];
$txt = "";
if ($mode == null || $mode == 'java')
{
$txt = render_helper::_render_java($data);
} elseif ($mode == 'swf' || $mode == 'flash')
{
$txt = render_helper::_render_swf($data);
}
if ($this->getConf('showPanoramaUrl'))
{
$txt .= '
Powered by PanoramaStudio Viewer';
}
$renderer->doc .= $txt;
return true;
} else
{
return false;
}
}
}// class