PT Photo Gallery Version 2.0 Upgrade
From ADF Docs
Contents
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_gallery_v1".
- Renamed file "/ADF/apps/pt_photo_gallery_v1/appBeanConfig.cfm" to "/ADF/apps/pt_photo_gallery_v1/appBeanConfig.cfm.old".
- Downloaded the PT Photo Gallery v2.0 and exported into the "/ADF/apps/pt_photo_gallery/" directory.
Custom Field Types
Photo Reference Name
- Import the "Photo Reference Name" custom field type. If the field is already imported, then do not import again. The exported object can be found here:
- /ADF/apps/pt_photo_gallery/exported-objects/Photo-Reference-Name-Custom-Field-Type.zip
Custom Text Field
- Import the "Custom Text Field" custom field type for the ADF. If the field is already imported, then do not import again.
Photo Chooser
- Change the props to the file in the app:
- /ADF/apps/pt_photo_gallery/customfields/photo_chooser_props.cfm
- Change the render file path to:
- /ADF/apps/pt_photo_gallery/customfields/photo_chooser_render.cfm
- Select the "Data Type" as "Unprocessed".
Custom Element Updates
Photo Size
- Update the "Title" field.
- Change the field type to the "Custom Text Field".
- In the properties tab, for the "Field ID" field, enter the text "photoSizeTitle".
- Change the field type to the "Custom Text Field".
- Update the "Directory" field.
- Change the field type to "Photo Reference Name".
- In the properties tab, for the "Title Field ID" field, enter the text "photoSizeTitle".
- In the properties tab, for the "Field ID" field, enter the text "photoSizeDirectory".
- Change the label text to "Reference Name".
- 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)."
- Change the field type to "Photo Reference Name".
Photo Category
- Update the "Title" field.
- Change the field type to the "Custom Text Field".
- In the properties tab, for the "Field ID" field, enter the text "photoCategoryTitle".
- Change the field type to the "Custom Text Field".
- Update the "Directory" field.
- Change the field type to "Photo Reference Name".
- In the properties tab, for the "Title Field ID" field, enter the text "photoCategoryTitle".
- In the properties tab, for the "Field ID" field, enter the text "photoCategoryDirectory".
- Change the label text to "Reference Name".
- 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). "
- Change the field type to "Photo Reference Name".
- Update the "Required Size ID List" field.
- Change the label text to "Required Photo Size".
- Update the "Resize Size ID List" field.
- Change the label text to "Resize Photo Size".
Photo
- Update the "Category" field.
- In the properties, update the "Default Field Value" to "[request.params.category]".
- Update the "PhotoID" field.
- In the properties, update the "Default Field Value" to the ColdFusion expresssion "createUUID()".
PtPhotoGallery Configuration
- Delete the fields from the element:
- CE Name
- CE FORM ID
- Add URL
- Upload Path
Create the following new tab:
- Features
- Display Name: Features
- Sort Name: 2-features
Edit the "PtPhotoGallery Configuration" tab and update the tab fields for the following:
- PtPhotoGallery Configuration
- Display Name: PtPhotoGallery Configuration
- Sort Name: 1-ptphotogallery-configuration
Add the following new fields:
- Name: UPLOAD_CROP_URL
- If this field does exist already, then move the field to the "Features" tab.
- In the "Feature" tab.
- Type: CommonSpot Page URL
- Label: UPLOAD CROP URL
- Description: Link to the CommonSpot page for the uploading a photo for the crop feature.
Photo Gallery
Add the following Render Handlers:
- Name: Listing
- Description: Renders a listing of the photos selected with the photo display size selected formthe metadata form.
- Rendering Module: /ADF/apps/pt_photo_gallery/renderhandlers/listing_display_rh.cfm
- Name: Single Image
- Description: Renders the top selected photo. The photo size is determined by the detail field in metadata form.
- Rendering Module: /ADF/apps/pt_photo_gallery/renderhandlers/gallery_single_image_rh.cfm
- Name: Single Image Random
- Description: Random selects a single image to display from the selected photos.
- Rendering Module: /ADF/apps/pt_photo_gallery/renderhandlers/gallery_single_image_random_rh.cfm
Metadata Forms Updates
PhotoSizeSelect
- Find the field with the name "photoSizeSelect" and make the following field definition updates:
- Label: Thumbnail Size
- Description: Select the Photo Thumbnail Size that is used as thumbnail selections for the rendering.
- Find the field with the name "detailSize" and make the following field definition updates:
- Label: Detail Size
- Description: Select the Photo Detail Size for the main photo to display in the rendering. This is the larger photo size dimensions.
- Add binding for the following Photo Gallery element render handlers:
- Listing
- Single Image
- Single Image Random
Lightbox Pages/Template
- Delete all the Lightbox pages that were created for the photo gallery app. They should be within the "/lightbox/photogallery/" subsite.
Forms Subsite
- Delete all the pages under the "/lightbox/photogallery/" subsite.
- Create a new subsite under "/webadmin/photogallery/" called "forms".
- Follow the install instructions for v2 for the Photo Upload and Photo Display pages.
Configuration Manager
- 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.