Changes between Version 25 and Version 26 of DownloadsPlugin


Ignore:
Timestamp:
Mar 22, 2015, 12:49:07 PM (9 years ago)
Author:
figaro
Comment:

Cosmetic changes

Legend:

Unmodified
Added
Removed
Modified
  • DownloadsPlugin

    v25 v26  
    11[[PageOutline(2-5, Contents, pullout)]]
    22
    3 = !DownloadsPlugin adds a downloads section to Trac
     3= Adds a downloads section to Trac
    44
    55== Description
    66
    7 This plugin provides downloads section which may contain releases or other files. It is administrated via WebAdminPlugin and there is an interface to the {{{trac-admin}}} tool that may help during automatic server maintenance. The Downloads section of Trac displays a table with information about the uploaded files such as description, component, version, size, architecture, type and optionally assigned tags which the download is related to. It also collects information about number of downloads which can be displayed on wiki page together with direct links to the specified download.
     7This plugin provides a downloads section which may contain releases or other files. It is administrated via WebAdminPlugin and there is an interface to the {{{trac-admin}}} tool that may help during automatic server maintenance. The Downloads section of Trac displays a table with information about the uploaded files such as description, component, version, size, architecture, type and optionally assigned tags which the download is related to. It also collects information about the number of downloads which can be displayed on a wiki page together with direct links to the specified download.
    88
    99== Bugs/Feature Requests
     
    1414If you have any issues, create a
    1515[http://trac-hacks.org/newticket?component=DownloadsPlugin new ticket] but read BugReporting page first, please.
     16
     17[[TicketQuery(component=DownloadsPlugin,group=type,format=progress)]]
    1618
    1719== Download
     
    2527== Dependencies
    2628
    27 !DownloadsPlugin for Trac 0.10 depends on WebAdminPlugin since many configuration options are avaiable only on apropriate WebAdminPlugin's pages. On Trac 0.11 this is supported by Trac itself. Optionally !DownloadsPlugin uses TagsPlugin for tags support.
     29!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.
    2830
    2931== Installation
    3032
    31 After installing plugin's egg you can set up few configuration variables in {{{trac.ini}}}. Their default values are:
     33After installing plugin's egg you can set up few configuration variables in the `trac.ini` file. Their default values are:
    3234
    3335{{{#!ini
     
    4749}}}
    4850
    49 Variable {{{title}}} sets text of main navigation bar button. {{{path}}} is location where uploaded downloads are stored. It has to be accessible for writing to web server. Setting {{{ext}}} variable restricts allowed extensions of uploaded files. If {{{unique_filename}}} is enabled, plugin checks if file name of download file is not already occupied by any other download file. {{{visible_fields}}} variable controls appearance of downloads table columns in Downloads section. Finally, {{{consoleadmin_user}}} option serves for permission checks when listing, adding or removing downlads using {{{trac-admin}}}. This option is available only in 0.12 branch. Another option available only in 0.12 branch is {{{additional_tags}}} that configures from which fields should be also generated download tags.
     51Option values:
     52 * Variable {{{title}}} sets text of main navigation bar button.
     53 * The {{{path}}} is the location where the uploaded downloads are stored. It has to be accessible for writing to web server.
     54 * Setting {{{ext}}} variable restricts allowed extensions of uploaded files.
     55 * 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.
     56 * {{{visible_fields}}} variable controls appearance of downloads table columns in Downloads section.
     57 * {{{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.
     58 * Another option available only in 0.12 branch is {{{additional_tags}}} that configures from which fields the download tags should be also generated.
    5059
    5160'''Note:''' {{{ext}}} and {{{visible_fields}}} options have changed to comma separated lists in 0.12 branch of the plugin.
    5261
    53 If you run Trac in an environment which needs to enable plugins explicitly, put in {{{trac.ini}}} these lines:
     62If you run Trac in an environment which needs to enable plugins explicitly, add the following lines in the `trac.ini` file:
    5463
    5564{{{#!ini
     
    6776}}}
    6877
    69 In 0.12 branch, the {{{DownloadsCore}}} component was splited into the {{{DownloadsDownloads}}} component, which handles Downloads section of Trac, and the {{{DownloadsCore}}} component that serves file download requests and other core features. This means that you can disable the {{{DownloadsDownloads}}} component to hide Downloads section from users. {{{admin}}} module was renamed to {{{consoleadmin}}}.
     78In 0.12 branch, the {{{DownloadsCore}}} component was split into the {{{DownloadsDownloads}}} component, which handles Downloads section of Trac, and the {{{DownloadsCore}}} component that serves file download requests and other core features. This means that you can disable the {{{DownloadsDownloads}}} component to hide Downloads section from users. {{{admin}}} module was renamed to {{{consoleadmin}}}.
    7079
    7180The next step is to upgrade your Trac environment:
    7281
    7382{{{#!sh
    74 # trac-admin <path_to_environment> upgrade
     83trac-admin <path_to_environment> upgrade
    7584}}}
    7685
     
    8392== Permissions
    8493
    85 !DownloadsPlugin defines three permissions: {{{DOWNLOADS_VIEW}}} for normal users and {{{DOWNLOADS_ADD}}} and {{{DOWNLOADS_ADMIN}}} for people who uploads and administrates downloads. {{{DOWNLOADS_ADD}}} permission is implemented since 0.12 branch and allows user to upload downloads without access to WebAdmin interface.
     94!DownloadsPlugin defines three permissions:
     95 1. {{{DOWNLOADS_VIEW}}} for normal users.
     96 1. {{{DOWNLOADS_ADD}}} and {{{DOWNLOADS_ADMIN}}} for people who upload and administrate downloads.     
     97 1. {{{DOWNLOADS_ADD}}} permission is implemented since the 0.12 branch and allows a user to upload downloads without access to the WebAdmin interface.
    8698
    87 You can grant them using these commands:
     99You can grant these permissions using these commands:
    88100
    89101{{{#!sh
    90 # trac-admin <path_to_environment> permission add <user> DOWNLOADS_VIEW
    91 # trac-admin <path_to_environment> permission add <user> DOWNLOADS_ADD # Branch 0.12 only.
    92 # trac-admin <path_to_environment> permission add <user> DOWNLOADS_ADMIN
     102trac-admin <path_to_environment> permission add <user> DOWNLOADS_VIEW
     103trac-admin <path_to_environment> permission add <user> DOWNLOADS_ADD # Branch 0.12 only.
     104trac-admin <path_to_environment> permission add <user> DOWNLOADS_ADMIN
    93105}}}
    94106
     
    123135== Inteface to `trac-admin`
    124136
    125 There is ability to list, insert or delete downloads from server's console/script with following commands:
     137There is the ability to list, insert or delete downloads from server's console/script with following commands:
    126138
    127139{{{#!sh
    128 # trac-admin <path_to_environment> download list
    129 # trac-admin <path_to_environment> download add <path_to_file> description=<description> \
     140trac-admin <path_to_environment> download list
     141trac-admin <path_to_environment> download add <path_to_file> description=<description> \
    130142    author=<author> tags="<tag1> <tag2> ..." component=<component> version=<version> \
    131143    architecture=<architecture> platform=<platform> type=<type>
    132 # trac-admin <path_to_environment> download remove <download_filename>
    133 # trac-admin <path_to_environment> download remove <download_id>
     144trac-admin <path_to_environment> download remove <download_filename>
     145trac-admin <path_to_environment> download remove <download_id>
    134146}}}
    135147
    136 All download attributes of {{{download add}}} command are optional only the file must be specified. {{{console_admin}}} {{{trac.ini}}} option must be setted to any user who has permission to do apropriate action.
     148All download attributes of {{{download add}}} command are optional, only the file must be specified. {{{console_admin}}} {{{trac.ini}}} option must be set to any user who has permission to perform the appropriate action.
    137149
    138150== Recent Changes