HTML Logo by World Wide Web Consortium (www.w3.org). Click to learn more about our commitment to accessibility and standards.

Moving forward with Composr

ocPortal has been relaunched as Composr CMS, which is now in beta. ocPortal 9 will be superseded by Composr 10.

Head over to compo.sr for our new site, and to our migration roadmap. Existing ocPortal member accounts have been mirrored.


ocPortal Tutorial: Advanced provision of downloads

Written by Chris Graham, ocProducts
The ocPortal download system is an advanced system, specifically designed to be an effective tool on sites with very large numbers of downloads. It is also integrated with the points system, which is useful for sites where members publish their own 'works' as downloads.



Getting the downloads onto the site

ocPortal provides three ways to get files into the download system, each appropriate for a different situation.

Uploading via web-form

The easiest way to add a file for a download is by attaching the file to the web-form, when the details of the download are defined. This is the most popular way, and is usually appropriate, however there are some major draw-backs (that are a result of the method, and not the fault of ocPortal):
  • Users with unreliable connections will not be able to resume the upload if it fails, and sometimes, it is hard to see if the upload has failed, or is just being slow
  • As far as we know none of the common web browsers show a progress monitor for the upload
  • PHP server settings often severely limit the maximum file size that may be uploaded

Uploading, and then referencing the URL

Thumbnail: Attaching a file to a download, and charging for it

Attaching a file to a download, and charging for it

If a file is too large to comfortably upload by web-form, users with FTP or SFTP/SCP access to the server may wish to upload it using this, and then provide the 'Add download' form with an equivalent HTTP URL (or the direct FTP URL) to the location they upload to.
The draw-backs with this method are:
  • It is less convenient than attaching directly
  • FTP/SFTP/SCP access is required and for obvious security reasons, these details are rarely given freely. Note that there is no restriction on actually uploading the file to your website's own server, so people may reference separate web space: but this leaves the download database integrity at the mercy of this secondary web space
  • The file is not contained in ocPortal, and thus cannot be managed by it (for example, deleted when the download is deleted)

Batch adding from an FTP server

Thumbnail: The FTP downloads interface

The FTP downloads interface

ocPortal includes a feature that allows staff to batch add files that are on an FTP server, into ocPortal, by FTP URL. This is particularly useful for adding large batches of downloads, where immediately making custom download descriptions available is not necessary.
The draw-backs with this method are:
  • Attractive descriptions have to be added separately
  • Only staff may perform this
  • The file is not contained in ocPortal, and thus cannot be managed by it (for example, deleted when the download is deleted)

Batch adding from a directory

ocPortal also includes a feature that allows staff to batch add files from a directory on the web server. For this to work, the directory must be accessible by URL.

The draw-backs with this method are:
  • Attractive descriptions have to be added separately
  • Only staff may perform this
  • The file is not contained in ocPortal, and thus cannot be managed by it (for example, deleted when the download is deleted)

Outmodeing

When a download in the download database has a new version released, either as a direct upgrade, or by some other means (such as being bundled in a wider package), the old download may be marked as 'outmoded' by the newer one.
To do this, the old download is edited such that the outmode field is set to point to the new one. When then viewed, the old download will provide a clear link to the new one.

Selling downloads

Thumbnail: A download 'for sale'

A download 'for sale'

A common example of a community that would benefit from this, is a community based around the 'modding' of a computer game, where members release 'modifications' for download. Such games include 'Quake', 'The Sims', and many others.
Members may add downloads, and charge for those downloads, using the 'submitter gets points' option. Thus with this, the creators are awarded for their work by the users, using a simple form of currency; this works two ways, much like real world economies do: members are encouraged to become the 'rich members' (as entrepreneurs) as well as to generally earn points (contribute to society).

Another example is a community based upon subscription: points could be bought via a service such as PayPal (ocPortal at the time of writing provides no specific support for this, but staff could manually allocate points based on PayPal transactions) and the website could require spending of these points to download files.





Concepts

outmode
Mark an entry as having been replaced by another one

See also