~kosova/+junk/tuxfamily-twiki

« back to all changes in this revision

Viewing changes to foswiki/lib/Foswiki/Plugins/SlideShowPlugin.pm

  • Committer: James Michael DuPont
  • Date: 2009-07-18 19:58:49 UTC
  • Revision ID: jamesmikedupont@gmail.com-20090718195849-vgbmaht2ys791uo2
added foswiki

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# Plugin for Foswiki - The Free and Open Source Wiki, http://foswiki.org/
 
2
#
 
3
# Copyright (C) 2002-2007 Peter Thoeny, peter@thoeny.org
 
4
# Copyright (C) 2008 Foswiki Contributors
 
5
#
 
6
# This program is free software; you can redistribute it and/or
 
7
# modify it under the terms of the GNU General Public License
 
8
# as published by the Free Software Foundation; either version 2
 
9
# of the License, or (at your option) any later version. For
 
10
# more details read LICENSE in the root of this distribution.
 
11
#
 
12
# This program is distributed in the hope that it will be useful,
 
13
# but WITHOUT ANY WARRANTY; without even the implied warranty of
 
14
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
15
# GNU General Public License for more details, published at
 
16
# http://www.gnu.org/copyleft/gpl.html
 
17
#
 
18
# As per the GPL, removal of this notice is prohibited.
 
19
 
 
20
package Foswiki::Plugins::SlideShowPlugin;
 
21
 
 
22
use vars qw(
 
23
        $web $topic $user $installWeb $VERSION $RELEASE $debug
 
24
    );
 
25
 
 
26
# This should always be $Rev: 4006 (2009-05-31) $ so that Foswiki can determine the checked-in
 
27
# status of the plugin. It is used by the build automation tools, so
 
28
# you should leave it alone.
 
29
$VERSION = '$Rev: 4006 (2009-05-31) $';
 
30
 
 
31
# This is a free-form string you can use to "name" your own plugin version.
 
32
# It is *not* used by the build automation tools, but is reported as part
 
33
# of the version number in PLUGINDESCRIPTIONS.
 
34
$RELEASE = '02 Aug 2008';
 
35
 
 
36
# =========================
 
37
sub initPlugin
 
38
{
 
39
    ( $topic, $web, $user, $installWeb ) = @_;
 
40
 
 
41
    # check for Plugins.pm versions
 
42
    if( $Foswiki::Plugins::VERSION < 1 ) {
 
43
        Foswiki::Func::writeWarning( "Version mismatch between SlideShowPlugin and Plugins.pm" );
 
44
        return 0;
 
45
    }
 
46
 
 
47
    return 1;
 
48
}
 
49
 
 
50
# =========================
 
51
sub commonTagsHandler
 
52
{
 
53
### my ( $text, $topic, $web ) = @_;   # do not uncomment, use $_[0], $_[1]... instead
 
54
    if( $_[0] =~ /%SLIDESHOWSTART/ ) {
 
55
        require Foswiki::Plugins::SlideShowPlugin::SlideShow;
 
56
        Foswiki::Plugins::SlideShowPlugin::SlideShow::init( $installWeb );
 
57
        $_[0] = Foswiki::Plugins::SlideShowPlugin::SlideShow::handler( @_ );
 
58
    }
 
59
}
 
60
 
 
61
1;