DokuWiki

It's better when it's simple

User Tools

Site Tools


plugin:s5

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
plugin:s5 [2013-08-19 18:52] Aleksandrplugin:s5 [2023-01-10 18:44] (current) – version upped andi
Line 6: Line 6:
 email      : andi@splitbrain.org email      : andi@splitbrain.org
 type       : render type       : render
-lastupdate : 2009-01-07 +lastupdate : 2022-11-30 
-compatible : 2009-02-14+, Adora Belle+compatible : Adora Belle, binky, ponder stibbons, hrun
 depends    :  depends    : 
 conflicts  conflicts 
Line 29: Line 29:
 ==== Changes ==== ==== Changes ====
  
-{{rss>http://github.com/feeds/splitbrain/commits/dokuwiki-plugin-s5/master date}}+{{rss>https://github.com/splitbrain/dokuwiki-plugin-s5/commits/master.atom date}}
  
 ===== Configuration ===== ===== Configuration =====
Line 40: Line 40:
  
 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. 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''. Opera users need to press ''F11'' to enter the presentation mode. Navigating between the slides is then possible using ''PAGE_UP'' and ''PAGE_DOWN''.
Line 49: Line 51:
 in the topright div. in the topright div.
  
-===== Specifying theme: ==== 
- 
-ahmetsacan: In order to specify theme using e.g., ''%%~~SLIDESHOW flower~~%%'', apply the following changes  
- 
-<code diff> 
-diff -b -u .s5/renderer.php s5/renderer.php 
---- .s5/renderer.php 2010-02-12 05:54:20.000000000 -0500 
-+++ s5/renderer.php 2010-02-15 16:46:50.561469800 -0500 
-@@ -45,7 +45,7 @@ 
-         ); 
-         p_set_metadata($ID,array('format' => array('s5' => $headers) )); 
-         $this->base = DOKU_BASE.'lib/plugins/s5/ui/'; 
--        $this->tpl  = $this->getConf('template'); 
-+        $this->tpl  = isset($_GET['s5theme'])?$_GET['s5theme']:$this->getConf('template'); 
-     } 
-  
-     /** 
-</code> 
- 
-<code diff> 
-diff -b -u .s5/syntax.php s5/syntax.php 
---- .s5/syntax.php 2010-02-12 05:54:20.000000000 -0500 
-+++ s5/syntax.php 2010-02-15 16:44:57.731469800 -0500 
-@@ -43,7 +43,7 @@ 
-      * Connect pattern to lexer 
-      */ 
-     function connectTo($mode) { 
--        $this->Lexer->addSpecialPattern('~~SLIDESHOW~~',$mode,'plugin_s5'); 
-+        $this->Lexer->addSpecialPattern('~~SLIDESHOW[^~]*~~',$mode,'plugin_s5'); 
-     } 
-  
-  
-@@ -51,6 +51,7 @@ 
-      * Handle the match 
-      */ 
-     function handle($match, $state, $pos, &$handler){ 
-+    if($match!='~~SLIDESHOW~~') return array(trim(substr($match,11,-2))); 
-         return array(); 
-     } 
-  
-@@ -61,7 +62,7 @@ 
-         global $ID; 
-         if($format != 'xhtml') return false; 
-  
--        $renderer->doc .= '<a href="'.exportlink($ID, 's5').'" title="'.$this->getLang('view').'">'; 
-+        $renderer->doc .= '<a href="'.exportlink($ID, 's5',sizeof($data)?array('s5theme'=>$data[0]):null).'" title="'.$this->getLang('view').'">'; 
-         $renderer->doc .= '<img src="'.DOKU_BASE.'lib/plugins/s5/screen.gif" align="right" alt="'.$this->getLang('view').'" width="48" height="48" />'; 
-         $renderer->doc .= '</a>'; 
-         return true; 
-</code> 
  
 ===== Using with jsMath ===== ===== Using with jsMath =====
Line 126: Line 78:
   * Is there a way to manually create a new page (with a new H2 headline) or automatically split content in multiple slides (for instance two pages : "H2 Headline (1/2)" and "H2 Headline (2/2)") ?   * Is there a way to manually create a new page (with a new H2 headline) or automatically split content in multiple slides (for instance two pages : "H2 Headline (1/2)" and "H2 Headline (2/2)") ?
     *Another solution would be an option to use H3 headline for new slides.     *Another solution would be an option to use H3 headline for new slides.
 +    * You can try this patch : <code>
 +--- 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;
 +</code>
   * There is a colision with the html5 plugin. When it is on, the button for starting is not visible.   * There is a colision with the html5 plugin. When it is on, the button for starting is not visible.
   * Is there a way to end the slideshow and get back to the page?   * Is there a way to end the slideshow and get back to the page?
 +    * -> there is: hit "back" or, on FF, Alt + left arrow to return to the page.
 +
 +==== Any chance to have <class=incremental> ?====
 +
 +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?
 +
 + --- [[user>coastGNU|Thomas Templin]] //2016-04-10 21:30//
plugin/s5.1376931123.txt.gz · Last modified: 2013-08-19 18:52 by Aleksandr

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
CC Attribution-Share Alike 4.0 International Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki