Community Feedback

Information

[Proposal] Gallery macro: http://xwiki.markmail.org/thread/2ik62lcsijdtqpx5
[Discussion] Office Presentation Viewer: http://xwiki.markmail.org/thread/a2bgci4z34laliw4

Solution 1: Image Gallery

When importing or viewing an office presentation the Open Office server generates an image for each slide. It makes sense to show the presentation slides using an image gallery. Inspired by Galleria I made a simple image gallery.

Let's say we create a wiki page from a presentation file wiki30-wysiwyg.odp. Currently the generated wiki syntax looks like this:

image:wiki30-wysiwyg-slide0.jpg

image:wiki30-wysiwyg-slide1.jpg

image:wiki30-wysiwyg-slide2.jpg

Changing this into:

{{velocity}}
$xwiki.ssx.use('OfficePresentationViewer')##
$xwiki.jsx.use('OfficePresentationViewer')##
{{/velocity}}
(% class="gallery" %)(((
image:wiki30-wysiwyg-slide0.jpg

image:wiki30-wysiwyg-slide1.jpg

image:wiki30-wysiwyg-slide2.jpg
)))

will lead to:

Failed to execute the [velocity] macro. Cause: [The execution of the [velocity] script macro is not allowed in [incubator:Improvements.OfficePresentationViewer]. Check the rights of its last author or the parameters if it's rendered from another script.]. Click on this message for details.

The same result can be achieved with the office macro:

{{velocity}}
$xwiki.ssx.use('OfficePresentationViewer')##
$xwiki.jsx.use('OfficePresentationViewer')##
{{/velocity}}
(% class="gallery" %)(((
{{office attachment="wiki30-wysiwyg.odp"/}}
)))