PT Photo Gallery Version 2.0 Upgrade

From ADF Docs
Revision as of 17:56, 3 January 2012 by Mcarroll (talk | contribs)
Jump to: navigation, search

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 Field Types

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

Photo Chooser

  1. Change the props to the file in the app:
    1. /ADF/apps/pt_photo_gallery/customfields/photo_chooser_props.cfm
  2. Change the render file path to:
    1. /ADF/apps/pt_photo_gallery/customfields/photo_chooser_render.cfm

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

Metadata Forms Updates

PhotoSizeSelect

  1. Find the field with the name "photoSizeSelect" and make the following field definition updates:
    1. Label: Thumbnail Size
    2. Description: Select the Photo Thumbnail Size that is used as thumbnail selections for the rendering.
  2. Find the field with the name "detailSize" and make the following field definition updates:
    1. Label: Detail Size
    2. Description: Select the Photo Detail Size for the main photo to display in the rendering. This is the larger photo size dimensions.
  3. Add binding for the following Photo Gallery element render handlers:
    1. Listing
    2. Single Image
    3. Single Image Random

Lightbox Pages/Template

  1. Delete all the Lightbox pages that were created for the photo gallery app. They should be within the "/lightbox/photogallery/" subsite.

Forms Subsite

  1. Delete all the pages under the "/lightbox/photogallery/" subsite.
  2. Create a new subsite under "/webadmin/photogallery/" called "forms".
  3. Follow the install instructions for v2 for the Photo Upload and Photo Display pages.

Configuration Manager

  1. Navigate to the "Configuration Manager" page for the Photo Gallery app. Edit and save the configuration record.

Reset the ADF! Then enjoy the new updates.