Script to Shortcode conversion

In the near future (expected in version 6.6.0) the old method of inserting wppa displays by means of wppa scripting will be discontinued.

As soon as you have updated to version 6.5.02 or later, you may see the following message on your admin screen:

4259

Posts and pages that contain depricated wppa scripts


If you see a box like this, it tells you exactly what posts and/or pages contain wppa scripts. The titles are links to edit the content, to make it as easy as possible to make the simple changes required.

The benefit of using shortcodes is that they can have attributes, just like html tags. This makes it possible to construct all kind of specifications like displaytype, album and/or photo selection etc. and place them inside the shortcode, whereby the sequence order of the attributes is irrelevant.

If you just want to convert, use this conversion tool:

Enter your script here:

Click the button to convert:
Copy / paste the result into your page / post:

If you want to learn more, read more...

Here is a simple example with attributes type and album, meaning: display a slideshow of album 3:
[wppa type="slide" album="3"][/wppa] This is the equivalence of %%wppa%% %%slide=3%%

Because it is too tricky to convert scripts by shortcodes automaticly (I do not want to write into your posts/pages content), you will have to convert any wppa scripts into wppa shortcodes yourself.

This page explains how to do this.

Basically a wppa script contains 4 tokens at the maximum:
1. %%wppa%%, the 'wake-up' code
2a. A combined token to specify what display type to display and what album to use.
2b. A combined token to specify what type single photo to display and which photo to use.
3. A size specification.
4. An align specification.

The conversion is very simple:

The 'wake-up' code

Basically the wppa shortcode is simply [wppa]
To conform with general standards, and to be prepared for future development, we always close the shortcode properly with [/wppa], just like html tags are closed, so our basic shortcode becomes: [wppa][/wppa]

So, if you have only %%wppa%% on your page, replace it by [wppa][/wppa]

The 'what' and 'which' code

The second script token converts to two shortcode attriutes: one defines the type of display, the second specifies the album or photo (selection) to be used.

Here is a list of conversions of all possible 2nd script tokens:

%%album=xx%% to show the contents of album xx converts to: type="album" album="xx"
%%cover=xx%% to show the cover of album xx converts to: type="cover" album="xx"
%%slide=xx%% to show a slideshow of the photos in album xx converts to type="slide" album="xx"
%%slideonly=xx%% to show a running slideshow of the photos in album xx without any surrounding navigation bars converts to type="slideonly" album="xx"
%%slideonlyf=xx%% to display a slideshow with a filmstrip only converts to type="slideonlyf" album="xx"
%%slidef=xx%% to show a slideshow with filmstrip even when filmstrip is switched off converts to type="slidef" album="xx"
%%photo=yy%% to show a single photo yy converts to type="photo" photo="yy"
%%mphoto=yy%% to show a single photo yy like a generic wp media photo with caption converts to type="mphoto" photo="yy"
%%slphoto=yy%% to show a single photo yy in the style of a slideshow converts to type="slphoto" photo="yy"

The 'size' code

%%size=zz%% converts to size="zz" IF zz = auto or z = a number greater than 100.
If the size is less than 100, replace it by a fraction. Example: %%size=75%% becomes size="0.75", meaning 75% of the available width. Make sure you use the decimal point, not the comma!

The 'align' code

%%align=left%% converts to align="left"
%%align=center%% converts to align="center"
%%align=right%% converts to align="right"

Examples

%%wppa%% %%album=7%% converts to
[wppa type="album" album="7"][/wppa]

%%wppa%% %%slide=7%% %%size=auto%% converts to
[wppa type="slide" album="7" size="auto"][/wppa]

%%wppa%% %%album=7%% %%size=450%% %%align=left%% converts to
[wppa type="album" album="7" size="450" align="left"][/wppa]

%%wppa%% %%album=7.9.11..14%% %%size=450%% %%align=left%% converts to
[wppa type="album" album="7.9.11..14" size="450" align="left"][/wppa]

%%wppa%% %%album=#topten,0,8%% %%size=450%% %%align=right%% converts to
[wppa type="album" album="#topten,0,8" size="450" align="right"][/wppa]

%%wppa%% %%cover=7%% %%size=80%% %%align=center%% converts to
[wppa type="cover" album="7" size="0.80" align="center"][/wppa]