Du ser en gammel version af denne side. Se den nuværende version.

Sammenlign med nuværende Vis sidehistorik

« Forrige Version 16 Næste »

This is my Gallery Site - I have created my own gallery scripts and Macro's - as no Confluence Plugins supports images in a filestructure.

Requirements

Software

Atlassian CLI (Notice the 3.X versions are not free, last free download versions at Atlassian CLI

Imagick and ffmpegthumbnailer installed, this can typically be done with a package manager for the OS.

Scripts

Gallery Configurations (config.txt)

Script for making thumbnail images (makeThumbs.sh)

Script for importing images into a Confluence page (updateGallery.sh)

Optional: Script for refreshing Confluence pages (refreshPages.sh)

User Macros

User Macro: make-top

User Macro: go-top

User Macro: me-video - Linking to a Video file 

One of these Lighboxes:

User Macro: me-image - Image lightbox with Floatbox

User Macro: me-image - Image lightbox with Slimbox2 

User Macro: me-image - Image lightbox with OrangeBox

User Macro: me-image - Image lightbox with fancybox

User Macro: me-image - Image lightbox with Confluence style

The setup

Install the Software and packages needed

Config Atlassian CLI (Set username, password and URL in confluence.sh)

Config Tomcat to support symbolic links

Create a Script directory and place the 3 scripts and the config.txt files into them

Edit the config.txt to fit Your installation

Start adding pictures to Your installation using the updategallery.sh and optional refreshpages.sh scripts

 

The workings

All content (Pictures and Video) are place on the servers filesystem in a Tree Structure, from a Basic root (called ContentRoot in the config.txt file)

All the top directories under the ContentRoot are linked into the Confluence installation by the makesymlinks.sh script)

For each top directory, a subdirectory or one or more phrases, a collection of content can be placed on a Confluence Page with the updategallery.sh script

When the script runs, it travels an entire directory-structure and :

  • Creates thumbnails for the content (image or video) in a subdir called something with "thumbs"
  • Adds a macro onto the specified Confluence page to show (render) the content (image or video)
  • Created a short link to the image - this link is md5 sum based, so even if the file changes name, the link will still work
  • Finally, saves the page into Confluence

 

Architecture

Architecture

Due to the architecture, a request to:

http://www.server.dk/links/6594565645694564056 will serve the regular file /data/images/Familiebilleder/2012/CIM2000.jpg and

http://www.server.dk/thumbs/200/6594565645694564056 will serve the regular file /data/images/Familiebilleder/2012/thumbs/200pxHigh/CIM2000.jpg

Questions and Answers

Q: Is there a manuel maintenance between the config.txt and the me-image macro?

A: Yes, the ThumbnailSize and DisplaySize numbers must match in the file and macro, otherwise the imagelinks will give 404

 

Q: My Thumbnail Image is not displayed?

A: Check the following:

  • Tomcat Linking is allowed
  • The Paths etc in the macro on the Confluence Page - does it exist in the filesystem
  • Permissions on the filesystem

 

Q: Images are so slow...why?

A: This can be bandwith, server hardware, memory - or the DisplaySize parameter - hence how large an image that must be fetched. 800 is default.

 

Q: Why does the me-image macro have both an parth/image-name and md5 sum parameter

A: The path/image-name is pure legacy, the md5 is the future workings, as this better supports moving images around in dirs, or renaming them.

  • Ingen etiketter