How To Create An Affiliate Review Site
|
|
« Review Foundry User Manual
|
Tutorial Table Of Contents
|
Obtain Review Foundry »
ADDING ITEMSAdding an ItemAdding an item is a little simpler than adding a category. But the process is very similar. Here we will see Clare add the DVD "The Jungle Book" to her Kids & Family > Disney category. She starts by firing up the Category Browser again and navigating her way to the category:
At this stage, since all categories are still empty the number appearing beside a category name is zero in the Category Browser. The default view on the right side of the page consists of just the navigation bar which looks something like this:
The final link in this navigation bar allows access to the page where an item can be added. Clare clicks on it and sees a form something like the following (where the values she intend to use for the item are filled out):
Most of the fields defining the item are fairly self explanatory (required fields are prefixed with a *, and additional fields could be added to the Item table if Clare felt she needed them). A more thorough discussion of each of these fields can be found in Editable Item Fields. However, a couple are worth elaborating upon here. One is the Mouseover URL. If present, the value of this field will be used whenever the URL is displayed either on the page, or in the status bar at the bottom of the browser when the user's mouse travels over the link formed from the URL (hence the name Mouseover URL). In Clare's case, she wishes to avoid having her Amazon Affiliate ID appear in the item links, so she defines a separate URL for this. Words appearing in the Keywords field will be used to create metadata tags on static pages for the benefit of spiders that index your site. These keywords also help the Review Foundry Search Engine function more efficiently, so add keywords whenever you can. Shown in the form above is an image, jungle-book.jpg, which has been uploaded using the Manage Upload button. In addition to the full-sized image, a thumbnail image will also be created at the time an image is upload--provided that thumbnailing has been configured from the Thumbnails page of the Configure control panel (in order for thumbnailing to be possible Clare needs to have access to one of 3 alternative image manipulation libraries: Image::Magick, GD, or NetPBM). As Clare wishes to collect reviews on the Jungle Book DVD she sets Solicit Reviews to 'Yes'. Less obvious is the meaning of the Unique Review IP field. This can be used to ensure that no more than a single review is submitted from each unique IP address. This is generally an unnecessary restriction on review submissions, so setting the field to 'No' is recommended. When the item fields are saved the page refreshes and, in addition to a confirmation message, the Category Browser also updates to show the new number of items in the open category branches. From the figure immediately below we can see that the total number of items in the Kids & Family > Disney category is 1. We also see that the Kids & Family category reports 1 as well. This is because the count includes items in subcategories as well as the immediate category, so you can always see the total number of items in a branch before it is opened.
Viewing an ItemOnce the item has been added, and supposing the Is Validated field had been set, so that the item is considered good for public viewing, it will be present in Clare's live Kids & Family > Disney category. The URL to public entry point for her review pages will be something like: http://www.mydomain.com/cgi-bin/path/to/.../foundry/do/foundry.cgi?module=find_item If she makes her way to the detail page for the Jungle Book DVD--by drilling down through the category pages--she should see a page for which the item detail section looks similar to this:
If Clare has correctly configured Review Foundry for thumbnailing (see the Review Foundry manual page on Thumbnails) the image which appears on the item detail page is a thumbnail of the image she uploaded when creating the Jungle Book DVD item, the original version of which can be seen by clicking on the thumbnail itself. The area of whitespace on the right of the page below the link which takes a visitor to the review submission page is where a graphical summary of ratings will be present once reviews start accruing for the item. In addition to providing the average value for each rating attribute associated with the Kids & Family > Disney category and the Jungle Book item, a set of ratings averaged over ALL items in the category is also presented so that Clare's visitors can see how well the Jungle Book DVD fares in comparison to similar DVDs in its class (category). Here is what the page might look like after one review has been approved for the Jungle Book DVD and several other reviews have been submitted for other DVDs in the same category:
In addition to the "star" rating style (though in the example above our stars are represented as crosses) Clare has several other choices for representing the ratings. In fact there are 4 styles that come "out of the box" and each of these can be modified if desired by providing replacement images for the component .gif files used to construct each rating style (replacements can be carried out from the Configure control panel):
Adding Item FieldsThe Item table contains several standard fields that characterize an item: its name and description being the two most important ones. There are others which store the item owner, an image, and an associated URL. Using just these few fields Clare can offer a reasonable detail page for an item. But she may have in mind an extra field or two that she believes would really improve the quality of her pages. Perhaps she would like to add a Director field, or a Release Date field. To do this she will need to be able to add columns to the Item table and then pull the data from them and present the results along with other fields. A discussion of how to add fields (columns) to an existing Review Foundry table is treated in detail in the Review Foundry User Manual. See the section on ADDING COLUMNS TO A TABLE. Here, we consider what is required in order to add a Release Date field. Because the field is a perfect match for one of the special database column types--in this case the DATE column type--we elect to add a DATE column. To do this, we first select the "Columns" option of the Database menu, in addition to the name of the table to which the column will be added--in this case, Item. Clicking on the submit button for this menu will bring up the Column Properties page for the table, at the bottom of which is a link labeled "Add Column". When this link is clicked on we see a form like the following (filled out in the way it needs to be to add the proposed column):
Once new columns have been added to the Item table additional code needs to be added to the templates in order to display the data. In order to do this correctly Clare will need to understand at least the rudiments of how the Review Foundry templating system works. For this she will need to read the section on THE TEMPLATE-TOOLKIT which allows a mini-language to be added to the HTML templates which enables variable substitution, loops, and so on. For instance, to add a Release Date field, which we will assume is the result of adding a release_date column to the Item table, we might add the following code to the relevant template (say item_page.ttml which is used to construct the detail page for an item):
[% item = alias.item_info %] (assuming alias.item_info is passed into the template) [% IF item.release_date %] Release Date: [% item.release_date %] [% END %] Note: when dealing with templates, the first step is to locate the template responsible for handling the portion of HTML you intend to affect. To do this, try looking in the HTML source code of the page that your browser is showing. Each public template identifies itself by inserting comments at the top and bottom of the template, such as <!-- begin: item_page.ttml --> and <!-- end: item_page.ttml -->. So if you are looking at the detail page for an item you will discover that the item_page.ttml template contains the HTML that Clare would likely want to modify when inserting the code for displaying the Release Date field. The template will have a section of code (near the top) that assigns the passed-in fields to a local variable, such as item in the code shown above. All Clare has to do now is add a conditional statement for displaying the value of the release_date column. Depending on how sophisticated Clare wanted to be about it, she could even add Template Toolkit code to parse the numeric release date (say, 2005-04-28) break it into year, month, and day, and then convert these to a format like April 28, 2005. There are a lot of possibilities inherent in the treatment of pulled data when using Template Toolkit to handle the data formatting. Studying the Template Toolkit in order to harness this extra flexibility is entirely optional, of course. Copyright © 2004 Random Mouse Software. All Rights Reserved. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||