5 | | This plugin will provide downloads section which would contain release files. |
6 | | It will be administrable via WebAdminPlugin and would show information about uploaded files such as description, component and version which is related to, size, architecture, type, etc ... It will be collecting information about number of downloads too. |
7 | | |
8 | | Currently this plugin is NOT functional (in early stage of development)!!! |
| 5 | This plugin provides downloads section which may contain release or other files. It is administrable via WebAdminPlugin and shows informations 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. |
29 | | Not avaiable yet. |
| 25 | DownloadsPlugin depends on WebAdminPlugin since many configuration options are avaiable only on apropriate WebAdminPlugin's pages. Support for TagsPlugin is planned too. |
| 26 | |
| 27 | == Installation == |
| 28 | |
| 29 | After installing plugin's egg you can set up few configuration variables in {{{trac.ini}}}. Their default values are displayed bellow: |
| 30 | |
| 31 | {{{ |
| 32 | [downloads] |
| 33 | |
| 34 | title = Downloads |
| 35 | path = /var/lib/trac/downloads |
| 36 | ext = zip gz bz2 rar |
| 37 | visible_fields = id file description size time count author tags component version architecture platform type # Currently not implemented. |
| 38 | }}} |
| 39 | |
| 40 | Variable {{{title}}} sets text of main navigation bar button. {{{path}}} is location where uploaded downloads are stored. It has to be accesible for writing to web server. Setting {{{ext}}} variable restricts allowed extensions of uploaded files. Finally {{{visibled_field}}} variable controls appearance of downloads table columns in Downloads sections. |
| 41 | |
| 42 | If you run Trac in environment which needs to enable plugins explicitly put in trac.ini these lines: |
| 43 | |
| 44 | {{{ |
| 45 | [components] |
| 46 | tracdownloads.api.DownloadsApi = enabled |
| 47 | tracdownloads.admin.DownloadsWebAdmin = enabled |
| 48 | tracdownloads.core.DownloadsCore = enabled |
| 49 | tracdownloads.init.DownloadsInit = enabled |
| 50 | tracdownloads.timeline.DownloadsTimeline = enabled |
| 51 | tracdownloads.wiki.DownloadsWiki = enabled |
| 52 | }}} |
| 53 | |
| 54 | The next step is to upgrade your environment: |
| 55 | |
| 56 | {{{ |
| 57 | # trac-admin <path_to_environment> upgrade |
| 58 | }}} |
| 59 | |
| 60 | == Permissions == |
| 61 | |
| 62 | DownloadsPlugin defines two permissions {{{DOWNLOADS_VIEW}}} for normal users and {{{DOWNLOADS_ADMIN}}} for people who uploads and administrates downloads. |
| 63 | |
| 64 | You can grant them using these commands: |
| 65 | |
| 66 | {{{ |
| 67 | # trac-admin <path_to_environment> permission add <user> DOWNLOADS_VIEW |
| 68 | # trac-admin <path_to_environment> permission add <user> DOWNLOADS_ADMIN |
| 69 | }}} |
| 70 | |
| 71 | == Macros == |
| 72 | |
| 73 | There is only macro for downloads referencing on wiki pages: |
| 74 | |
| 75 | {{{ |
| 76 | [download:<download_id> <text>] |
| 77 | }}} |