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

Sammenlign med nuværende Vis sidehistorik

« Forrige Version 37 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.

Versions

 

2014-01-16 : Upgraded to permanent multipage (1 for each subdir and 1 to include all), ThumbSize as command line argument and minor fixes to the code 

2013-09-15 : Putting ThumbSize and DisplaySize in the macro call, so these can be changed without breaking older pages

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

Configurations (config.txt)

Script for making thumbnail images (makeThumbs.sh)

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

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

Get files files-20130827.tar

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 prettyPhoto (Best, and actually free (tommel op) ) 

User Macro: me-image - Image lightbox with Floatbox (Best, not free for commercial sites)

User Macro: me-image - Image lightbox with Slimbox2 (Free, not good on mobile devices)

User Macro: me-image - Image lightbox with OrangeBox (Free)

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 (see this currently unsolved issue regarding special UTF-8 characters)

Link from Confluence to the MediaRoot (here called /data/images) - The "media" in the link is used in the "me-image" macro, these must match if changed.

ln -s /data/images $CONFLUENCE_HOME/confluence/media

 

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

Edit the config.txt to fit Your installation

Create the User Macro me-image in Your Confluence installation (remember to set parameters ThumbSize and DisplaySize to the same as i config.txt)

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 MediaRoot in the config.txt file) - This Root is symlinked into the Confluence base Url

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 subdirectory called something with "thumbs"
  • Adds a macro onto the specified Confluence page to show (render) the content (image or video)
  • Finally, saves the page into Confluence

 

Questions and Answers

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

A: Yes, the ThumbSize and DisplaySize numbers must match in the file and macro, otherwise images will give a 404 Error

 

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: My image just opens in a new window, not popped up or via jQuery

A: Either the ligtbox is not loaded, or the class and/or id on each images is wrong.

 

  • Ingen etiketter