This cookbook for PmWiki 2 uses S5 http://www.meyerweb.com/eric/tools/s5/ Installing: * Download S5 and uncompress it to pub/s5 folder in your "Farm" directory * in local/config.php, include this file by: if ($action == 'slideshow2') <--------------- change by FE, see below { include_once("$FarmD/cookbook/slideshow-1.3.php"); $SlidesSkin="actual"; } History 1.2: added contribution by JonHaupt 2: transformation by François Elie the title is the first line of the page slides follows !!! headers and not ! options $Toc1InSlides: a slide is produced at changes in ! $Toc2InSlides: a slide is produced at changes in !! $TocInHeader: the positions of slide is indicate at right in the header (his !!, his !) $NumInToc: Toc in headers and Slides are numeroted (I -, II - for

, and A. B. C. for

) default options are true */ SDV($Toc1InSlides,true); SDV($Toc2InSlides,true); SDV($TocInHeader,true); SDV($NumInToc,true); SDV($roman,array('I','II','III','IV','V','VI','VII','VIII','IX','X')); # Slideshow skin list global $SlideShowSkinList; SDVA($SlideShowSkinList, array ( 'pmwiki' => 'pmwiki', 'blue' => 'blue', 'flower' => 'flower', 'pixel' => 'pixel', 'pretty' => 'pretty', )); $SlidesSkin = "actual"; # action=...&theme=... to specify a particular theme on display if (isset($_GET['theme'])) if (@$SlideShowSkinList[$_GET['theme']]) $SlidesSkin = ($_GET['theme']); SDV($HandleActions['slideshow'],'HandleSlides'); SDV($HandleActions['slideshow2'],'HandleSlides2'); // François Elie Markup('slide','_begin','/\(:RSS *(.+):\)/e',"RSS('\$1')"); SDV($SlideList,array()); SDV($SlideShowFmt, ' $Title
'); SDV($SlideSoloFmt,'
$SlideContent
'); SDV($HandleSlideShowFmt,array(&$SlideShowFmt,&$SlideList,'
')); function HandleSlides($pagename, $auth = 'read') { global $SlideShowFmt, $SlideSoloFmt, $SlideList,$RssItemFmt, $HandleSlideShowFmt,$FmtV,$ScriptUrl,$Group,$Name; $t = ReadTrail($pagename,$pagename); $page = RetrieveAuthPage($pagename, $auth, false, READPAGE_CURRENT); if (!$page) Abort("?cannot read $pagename"); $cbgmt = $page['time']; $source = $page['text']; $number_of_items = preg_match_all('/\n\!([\ \w].*)/', $source, $titles); // get the number of items and the dates $body_of_items = preg_split('/\n\!([\ \w].*)/', $source); // get the number of items and the dates $titles = $titles[0]; for ($i = 0; $i < $number_of_items; $i++) { $FmtV['$SlideContent'] = MarkupToHTML($pagename, $titles[$i] . "\n" . $body_of_items[$i + 1]); $SlideList[] = FmtPageName($SlideSoloFmt, $pagename); } PrintFmt($pagename,$HandleSlideShowFmt); exit(); } function gettitles($level,$source,&$titles) { return preg_match_all("/\n$level([\ \w].*)/",$source,$titles); } function splittree($level,$source) { return preg_split("/\n$level([\ \w].*)/", $source); } function slide($pagename,$slide) { global $SlideSoloFmt,$SlideList,$FmtV; $FmtV['$SlideContent'] = MarkupToHTML($pagename, $slide); $SlideList[] = FmtPageName($SlideSoloFmt, $pagename); } function hlist($t,$n,$level) { if ($level=='!!!!') $typenum='roman'; else $typenum='galpha'; for ($i=0;$i! $part3=splittree('!!!',$part2[$j]); // parts of level 3 array_shift($part3); for ($k=0;$k<$nblevel3;$k++) { if (($i!=0) and $TocInHeader)// production of tree for maps { $pref1=numtitle($i-1,'roman'); $pref2=numtitle($j-1,'galpha'); $l0="%class=gtitle%$gtitle"; $l1="!!".$pref1.$titles1[$i-1]; $l2=''; if ($titles2[$j-1]!='') $l2="!!!".$pref2.$titles2[$j-1]; $map="$l0\n$l1\n$l2"; } else $map=''; // first page (cover) slide($pagename,$map.$titles3[$k]."\n".$part3[$k]); } } } PrintFmt($pagename,$HandleSlideShowFmt); exit(); }