Difference between revisions of "PT Photo Gallery Version 2.0 Upgrade"

From ADF Docs
Jump to: navigation, search
(Created page with '== Overview == This guide is to upgrade the PT Photo Gallery v2.0 application. == Application Code == # Renamed directory "/ADF/apps/pt_photo_gallery" to "/ADF/apps/pt_photo_gal…')
 
(Photo)
Line 40: Line 40:
 
## Change the label text to "Resize Photo Size".
 
## Change the label text to "Resize Photo Size".
  
== Photo ==
+
=== Photo ===
 
# Update the "Category" field.
 
# Update the "Category" field.
 
## In the properties, update the "Default Field Value" to "[request.params.category]".
 
## In the properties, update the "Default Field Value" to "[request.params.category]".

Revision as of 17:49, 3 January 2012

Overview

This guide is to upgrade the PT Photo Gallery v2.0 application.

Application Code

  1. Renamed directory "/ADF/apps/pt_photo_gallery" to "/ADF/apps/pt_photo_gallery_v1.1".
  2. Renamed file "/ADF/apps/pt_photo_gallery_v1.1/appBeanConfig.cfm" to "/ADF/apps/pt_photo_gallery_v1.1/appBeanConfig.cfm.old".
  3. Downloaded the PT Photo Gallery v2.0 and exported into the "/ADF/apps/pt_photo_gallery/" directory.


Custom Fields

Photo Reference Name

  1. Import the "Photo Reference Name" custom field type. The exported object can be found here:
    1. /ADF/apps/pt_photo_gallery/exported-objects/Photo-Reference-Name-Custom-Field-Type.zip

Custom Element Updates

Photo Size

  1. Update the "Title" field.
    1. Change the field type to the "Custom Text Field".
      1. In the properties tab, for the "Field ID" field, enter the text "photoSizeTitle".
  2. Update the "Directory" field.
    1. Change the field type to "Photo Reference Name".
      1. In the properties tab, for the "Title Field ID" field, enter the text "photoSizeTitle".
      2. In the properties tab, for the "Field ID" field, enter the text "photoSizeDirectory".
    2. Change the label text to "Reference Name".
    3. Change the description text to "This is the reference name value to return the specific photo size. This field is read only once the record has been created and can not be edited.
      Defaulted to the title, but can be customized. The title can be unique and the reference name can be a simple value (i.e. small, medium, large, etc)."

Photo Category

  1. Update the "Title" field.
    1. Change the field type to the "Custom Text Field".
      1. In the properties tab, for the "Field ID" field, enter the text "photoCategoryTitle".
  2. Update the "Directory" field.
    1. Change the field type to "Photo Reference Name".
      1. In the properties tab, for the "Title Field ID" field, enter the text "photoCategoryTitle".
      2. In the properties tab, for the "Field ID" field, enter the text "photoCategoryDirectory".
    2. Change the label text to "Reference Name".
    3. Change the description text to "This is the reference name value to return the specific photo size. This field is read only once the record has been created and can not be edited.
      Defaulted to the title, but can be customized. The title can be unique and the reference name can be a simple value (i.e. small, medium, large, etc). "
  3. Update the "Required Size ID List" field.
    1. Change the label text to "Required Photo Size".
  4. Update the "Resize Size ID List" field.
    1. Change the label text to "Resize Photo Size".

Photo

  1. Update the "Category" field.
    1. In the properties, update the "Default Field Value" to "[request.params.category]".
  2. Update the "PhotoID" field.
    1. In the properties, update the "Default Field Value" to the ColdFusion expresssion "createUUID()".

PtPhotoGallery Configuration

  1. Delete the fields from the element:
    1. CE Name
    2. CE FORM ID
    3. Add URL
    4. Upload Path

Create the following new tab:

  1. Features
    1. Display Name: Features
    2. Sort Name: 2-features

Edit the "PtPhotoGallery Configuration" tab and update the tab fields for the following:

  1. PtPhotoGallery Configuration
    1. Display Name: PtPhotoGallery Configuration
    2. Sort Name: 1-ptphotogallery-configuration

Add the following new fields:

  1. Name: UPLOAD_CROP_URL
    1. If this field does exist already, then move the field to the "Features" tab.
    2. In the "Feature" tab.
    3. Type: CommonSpot Page URL
    4. Label: UPLOAD CROP URL
    5. Description: Link to the CommonSpot page for the uploading a photo for the crop feature.

Photo Gallery

Add the following Render Handlers:

  1. Name: Listing
    1. Description: Renders a listing of the photos selected with the photo display size selected formthe metadata form.
    2. Rendering Module: /ADF/apps/pt_photo_gallery/renderhandlers/listing_display_rh.cfm
  2. Name: Single Image
    1. Description: Renders the top selected photo. The photo size is determined by the detail field in metadata form.
    2. Rendering Module: /ADF/apps/pt_photo_gallery/renderhandlers/gallery_single_image_rh.cfm
  3. Name: Single Image Random
    1. Description: Random selects a single image to display from the selected photos.
    2. Rendering Module: /ADF/apps/pt_photo_gallery/renderhandlers/gallery_single_image_random_rh.cfm