After I did the
Main.TWikiPlatformPresentation on Wednesday I was looking for a way to present the M$ PowerPoint slides in a "web presentable way". PowerPoint has an
HTML export function, but the code is just incredible large, generates way to many files and requires IE or Netscape.
Instead I was looking for a simple way that works with any browser. PowerPoint has an export to GIF function. Uploading all files to a Plugins.TWiki topic is easy, but how can we click through the files? We need two things:
- I created a new variable (not yet checked into Alpha) that gets a CGI parameter:
%URLPARAM{"name"}%. I.e. %URLPARAM{"skin"}% returns plain for a .../view/Codev/TWikiSlideShowEngine?skin=plain URL. Is for the skin parameter; click on the Print link below and you will see.
- The TWikiSpreadSheet plugin do do some calculations.
With that you can create a slide show topic and click through the slides.
Here is the
HTML code that calculates the previous slide number, current slide number and next slide number. It does check for boundaries.
<!-- start hiding
|R1|Number-of-slides:|54|Fileprefix:|Slide|Filesuffix:|.GIF|
|R2|get-parameters:|1|%-URLPARAM{"slide"}%|%-CALC{"$MAX(R2:C3..R2:C4)"}%|%-CALC{"$T(R2:C5)"}%|%-CALC{"$T(R1:C3)"}%|
|R3|calc-max-curr:|1|%-CALC{"$MIN(R2:C6..R2:C7)"}%|%-CALC{"$T(R3:C4)"}%|%CALC{"$T(R3:C4)"}%|%-CALC{"$T(R2:C7)"}%|
|R4|calc-prev&next:|1|%-CALC{"$INT($T(R3:C4)-1)"}%|%-CALC{"$T(R3:C5)"}%|%-CALC{"$INT($T(R3:C6)+1)"}%|%-CALC{"$T(R2:C7)"}%|
|R5|calc-min-prev,max-next:|1|%-CALC{"$MAX(R4:C3..R4:C4)"}%|%-CALC{"$T(R4:C5)"}%|%-CALC{"$MIN(R4:C6..R4:C7)"}%|%-CALC{"$T(R2:C7)"}%|
end hiding -->
Note: Remove the "-" from each variable, i.e. write
%CALC... instead of
%-CALC....
- To enter for each new slide show topic:
- The number of slides you have, in
$T(R1:C3)
- The GIF file prefix (before the consecutive number), in
$T(R1:C5)
- The GIF file suffix, in
$T(R1:C7)
- These values get calculated:
- The previous slide number, in
$T(R5:C4)
- The current slide number, in
$T(R5:C5)
- The next slide number, in
$T(R5:C6)
Add to above
HTML code the slide text:
<center>
<table border="0" cellspacing="0" cellpadding="0">
<tr><td align="center">
*[[%-SCRIPTURL%/view%-SCRIPTSUFFIX%/%-WEB%/%-TOPIC%?skin=plain&slide=1][ 1 ]]*
*[[%-SCRIPTURL%/view%-SCRIPTSUFFIX%/%-WEB%/%-TOPIC%?skin=plain&slide=%-CALC{"$T(R5:C4)"}%][ << ]]*
*Slide %-CALC{"$T(R5:C5)"}%*
*[[%-SCRIPTURL%/view%-SCRIPTSUFFIX%/%-WEB%/%-TOPIC%?skin=plain&slide=%-CALC{"$T(R5:C6)"}%][ >> ]]*
*[[%-SCRIPTURL%/view%-SCRIPTSUFFIX%/%-WEB%/%-TOPIC%?skin=plain&slide=%-CALC{"$T(R5:C7)"}%][ %-CALC{"$T(R5:C7)"}% ]]*
</td></tr><tr><td align="center">
<img src="%-PUBURLPATH%/%-WEB%/%-TOPIC%/%-CALC{"$T(R1:C5)"}%%-CALC{"$T(R5:C5)"}%%-CALC{"$T(R1:C7)"}%">
</td></tr>
</table>
</center>
And off you go!
--
PeterThoeny - 01 Jun 2001
We solved the same problem by adding a simple "BUTTON" tag that creates standard button images for "NEXT" and "PREVIOUS" buttons. (%BUTTON{image=next,link=WikiTopic}%. We created a sequence of topics using the powerpoint-generated GIFs and linked them using these buttons to create a browsable presentation
In wikicfg.pm:
$text =~ s/%BUTTON{(.*?)}%/&handleButton($1)/geo;
sub handleButton
{
my( $attributes ) = @_;
my $img = extractNameValuePair( $attributes, "image" );
my $link = extractNameValuePair( $attributes, "link" );
return "<a href=\"$link\"><img src=\"https://www.twiki.org/p/pub/images/$img.gif\" border=\"0\">
a>";
}
Not as complete a solution and a pain to add all those links, but OK for short training presentations.
--
CrawfordCurrie - 04 Jun 2001
- I am investigating building a powerpoint WebService that can return html given a ppt file:
http://groups.google.com/groups?hl=en&lr=&safe=off&ic=1&th=f3d17d7100a5dfbf,8&seekm=1864c31.0106030737.10b5711e%40posting.google.com#p
- Can you post the powerpoint version of your slideshow - I would like to post it around my firm.
Thanks. M.
--
MartinCleaver - 04 Jun 2001
The latest
TWikiAlphaRelease has now the new
%URLPARAM{"name"}% variable.
--
PeterThoeny - 08 Jun 2001