Gallery:模块:downloadlink

来自站长百科
跳转至: 导航、​ 搜索

Download link Module

Adds a set of download links to the 'action items' dropdown, one for each existing resize/thumbnail.


NOTE: Now updated to be compatible with Gallery 2.3 and later, ONLY.

Installation

  • Install and activate the module in site admin -> plugins
  1. login as admin
  2. select plugins from the left navigation, then select the Get More Plugins tab.
  3. Make sure that you select the Community Repository ("Show Repository List") and update the list of plugins ("Update Plugin List") if necessary.
  4. The download module should appear in the plugin list, under the "Export" section.
  • Once installed, you will have a set of new permission to allow items to be downloaded - one permission each for the thumbnail, the original sized image, and the resize(s). By default the 'everybody' group gets permission to download both the original and resizes (and set on the root album so applying globally) but of course you can change that.
  • Site Admins get all permissions throughout Gallery so they will see links for all possible downloads, regardless of which permissions are set.
  • The permissions for the download links are independent from the permissions to view the different sizes of images. So you can allow people to download the full sized picture even if they can't display it within a gallery page. If you allow a user to view a full size image but deny them permission for the download link remember that they can still download the picture by scraping the url from the Gallery photo page's html or by looking in their browser cache.

Screen shots

文件:DL Prompt.png Download Prompt in Fire Fox browser


文件:DL permissions.png Permissions for the item.


文件:Action download.png Action items dropdown

Theme customisation

To add a link to download the full image on the photo page add this to the photo.tpl file:

    <a href="{g->url arg1="view=downloadlink.OfferDownload" arg2="itemId=`$theme.item.id`"}">
    Download and save full image</a>

Please note: if you use this way of placing a link, the download will be of the original original item, not the 'preferred' original item, so without watermarks, rotations or other image manipulations that have been applied to the 'original'. Download the original size from the Item Actions menu does include watermarks etc.

Notes