Changes between Version 7 and Version 8 of DownloadsPlugin


Ignore:
Timestamp:
May 6, 2009, 6:59:59 PM (6 years ago)
Author:
Blackhex
Comment:

Finish of 0.12 branch documentation update.

Legend:

Unmodified
Added
Removed
Modified
  • DownloadsPlugin

    v7 v8  
    33== Description ==
    44
    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.
     5This 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.
    66
    77== Bugs/Feature Requests ==
     
    2323== Dependencies ==
    2424
    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.
     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.
    2626
    2727== Plugin Versions ==
     
    5454  architecture,platform,type # For 0.12 branch.
    5555unique_filename = False
    56 consoleadmin_user = anonymous # 0.12 branch only.
     56consoleadmin_user = anonymous # Branch 0.12 only.
    5757}}}
    5858
     
    6161'''Note:''' Don't miss that {{{ext}}} and {{{visible_fields}}} options has changed to comma separated lists in 0.12 branch of the plugin.
    6262
    63 If you run Trac in environment which needs to enable plugins explicitly put in trac.ini these lines:
     63If you run Trac in environment which needs to enable plugins explicitly put in {{{trac.ini}}} these lines:
    6464
    6565{{{
    6666[components]
    6767tracdownloads.api.DownloadsApi = enabled
    68 tracdownloads.admin.DownloadsWebAdmin = enabled
    6968tracdownloads.core.DownloadsCore = enabled
    7069tracdownloads.init.DownloadsInit = enabled
    7170tracdownloads.timeline.DownloadsTimeline = enabled
    7271tracdownloads.wiki.DownloadsWiki = enabled
     72tracdownloads.admin.DownloadsWebAdmin = enabled # Branch 0.10 and 0.11.
     73tracdownloads.webadmin.DownloadsWebAdmin = enabled # Branch 0.12 only.
     74tracdownloads.consoleadmin.DownloadsConsoleAdmin = enabled # Branch 0.12 only.
     75tracdownloads.core.DownloadsDownloads = enabled # Branch 0.12 only.
     76tracdownloads.tags.DownloadsTags = enabled # With TagsPlugin installed.
    7377}}}
     78
     79In 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}}}.
    7480
    7581The next step is to upgrade your environment:
     
    8187== Permissions ==
    8288
    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.
    8490
    8591You can grant them using these commands:
     
    8793{{{
    8894# 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.
    8996# trac-admin <path_to_environment> permission add <user> DOWNLOADS_ADMIN
    9097}}}
     
    9299== Macros ==
    93100
    94 There is only macro with two possible evocations for downloads referencing on wiki pages:
     101There are few wiki macros available:
    95102
    96103{{{
     
    98105[download:<download_filename> <text>]
    99106}}}
     107
     108Displays 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
     119Displays 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
     125Displays 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
     129There 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
     140All 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.
    100146
    101147== Recent Changes ==