News:

Dear forum visitors, if the support forum is not available, please try again a few minutes later. Thanks!

Main Menu
Support-Forum

Preview files

Started by sean72, 10.09.2015 05:44:48

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

sean72

Maybe this is an easy question, but I cannot see how to set preview images for each downloadable file. I went to Downloads--Edit Download--Files Data (on the right side). I have preview jpgs for each document/download that can be downloaded.





Am I overlooking something in the documentation?
  •  

ColinM

Hi
You are probably not doing anything wrong! But there is probably a terminology problem.  I think there is a need to have some documentation here so I will do that soon.
For your immediate need hopefully the following will help.

First in jD a preview file is a sound or video clip, typically mp3 and mp4 files.  What you want are referred to as images and also as 'screenshots'. You can have up to ten images/Download.  They are loaded via the Images Tab when creating or editing a Download. 

Now suppose you have uploaded via the Images tab your 4 images.  As each image is uploaded jD automatically makes a thumbnail to the size you set in the Config - Pictures tab in the Thumbnails Settings section, which is near the end of the page.  Now you should also see a message in Green  Status: GD Library is present. If it is a message in red then there is a problem as your host does not have the requisite library.  But we can give guidance on that separately.  Whilst you are in that section scroll down a bit and see if your site has the Imagemagik php module loaded.   On the vast majority of sites both are present but if you are using XAMPP on your local PC you will find ImageMagik is not normally present.  However we only need the GD library for images.

Assuming all is well then when you see a download listed on the front end then only the first image is shown as a thumbnail.  Clicking on it will show the full size version.  Now to show more images you need to customise your Active Files Layout.  Usually the default active one is "Standard Files Layout without Checkboxes v2.5".  We will need to edit this layout.  Please checkout
http://www.jdownloads.net/documentations/item/editing-a-layout
http://www.jdownloads.net/documentations/item/which-layout-is-used-where
http://www.jdownloads.net/documentations/item/simple-example-of-layout-editing

Whatever you do always make a copy, edit it and make it the active one.  If you edit a Default version it could at some later date be overwritten by an update!!
Assuming we are using a copy of "Standard Files Layout without Checkboxes v2.5" called "Standard Files Layout without Checkboxes v2.5(2)"  then you will find a line

<td valign="top">{screenshot_begin}<a href="{screenshot}" rel="lightbox"> <img src="{thumbnail}" align="right" /></a>{screenshot_end}</td>

If you look on the righthand side of the layout page then you will instructions in red about adding extra images.
so add the line
{screenshot_begin2}<a href="{screenshot2}" rel="lightbox"> <img src="{thumbnail2}" align="right" /></a>{screenshot_end2}
after the first one.  Now it will show 2 images or rather thumbnails.  You can add several lines as indicated to show more images.  It does not matter if you have less actual images because jD will ignore the surplus code lines in the layout.

At this point you should be good to go.  You may wish to add extra css to position differently or similar but that is another story

Note on the Download Details view all 4 thumbnails would have shown anyway so you do not need to edit that layout.

Hope this helps.

Please keep me up with your progress or otherwise.  As I said above I will write an article based upon above notes.

Colin
Colin M
  •  

sean72

Thanks! Your instructions were clear and detailed. I do have a question. The adding "{screenshot_begin2}<a href="{screenshot2}" rel="lightbox"> <img src="{thumbnail2}" align="right" /></a>{screenshot_end2}" , what layout should this be made? Category, categories, files etc.

I can't seem to find "<td valign="top">{screenshot_begin}<a href="{screenshot}" rel="lightbox"> <img src="{thumbnail}" align="right" /></a>{screenshot_end}</td>"

Thanks again for your help!
  •  

ColinM

Hi
It is in the Files Layout - for example Standard Files Layout without Checkboxes v2.5
See attached pic
Colin

[gelöscht durch Administrator]
Colin M
  •  

sean72

It works! Thanks!
  •