Changes between Version 25 and Version 26 of DownloadsPlugin
- Timestamp:
- Mar 22, 2015, 12:49:07 PM (9 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
DownloadsPlugin
v25 v26 1 1 [[PageOutline(2-5, Contents, pullout)]] 2 2 3 = !DownloadsPlugin adds a downloads section to Trac3 = Adds a downloads section to Trac 4 4 5 5 == Description 6 6 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 onwiki page together with direct links to the specified download.7 This 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. 8 8 9 9 == Bugs/Feature Requests … … 14 14 If you have any issues, create a 15 15 [http://trac-hacks.org/newticket?component=DownloadsPlugin new ticket] but read BugReporting page first, please. 16 17 [[TicketQuery(component=DownloadsPlugin,group=type,format=progress)]] 16 18 17 19 == Download … … 25 27 == Dependencies 26 28 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. 28 30 29 31 == Installation 30 32 31 After installing plugin's egg you can set up few configuration variables in {{{trac.ini}}}. Their default values are:33 After installing plugin's egg you can set up few configuration variables in the `trac.ini` file. Their default values are: 32 34 33 35 {{{#!ini … … 47 49 }}} 48 50 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. 51 Option 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. 50 59 51 60 '''Note:''' {{{ext}}} and {{{visible_fields}}} options have changed to comma separated lists in 0.12 branch of the plugin. 52 61 53 If you run Trac in an environment which needs to enable plugins explicitly, put in {{{trac.ini}}} these lines:62 If you run Trac in an environment which needs to enable plugins explicitly, add the following lines in the `trac.ini` file: 54 63 55 64 {{{#!ini … … 67 76 }}} 68 77 69 In 0.12 branch, the {{{DownloadsCore}}} component was split edinto 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}}}.78 In 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}}}. 70 79 71 80 The next step is to upgrade your Trac environment: 72 81 73 82 {{{#!sh 74 #trac-admin <path_to_environment> upgrade83 trac-admin <path_to_environment> upgrade 75 84 }}} 76 85 … … 83 92 == Permissions 84 93 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. 86 98 87 You can grant the musing these commands:99 You can grant these permissions using these commands: 88 100 89 101 {{{#!sh 90 #trac-admin <path_to_environment> permission add <user> DOWNLOADS_VIEW91 #trac-admin <path_to_environment> permission add <user> DOWNLOADS_ADD # Branch 0.12 only.92 #trac-admin <path_to_environment> permission add <user> DOWNLOADS_ADMIN102 trac-admin <path_to_environment> permission add <user> DOWNLOADS_VIEW 103 trac-admin <path_to_environment> permission add <user> DOWNLOADS_ADD # Branch 0.12 only. 104 trac-admin <path_to_environment> permission add <user> DOWNLOADS_ADMIN 93 105 }}} 94 106 … … 123 135 == Inteface to `trac-admin` 124 136 125 There is ability to list, insert or delete downloads from server's console/script with following commands:137 There is the ability to list, insert or delete downloads from server's console/script with following commands: 126 138 127 139 {{{#!sh 128 #trac-admin <path_to_environment> download list129 #trac-admin <path_to_environment> download add <path_to_file> description=<description> \140 trac-admin <path_to_environment> download list 141 trac-admin <path_to_environment> download add <path_to_file> description=<description> \ 130 142 author=<author> tags="<tag1> <tag2> ..." component=<component> version=<version> \ 131 143 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>144 trac-admin <path_to_environment> download remove <download_filename> 145 trac-admin <path_to_environment> download remove <download_id> 134 146 }}} 135 147 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.148 All 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. 137 149 138 150 == Recent Changes