=====""Slideshow2"" Handler===== >>==See also:== - Documentation: Slideshow2HandlerInfo ==works with:== - Wikka 1.1.6.2 & 1.1.6.3 & 1.1.6.4 >>//NOT included in any Wikka version//{{lastedit show="3"}} This is the development page for the ""Slideshow2"" handler. ===Installation=== - Save the first code block below as ##handlers/page/slideshow.php## - Give it the same file permissions as the other php files in that directory - Create a directory in ##3rdparty/plugins## called ##S5## - Download [[http://meyerweb.com/eric/tools/s5/v/1.1/s5-11.zip | this compressed file]] to the newly created ##S5## directory - Unzip the compressed archive inside the ##3rdparty/plugins/S5## directory - Modify ##3rdparty/plugins/S5/ui/default/slides.js## as shown on the second code block below - Modify ##libs/Wakka.class.php## as shown on the third code block below - Save the fourth code block below as ##3rdparty/plugins/S5/.htaccess## === Code === 1. New ##handlers/page/slideshow.php## file <<##handlers/page/slideshow.php##<< %%(php)HasAccess('read')) { print($this->Header(). '

'. ERROR_ACL_READ .'

'. $this->Footer()); } else { if ($this->page) { header("Content-type: text/html"); $theme_dir = '/3rdparty/plugins/S5/ui/default'; // render page $the_page = $this->Format($this->page['body'], 'wakka'); if (preg_match('/^.*?

(.*?)<\/h1>/i', $the_page, $matches)) // process title slide and gather meta-data { $slideshow_title = $matches[1]; if (preg_match("/

_author_(.*?)<\/h5>/i", $the_page, $matches2)) { $presenter_name = (isset($matches2[1]) ? trim($matches2[1]) : ''); $the_page = preg_replace("/
_author_.*?<\/h5>/i", "", $the_page); } if (preg_match("/
_affiliation_(.*?)<\/h5>/is", $the_page, $matches2)) { $presenter_affiliation = (isset($matches2[1]) ? trim($matches2[1]) : ''); $the_page = preg_replace("/
_affiliation_.*?<\/h5>/is", "", $the_page); } if (preg_match("/
_footer1_(.*?)<\/h5>/s", $the_page, $matches2)) { $footer1 = (isset($matches2[1]) ? trim($matches2[1]) : ''); $the_page = preg_replace("/
_footer1_.*?<\/h5>/s", "", $the_page); } if (preg_match("/
_footer2_(.*?)<\/h5>/s", $the_page, $matches2)) { $footer2 = (isset($matches2[1]) ? trim($matches2[1]) : ''); $the_page = preg_replace("/
_footer2_.*?<\/h5>/s", "", $the_page); } $the_page = preg_replace('/^.*?

(.*?)<\/h1>/', '', $the_page); } $the_page = preg_replace("/.*?

(.*?)<\/h1>/", "\n

$1

", $the_page); $the_page = preg_replace("/
\_handout_(.*?)<\/h5>/is", "
$1
", $the_page); ?> <?php echo htmlentities($slideshow_title, ENT_QUOTES); ?> '."\n"; ?>
'. $this->ReturnSafeHTML($slideshow_title) .'

'. $this->ReturnSafeHTML($presenter_name) .'

'. $this->ReturnSafeHTML($presenter_affiliation) .'

'; echo $the_page; } // if ($this->page) } ?>
%% 2. In ##3rdparty/plugins/S5/ui/default/slides.js##, go to line 384 and replace the following code block: %%(Javascript) controlsDiv.innerHTML = '
' + '