Wiki source code of User Macro: me-image - Image lightbox with prettyPhoto
Last modified by Normann P. Nielsen on 2014/01/23 08:25
Hide last authors
| author | version | line-number | content |
|---|---|---|---|
| |
1.1 | 1 | |= Name| me-image |
| 2 | |= Macro Body Processing| No macro body | ||
| 3 | |= Output format| HTML | ||
| 4 | |= Lightbox| [[http://www.no-margin-for-errors.com/projects/prettyphoto-jquery-lightbox-clone/]] | ||
| 5 | |||
| 6 | |||
| 7 | |||
| 8 | Place this is Custom HTML | ||
| 9 | |||
| 10 | |||
| 11 | {{code}} | ||
| 12 | <!-- prettyPhoto --> | ||
| 13 | <link rel="stylesheet" href="/prettyphoto/css/prettyPhoto.css" type="text/css" media="screen" charset="utf-8" /> | ||
| 14 | <script src="/prettyphoto/js/jquery.prettyPhoto.js" type="text/javascript" charset="utf-8"></script> | ||
| 15 | {{/code}} | ||
| 16 | |||
| 17 | |||
| 18 | |||
| 19 | Macro Code | ||
| 20 | |||
| 21 | |||
| 22 | {{code}} | ||
| 23 | ## @param path:title=Status|type=string|required=true|desc=File Path | ||
| 24 | ## @param image:title=Status|type=string|required=true|desc=Image Name | ||
| 25 | ## @param group:title=Status|type=string|required=true|desc=Group | ||
| 26 | ## @param thumbsize:title=Thumbsize|type=string|required=false|desc=Thumbnail Size | ||
| 27 | ## @param displaysize:title=Displaysize|type=string|required=false|desc=Display Size | ||
| 28 | |||
| 29 | ## Default Thumb and Display Sizes: | ||
| 30 | #set($ThumbSizeDefault=200) | ||
| 31 | #set($DisplaySizeDefault=800) | ||
| 32 | |||
| 33 | #if (${paramthumbsize} != "" ) | ||
| 34 | #set($ThumbSizeDefault=${paramthumbsize}) | ||
| 35 | #end | ||
| 36 | |||
| 37 | #if (${paramdisplaysize} != "" ) | ||
| 38 | #set($DisplaySizeDefault=${paramdisplaysize}) | ||
| 39 | #end | ||
| 40 | |||
| 41 | #set ($title=$parampath.replace("//", "")) | ||
| 42 | #set ($title=$title.replace("%20", " ")) | ||
| 43 | #set ($title=$title.replace("/", " / ")) | ||
| 44 | |||
| 45 | <a href="/media/${parampath}/thumbs/${DisplaySizeDefault}pxHigh/${paramimage}" rel="prettyPhoto[${parampath}]"><img src="/media/${parampath}/thumbs/${ThumbSizeDefault}pxHigh/${paramimage}" alt="$title" /></a> | ||
| 46 | {{/code}} |