Dokuwiki for science

差分

この文書の現在のバージョンと選択したバージョンの差分を表示します。

この比較画面にリンクする

slideshow_plugin [2016/10/30 23:26] (現在)
ライン 1: ライン 1:
 +=====XML/​SWF Slideshow plugin=====
 +This DokuWiki plugin create a slideshow in the DokuWiki page by using [[http://​www.maanis.us]]'​s XML/SWF Slideshow. XML/SWF Slideshow is a simple and cool Flash application. The slides and many variables for the style are defined by XML easily.
  
 +Though the XML/SWF Slideshow needs XML files, you can edit the XML content on the DokuWiki system by using this plugin. Of cource, this plugin supports static xml files for the slideshow.
 +
 +
 +:!: This plugin is no longer maintained now. :!:
 +
 +<​slideshow {{computer:​en:​slide_example2.xml|}} 200 150 slide1 F7F7F7 RIGHT></​slideshow>​
 +
 +  ***[[http://​www.maani.us/​xml_slideshow/​index.php|maani.us XML/SWF Slideshow]]**
 +    *[[http://​www.maani.us/​xml_slideshow/​index.php?​menu=Download|Download page]]
 +    *[[http://​www.maani.us/​xml_slideshow/​index.php?​menu=License|License page]]
 +
 +
 +
 +<​clear/>​
 +
 +^Download|{{computer:​source:​slideshow.zip|slideshow.zip}} (34.5 KB)|2008-03-22|
 +:!:This plugin requires [[cache plugin]]
 +
 +If you want to try this plugin, go to the playground page. ->  [[:​playground:​slideshow_test]]
 +
 +=====Examples=====
 +
 +  *See detailed coding at [[http://​www.maani.us/​xml_slideshow/​index.php?​menu=Tutorial|XML/​SWF Slideshow]] site.
 +  *This plugin uses '​slideshow'​ namespace for the caching<​del>​ of dynamic coding</​del>​.
 +
 +
 +
 +
 +
 +
 +
 +====Dynamic xml coding====
 +You can code XML/SWF Slideshow'​s xml file on the DokuWiki system as you edit other pages as usual.
 +
 +**Syntax**\\ ​
 +<​code>​
 +<​slideshow (width) (height) (name) (bgcolor) (align)>
 +  ...
 +  XML/SWF Slideshow code
 +  You can use media link like {{XXX.jpg}}.
 +  You can use wiki link like [[XXX:​XXX]].
 +  You can include your PHP script by <​include>​XXX.php</​include>​.
 +  ...
 +</​slideshow>​
 +
 +</​code>​
 +
 +By using the latest version, you can use either %%[[wiki link]]%% or %%{{media file}}%% format **within** the XML code.;-)
 +
 +
 +**Example**\\ ​
 +<​slideshow 200 150 example1 CCFF99 RIGHT>
 + <​slide>​
 +  <image url='​{{computer:​en:​phm10_0134.jpg}}'/>​
 +  <​link><​area url='​[[computer:​en:​slideshow_plugin]]'/></​link>​
 + </​slide>​
 + <​slide>​
 +  <image url='​{{computer:​en:​phm10_0210.jpg}}'/>​
 + </​slide>​
 + <​slide>​
 +  <image url='​{{computer:​en:​phm10_0651.jpg|Sky}}'/>​
 + </​slide>​
 +</​slideshow>​
 +
 +<​code>​
 +<​slideshow 200 150 example1 CCFF99 RIGHT>
 + <​slide>​
 +  <image url='​{{computer:​en:​phm10_0134.jpg}}'/>​
 +  <​link><​area url='​[[computer:​en:​slideshow_plugin]]'/></​link>​
 + </​slide>​
 + <​slide>​
 +  <image url='​{{computer:​en:​phm10_0210.jpg}}'/>​
 + </​slide>​
 + <​slide>​
 +  <image url='​{{computer:​en:​phm10_0651.jpg|Sky}}'/>​
 + </​slide>​
 +</​slideshow>​
 +</​code>​
 +
 +
 +
 +
 +====Static XML file====
 +You can also use external xml files for XML/SWF Slideshow. Put the location of file before the parameters of width and height. The location should be full path including all namespaces. Since you can use Wiki syntax of '​{{}}',​ it is convinient for you to put it by {{icon>​picture}} in toolbar.
 +
 +At the latest version, a media file format like %%{{XXX.jpg}}%% will be replaced to appropriate URL **within** the external XML file.
 +
 +**Syntax**\\ ​
 +<​code>​
 +<​slideshow (filename) (width) (height) (bgcolor) (align)></​slideshow>​
 +
 +</​code>​
 +
 +
 +**Example**\\ ​
 +
 +<​code>​
 +<​slideshow computer:​en:​slide_example2.xml 150 120></​slideshow>​
 +
 +<​slideshow {{computer:​en:​slide_example2.xml|}} 150 120></​slideshow>​ // media file format will work.
 +
 +</​code>​
 +<​slideshow computer:​en:​slide_example2.xml 150 120></​slideshow>​
 +
 +{{computer:​en:​slide_example2.xml}}
 +
 +<​clear/>​
 +
 +
 +===== Extensions =====
 +====Clearing cache====
 +In order to remove all cached files in a slideshow media directory, use **clear_cache** word.
 +
 +<​code>​
 +<​slideshow clear_cache></​slideshow>​
 +
 +</​code>​
 +
 +:!:Since '​clear_cache'​ deletes all cached files from '​slideshow'​ namespace, a cached Wiki page doesn'​t show charts sometimes. Therefore, use **%%~~NOCACHE~~%%** command in the page to recreate XML files everytime.
 +
 +
 +
 +==== Scripts within Xml ====
 +You can include external PHP scripts in XML source by using **%%<​include>​%%** tag. Notice that the base directory is '/​lib/​plugins/​slideshow/'​. The PHP scripts should return string data.
 +
 +**Example**
 +<​slideshow 200 150 langEx CCFF99 RIGHT>
 + <​slide>​
 +  <image url='​{{computer:​en:​phm10_0134.jpg}}'/>​
 +  <​include>​include_test.php</​include>​
 + </​slide>​
 + <​slide>​
 +  <image url='​{{computer:​en:​phm10_0210.jpg|}}'/>​
 + </​slide>​
 +</​slideshow>​
 +<​code>​
 +<​slideshow 200 150 langEx CCFF99 RIGHT>
 + <​slide>​
 +  <image url='​{{computer:​en:​phm10_0134.jpg}}'/>​
 +  <!-- Display $conf['​lang'​] as a text -->
 +  <​include>​include_test.php</​include> ​          // <- here.
 + </​slide>​
 + <​slide>​
 +  <image url='​{{computer:​en:​phm10_0210.jpg}}'/>​
 + </​slide>​
 +</​slideshow>​
 +</​code>​
 +**include_test.php**
 +<​code>​
 +<?php
 +global $conf;
 +$ret ='<​draw_text><​text x="​0"​ y="​0"​ width="​50"​ rotation="​0"​ align="​left"​ size="​60"​ color="​000000"​ alpha="​90">';​
 +$ret .= $conf['​lang'​];​
 +$ret .= '</​text></​draw_text>';​
 +return $ret;
 +?>
 +</​code>​
 +<​clear/>​
 +
 +=====Installation=====
 +  -Install [[cache plugin]] if not installed.
 +  -Download '​{{computer:​source:​slideshow.zip|slideshow.zip}}(35KB)'​ and extract.
 +  -Upload the slideshow directory to your DokuWiki server at /​lib/​plugins/​
 +
 +The '​slideshow.swf'​ is redistributed unregistered version of XML/SWF Slideshow. See the license page at [[http://​www.maani.us/​xml_slideshow/​index.php?​menu=License|maani.us'​s site]]
 +
 +{{computer:​en:​slideshow_config_en.jpg?​400}}
 +======History======
 +  *2008.3.22
 +    *Caching mechanism was allocated [[cache plugin]].
 +  *2008.3.16
 +    *Vulnerability of XSS was fixed. (Thanks, Andy)
 +    *bug fix to make an appropriate swf library path.
 +  *2007.12.30
 +    *bug fix
 +  *2007.12.18
 +    *Enabled to use **%%[[wiki link]]%%** and **%%<​include>​%%**.
 +  *2007.12.08 ver. 0.4.1
 +    *Enabled to start without configuration
 +  *2007.12.07 ver. 0.4
 +    *Media format **%%{{XXXX.jpg}}%%** translation
 +    *Fix around directory-creation & ACL setting.
 +    *Fetch URL was abolished. <- This configuration has bothered people.
 +  *2007.8.26 ver.0.3.1
 +    *Supports file name of DokuWiki syntax.
 +  *2007.8.19 ver.0.3.0
 +    *Bug fix
 +    *Addition of configurable items
 +    *Localization of configuration (en and ja)
 +  *2007.8.18 ver.0.2.0
 +    *Enabled to modify settings on Web browser
 +  *2007.8.16 ver.0.1.0
 +    *First version
 +
 +======Links======
 +<float icon(compass)>​
 +  *[[chart_plugin|XML/​SWF Chart plugin]] - Flash chart
 +  *[[aviewer_plugin|AutoViewer plugin]] - Simpler Flash slideshow
 +  ***[[http://​www.maani.us/​xml_slideshow/​index.php|XML/​SWF Slideshow by maani.us]]**
 +    *[[http://​www.maani.us/​xml_slideshow/​index.php?​menu=Download|Download page]]
 +    *[[http://​www.maani.us/​xml_slideshow/​index.php?​menu=License|License page]]
 +</​float>​
 +<​clear/>​
 +{{tag>​Plugin}}