Changes between Version 7 and Version 8 of DownloadsPlugin
- Timestamp:
- May 6, 2009, 4:59:59 PM (15 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
DownloadsPlugin
v7 v8 3 3 == Description == 4 4 5 This plugin provides downloads section which may contain release or other files. It is administrable via WebAdminPlugin and shows information about uploaded files such as description, component, version, size, architecture and type which is download related to. It collects information about number of downloads too.5 This plugin provides downloads section which may contain release or other files. It is administrable via WebAdminPlugin and there is inteface to {{{trac-admin}} tool that may help during automatic server maintanance. Dowloads section of the Trac shows table with information about uploaded files such as description, component, version, size, architecture, type and optionally assigned tags which is download related to. It also collects information about number of downloads which can be displayed on wiki page together with direct links to specified download. 6 6 7 7 == Bugs/Feature Requests == … … 23 23 == Dependencies == 24 24 25 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. OptionallyDownloadsPlugin uses TagsPlugin for tags support.25 !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. 26 26 27 27 == Plugin Versions == … … 54 54 architecture,platform,type # For 0.12 branch. 55 55 unique_filename = False 56 consoleadmin_user = anonymous # 0.12 branchonly.56 consoleadmin_user = anonymous # Branch 0.12 only. 57 57 }}} 58 58 … … 61 61 '''Note:''' Don't miss that {{{ext}}} and {{{visible_fields}}} options has changed to comma separated lists in 0.12 branch of the plugin. 62 62 63 If you run Trac in environment which needs to enable plugins explicitly put in trac.inithese lines:63 If you run Trac in environment which needs to enable plugins explicitly put in {{{trac.ini}}} these lines: 64 64 65 65 {{{ 66 66 [components] 67 67 tracdownloads.api.DownloadsApi = enabled 68 tracdownloads.admin.DownloadsWebAdmin = enabled69 68 tracdownloads.core.DownloadsCore = enabled 70 69 tracdownloads.init.DownloadsInit = enabled 71 70 tracdownloads.timeline.DownloadsTimeline = enabled 72 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. 73 77 }}} 78 79 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}}}. 74 80 75 81 The next step is to upgrade your environment: … … 81 87 == Permissions == 82 88 83 DownloadsPlugin defines two permissions: {{{DOWNLOADS_VIEW}}} for normal users and {{{DOWNLOADS_ADMIN}}} for people who uploads and administrates downloads.89 !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. 84 90 85 91 You can grant them using these commands: … … 87 93 {{{ 88 94 # trac-admin <path_to_environment> permission add <user> DOWNLOADS_VIEW 95 # trac-admin <path_to_environment> permission add <user> DOWNLOADS_ADD # Branch 0.12 only. 89 96 # trac-admin <path_to_environment> permission add <user> DOWNLOADS_ADMIN 90 97 }}} … … 92 99 == Macros == 93 100 94 There is only macro with two possible evocations for downloads referencing on wiki pages:101 There are few wiki macros available: 95 102 96 103 {{{ … … 98 105 [download:<download_filename> <text>] 99 106 }}} 107 108 Displays link to download identified by ID {{{<download_id>}}} or filename {{{<download_filename>}}} with text {{{<text>}}}. 109 110 {{{ 111 [[DownloadsCount(1)]] 112 [[DownloadsCount(1, 2, 3)]] 113 [[DownloadsCount(foo.zip)]] 114 [[DownloadsCount(1, foo.zip, bar.rar, 3)]] 115 [[DownloadsCount()]] 116 [[DownloadsCount(0)]] 117 }}} 118 119 Displays sum of number of downloads for downloads identified by comma separated list of IDs or filenames. If there is empty list or any zero (last two examples), sum of all number of downloads for all downloads is returned. Non-existing downloads silently counts as zero. Works with branch 0.12 only. 120 121 {{{ 122 [[ListDownloads()]] 123 }}} 124 125 Displays same table that is displayed in Downloads section of the Trac on a wiki page. Works with branch 0.12 only. 126 127 == Inteface to {{{trac-admin}}} == 128 129 There is ability to list, insert or delete downloads from server's console/script with following commands: 130 131 {{{ 132 # trac-admin <path_to_environment> download list 133 # trac-admin <path_to_environment> download add <path_to_file> description=<description> \ 134 author=<author> tags="<tag1> <tag2> ..." component=<component> version=<version> \ 135 architecture=<architecture> platform=<platform> type=<type> 136 # trac-admin <path_to_environment> download remove <download_filename> 137 # trac-admin <path_to_environment> download remove <download_id> 138 }}} 139 140 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. 141 142 == Notes == 143 144 * Branch 0.10 of the plugin is considered as deprecated and not developed anymore. 145 * Branch 0.11 is bug-fix only unless requested otherwise. 100 146 101 147 == Recent Changes ==