Compatible with DokuWiki
Adora Belle, binky, ponder stibbons, hrun
Similar to impressjs, odp, revealjs, s5reloaded
S5 is a slide show format based entirely on XHTML, CSS, and JavaScript. With one file, you can run a complete slide show and have a printer-friendly version as well.
This plugin can create S5 slide show presentations from any DokuWiki page.
Use the download link given above to download or install the plugin through the plugin manager.
$conf['plugin']['s5']['template']
.lib/plugins/s5/ui/
getSort()
level for it is higher than the s5 plugin.
Usage is simple. Just add ~~SLIDESHOW~~
somewhere in the page (at the very top is recommended), and start your page with a H1 headline. Following content will go on the first (welcome) slide. Additional slides are created by H2 headlines. Adding a horizontal rule finishes the current slide and additional content goes to the “Handout” area (only visible when the slide is printed). Footnotes and abbreviation will be ignored on the slide. Plugin output won't be visible unless a plugin handles the mode s5
explicitly.
A template can be selected from within the syntax like this: ~~SLIDESHOW flower~~
.
Opera users need to press F11
to enter the presentation mode. Navigating between the slides is then possible using PAGE_UP
and PAGE_DOWN
.
Another option is to insert a link to the s5 view of any page in your template. For example edit: <wiki_dir>/lib/tpl/<your-template>/main.php
to add
<a href="<?php echo exportlink($ID, 's5')?>" title="online slideshow"><img src="<?php echo DOKU_BASE?>lib/plugins/s5/screen.gif" height="16px" alt="online slideshow"></a>
in the topright div.
Hacking renderer.php
like this made it work for me:
<!-- S5 JS --> // add those two lines: <script type="text/javascript" charset="utf-8" src="'.$this->base.'../../../exe/js.php"></script> <script src="'.$this->base.'../../jsmath/script.js" type="text/javascript"></script> <script src="'.$this->base.'default/slides.js" type="text/javascript"></script>
just in case you want to show List-Elements one by one put this at the bottom of the page
<script> var uls = document.getElementsByTagName('ul'); for(var i=0,j=uls.length;i<j;++i){uls[i].setAttribute('class','incremental')} </script>
--- s5/conf/default.php.orig 2015-06-02 18:03:19.062284950 +0200 +++ s5/conf/default.php 2015-06-02 17:50:35.406550419 +0200 @@ -1,4 +1,5 @@ <?php $conf['template'] = 'dokuwiki'; +$conf['maxHeaderLevelForNewSlide'] = 3; --- s5/renderer.php.orig 2015-06-02 17:44:20.952724847 +0200 +++ s5/renderer.php 2015-06-02 18:02:06.229923670 +0200 @@ -18,6 +18,7 @@ var $slideopen = false; var $base=''; var $tpl=''; + var $lastH2=''; /** * the format we produce @@ -121,7 +122,7 @@ /** * This is what creates new slides * - * A new slide is started for each H2 header + * A new slide is started for each Hx header, where x <= configuration parameter "maxHeaderLevelForNewSlide" */ function header($text, $level, $pos) { if($level == 1){ @@ -133,12 +134,19 @@ } } - if($level == 2){ + if($level <= $this->getConf('maxHeaderLevelForNewSlide')){ if($this->slideopen){ $this->doc .= '</div>'.DOKU_LF; //close previous slide } $this->doc .= '<div class="slide">'.DOKU_LF; $this->slideopen = true; + + if ($level == 2) { + $this->lastH2 = $text; + } else { + $level = 2; + $text = $this->lastH2 . " - " . $text; + } } $this->doc .= '<h'.($level-1).'>'; $this->doc .= $this->_xmlEntities($text); @@ -149,7 +157,7 @@ * Top-Level Sections are slides */ function section_open($level) { - if($level < 3){ + if($level <= $this->getConf('maxHeaderLevelForNewSlide')){ $this->doc .= '<div class="slidecontent">'.DOKU_LF; }else{ $this->doc .= '<div>'.DOKU_LF;
Due to http://meyerweb.com/eric/tools/s5/features.html “Incremental display”, example in http://meyerweb.com/eric/tools/s5/s5-intro.html on page 9, s5 is capable to “show the bullet points one at a time”.
Is there a way to have this for the s5 plugin?
— Thomas Templin 2016-04-10 21:30