Difference between revisions of "PT Comments Install v1"

From ADF Docs
Jump to: navigation, search
(Created page with '== Download == Download the Comments Application from the Community Site or from the [http://community.paperthin.com/svn/pt_comments/trunk/ SVN Repository]. Extract the zip fil…')
 
(Site Configuration)
Line 31: Line 31:
  
 
Review and update the path to reference the ADF path.  In most cases, this will just require the element to be unlocked and a change in the path from the site name to 'ADF'.  Check the path for the [[PT_Comments#Contents|custom field types that were imported]] with the custom element by unlocking it and fixing the explicit path to point to "/ADF/extensions/".
 
Review and update the path to reference the ADF path.  In most cases, this will just require the element to be unlocked and a change in the path from the site name to 'ADF'.  Check the path for the [[PT_Comments#Contents|custom field types that were imported]] with the custom element by unlocking it and fixing the explicit path to point to "/ADF/extensions/".
 +
 +
== Comment Manager ==
 +
 +
  
 
== Site Configuration ==
 
== Site Configuration ==

Revision as of 19:30, 12 September 2012

Download

Download the Comments Application from the Community Site or from the SVN Repository.

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

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("ptComments");

Import Elements

The Comments Application has a single Global Custom Element defined within CommonSpot. The element has been exported and is available in the Comments's "exported-objects" folder located at the root of the Comments application directory (e.g. /ADF/apps/pt_comments/exported-objects/)

Optional: You may want to create a new category within the CommonSpot Element Gallery for 'Comments Elements'.

To import these objects, you will need to be an administrator for your site. If you are not a site administrator, consult your Server administrator for more information.

Import

Import the Custom Element:

  1. Comments (Comments-Custom-Element.zip)

Verify Import

The render handler path for the imported "comments" element must be verified that it has the correct path. During the import process, the render handler path may have been changed to reflect the current site's path.

Review and update the path to reference the ADF path. In most cases, this will just require the element to be unlocked and a change in the path from the site name to 'ADF'. Check the path for the custom field types that were imported with the custom element by unlocking it and fixing the explicit path to point to "/ADF/extensions/".

Comment Manager

Site Configuration

Installing cfformprotect

CF Form Protect helps to prevent your form from spam. It allows the comments that users enter to have some verification of who is entering the data.

  1. Copy cffp.ini.cfm from /ADF/thirdParty/cfformprotect/ into your /_cs_apps/config directory
  2. Edit the parameters as you see fit. Please note the email settings

Adding comments to your page

The comments element, which will be configured in a step below, requires a variable called "request.params.comments.contentDataPageID". This variable does not exist and will throw an error unless one of two things are done. First, you can add a script to the page directly above where you place the comments element. The script (pageComments.cfm) will define the variable needed by the comments element.

Alternatively, you can add the following line of code:

<cfset request.params.comments.contentDataPageID = request.page.id>

to a template-basepage.head file in the site's /templates directory. If you add the line of code to your template-basepage.head file, then it is not necessary to place a custom script element on every page where you wish to use comments. Adding this code to your template-basepage.head is the preferred installation method. If your site does not have a template-basepage.head file, you may create one. The Commonspot developer's guide explains the requirements for creating the .head file.

  1. Edit your page
  2. Optional -- Add a custom script to your page
    • /ADF/apps/pt_comments/customcf/pageComments.cfm
  3. Add the comments element to your page
  4. Update the render mode on this element
    1. Select "Display existing element data (content reuse)"
    2. Select "Render results dynamically based on a filter, or display all records."
    3. click on filter
    4. select "Subset of records"
    5. in the dropdown select Comments.contentDataPageID
    6. Set the comparison to equals
    7. click the ... next to the value
    8. enter: request.params.comments.contentDataPageID
    9. click save
  5. submit your page