Wiki source for ShowVisioAction

Show raw source


This is the development page for the ""ShowVisio"" action

Please feel free to make changes or leave comments!

There are 2 ways to show a Visio document within a Wikka page and they both require the MS Visio Viewer plugin.
You can get it from

I have tested it with IE and it works very well. Sadly, it does not work with Firefox.

~1) Using an action
~""{{visio url="http://devpc/application%20data/rpc_http_diagram.vsd" height="750" width="900"}}""
!This was based on the Mindmap.php action. Thanks go to the author of that action!

~2) Using iframe
~ ""{{iframe width="1200" height="2000" url="http://devpc/application%20data/rpc_http_diagram.vsd"}}""

I came up with the action before I realised that it could also be done with an iframe. If anyone can point out the pros/cons of each approach, I'd be grateful.


Display a Microsoft Visio diagram within a Wikka page. Works with IE only!

Sample usage:
{{visio url="http://devpc/application%20data/rpc_http_diagram.vsd" height="750" width="900"}}
Height and Width are optional.

Nick Damoulakis


$visio_url = $vars['url'];
if ((!$visio_url && !$height) && $wikka_vars) $visio_url = $wikka_vars;
$visio_url = $this->cleanUrl(trim($visio_url));
$height = $this->htmlspecialchars_ent(trim($vars['height']));
$width = $this->htmlspecialchars_ent(trim($vars['width']));

if ($visio_url) {

if (!$height)
$height = "650";

if (!$width)
$width = "550";

$output =
"<script type=\"text/javascript\" language=\"JavaScript\">\n".
" if(!navigator.javaEnabled()) {\n".
" document.write('Please install a <a href=\"\">Java Runtime Environment</a> on your computer.');\n".
" }\n".
"function popup(mylink, windowname)\n".
"if (! window.focus)return true;\n".
"var href;\n".
"if (typeof(mylink) == 'string')\n".
" href=mylink;\n".
" href=mylink.href;\n".
", windowname, ',type=fullWindow,fullscreen,scrollbars=yes');\n".
"return false;\n".
"<OBJECT classid=\"CLSID:279D6C9A-652E-4833-BEFC-312CA8887857\"".
"id=\"viewer1\" width=".$width." height=".$height.">".
"<param name=\"BackColor\" value=\"16777120\">".
"<param name=\"AlertsEnabled\" value=\"1\">".
"<param name=\"ContextMenuEnabled\" value=\"1\">".
"<param name=\"GridVisible\" value=\"0\">".
"<param name=\"HighQualityRender\" value=\"1\">".
"<param name=\"PageColor\" value=\"16777215\">".
"<param name=\"PageVisible\" value=\"1\">".
"<param name=\"PropertyDialogEnabled\" value=\"1\">".
"<param name=\"ScrollbarsVisible\" value=\"1\">".
"<param name=\"ToolbarVisible\" value=\"1\">".
"<param name=\"SRC\" value=".$visio_url.">".
"<param name=\"CurrentPageIndex\" value=\"0\">".
"<param name=\"Zoom\" value=\"-1\">".
"<br />$visio_url\n";


} else {
echo "<span class='error'><em>Error: Invalid visio action syntax. <br /> Proper usage: {{visio}} or {{visio url=\"\"}}</em></span>";


Valid XHTML :: Valid CSS: :: Powered by WikkaWiki