Difference between revisions of "PT Sync Install 1.0"

From ADF Docs
Jump to: navigation, search
 
Line 1: Line 1:
 
== Overview ==
 
== Overview ==
 +
The following guide will install the PT Sync Application for the source and destination sites.
 +
 +
Follow the instructions closely because some steps need to be completed on both the source and destination sites.
 +
 
The PT Sync Application is built within the ADF.  The ADF must be installed in the site to run the PT Sync, follow the ADF [[Installation]] instructions.
 
The PT Sync Application is built within the ADF.  The ADF must be installed in the site to run the PT Sync, follow the ADF [[Installation]] instructions.
  

Latest revision as of 18:51, 21 December 2011

Overview

The following guide will install the PT Sync Application for the source and destination sites.

Follow the instructions closely because some steps need to be completed on both the source and destination sites.

The PT Sync Application is built within the ADF. The ADF must be installed in the site to run the PT Sync, follow the ADF Installation instructions.

Download

Download the PT Sync Application from the Community Site or from the SVN Repository.

Extract the zip files into the following directory: /ADF/apps/pt_sync/

ADF Configuration

  • Make sure the ADF is setup and running on the site. If the ADF is not setup, then follow the instructions for ADF Installation.
  • Open the sites 'ADF.cfc' (See Site Configuration (ADF.cfc) for more info) file (located in your site's /_cs_apps/ directory) in a text editor. Locate the Load the ADF Application into application space comment in the file. Add (or uncomment) the following command under the comment section:
loadApp("ptSync");
  • Load the PT Sync Application into the source and destination site!
  • Reset the ADF for the server and site.

Import

Only important these elements into the Source Site

Create a new element category called "PT Sync Elements". Import Custom Elements in this order:

  1. Sync Mapping
  2. ptSync Configuration

Subsites

It is highly recommended that a PT Sync webadmin subsite is created for the administrators. This configuration allows subsite security to be used to allow only Administrators access to the webadmin subsite.

Your site may already have a webadmin subsite. The steps below will add a sync subsite under the webadmin subsite.

Web Admin

  1. Create a new subsite under the site root called webadmin.
  2. Create a new subsite under webadmin called sync.
  3. Configure the /webadmin/sync/ subsite Content Security to give 'No Rights' to 'Anonymous Users' and 'Authenticated Users'.
  4. Configure the /webadmin/sync/ subsite Content Security to give permissions to the group of administrators who will manage the sync application.

App Configuration

The PT Sync Configuration Page will be used to manage the ptSync Configuration custom element.

Setup the App Configuration on the Source site!

Steps

  1. Create a new page called 'Configuration Manager' in the /webadmin/sync/ subsite.
  2. In the main content of the page, add a Custom Script element.
  3. Enter the explicit module path for:
    1. /ADF/apps/pt_sync/customcf/sync_config_admin.cfm
  4. Publish the page.

Create Sync Configuration Record

We are creating a single PT Sync Configuration element record to be used within the application.

On the page select the "Edit Configuration" button. Complete this form to select the source site, destination site, and the Sync Mapping custom element that was imported.

Once this record is saved and created, this page will render the "Show/Hide Configuration" button to see the configuration record.

Reset the ADF for the server and site.

Mapping Manager

The Sync Mappings are global custom elements. Managing data for these global custom elements can be configured easily through the use of Datasheets. The following sections will describe how to configure a CommonSpot page to manage the data for this element.

Steps

  1. Create a new page with the title 'Sync Mappings' and name 'index' in the subsite /webadmin/sync/.
  2. In the main content of the page, add a Custom Script element.
  3. From the Custom Script element interface, click the "Edit" icon.
  4. Enter the following text into the Explicit Module path: /ADF/apps/pt_sync/customcf/sync_mapping_manager.cfm
  5. From the Datasheet element interface, click the "Datasheet" icon.
  6. From the "Datasheet Views" dialog, follow the "Click here to create a new datasheet view" link.
  7. Enter the following information and then click "Next":
    1. Name: All Sync Mappings
    2. Private: unchecked
    3. Default View: unchecked
    4. Description: View to manage all of the photo sizes
    5. Datasheet Source: Form Result/Custom Element Sheet
  8. From the Datasheet Source dialog, choose the "Sync Mapping" custom element and click "Next".
  9. From the Datasheet Columns dialog select the columns UUIDField, sourceCE, Is Active, and ID fields and move them to the Selected Columns list then click "Finish".
  10. You will be directed to the Datasheet View page. Click "Close" to return to your page.
  11. You will now see the datasheet element on this page. Click the Datasheet element interface icon again and choose "Edit Columns".
  12. Add Action Columns for Edit and Delete.
  13. Edit the "UUIDField" column.
    1. Change the "Render Handler" to the following path:
      1. /ADF/extensions/datasheet-modules/1.0/edit-delete.cfm
  14. Edit the "SOURCECE" column.
    1. Change the "Render Handler" to the following path:
      1. /ADF/extensions/datasheet-modules/1.0/formID-to-CEName.cfm
  15. Edit the "ID" column.
    1. Change the "Header" text to "Automate Sync".
    2. Change the "Render Handler" to the following path:
      1. /ADF/apps/pt_sync/datasheet-modules/ds-auto-sync-actions.cfm
  16. Save the form.
  17. Publish this page.

CommonSpot Hooks

CommonSpot provides hooks for editing global custom element and post page approvals. The PT Sync application utilizes these hooks to call the sync processing functions when a global custom element is added/edited and a local custom element is added/edited with a page and the page is approved.

The following steps are to include the CommonSpot hook files into the source site (these files are not needed on the destination site).

Steps

  1. Copy the following two files from the PT Sync app:
    1. /pt_sync/site_files/post-approve.cfm
    2. /pt_sync/site_files/post-save-form-hook.cfm
  2. Paste these files directly within the site root.
  3. In the PT Sync App, open the delete form data file within the app (/pt_sync/site_files/datasheet-modules/delete-form-data.cfm). Within the file, identify the snippet code block within the comments for "PT SYNC - SNIPPET START" and "PT SYNC - SNIPPET END".
  4. Locate the delete form data datasheet module within the site (/datasheet-modules/delete-form-data.cfm). Insert the snippet code block within your sites delete form data. Make sure that the snippet code block is ABOVE the cfinclude to the cs-delete-form-data.cfm.
    1. <cfinclude template="\commonspot\controls\datasheet\cs-delete-form-data.cfm">