User Tools

Site Tools


nupusi:olatedownload:frontend

Olate Download Front End

The front end of your Olate Download installation is where all your files are listed, where comments can be added, where files can be searched and where visitors will download your files.

General

The front end is the part of the application that your visitors will view when browsing the site. As with the Administration panel, the interface is completely customisable.

General Interface

The default interface shows the categories and one level of child categories on the left with the file listing in the middle. A menu is present along the top blue bar.

Category Menu

The category menu displays the parent categories and the first level of their children. If children are present, the parent category becomes collapsable. The ordering of the categories is controlled from within the admin control panel. The total number of files within a child category is shown next to the category name if the Enable Count setting (General Settings via admin panel) is set to yes.

File Listing

The file listing shows each of the downloads displayed according to specific criteria (see below). Each download is contained within its own box. The information displayed includes the category, file name, short description, date added, file size and the total number of downloads.

Clicking the category name will take you to the listing of files within that category. Clicking on the name of the file or the View Full Info link will display further information about the file including comments and ratings. You can click on the x Downloads link and proceed to download that file immediately.

Your visitors can search your file database for specific files using the MySQL FULLTEXT searching functionality (MySQL 4.0.2+ only). The visitor enters their search term and the engine will search the filename, short and large descriptions.

Sorting

When viewing files within their parent category or when using the filter options, various sort options are displayed. These allow visitors to filter the ordering of the file listings. The sorting is allowed either by name, date, downloads or filesize.

File Details

When viewing further details about a file, similar information as in the main file listing is displayed. In addition to this, rating information and a listing of comments are available. There is also a link for users to report problems with files to the administrator. The user can rate and add comments to a file.

Rating/Comments

Olate Download 3 allows your visitors not only to rate your file listings but also to add their own comments.

Rating

Users can select a rating for a file on a scale of Lowest to Highest using radio buttons to make the selection. Once voted, the new file rating is calculated and displayed, and a cookie is set to prevent the user voting again.

Comments

Comments can be added by users to specific files. If comments are set to require approval (a setting in the admin panel), they will not appear on the site immediately, but will be entered into the moderation queue. Otherwise, they will appear immediately after submission. The e-mail address is only viewable by the administrator.

Various formatting tags can be used to add formatting to the comment as HTML is not allowed. Linebreaks are preserved along with the following code to format the comment:

Formatting Codes

RSS Feed

RSS (RDF Site Summary) allows you to remotely access the listings of files within your Olate Download installation. Olate Download 3 includes an RSS tool which allows you to display statistics and download listings on other pages of your site or on other websites.

rss.php

Once enabled via General Settings, if you load rss.php into your browser, you will see the RSS output. The default action is to show the number of latest files you specify in General Settings.

Each download is contained within its own <item> tag. For Example:

<item>
<title>Test</title>
<description>Test</description>
<link>http://www.example.com/upload/details.php?file=6</link>
<downloads>0</downloads>
</item>

Modes

Various options can be specified to display certain data:

Categories

By adding ?cat=x where x is the category number to the end of the url, you can list downloads within a specific category. For example, if you wanted to list all downloads in category 2, you would specify: http://www.example.com/upload/rss.php?cat=2.

Files

You can view data for a specific file by adding mode=2&file=x where x is the file ID number to the end of the URL. Information about the specified file ID will then be displayed. For example, if you wanted to view details about file 2, you would specify: http://www.example.com/upload/rss.php?mode=2&file=2.

Statistics

By appending mode=3 to the end of the URL, you can obtain the total downloads and total files counts. For example http://www.example.com/upload/rss.php?mode=3

Using the RSS feed

You can syndicate the RSS feed on your installation and access the data from tools such as Mozilla Thunderbird and Trillian. However, the most useful method is to place it on your own website. A very useful tool to allow you to do this within PHP is called MagpieRSS. This provides an easy to use RSS parser to allow you to display RSS feeds on your website how you wish.

Magpie is extremely easy to use - this is one of the major advantages it has. You simply include the rss_fetch.inc file then call the function. The feed you specify is then parsed and the data is placed into an array which you can then manipulate using normal PHP.

<?php
include('rss_fetch.inc');
$rss = fetch_rss('http://www.example.com/upload/rss.php');'
?>

The results of the fetch are stored in the $rss array. Magpie takes and absolutely non-validating approach to parsing the RSS feed, as long as it is well formed, Magpie will cheerfully parse new, and never before seen tags. For each element in your feed, Magpie will reference it by name in the array with each new item referenced by ID. It is easier to show you this than to explain it so create a PHP file with the following code in:

<?php
include('rss_fetch.inc');
$rss = fetch_rss('http://www.olate.co.uk/od3/demo/rss.php');
echo <pre>;
print_r($rss);
echo </pre>;
?>

Load the PHP file with the above code and you'll see how the array is organised, with each item in a new sub-array.

Continuing along this line, if you want to get the title of the very first file, you would have to reference the items object within the $rss array, specify the key 0, then the name title. This is easy to do:

<?php
echo $rss->items[0]['title'];
?>

You can find out the names you need to reference by using the example above where it echoes the entire array or by viewing the rss.php file.

An in depth tutorial explaining how to parse RSS is available at http://www.olate.com/articles/214.

Recommend a Friend

This feature allows your visitors to send an e-mail to their friends to inform them about a certain file - to recommend it. When enabled in the General Settings section a link will appear in the frontend “Recommend this file to a friend”. Clicking this reveals the options to enter in your own details and the details of the recipient. The recipient will then be e-mailed with the file details.

Every e-mail sent out is logged and a link is added to the e-mail to allow the recipient to block his e-mail address from receiving any further notices.

If you enable the “Require sender confirmirmation” option in General Settings, the sender will be emailed to check that the from email address is not fake, and will be required to click a link to a page which will then send the recommendation.

nupusi/olatedownload/frontend.txt · Last modified: 2008/12/06 13:56 (external edit)