Wiki source code of Mos-Eisley Gallery

Version 8.1 by Normann P. Nielsen on 2026/11/15 15:43

Show last authors
1 This is my Gallery Site - I have created my own gallery scripts and Macro's - as no Confluence Plugins supports images in a filestructure.
2
3 {{success}}2018-01-03: Added Extraction of EXIF Tags - for GPS Position purpose - Read [[Extraction EXIF data from my Images>>Main.atlassian.atlassian-confluence.mos-eisley-gallery.extraction-exif-data-from-my-images]]
4
5 2015-09-20: Changed input for makeThumbs.sh to key=value usage and added orientation magic into it
6
7 2015-01-04: Changed input to key=value usage
8
9 2014-07-15 : Added the [[blazy>>http://dinbror.dk/blog/blazy/]] javascript to my site. This makes thumbnail load and display when needed instead of all thumbnails loaded when rendering a page (rendering 2000 small images takes a heck of time) - Read the [[Adding blazy to the Mos-Eisley Gallery>>Main.atlassian.atlassian-confluence.mos-eisley-gallery.adding-blazy-to-the-mos-eisley-gallery]] page
10
11 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
12
13 2013-09-15 : Putting ThumbSize and DisplaySize in the macro call, so these can be changed without breaking older pages{{/success}}
14
15 = Requirements =
16
17 === Software ===
18 [[Atlassian CLI>>https://bobswift.atlassian.net/wiki/display/ACLI/Atlassian+CLI+license]] (Notice the 3.X versions are not free, last free download versions at [[Atlassian CLI>>Main.atlassian.atlassian-confluence.atlassian-cli]]
19
20 [[Imagick>>http://www.imagemagick.org/script/index.php]] , [[exiftool>>https://www.sno.phy.queensu.ca/~phil/exiftool/]] and [[ffmpegthumbnailer>>http://code.google.com/p/ffmpegthumbnailer/]] installed, this can typically be done with a package manager for the OS.
21
22 A Ligthbox, this is optional, as the build-in can be used, but a custom one can be installed as in [[Installing Javascript libraries or frameworks in Confluence>>Main.atlassian.atlassian-confluence.mos-eisley-gallery.installing-javascript-libraries-or-frameworks-in-confluence]]
23
24 === Scripts ===
25 [[Configurations (config.txt)>>Main.atlassian.atlassian-confluence.mos-eisley-gallery.gallery-configurations-config-txt]]
26
27 [[Script for making thumbnail images (makeThumbs.sh)>>Main.atlassian.atlassian-confluence.mos-eisley-gallery.script-for-making-thumbnail-images-makethumbs-sh]]
28
29 [[Script for linking images into a Confluence page (updateGallery.sh)>>Main.atlassian.atlassian-confluence.mos-eisley-gallery.script-for-linking-images-into-a-confluence-page-updategallery-sh]]
30
31 Optional: [[Script for refreshing Confluence pages (refreshPages.sh)>>Main.atlassian.atlassian-confluence.mos-eisley-gallery.script-for-refreshing-confluence-pages-refreshpages-sh]]
32
33 === Files ===
34 Get the latest files [[https://bitbucket.org/moseiseydk/confluence-gallery]]
35
36 === User Macros ===
37 [[User Macro: make-top>>Main.atlassian.atlassian-confluence.user-macros.content-enhancement.user-macro-make-top]]
38
39 [[User Macro: go-top>>Main.atlassian.atlassian-confluence.user-macros.content-enhancement.user-macro-go-top]]
40
41 [[User Macro: me-video - Linking to a Video file>>Main.atlassian.atlassian-confluence.user-macros.images-video-and-lightboxes.user-macro-me-video-linking-to-a-video-file]]
42
43 __One__ of these User Macros If You have selected a custom lighbox ([[Installing Javascript libraries or frameworks in Confluence>>Main.atlassian.atlassian-confluence.mos-eisley-gallery.installing-javascript-libraries-or-frameworks-in-confluence]]):
44
45 [[User Macro: me-image - Image lightbox with prettyPhoto>>Main.atlassian.atlassian-confluence.mos-eisley-gallery.user-macro-me-image-image-lightbox-with-prettyphoto]]
46
47 [[User Macro: me-image - Image lightbox with Floatbox>>Main.atlassian.atlassian-confluence.mos-eisley-gallery.user-macro-me-image-image-lightbox-with-floatbox]]
48
49 [[User Macro: me-image - Image lightbox with Slimbox2>>Main.atlassian.atlassian-confluence.mos-eisley-gallery.user-macro-me-image-image-lightbox-with-slimbox2]]
50
51 [[User Macro: me-image - Image lightbox with OrangeBox>>Main.atlassian.atlassian-confluence.mos-eisley-gallery.user-macro-me-image-image-lightbox-with-orangebox]]
52
53 [[User Macro: me-image - Image lightbox with fancybox>>Main.atlassian.atlassian-confluence.mos-eisley-gallery.user-macro-me-image-image-lightbox-with-fancybox]]
54
55 Or use the one in Confluence:
56
57 [[User Macro: me-image - Image lightbox with Confluence style>>Main.atlassian.atlassian-confluence.mos-eisley-gallery.user-macro-me-image-image-lightbox-with-confluence-style]]
58
59 = The setup =
60
61 Install the Software and packages needed
62
63 Config Atlassian CLI (Set username, password and URL in confluence.sh)
64
65 Config Tomcat to support symbolic links (see [[this>>Main.atlassian.atlassian-confluence.utf-8-support-in-tomcat.tomcat-utf-8-issue]] currently  **unsolved** issue regarding special UTF-8 characters)
66
67 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.
68
69
70 {{code}}
71 ln -s /data/images $CONFLUENCE_HOME/confluence/media
72 {{/code}}
73
74
75
76 Create a Script directory and place the 3 scripts and the config.txt files into them
77
78 Edit the config.txt to fit Your installation
79
80 Create the User Macro [[me-image>>Main.atlassian.atlassian-confluence.mos-eisley-gallery.user-macro-me-image-image-lightbox-with-floatbox]] in Your Confluence installation (remember to set parameters // **ThumbSize** // and // **DisplaySize** // to the same as i config.txt)
81
82 Start adding pictures to Your installation using the updategallery.sh and optional refreshpages.sh scripts
83
84
85
86 = The workings =
87
88 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
89
90 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
91
92 When the script runs, it travels an entire directory-structure and :
93
94 * Creates thumbnails for the content (image or video) in a subdirectory called something with "thumbs"
95 * Adds a macro onto the specified Confluence page to show (render) the content (image or video)
96 * Finally, saves the page into Confluence
97
98
99 = Questions and Answers =
100
101 **Q: Is there a manuel maintenance between the config.txt and the me-image macro?**
102
103 A: Yes, the ** //ThumbSize// ** and ** //DisplaySize// ** numbers must match in the file and macro, otherwise images will give a 404 Error
104
105
106
107 **Q: My Thumbnail Image is not displayed?**
108
109 A: Check the following:
110
111 * Tomcat Linking is allowed:
112 The server.xml file has to be changed adding the allowedLinked parameter:
113
114
115
116 | ##<Context path=## ##""## ##docBase=## ##"../confluence"## ##debug=## ##"0"## ##reloadable=## ##"false"## ##useHttpOnly=## ##"true"## ##allowLinking=## ##"true"## ##>##
117 * The Paths etc in the macro on the Confluence Page - does it exist in the filesystem
118 * Permissions on the filesystem
119
120
121 **Q: Images are so slow...why?**
122
123 A: This can be bandwith, server hardware, memory - or the //DisplaySize //parameter - hence how large an image that must be fetched. 800 is default.
124
125
126
127 **Q: My image just opens in a new window, not popped up or via jQuery**
128
129 A: Either the ligtbox is not loaded, or the class and/or id on each images is wrong, consult the Lightbox documentation and [[Installing Javascript libraries or frameworks in Confluence>>Main.atlassian.atlassian-confluence.mos-eisley-gallery.installing-javascript-libraries-or-frameworks-in-confluence]]