(no commit message)
[openafs-wiki.git] / TWiki / SlideShowPlugin.mdwn
1 # <a name="Slide Show Plugin"></a><a name=" Slide Show Plugin"></a> Slide Show Plugin
2
3 This plugin converts a topic with headings into a slideshow.
4
5 <div>
6   <ul>
7     <li><a href="#Introduction"> Introduction</a></li>
8     <li><a href="#Syntax Rules"> Syntax Rules</a><ul>
9         <li><a href="#How to Create a Slideshow"> How to Create a Slideshow</a></li>
10         <li><a href="#How to Create Your own Slide Tem"> How to Create Your own Slide Template</a></li>
11       </ul>
12     </li>
13     <li><a href="#Example"> Example</a><ul>
14         <li><a href="#Slide 1: Silly Sample Slideshow"> Slide 1: Silly Sample Slideshow</a></li>
15         <li><a href="#Slide 2: Agenda"> Slide 2: Agenda</a></li>
16         <li><a href="#Slide 3: Silly Introduction"> Slide 3: Silly Introduction</a><ul>
17             <li><a href="#Comments"> Comments</a></li>
18           </ul>
19         </li>
20         <li><a href="#Slide 4: Silly Feature"> Slide 4: Silly Feature</a></li>
21         <li><a href="#Slide 5: Silly Conclusion"> Slide 5: Silly Conclusion</a></li>
22       </ul>
23     </li>
24     <li><a href="#%TOPIC% Global Settings"> %TOPIC% Global Settings</a></li>
25     <li><a href="#Default Slide Template"> Default Slide Template</a></li>
26     <li><a href="#Plugin Installation Instructions"> Plugin Installation Instructions</a></li>
27     <li><a href="#Plugin Info"> Plugin Info</a></li>
28   </ul>
29 </div>
30
31 ## <a name="Introduction"></a> Introduction
32
33 There is already a defacto standard for presentations, why this plugin? This plugin makes sense for organizations that do already have lots of content in TWiki: It is easy to create a web based presentation that contains many links to related content. The plugin does not try to compete with the bells and whistles of the other presentation program, but the markup of TWiki and other plugins like TWiki:Plugins/ChartPlugin, TWiki:Plugins/GaugePlugin, TWiki:Plugins/SpreadSheetPlugin, TWiki:Plugins/TWikiDrawPlugin can be used to create appealing presentations.
34
35 Any topic with headings can be converted into a slideshow. Each slide starts with a `"---++"` heading. There are two modes to view a topic:
36
37 - Normal topic view mode: Headings and text is shown in the usual TWiki rendering, representing the outline of the slideshow. This mode is useful to print handouts.
38 - Presentation mode: Each heading with text is shown as a slide; the format is based on a slide template. Navigation buttons are added to go to the "First", "Previous", and "Next" slide. Slide navigation is quick because it is done with anchor jumps to the same page.
39
40 You can start the presentation by clicking on the "Start presentation" button.
41
42 ## <a name="Syntax Rules"></a> Syntax Rules
43
44 ### <a name="How to Create a Slideshow"></a> How to Create a Slideshow
45
46 - Start with `%SLIDESHOWSTART%`
47   - Use the optional `template` parameter to specify your own slide template topic, e.g. `%SLIDESHOWSTART{ template="MyOwnSlideTemplate" }%`
48 - Create the slides. Start each slide with a `"---++"` heading and add text like paragraphs, bullets, tables and images.
49   - **_Hint:_** Make sure to keep each slide short enough so that you do not need to scroll to see all text of a slide during the presentation.
50   - **_Note:_** You can use any heading level you like, but use the same for all slides.
51 - End your slideshow with `%SLIDESHOWEND%`
52
53 ### <a name="How to Create Your own Slide Tem"></a> How to Create Your own Slide Template
54
55 To create your own template topic, copy the "Default Slide Template" section below into your own slide template topic and customize it to your needs. It can be activated as the default template in the plugin's `TEMPLATE` setting, or per slideshow with the `%SLIDESHOWSTART{ template="MyOwnSlideTemplate" }%` setting.
56
57 - Use an HTML table that defines a slide. For example, create one row for the slide title, another one for the slide text.
58 - These keywords can be used: <table border="1" cellpadding="0" cellspacing="0">
59   <tr>
60     <th bgcolor="#99CCCC"><strong> Keyword </strong></th>
61     <th bgcolor="#99CCCC"><strong> What it means </strong></th>
62   </tr>
63   <tr>
64     <td><code>%SLIDETITLE%</code></td>
65     <td> The heading of the slide </td>
66   </tr>
67   <tr>
68     <td><code>%SLIDETEXT%</code></td>
69     <td> The text of the slide </td>
70   </tr>
71   <tr>
72     <td><code>%SLIDECOMMENT%</code></td>
73     <td> The comment of the slide (optional; appended to slide of missing) </td>
74   </tr>
75   <tr>
76     <td><code>%SLIDENUM%</code></td>
77     <td> The current slide number </td>
78   </tr>
79   <tr>
80     <td><code>%SLIDEMAX%</code></td>
81     <td> The last slide number </td>
82   </tr>
83   <tr>
84     <td><code>%SLIDENAV%</code></td>
85     <td> The navigation buttons for "First", "Previous", "Next" slide </td>
86   </tr>
87   <tr>
88     <td><code>%SLIDENAVALL%</code></td>
89     <td> The navigation buttons for "First", "Previous", "Next", "Last" slide </td>
90   </tr>
91   <tr>
92     <td><code>%SLIDENAVFIRST%</code></td>
93     <td> The navigation button for "First slide" </td>
94   </tr>
95   <tr>
96     <td><code>%SLIDENAVPREV%</code></td>
97     <td> The navigation button for "Previous slide" </td>
98   </tr>
99   <tr>
100     <td><code>%SLIDENAVNEXT%</code></td>
101     <td> The navigation button for "Next slide" </td>
102   </tr>
103   <tr>
104     <td><code>%SLIDENAVLAST%</code></td>
105     <td> The navigation button for "Last slide" </td>
106   </tr>
107 </table>
108 - Only text between `%STARTINCLUDE%` and `%STOPINCLUDE%` is used for the template.
109
110 ## <a name="Example"></a> Example
111
112 This is a short example of a slideshow. You should see a "Start presentation" button if this plugin is installed:
113
114 <a name="StartPresentation"></a> <span>[[Main/WebHome?slideshow=on;skin=print#GoSlide1]]</span>
115
116 ### <a name="Slide 1: Silly Sample Slideshow"></a> Slide 1: Silly Sample Slideshow
117
118 %BR%
119
120 <center> By TWiki:Main/PeterThoeny <p> San Jose, 29 Sep 2007 </p>
121 </center>
122
123 ### <a name="Slide 2: Agenda"></a> Slide 2: Agenda
124
125 - Silly Introduction
126 - Silly Feature
127 - Silly Conclusion
128
129 ### <a name="Slide 3: Silly Introduction"></a> Slide 3: Silly Introduction
130
131 - why foo bar
132 - blah blah
133
134 #### <a name="Comments"></a> Comments
135
136 - This text is not shown in the slide if HIDECOMMENTS is set to on.
137
138 ### <a name="Slide 4: Silly Feature"></a> Slide 4: Silly Feature
139
140 - it's foo bar
141 - more foo bar
142
143 ### <a name="Slide 5: Silly Conclusion"></a> Slide 5: Silly Conclusion
144
145 - foo is bar
146 - bar is foo
147
148 This text is not part of the slideshow
149
150 ## <a name="%TOPIC% Global Settings"></a> %TOPIC% Global Settings
151
152 Plugin settings are stored as preferences variables. To reference a plugin setting write <code>**%&lt;plugin&gt;\_&lt;setting&gt;%**</code>, i.e. <code>**%SLIDESHOWPLUGIN\_SHORTDESCRIPTION%**</code>
153
154 - One line description, is shown in the %SYSTEMWEB%.TextFormattingRules topic:
155   - Set SHORTDESCRIPTION = Create web based presentations based on topics with headings.
156
157 - Debug plugin: (See output in `data/debug.txt`)
158   - Set DEBUG = 0
159
160 - Default template for slides:
161   - Set TEMPLATE = [[SlideShowPlugin]]
162
163 - Hide text starting with a `---+++ Comments` heading:
164   - Set HIDECOMMENTS = on
165
166 ## <a name="Default Slide Template"></a> Default Slide Template
167
168 The part between the rulers defines the default format of a slide:
169
170 ----
171
172 <table border="0" cellpadding="5" cellspacing="0" width="100%">
173   <tr bgcolor="#003399">
174     <td valign="middle" width="2%"><img alt="TWiki Slide Show" border="0" src="http://www.dementia.org/twiki//view/%WEB%/SlideShowPlugin/logo.gif" /></td>
175     <td valign="middle"><font color="#FFFFFF" size="+3">%SLIDETITLE%</font></td>
176     <td align="right" valign="middle"> %SLIDENAVNEXT%</td>
177   </tr>
178 </table>
179 <table border="0" cellpadding="3" cellspacing="0" width="100%">
180   <tr bgcolor="#FFFF99">
181     <td width="1"><img alt="" height="480" src="http://www.dementia.org/twiki//view/%WEB%/SlideShowPlugin/clearpixel.gif" width="1" /></td>
182     <td valign="top"> %BR% <font color="#003399" size="+2"> %SLIDETEXT% </font></td>
183   </tr>
184 </table>
185 <table border="0" cellpadding="0" cellspacing="0" width="100%">
186   <tr bgcolor="#FFFFCC">
187     <td valign="middle"> %SLIDENAVALL% </td>
188     <td align="right" valign="middle"><font color="#666666" size="-1">Slide %SLIDENUM% of %SLIDEMAX%</font></td>
189     <td align="right" valign="middle"><font color="#666666" size="-2"> COPYRIGHT © 2010 by the contributing authors </font></td>
190   </tr>
191 </table>
192
193 ----
194
195 ## <a name="Plugin Installation Instructions"></a> Plugin Installation Instructions
196
197 **_Note:_** You do not need to install anything on the browser to use this plugin. The following instructions are for the administrator who installs the plugin on the server where TWiki is running.
198
199 - Download the ZIP file from the Plugin Home (see below)
200 - Unzip <code>**%TOPIC%.zip**</code> in your twiki installation directory. Content: <table border="1" cellpadding="0" cellspacing="0">
201   <tr>
202     <th bgcolor="#99CCCC"><strong> File: </strong></th>
203     <th bgcolor="#99CCCC"><strong> Description: </strong></th>
204   </tr>
205   <tr>
206     <td><code><b>data/TWiki/%TOPIC%.txt</b></code></td>
207     <td> Plugin topic </td>
208   </tr>
209   <tr>
210     <td><code><b>lib/TWiki/Plugins/%TOPIC%.pm</b></code></td>
211     <td> Plugin Perl module </td>
212   </tr>
213   <tr>
214     <td><code><b>lib/TWiki/Plugins/%TOPIC%/SlideShow.pm</b></code></td>
215     <td> Plugin Perl module </td>
216   </tr>
217   <tr>
218     <td><code><b>pub/TWiki/*.gif</b></code></td>
219     <td> Various button image files </td>
220   </tr>
221 </table>
222 - TWiki 4.0 and up: Run the [configure](http://www.dementia.org/twiki//configure) script, and enable the plugin in the \{Plugins\} section.
223 - Test above example if the installation was successful.
224
225 ## <a name="Plugin Info"></a> Plugin Info
226
227 <table border="1" cellpadding="0" cellspacing="0">
228   <tr>
229     <td align="right"> Plugin Author: </td>
230     <td> TWiki:Main/PeterThoeny </td>
231   </tr>
232   <tr>
233     <td align="right"> Copyright: </td>
234     <td> © 2006-2007, Peter Thoeny, <a href="http://www.twiki.net/" target="_top">TWIKI.NET</a></td>
235   </tr>
236   <tr>
237     <td align="right"> License: </td>
238     <td> GPL (<a href="http://www.gnu.org/copyleft/gpl.html" target="_top">GNU General Public License</a>) </td>
239   </tr>
240   <tr>
241     <td align="right"> Plugin Version: </td>
242     <td> 02 Aug 2008 </td>
243   </tr>
244   <tr>
245     <td align="right"> Change History: </td>
246     <td>  </td>
247   </tr>
248   <tr>
249     <td align="right"> 02 Aug 2008: </td>
250     <td> Fixed corruption of preview </td>
251   </tr>
252   <tr>
253     <td align="right"> 29 Sep 2007: </td>
254     <td> Added %SYSTEMWEB%.VarSLIDESHOWSTART and %SYSTEMWEB%.VarSLIDESHOWEND to have them listed in %SYSTEMWEB%.TWikiVariables </td>
255   </tr>
256   <tr>
257     <td align="right"> 12 Feb 2007: </td>
258     <td> fixed construction of view urls (TWiki:Main/MichaelDaum) </td>
259   </tr>
260   <tr>
261     <td align="right"> 19 Nov 2006: </td>
262     <td> 12011: Preserve URL parameters in slideshow (suggested by TWiki:Main/ThomasWeigert); changed logo in default template to T-logo; fixed warning errors introduced by 1.005 </td>
263   </tr>
264   <tr>
265     <td align="right"> 16 Mar 2005: </td>
266     <td> 1.005 Crawford Currie prepped for Dakar, and fixed multiple evaluation bug </td>
267   </tr>
268   <tr>
269     <td align="right"> 21 Nov 2004: </td>
270     <td> 1.004 Added support for <code>%SLIDECOMMENT%</code> template keyword (TWiki:Main/ArthurClemens); added benchmarks </td>
271   </tr>
272   <tr>
273     <td align="right"> 21 Mar 2004: </td>
274     <td> Internal change: Fixed unofficial function call </td>
275   </tr>
276   <tr>
277     <td align="right"> 14 Dec 2002: </td>
278     <td> Added <code>%SLIDENAVALL%</code> template keyword; added HIDECOMMENTS setting </td>
279   </tr>
280   <tr>
281     <td align="right"> 23 Nov 2002: </td>
282     <td> Added <code>%SLIDENAVLAST%</code> template keyword; using print Skin for presentation mode </td>
283   </tr>
284   <tr>
285     <td align="right"> 19 Nov 2002: </td>
286     <td> Added "Start presentation" and "End presentation" buttons; added <code>%SLIDENAVFIRST%</code>, <code>%SLIDENAVPREV%</code>, <code>%SLIDENAVNEXT%</code> template keywords </td>
287   </tr>
288   <tr>
289     <td align="right"> 17 Nov 2002: </td>
290     <td> Initial version </td>
291   </tr>
292   <tr>
293     <td align="right"> CPAN Dependencies: </td>
294     <td> none </td>
295   </tr>
296   <tr>
297     <td align="right"> Other Dependencies: </td>
298     <td> none </td>
299   </tr>
300   <tr>
301     <td align="right"> Perl Version: </td>
302     <td> 5.005 </td>
303   </tr>
304   <tr>
305     <td align="right"> TWiki:Plugins/Benchmark: </td>
306     <td> %SYSTEMWEB%.GoodStyle 98%, %SYSTEMWEB%.FormattedSearch 99%, [[Main/SlideShowPlugin]] 99% </td>
307   </tr>
308   <tr>
309     <td align="right"> Plugin Home: </td>
310     <td><a href="http://TWiki.org/cgi-bin/view/Plugins/%TOPIC%" target="_top">http://TWiki.org/cgi-bin/view/Plugins/%TOPIC%</a></td>
311   </tr>
312   <tr>
313     <td align="right"> Feedback: </td>
314     <td><a href="http://TWiki.org/cgi-bin/view/Plugins/%TOPIC%Dev" target="_top">http://TWiki.org/cgi-bin/view/Plugins/%TOPIC%Dev</a></td>
315   </tr>
316   <tr>
317     <td align="right"> Appraisal: </td>
318     <td><a href="http://TWiki.org/cgi-bin/view/Plugins/%TOPIC%Appraisal" target="_top">http://TWiki.org/cgi-bin/view/Plugins/%TOPIC%Appraisal</a></td>
319   </tr>
320 </table>
321
322 **_Related Topics:_** %SYSTEMWEB%.TWikiPreferences, %SYSTEMWEB%.TWikiPlugins