Changes between Version 35 and Version 36 of DownloadsPlugin


Ignore:
Timestamp:
Nov 28, 2016, 8:54:57 AM (5 years ago)
Author:
Ryan J Ollos
Comment:

Remove obsolete info about old versions and update config options.

Legend:

Unmodified
Added
Removed
Modified
  • DownloadsPlugin

    v35 v36  
    2929== Installation
    3030
    31 !DownloadsPlugin for Trac 0.10 depends on WebAdminPlugin, since many of the configuration options are available only on appropriate WebAdminPlugin's pages. On Trac 0.11 this is supported by Trac itself. Optionally !DownloadsPlugin uses TagsPlugin for tags support.
    32 
    3331General instructions on installing Trac plugins can be found on the [TracPlugins#InstallingaTracplugin TracPlugins] page.
    3432
    3533== Configuration
    3634
    37 After installing plugin's egg you can set up few configuration variables in the `trac.ini` file. Their default values are:
     35After installing the plugin you can set up configuration variables in `trac.ini`. Their default values are:
    3836
    3937{{{#!ini
    4038[downloads]
    41 path = /var/lib/trac/downloads
    42 ext = zip gz bz2 rar # For 0.10 and 0.11 branch.
    43 ext = zip,gz,bz2,rar # For 0.12 branch.
    44 additional_tags = author,component,version,architecture,platform,type # 0.12 branch only.
    45 visible_fields = id file description size time count author tags component version \
    46   architecture platform type # For 0.10 and 0.11 branch.
    47 visible_fields = id,file,description,size,time,count,author,tags,component,version, \
    48   architecture,platform,type # For 0.12 branch.
     39additional_tags = author,component,version,architecture,platform,\
     40                  type # If TagsPlugin is installed
     41architecture_sort = name
     42architecture_sort_direction = asc
     43consoleadmin_user = anonymous
     44download_sort = time
     45download_sort_direction = desc
     46ext = zip,gz,bz2,rar
     47max_size = 268697600
     48path = ../downloads
     49platform_sort = name
     50platform_sort_direction = asc
     51type_sort = name
     52type_sort_direction = asc
    4953unique_filename = False
    50 consoleadmin_user = anonymous # Branch 0.12 only.
     54visible_fields = id,file,description,size,time,count,author,tags,\
     55                 component,version,architecture,platform,type
    5156}}}
    5257
    5358Option values:
    54  * The {{{path}}} is the location where the uploaded downloads are stored. It has to be accessible for writing to web server.
    55  * Setting {{{ext}}} variable restricts allowed extensions of uploaded files.
    56  * If {{{unique_filename}}} is enabled, then the plugin checks if the file name of the download file is not already occupied by any other download file.
    57  * {{{visible_fields}}} variable controls appearance of downloads table columns in Downloads section.
    58  * {{{consoleadmin_user}}} option serves for permission checks when listing, adding or removing downloads using {{{trac-admin}}}. This option is available only in 0.12 branch.
    59  * Another option available only in 0.12 branch is {{{additional_tags}}} that configures from which fields the download tags should be also generated.
     59* The `path` is the location where the uploaded downloads are stored. It has to be accessible for writing to web server.
     60* Setting `ext` variable restricts allowed extensions of uploaded files.
     61* If `unique_filename` is enabled, then the plugin checks if the file name of the download file is not already occupied by any other download file.
     62* `visible_fields` variable controls appearance of downloads table columns in Downloads section.
     63* `consoleadmin_user` option serves for permission checks when listing, adding or removing downloads using `trac-admin`.
     64* `additional_tags` configures from which fields the download tags should be also generated.
    6065
    61 '''Note:''' {{{ext}}} and {{{visible_fields}}} options have changed to comma separated lists in 0.12 branch of the plugin.
    62 
    63 If you run Trac in an environment which needs to enable plugins explicitly, add the following lines in the `trac.ini` file:
     66Enable the plugin using the following in trac.ini:
    6467
    6568{{{#!ini
    6669[components]
    67 tracdownloads.api.DownloadsApi = enabled
    68 tracdownloads.core.DownloadsCore = enabled
    69 tracdownloads.init.DownloadsInit = enabled
    70 tracdownloads.timeline.DownloadsTimeline = enabled
    71 tracdownloads.wiki.DownloadsWiki = enabled
    72 tracdownloads.admin.DownloadsWebAdmin = enabled # Branch 0.10 and 0.11.
    73 tracdownloads.webadmin.DownloadsWebAdmin = enabled # Branch 0.12 only.
    74 tracdownloads.consoleadmin.DownloadsConsoleAdmin = enabled # Branch 0.12 only.
    75 tracdownloads.core.DownloadsDownloads = enabled # Branch 0.12 only.
    76 tracdownloads.tags.DownloadsTags = enabled # With TagsPlugin installed.
     70tracdownloads.* = enabled
    7771}}}
    7872
     
    9488
    9589This plugin defines the following permissions:
    96  1. {{{DOWNLOADS_VIEW}}} for normal users.
    97  1. {{{DOWNLOADS_ADD}}} and {{{DOWNLOADS_ADMIN}}} for people who upload and administrate downloads.
    98  1. {{{DOWNLOADS_ADD}}} permission is implemented since the 0.12 branch and allows a user to upload downloads without access to the WebAdmin interface.
     901. {{{DOWNLOADS_VIEW}}} for normal users.
     911. {{{DOWNLOADS_ADD}}} and {{{DOWNLOADS_ADMIN}}} for people who upload and administer downloads.
     921. {{{DOWNLOADS_ADD}}} permission allows a user to upload downloads without access to the WebAdmin interface.
    9993
    10094You can grant these permissions using these commands: