plugin:visio
no way to compare when less than two revisions
Differences
This shows you the differences between two versions of the page.
Previous revisionNext revision | |||
— | plugin:visio [2009-10-10 18:52] – tag cleanup laynee | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== visio plugin ====== | ||
+ | ---- plugin ---- | ||
+ | description: | ||
+ | author | ||
+ | email : marc@practeo.ch | ||
+ | type : syntax | ||
+ | lastupdate : 2007-12-05 | ||
+ | compatible : | ||
+ | depends | ||
+ | conflicts | ||
+ | similar | ||
+ | tags : embed, diagrams | ||
+ | ---- | ||
+ | |||
+ | =====Background====== | ||
+ | |||
+ | I have been working on making a documentation page for some network. We needed some inline Visio diagram display so that regular end user could be able to see the diagram without generating (non up to date image export). | ||
+ | |||
+ | ====== How to install ====== | ||
+ | Download the file [[http:// | ||
+ | Download the (Free) Microsoft Visio Viewer 2003 and copy the .exe file to your server, then configure the plugin to have the correct path to offer the Visio viewer download to the end users. | ||
+ | |||
+ | Visio 2003 Viewer can be found under downloaded at [[http:// | ||
+ | |||
+ | ====Acknowledgment==== | ||
+ | |||
+ | I borrowed some code from [[plugin: | ||
+ | |||
+ | ====Syntax==== | ||
+ | |||
+ | < | ||
+ | {{my_visio_file.vsd[, | ||
+ | </ | ||
+ | |||
+ | The plugin will generate the needed embedded object to view the Visio file with Internet Explorer and Microsoft Visio Viewer 2003. | ||
+ | (Ok, could be better, but quick and dirty solution). | ||
+ | |||
+ | ====Code==== | ||
+ | <code php> | ||
+ | <?php | ||
+ | /** | ||
+ | * Plugin Visio: Insert a ActiveX object to view Visio diagrams. | ||
+ | | ||
+ | * @license | ||
+ | * @author | ||
+ | */ | ||
+ | |||
+ | // must be run within DokuWiki | ||
+ | if(!defined(' | ||
+ | |||
+ | if(!defined(' | ||
+ | require_once(DOKU_PLUGIN.' | ||
+ | |||
+ | /** | ||
+ | * All DokuWiki plugins to extend the parser/ | ||
+ | * need to inherit from this class | ||
+ | */ | ||
+ | class syntax_plugin_visio extends DokuWiki_Syntax_Plugin { | ||
+ | |||
+ | function getInfo(){ | ||
+ | return array( | ||
+ | ' | ||
+ | ' | ||
+ | ' | ||
+ | ' | ||
+ | ' | ||
+ | | ||
+ | ' | ||
+ | ); | ||
+ | } | ||
+ | |||
+ | function getType() { return ' | ||
+ | |||
+ | function getSort() { return 10; } | ||
+ | |||
+ | function connectTo($mode) { | ||
+ | $this-> | ||
+ | } | ||
+ | function handle($match, | ||
+ | $data[' | ||
+ | $match = substr($match, | ||
+ | list($filename, | ||
+ | $data[' | ||
+ | |||
+ | if (preg_match_all('/ | ||
+ | { | ||
+ | $data[' | ||
+ | $data[' | ||
+ | $data[' | ||
+ | } | ||
+ | else | ||
+ | { | ||
+ | $data[' | ||
+ | } | ||
+ | return array($data, | ||
+ | |||
+ | } | ||
+ | function render($mode, | ||
+ | |||
+ | if($mode == ' | ||
+ | $data = $data[0]; | ||
+ | |||
+ | if (isset($data[' | ||
+ | if (isset($data[' | ||
+ | |||
+ | $renderer-> | ||
+ | $renderer-> | ||
+ | $renderer-> | ||
+ | $renderer-> | ||
+ | $renderer-> | ||
+ | $renderer-> | ||
+ | $renderer-> | ||
+ | $renderer-> | ||
+ | $renderer-> | ||
+ | $renderer-> | ||
+ | $renderer-> | ||
+ | $renderer-> | ||
+ | $renderer-> | ||
+ | $renderer-> | ||
+ | $renderer-> | ||
+ | $renderer-> | ||
+ | $renderer-> | ||
+ | $renderer-> | ||
+ | $renderer-> | ||
+ | |||
+ | $renderer-> | ||
+ | |||
+ | return true; | ||
+ | } | ||
+ | return false; | ||
+ | } | ||
+ | } | ||
+ | ?> | ||
+ | </ | ||
+ | |||
+ | ===== Configuration ===== | ||
+ | |||
+ | There are some new configuration settings to set the default url for downloading the Microsoft Visio Viewer 2003 and default height and width. | ||
+ | |||
+ | ====== Discussion ====== | ||
+ | I've installed the PlugIn on my [[http:// | ||
+ | |||
+ | >It doesn' | ||
+ | |||
+ | Hello, I've tried it with one Visio 2007 (*.VSD) and I got the message, that i have not the proper version of VisoViewer installed (but I have visioviewer.exe from MS-downloads). | ||
+ | It looks like that because of the putting the extension to lower-case it assumes/ | ||
+ | Maybe the conversion of Upper to lowercase has to be overwritten for this file-type. | ||
+ | And yes it doesn' |
plugin/visio.txt · Last modified: 2023-12-16 23:16 by Aleksandr