Not logged in. · Lost password · Register
Forum: General Help and Support Features and Functionality RSS
Gallery plugin
Avatar
Xeenych #1
Member since Jul 2016 · 18 posts
Group memberships: Members
Show profile · Link to this post
Subject: Gallery plugin
Is it possible to make a gallery from individual images, not a whole namespace?

I try this, but images are shown in a column

{{gallery>:img00000021.jpg?lightbox&showtitle}}
{{gallery>:img00000022.jpg?lightbox&showtitle}}
{{gallery>:img00000024.jpg?lightbox&showtitle}}

Look here for example:
http://188.120.235.62/dokuwiki/doku.php
eilko #2
Member since Feb 2012 · 22 posts
Group memberships: Members
Show profile · Link to this post
{{gallery>images:vacation?image_*.jpg&80x80&crop&lightbox}}
This displays all images beginning with image_ and ending in .jpg from the namespace images:vacation. Thumbnails are cropped to 80×80 pixels and images will be opened in lightbox mode.

https://www.dokuwiki.org/plugin:gallery
Avatar
progzmaster #3
User title: Gábor Móczik
Member since Nov 2016 · 6 posts · Location: Hungary
Group memberships: Members
Show profile · Link to this post
Dear All!

I have the same problem!
Using the wildcard mode does not help for me, as I have to list the images in a specific order.
So is there a way to make the images appear in one row if listed individually as in the first post?

If the gallery plugin does not provide this functionality, is there any other which provides:
  - lightbox mode
  - can resize the image in a way that the whole image fits in a specified box
  - optional: can add caption to the image in wikitext (without editing EXIF/IPTC data)

I already checked a bunch of image plugins, but it seems none of them support the resizing mode I need.
I making an operations manual and I have both portrait and landscape images, so an exact
ordering is required and the whole image has to be seen, ie. it is not cropped in sides or in top/bottom, but it is resized to fit wholly in the box.

Thank you in advane!
Avatar
SFITCS #4
User title: Scott Ferguson
Member since Dec 2014 · 464 posts · Location: Canberra, Australia
Group memberships: Members
Show profile · Link to this post
1. How big is this "box"?
2. How are you creating the box?

I prep-end numbers to the image filenames to force the order they are shown by gallery.
1. Create a list of images in a directory
2. View those images in an image viewer (in my case by mounting the DokuWiki directory as a local filesystem using sshfs, and viewing with Gwenview). The order the images are viewed is the same order they are organised on the webserver filesystem, and shown by the gallery plugin. By viewing the directory of images in thumbnail mode I determine which order I want the images to appear.
3. Rearrange the order of those filenames in the list, then save the list.
4. Use the list to script the renaming of those files (in the list) by pre-pending an incremented number to the filename. (starting from 000). Or do the renumbering manually if there's not many files to rename (and you have time to spare).


[gently] It's called "hijacking" a thread when you add a question to a thread you didn't start. Please don't do it, create a new thread instead, even if the question in some way resembles to OP's question.
Avatar
progzmaster #5
User title: Gábor Móczik
Member since Nov 2016 · 6 posts · Location: Hungary
Group memberships: Members
Show profile · Link to this post
Hijacking:
Sorry, I thought it would make more sense to discuss this here as it looks really similar if not the same as the OP's problem, and it may helpful for him/her too.

My problem, and probably the OP's too, in general, is how to specify individual images to appear as a gallery.

1. How big is this "box"?
2. How are you creating the box?
I mean a thumbnail box that the plugin creates for me automatically. It seems that only the gallery plugin supports resizing into a box maximizing width or height whichever reaches the size first.

I thought of the image numbering and sorting based on filename but it does not good (at least for me) as the same image may be in different galleries (different views sharing some common images).

Since then I discovered two ways with the assistance of the Wrap plugin:
1. using standard styles
<WRAP group>
<WRAP column>{{gallery>img1.jpg}}</WRAP>
<WRAP column>{{gallery>img2.jpg}}</WRAP>
<WRAP column>{{gallery>img3.jpg}}</WRAP>
...
</WRAP>

2. customizing the template
Template:
div.dokuwiki div.gallery {
    clear: none;
    float: left;
}

Wiki markup
<WRAP>
{{gallery>img1.jpg}}
{{gallery>img2.jpg}}
{{gallery>img3.jpg}}
...
<WRAP clear/>
<WRAP>

The first one may work with any template, but so much noise around the content, not really enjoyable to edit.
The second one is acceptable for me, however I do not really like the <WRAP clear/> everywhere.
Avatar
SFITCS #6
User title: Scott Ferguson
Member since Dec 2014 · 464 posts · Location: Canberra, Australia
Group memberships: Members
Show profile · Link to this post
Using the wildcard mode does not help for me, as I have to list the images in a specific order.
Which is possible if you use image filenames with a number at the start.
If you want to display the images from one namespace in pages in multiple namespaces, in different orders - then you should have stated that when you asked your question - that way there would be a chance that the answer you get would solve your problem.
You could always copy the images to different namespaces and renumber them accordingly...
It seems that only the gallery plugin supports resizing into a box maximizing width or height whichever reaches the size first.
Huh? Using the thumbnail mode in gallery allows specifying the size of the image. The "box" size is determined by the image size you set. There's a difference.
Standard DokuWiki syntax allows resizing an image (and the WRAP plugin can be used to create custom styles that will do the same thing).
The first one may work with any template, but so much noise around the content, not really enjoyable to edit.
The second one is acceptable for me, however I do not really like the <WRAP clear/> everywhere.
Then use WRAP to create a custom style and apply that to your images.
div.dokuwiki div.gallery {
    clear: none;
    float: left;
}
Will break when you upgrade gallery....
$DokuWiki/conf/userstyle.css
div.dokuwiki div.gallery {
    clear: none !important;
    float: left !important;
}
Does the same thing, but won't break when you upgrade gallery (note that I'm just giving you an alternative implementation, not CSS that I'd apply/suggest).
The first one may work with any template, but so much noise around the content, not really enjoyable to edit.
I don't know what you mean by "noise around the content".

You can apply lightbox.js a number of ways; you can use userstyle.css and the WRAP plugin to apply custom styling (e.g. a caption, and image size); and there is a plugin that gives you a Wikipedia style box and caption; also when you use standard DokuWiki syntax to add an image that includes a link to the original image - the original will appear in a page that displays some EXIF data (and it should be possible to make that page display as a pop-up using userstyle.css).
Avatar
progzmaster #7
User title: Gábor Móczik
Member since Nov 2016 · 6 posts · Location: Hungary
Group memberships: Members
Show profile · Link to this post
then you should have stated that when you asked your question - that way there would be a chance that the answer you get would solve your problem.
No offense, but I already specified that I want to use individual filenames, not wildcards. Duplicating the images isn't a good solution either, it will increase the work of keeping everything intact. This is a knowledge base where things may change, gets reorganized at times, things are related but I want to tie them together as loosely as possible. Maintenance is as much important as the usefulness of the displayed content for the users.

Using the thumbnail mode in gallery allows specifying the size of the image.
I did not stated otherwise.  :-)

Will break when you upgrade gallery....
$DokuWiki/conf/userstyle.css
Thank you for the userstyle.css tip, I did not know that!
Anyway, I copied the default DokuWiki theme and I made every customization for our needs in there, I did not change any original code or CSS, so hopefully it won't break.

I don't know what you mean by "noise around the content"
I mean the too much formatting overhead which repeats everywhere, the ton of nested wraps and deep inside there is just a little content. I like the cleanest achiveable syntax where the wikitext remains easy to read.

You can apply lightbox.js a number of ways; you can use userstyle.css and the WRAP plugin to apply custom styling (e.g. a caption, and image size); and there is a plugin that gives you a Wikipedia style box and caption
I checked the Imagebox plugin already. It is nice, but I had two problems with it:
  - no lightbox (out of the box)
  - the thumbnail mode can only crop (out of the box)

I may have a look at the source and CSS to see how easy is to add these functionalities...
Until that I stick to Gallery, the above CSS and <WRAP clear/>...

Thank you for your help!
Avatar
SFITCS #8
User title: Scott Ferguson
Member since Dec 2014 · 464 posts · Location: Canberra, Australia
Group memberships: Members
Show profile · Link to this post
Quote by progzmaster:
I copied the default DokuWiki theme and I made every customization for our needs in there, I did not change any original code or CSS, so hopefully it won't break.
If you changed the copied theme (template) name and modified the strings in lib/tpl/$CopiedTheme/template.info.txt, and then selected your copied theme name in Admin->Configuration Settings->template that would be better than using conf/userstyle.css. i.e. you have created your own template (theme) which will survive updates to DokuWiki.
Note that userstyle.css only affects screen mode - as might the css you modified in your copied theme (template) depending on which css/less files you modified.
Close Smaller – Larger + Reply to this post:
Verification code: VeriCode Please enter the word from the image into the text field below. (Type the letters only, lower case is okay.)
Smileys: :-) ;-) :-D :-p :blush: :cool: :rolleyes: :huh: :-/ <_< :-( :'( :#: :scared: 8-( :nuts: :-O
Special characters:
Go to forum
Imprint
This board is powered by the Unclassified NewsBoard software, 20150713-dev, © 2003-2015 by Yves Goergen
Current time: 2019-12-14, 08:22:13 (UTC +01:00)