Wiki source code of User Macro: me-image - Image lightbox with Flare
Last modified by Normann P. Nielsen on 2014/01/20 19:26
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://pixelentity.com/previews/components/flare/]] | ||
| 5 | |||
| 6 | |||
| 7 | |||
| 8 | Place this is Custom HTML | ||
| 9 | |||
| 10 | |||
| 11 | {{code}} | ||
| 12 | <!-- Flare --> | ||
| 13 | <link href="/flare/js/pe.flare/jquery.pixelentity.flare.min.css" rel="stylesheet"/> | ||
| 14 | <script type="text/javascript" src="/flare/js/pe.flare/jquery.pixelentity.flare.min.js"></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 | |||
| 30 | ## Default Thumb and Display Sizes: | ||
| 31 | #set($ThumbSizeDefault=200) | ||
| 32 | #set($DisplaySizeDefault=800) | ||
| 33 | |||
| 34 | |||
| 35 | #if (${paramthumbsize} != "" ) | ||
| 36 | #set($ThumbSizeDefault=${paramthumbsize}) | ||
| 37 | #end | ||
| 38 | |||
| 39 | |||
| 40 | #if (${paramdisplaysize} != "" ) | ||
| 41 | #set($DisplaySizeDefault=${paramdisplaysize}) | ||
| 42 | #end | ||
| 43 | |||
| 44 | |||
| 45 | #set ($title=$parampath.replace("//", "")) | ||
| 46 | #set ($title=$title.replace("%20", "_")) | ||
| 47 | |||
| 48 | |||
| 49 | <a href="/media/${parampath}/thumbs/${DisplaySizeDefault}pxHigh/${paramimage}" data-target="flare" data-flare-gallery="${parampath}" data-flare-thumb="/media/${parampath}/thumbs/${ThumbSizeDefault}pxHigh/${paramimage}" tilte="${paramimage}" data-title="$title" data-description="$title"><img src="/media/${parampath}/thumbs/${ThumbSizeDefault}pxHigh/${paramimage}" /></a> | ||
| 50 | {{/code}} |