1# See bottom of file for license and copyright information
2package Foswiki::Plugins::SlideShowPlugin;
3
4use strict;
5use warnings;
6
7use Foswiki::Request;
8
9BEGIN {
10    # Backwards compatibility for Foswiki 1.1.x
11    unless ( Foswiki::Request->can('multi_param') ) {
12        no warnings 'redefine';
13        *Foswiki::Request::multi_param = \&Foswiki::Request::param;
14        use warnings 'redefine';
15    }
16}
17
18our $VERSION = 2.32;
19our $RELEASE = '06 Sep 2016';
20our $SHORTDESCRIPTION =
21  'Create web based presentations based on topics with headings';
22our $NO_PREFS_IN_TOPIC = 1;
23
24our $core;
25
26sub initPlugin {
27
28    # check for Plugins.pm versions
29    if ( $Foswiki::Plugins::VERSION < 1 ) {
30        Foswiki::Func::writeWarning(
31            "Version mismatch between SlideShowPlugin and Plugins.pm");
32        return 0;
33    }
34    $core = undef;
35
36    return 1;
37}
38
39sub commonTagsHandler {
40### my ( $text, $topic, $web ) = @_;   # do not uncomment, use $_[0], $_[1]... instead
41    if ( $_[0] =~ m/%SLIDESHOWSTART/ ) {
42        unless ($core) {
43            require Foswiki::Plugins::SlideShowPlugin::SlideShow;
44            $core = new Foswiki::Plugins::SlideShowPlugin::SlideShow();
45        }
46        $_[0] = $core->renderSlideShow(@_);
47    }
48}
49
501;
51__END__
52Foswiki - The Free and Open Source Wiki, http://foswiki.org/
53
54Copyright (C) 2008-2016 Foswiki Contributors. Foswiki Contributors
55are listed in the AUTHORS file in the root of this distribution.
56NOTE: Please extend that file, not this notice.
57
58This program is free software; you can redistribute it and/or
59modify it under the terms of the GNU General Public License
60as published by the Free Software Foundation; either version 2
61of the License, or (at your option) any later version. For
62more details read LICENSE in the root of this distribution.
63
64This program is distributed in the hope that it will be useful,
65but WITHOUT ANY WARRANTY; without even the implied warranty of
66MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
67
68As per the GPL, removal of this notice is prohibited.
69