Difference between revisions of "PT Blog Version 2.0 Install"

From ADF Docs
Jump to: navigation, search
(Blog)
(Templates)
Line 65: Line 65:
  
 
=== Blog Post Template ===
 
=== Blog Post Template ===
 +
The Blog Post Template is the template that all the blog post pages are created from.
 +
To construct your Blog Post Template complete the following steps.
 +
 +
# Create a CommonSpot page called 'Blog Post' from the Base Plus One template. (The subsite for this is not critical but it is a good idea to create this page in a subsite that has been created for the Blogs.
 +
# Place the ''Posts2'' Custom Element on this page.
 +
# Click ''Render Mode'' in the element interface.
 +
# Select ''Display existing element data (content reuse)'' on the ''Rendering Mode'' tab.
 +
# Select the ''Filter'' tab.
 +
# Select Filter Type to ''Show subset of records''.
 +
# Select the field drop-down as the ''PostID'' field.
 +
# Select the operator as ''Equals''.
 +
# Click the '...' button to open the ColdFusion expression window.
 +
# Enter the text ''request.page.metadata.blogs.postID'' as the expression and check the ''force cache'' checkbox.  Click ''OK'' and then check the box to ''Ignore ColdFusion error'', then click ''OK''.
 +
# Click ''OK'' on the render mode window.
 +
# Click ''More'' in the element interface.  Then the ''Custom Render Handlers'' menu option, and choose the ''Main Display w/Tags'' Render Handler.
 +
# Submit Page and then Save as Template.
 +
# Remember to submit the template for public use.
 +
# Go to the CommonSpot Site Administration and bind the ''Blogs'' metadata form to this new ''Blog Post Template''.
  
 
== Create Add Blog Page ==
 
== Create Add Blog Page ==

Revision as of 14:16, 5 April 2010

Download

Download the Blog Application from the Community Site Project or from the SVN Repository.

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

Site Configuration

  • Make sure the ADF is setup and running on the site. If the ADF is not setup, then follow the instructions for ADF Site Level ADF Component.
  • Open the sites 'ADF.cfc' file in a text editor. Locate the Load the ADF Application into application space commentin the file. Add the following command under the comment section:
loadApp("ptBlog2");

Import Custom Elements

Create a "Blog Elements" category and import all portions of each component in the order listed.

Import Custom Element:

  1. Blog2 (Blog2-Custom-Element.zip)
  2. Posts2 (Posts2-Custom-Element.zip)
  3. Comments2 (Comments2-Custom-Element.zip)
  4. PTBlog2 Configuration (PTBlog2-Configuration-Custom-Element.zip)

Import Metadata:

  1. Blogs (Blogs-Metadata-Form.zip)

Verify Imports

The imported components' render handlers and custom field types must be verified. During the import process, the render handler and custom field types paths may have been changed to reflect the current site's path.

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

If the custom elements that are imported contain custom field types that are already in the site, the naming convention for the custom field type will be unique. To resolve this, unlock the field types and elements, and reassign the element field type to the pre-existing field type.

Subsites

It is highly recommended this Blog Web Admin subsite for administrators and a Blog Lightbox subsite for the lightbox pages. This allows security to be setup for the subsite to allow only administrators access for the webadmin and the CS toolbar turned off for the lightbox pages.

Your site may already have a webadmin and/or lightbox subsite. The steps below will add a blogs subsite into the webadmin and lightbox subsites.

Web Admin

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

Lightbox

  1. Create a new subsite under the site root called lightbox.
  2. Create a new subsite under lightbox called blogs.

Blogs

The subsite for the blog pages must be created manually. This subsite is custom to your implementation and can be any subsite within the site. If you don't have a specific subsite then create a Blogs subsite under the site root.

Templates

Lightbox Template

The Lightbox template will be used to render pages within a lightbox. The Lightbox template may already exist on your site if you have installed another ADF application. Check your sites templates before following the steps below to create the template.

  1. Create a new page named Lightbox Template from the Blank Layout Template in the Lightbox subsite.
  2. Submit and activate the page.
  3. Save the page as a template.
  4. Submit the template for public use.

Blog Post Template

The Blog Post Template is the template that all the blog post pages are created from. To construct your Blog Post Template complete the following steps.

  1. Create a CommonSpot page called 'Blog Post' from the Base Plus One template. (The subsite for this is not critical but it is a good idea to create this page in a subsite that has been created for the Blogs.
  2. Place the Posts2 Custom Element on this page.
  3. Click Render Mode in the element interface.
  4. Select Display existing element data (content reuse) on the Rendering Mode tab.
  5. Select the Filter tab.
  6. Select Filter Type to Show subset of records.
  7. Select the field drop-down as the PostID field.
  8. Select the operator as Equals.
  9. Click the '...' button to open the ColdFusion expression window.
  10. Enter the text request.page.metadata.blogs.postID as the expression and check the force cache checkbox. Click OK and then check the box to Ignore ColdFusion error, then click OK.
  11. Click OK on the render mode window.
  12. Click More in the element interface. Then the Custom Render Handlers menu option, and choose the Main Display w/Tags Render Handler.
  13. Submit Page and then Save as Template.
  14. Remember to submit the template for public use.
  15. Go to the CommonSpot Site Administration and bind the Blogs metadata form to this new Blog Post Template.

Create Add Blog Page

This page will be used to create new Blog Posts in the Blog Administrator. Each Blog will share this Add page.

  1. Create page called "Add Blog"
  2. Place Custom Script on the page
  3. Select the "/ADF/apps/pt_blog/customcf/handle_blog_create.cfm" script (Note: after page reloads a Simple Form Element will Appear
  4. Choose "Select Form" from the Simple Form Element Interface
  5. Choose option 2 (Select Simple Form/Custom Element)
  6. Locate the "Blog Posts" Custom Element and add data for the Action (using the "Specify Results Text" method)
  7. Publish Page

Create Blog Dashboard Page

This page will be used to manage the blog post and comments for each blog. Each Blog will share this Dashboard Page.

  1. Create page called "Blog Dashboard"
  2. Place Custom Script on the page
  3. Select the "/ADF/apps/pt_blog/customcf/blog_dashboard.cfm" script (after page reloads 3 tabs and links to datasheets will appear)

Configure Posts Tab

  1. Click the "Posts" tab
  1. Locate the "Blog" Custom Element and click on the "Render Mode" option in the Element Interface
  2. Choose "Content Reuse" and leave the filter option on "Render results dynamically based on a filter, or display all records."
  3. Click on the "Filter" tab and apply the following filter: Field = BlogID; Operator = "equals"; Value = "request.params.blogID" (note: use the UDE button)
  1. Define a View for the Datasheet Element in this Tab - call it "All Blog Posts"
  2. Leave the View Source as the Default: Form Result/Custom Element Sheet
  3. Select the "Blog Posts" Custom Element and select the following columns: Title, Date Posted, Created By and PageURL (Note: The only required column is "PageURL")
  4. Move the "PageURL" field to the end of the list of columns


Create Blogs Management Page