From 39d706a4b72c1093ba15cfc4dd3f1fcade732bf5 Mon Sep 17 00:00:00 2001 From: Fabien Benetou Date: Wed, 7 Sep 2016 10:22:39 +0200 Subject: [PATCH] added multiplex --- README.md | 2 ++ reveal.php | 88 +++++++++++++++++++++++++++++++++++++++++++++++++++--- 2 files changed, 86 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 4cbc8e0..b10ada1 100644 --- a/README.md +++ b/README.md @@ -1 +1,3 @@ # PmWiki-Reveal + +See http://www.pmwiki.org/wiki/Cookbook/Reveal for details diff --git a/reveal.php b/reveal.php index 57466b6..d957c86 100644 --- a/reveal.php +++ b/reveal.php @@ -9,15 +9,17 @@ Using: Include this (reveal.php) file in your config.php. - Create a page using html/htmlend
to define slides and then + Create a page using section to define slides and then access the page with action=reveal + + If you defined a master/client keypair configure them further in the multiplex parameters */ Markup('section','fulltext','/\(:section:\)/e',"Keep('
')"); Markup('sectionend','fulltext','/\(:sectionend:\)/e',"Keep('
')"); -SDV($HandleActions['reveal'],'HandleSlides'); +SDV($HandleActions['reveal'],'HandleRevealSlides'); SDV($SlideShowFmt, ' @@ -34,14 +36,32 @@ $Slide '); -function HandleSlides($pagename, $auth = 'read') { +function HandleRevealSlides($pagename, $auth = 'read') { global $SlideShowFmt,$FmtV,$ScriptUrl,$Group,$Name; $page = RetrieveAuthPage($pagename, $auth, false, READPAGE_CURRENT); @@ -53,4 +73,64 @@ function HandleSlides($pagename, $auth = 'read') { exit(); } +/* For master control of slides (ALL presentations!) +{"secret":"14731768290817665483","socketId":"1ff0f582dc396a71"} + +Example of working control +http://fabien.benetou.fr/pub/home/testingrevealremote/ +*/ + +SDV($HandleActions['revealcontrol'],'ControlSlides'); + +SDV($SlideShowFmtControl, ' + + + + reveal.js - Barebones + + + +
+
+$Slide +
+
+ + + + +'); + +function ControlSlides($pagename, $auth = 'read') { + global $SlideShowFmtControl,$FmtV,$ScriptUrl,$Group,$Name; + + $page = RetrieveAuthPage($pagename, $auth, false, READPAGE_CURRENT); + if (!$page) Abort("?cannot read $pagename"); + + $FmtV['$Slide'] = MarkupToHTML($pagename, $page['text']); + FmtPageName($SlideShowFmtControl, $pagename); + PrintFmt($pagename,$SlideShowFmtControl); + exit(); +} + ?>