Difference between revisions of "PT Blog Version 2.1 Install"

From ADF Docs
Jump to: navigation, search
(Create Blog Dashboard Page)
 
(22 intermediate revisions by 2 users not shown)
Line 21: Line 21:
 
# Posts2 (Posts2-Custom-Element.zip)
 
# Posts2 (Posts2-Custom-Element.zip)
 
# Comments2 (Comments2-Custom-Element.zip)
 
# Comments2 (Comments2-Custom-Element.zip)
 +
# Blog2 Feature Data (Blog2-Feature-Data-Custom-Element.zip)
 
# PTBlog2 Configuration (PTBlog2-Configuration-Custom-Element.zip)
 
# PTBlog2 Configuration (PTBlog2-Configuration-Custom-Element.zip)
  
Line 59: Line 60:
 
# Place the ''Posts2'' Custom Element on this page.
 
# Place the ''Posts2'' Custom Element on this page.
 
# Click ''Render Mode'' in the element interface.
 
# Click ''Render Mode'' in the element interface.
# Select ''Display existing element data (content reuse)'' on the ''Rendering Mode'' tab.
+
## Select ''Display existing element data (content reuse)'' on the ''Rendering Mode'' tab.
# Select the ''Filter'' tab.  
+
## Select the ''Filter'' tab.  
# Select Filter Type to ''Show subset of records''.
+
### Select Filter Type to ''Show subset of records''.
# Select the field drop-down as the ''PostID'' field.  
+
### Select the field drop-down as the ''PostID'' field.  
# Select the operator as ''Equals''.
+
### Select the operator as ''Equals''.
# Click the '...' button to open the ColdFusion expression window.
+
### Click the '...' button to open the ColdFusion expression window.
# Enter the text ''request.page.metadata.blogs2.postID'' as the expression and check the ''force cache'' checkbox.  Click ''OK'' and then check the box to ''Ignore ColdFusion error'', then click ''OK''.
+
### Enter the text ''request.page.metadata.blogs2.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 ''OK'' on the render mode window.
## Ignore the error message for 'Error: Error evaluating a user-defined expresssion'.
+
### Ignore the error message for 'Error: Error evaluating a user-defined expresssion'.
 
# Click ''More'' in the element interface.  Then the ''Custom Render Handlers'' menu option, and choose the ''Main Display'' Render Handler. (You may see an error on this page with the Render Handler.  That is OK at this point.)
 
# Click ''More'' in the element interface.  Then the ''Custom Render Handlers'' menu option, and choose the ''Main Display'' Render Handler. (You may see an error on this page with the Render Handler.  That is OK at this point.)
 
# Submit Page and then Save as Template.
 
# Submit Page and then Save as Template.
Line 74: Line 75:
  
 
=== Landing Page Template ===
 
=== Landing Page Template ===
# Create a new template "Blog Landing" with the following settings:
+
# Create a CommonSpot page called 'Blog Landing' 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.)
## Add the "Posts2" custom element to the page.
+
# Add the "Posts2" custom element to the page.
## Set the render mode for the following:
+
# Set the render mode for the following:
### Rendering Mode: "Display existing element data (content reuse)" and "Render results dynamically based on a filter, or display all records.".
+
## Rendering Mode: "Display existing element data (content reuse)" and "Render results dynamically based on a filter, or display all records.".
### Filter:
+
## Filter:
#### Filter: Subset of records
+
### Filter: Subset of records
#### Post2.blogID Equals {request.page.metadata.blogs2.blogID} (this is a ColdFusion expression)
+
### Post2.blogID Equals {request.page.metadata.blogs2.blogID} (this is a ColdFusion expression)
##### Make sure to check "Force Cache".
+
#### Make sure to check "Force Cache".
##### Sort Order: "Date Posted" and "Descending"
+
#### Sort Order: "Date Posted" and "Descending"
#### Save Render Mode
+
### Save Render Mode
###Ignore the error message for "Error evaluating a user-defined expresssion".
+
##Ignore the error message for "Error evaluating a user-defined expresssion".
## Change the custom render handler to "Home Page Display".
+
# Change the custom render handler to "Home Page Display".
## Publish the page.
+
# Publish the page.
## Save the page as a template and submit the template for public use.
+
# Save the page as a template and submit the template for public use.
 
# Go to the Site Administrator and metadata forms.  Add a new binding for the "Blogs2" form to the "Blog Landing" template.
 
# Go to the Site Administrator and metadata forms.  Add a new binding for the "Blogs2" form to the "Blog Landing" template.
# Navigate to the "Blogs Manager" page and select the "Edit App Configuration" to open the configuration custom element form. On the "Features" tab, set the "Blog Landing Page Template" select field to the template that was created.
 
# On the "Blogs Manager" page, select the link for "Reset Site ADF" to have the updates take effect.
 
 
=== Tags Listing Template ===
 
# Create a new page with the name "Blog Tags" from the "Blog Post" template.
 
# Delete the ''Posts2'' custom element from the page.
 
# Place the ''Tags'' 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 ''contentID'' field.
 
# Select the operator as ''Equals''.
 
# Click the '...' button to open the ColdFusion expression window.
 
# Enter the text ''request.page.metadata.blogs2.blogID'' as the expression and check the ''force cache'' checkbox.  Click ''OK'' and then check the box to ''Ignore ColdFusion error'', then click ''OK''.
 
# Select the ''Add Criteria'' drop-down and select ''AND''.
 
# Select the field drop-down as the ''Active'' field.
 
# Select the operator as ''Equals''.
 
# Select "1" from the drop-down for Value.
 
# Select the Sort Order field to ''Tags'' and Ascending.
 
# Click ''OK'' on the render mode window.
 
## Ignore the error message for 'Error: Error evaluating a user-defined expresssion'.
 
# Click ''More'' in the element interface.  Then the ''Custom Render Handlers'' menu option, and choose the ''Main Display'' Render Handler. (You may see an error on this page with the Render Handler.  That is OK at this point.)
 
# Click the element interface, and then ''more'' and select ''custom render handlers...''.
 
# Select the ''Blog Listing'' render handler from the list.
 
# Submit Page and then Save as Template.
 
# Remember to submit the template for public use.
 
# Go to the Site Administrator and metadata forms.  Add a new binding for the "Blogs2" form to the "Blog Tags" template.
 
# Navigate to the "Blogs Manager" page and "Edit App Configuration" to open the configuration custom element form. On the "Features" tab, set the "Tags Listing Page Template" field to the template that was created and submit the form.
 
# On the "Blogs Manager" page, select the link for "Reset Site ADF" to have the updates take effect.
 
  
 
== CCAPI Configuration ==
 
== CCAPI Configuration ==
Line 127: Line 98:
 
# Create a new page called 'ccapi' under the root subsite and from the base plus one template.  When creating the page, disable the standard metadata 'Include In' fields for 'Page Indexes' and 'Full Text and Search Element Results'. This page may already exist within your site, if it does, then continue to the next steps.
 
# Create a new page called 'ccapi' under the root subsite and from the base plus one template.  When creating the page, disable the standard metadata 'Include In' fields for 'Page Indexes' and 'Full Text and Search Element Results'. This page may already exist within your site, if it does, then continue to the next steps.
 
# Add the 'Posts2' element to the page.
 
# Add the 'Posts2' element to the page.
# Select the 'Posts2' element indicator and go to 'more...'.  Select 'Name' from the menu.
+
## Select the 'Posts2' element indicator and go to 'more...'.  Select 'Name' from the menu.
# In the Element Name field, enter the text 'ccapiPosts2Element'.
+
## In the Element Name field, enter the text 'ccapiPosts2Element'.
 
# Add the 'Comments2' element to the page.
 
# Add the 'Comments2' element to the page.
# Select the 'Comments2' element indicator and go to 'more...'.  Select 'Name' from the menu.
+
## Select the 'Comments2' element indicator and go to 'more...'.  Select 'Name' from the menu.
# In the Element Name field, enter the text 'ccapiComments2Element'.
+
## In the Element Name field, enter the text 'ccapiComments2Element'.
 +
# Add the 'Blog2 Feature Data' element to the page.
 +
## Select the 'Blog2 Feature Data' element indicator and go to 'more...'.  Select 'Name' from the menu.
 +
## In the Element Name field, enter the text 'ccapiBlog2FeatureData'.
 +
# Add the 'Blog2' element to the page.
 +
## Select the 'Blog2' element indicator and go to 'more...'.  Select 'Name' from the menu.
 +
## In the Element Name field, enter the text 'ccapiBlog2'.
 
# Publish this page and put in read mode.
 
# Publish this page and put in read mode.
 
# Edit the 'ccapi.cfm' file (it may be ccapi.xml) for the site and add the following xml block into the <elements> section:
 
# Edit the 'ccapi.cfm' file (it may be ccapi.xml) for the site and add the following xml block into the <elements> section:
Line 147: Line 124:
 
   <controlName>ccapiComments2Element</controlName>
 
   <controlName>ccapiComments2Element</controlName>
 
</Comments>
 
</Comments>
 +
<BlogFeatureData>
 +
  <pageID>#####</pageID>
 +
  <subsiteID>##</subsiteID>
 +
  <elementType>custom</elementType>
 +
  <controlName>ccapiBlog2FeatureData</controlName>
 +
</BlogFeatureData>
 +
<Blog>
 +
  <pageID>#####</pageID>
 +
  <subsiteID>##</subsiteID>
 +
  <elementType>custom</elementType>
 +
  <controlName>ccapiBlog2</controlName>
 +
</Blog>
 
</source>
 
</source>
 
    
 
    
Line 161: Line 150:
 
[[Reset ADF|Reset the ADF]] for the server and site.
 
[[Reset ADF|Reset the ADF]] for the server and site.
  
== Create Blog Dashboard Page==
+
== Proxywhitelist Updates ==
This page will be used to manage the blog post and comments for each blogEach Blog will share this Dashboard Page.
+
A security feature within the ADF prevents unauthorized methods from being calledThe Blog Application requires certain methods to be authorized by updating the proxyWhiteList.xml file located within your site's _cs_apps/config directory.  If there is no proxyWhiteList.xml file located within that directory, you may copy the file from /ADF/apps/pt_blog/components into the _cs_apps/config directory and then reset the ADF. If there is already a proxyWhiteList.xml file located in your config directory, then add the following lines to it:
# Create page from the Base Plus One template called "Blog Dashboard" in the ''/webadmin/blogs/'' subsite.
+
<source lang="java">
# Place Custom Script on the page
+
<blogForms>renderPostForm,renderDeleteForm,renderBlogForm,renderBlogDeleteForm</blogForms>
# Select the "/ADF/apps/pt_blog/customcf/blog_dashboard.cfm" script (after page reloads 2 tabs and links to datasheets will appear)
+
<commentsService>handleCommentsSubmit,getDashboardData</commentsService>
 +
<PostService>syncPost,createPostPage</PostService>
 +
<blogService>handleBlogUpdate</blogService>
 +
<blogsUserGroupsGC>controller</blogsUserGroupsGC>
 +
</source>   
 +
   
 +
The above must be placed between the beginning and ending SETTINGS tags.  After adding the above lines, reset the ADF.
  
=== Configure Posts Tab ===
+
== Create Blog Management Page ==
# Click the "Posts" tab
+
This page will be used to manage the blogs for the site. 
  
# Define a View for the Datasheet Element in this Tab - call it "All Blog Posts"
+
# Create page from the Base Plus One template called "Blog Manager" in the ''/webadmin/blogs/'' subsite.
 +
# Place Custom Script on the page
 +
# Select the "/ADF/apps/pt_blog/customcf/all_blogs_manager.cfm" script.
 +
# Define a View for the Datasheet Element for this page - call it "All Blogs"
 
# Leave the View Source as the Default: Form Result/Custom Element Sheet
 
# Leave the View Source as the Default: Form Result/Custom Element Sheet
# Select the "Posts2" Custom Element and select the following columns: PostID, PostPageID, Title, Created By, and Date Posted.
+
# Select the "Blog2" Custom Element and select the following columns: blogID, Name, SubsiteURL, DateCreated, and Active.
# On the Datasheet, click on the "Filter" and apply the following filter: Field = BlogID; Operator = "equals"; Value = "request.params.blogID" (note: use the UDE button)
 
 
# Edit the datasheet columns.
 
# Edit the datasheet columns.
## Edit the PostID column, change the render handler to: ''/ADF/apps/pt_blog/datasheet-modules/lightbox_edit_delete_post.cfm''
+
## Edit the blogID column, change the render handler to:  
### Clear the header text.
+
### /ADF/apps/pt_blog/datasheet-modules/blog_edit_delete.cfm''
## Edit the PostPageID column, change the render handler to: ''/ADF/apps/pt_blog/datasheet-modules/post_page_url.cfm''
+
### Change the header text to "Edit/Delete".
### Clear the header text.
 
## Edit the CreatedBy column, change the render handler to: ''/ADF/extensions/datasheet-modules/1.0/userID-to-name.cfm''
 
 
# Edit the datasheet layout
 
# Edit the datasheet layout
## Set default sorting to "Title" field.
+
## Set default sorting to "Name" field.
 
## Set Results Per Page to "50".
 
## Set Results Per Page to "50".
 
## Uncheck "Show Alphabet Characters for Filtering"
 
## Uncheck "Show Alphabet Characters for Filtering"
 
## Uncheck "Allow JavaScript data sorting"
 
## Uncheck "Allow JavaScript data sorting"
## Click "Save"
+
# Publish the Blogs Management page.
 +
 
 +
== Create Blog Configuration Record ==
 +
We are creating a single Blog Configuration element record to be used within the application.
 +
 
 +
Go to the Blogs Management Page and select the ''Edit App Configuration'' link.  In the form, select the CommonSpot pages that were created in the previous steps. 
  
=== Configure Comments Tab ===
+
[[Reset ADF|Reset the ADF]] for the server and site.
# Click the "Comments" tab
 
  
# Define a View for the Datasheet Element in this Tab - call it "All Blog Comments"
+
== Create Blog Dashboard Page==
# Leave the View Source as the Default: Form Result/Custom Element Sheet
+
This page will be used to manage the blog post and comments for each blog.  Each Blog will share this Dashboard Page.
# Select the "Comments2" Custom Element and select the following columns: CommentID, Name, and Date Created.
+
# Create page from the Base Plus One template called "Blog Dashboard" in the ''/webadmin/blogs/'' subsite.
# On the Datasheet, click on the "Filter" and apply the following filter: Field = Comments2.blogID; Operator = "equals"; Value = "request.params.blogID" (note: use the UDE button)
+
# Place Custom Script on the page
 +
# Enter the explicit path for the following custom script:
 +
## /ADF/apps/pt_blog/customcf/blog_dashboard.cfm
 +
# Define a View for the Datasheet Element called "All Blog Posts"
 +
## Leave the View Source as the Default: Form Result/Custom Element Sheet
 +
## Select the "Posts2" Custom Element and select the following columns: PostID, PostPageID, Title, Created By, and Date Posted.
 +
## On the Datasheet, click on the "Filter" and apply the following filter: Field = BlogID; Operator = "equals"; Value = "request.params.blogID" (note: use the UDE button)
 
# Edit the datasheet columns.
 
# Edit the datasheet columns.
## Edit the CommentID column, change the render handler to: ''/ADF/extensions/datasheet-modules/1.0/edit-delete.cfm''
+
## Edit the PostID column, change the render handler to:
## Clear the header text for the field.
+
### /ADF/apps/pt_blog/datasheet-modules/lightbox_edit_delete_post.cfm
 +
### Change the header text to "Edit/Delete/Comments".
 +
## Edit the PostPageID column, change the render handler to:
 +
### /ADF/apps/pt_blog/datasheet-modules/post_page_url.cfm
 +
### Change the header text to "View Post Page".
 +
## Edit the CreatedBy column, change the render handler to:
 +
### /ADF/extensions/datasheet-modules/1.0/userID-to-name.cfm
 +
## Edit the DatePosted column, make the following settings:
 +
### Format Mask: Date/Time
 +
###  Date/Time Format: 07/24/00
 
# Edit the datasheet layout
 
# Edit the datasheet layout
## Set default sorting to "DateCreated" field and "Descending".
+
## Set default sorting to "Title" field.
 
## Set Results Per Page to "50".
 
## Set Results Per Page to "50".
 
## Uncheck "Show Alphabet Characters for Filtering"
 
## Uncheck "Show Alphabet Characters for Filtering"
 
## Uncheck "Allow JavaScript data sorting"
 
## Uncheck "Allow JavaScript data sorting"
 
## Click "Save"
 
## Click "Save"
# Publish the Blog Dashboard page.
+
# Submit and publish the page.
 
 
== Create Blogs Management Page ==
 
This page will be used to manage the blogs for the site. 
 
  
# Create page from the Base Plus One template called "Blogs Manager" in the ''/webadmin/blogs/'' subsite.
+
== Create Blog Feature Data Management Page ==
# Place Custom Script on the page
+
This page will be used to manage the blog feature data records for the site.
# Select the "/ADF/apps/pt_blog/customcf/all_blogs_manager.cfm" script.
 
# Define a View for the Datasheet Element for this page - call it "All Blogs"
 
# Leave the View Source as the Default: Form Result/Custom Element Sheet
 
# Select the "Blog2" Custom Element and select the following columns: blogID, blogTemplate, Name, Subsite, DateCreated, and Active.
 
# Edit the datasheet columns.
 
## Edit the blogID column, change the render handler to: ''/ADF/apps/pt_blog/datasheet-modules/blog_dashboard_link.cfm''
 
### Clear the header text.
 
## Edit the blogTemplate column, change the render handler to: ''/ADF/extensions/datasheet-modules/lightbox_edit_delete.cfm''
 
### Clear the header text.
 
## Edit the Subsite column, change the render handler to: ''/ADF/extensions/datasheet-modules/1.0/subsiteID-to-link.cfm''
 
# Edit the datasheet layout
 
## Uncheck "Allow JavaScript data sorting"
 
## Click "Save"
 
# Publish the Blogs Management page.
 
  
== Create Blog Configuration Record ==
+
# Create page from the Base Plus One template called "Blog Feature Data" in the ''/webadmin/blogs/'' subsite.
We are creating a single Blog Configuration element record to be used within the application.  
+
# Add a Datasheet element into the page.
 +
## Define a View for the Datasheet Element called "Blog Feature Data"
 +
## Leave the View Source as the Default: Form Result/Custom Element Sheet
 +
## Select the "Blog2 Feature Data" Custom Element and select the following columns: BlogID, FeatureType, FeatureCSPageID, and Last Date Modified.
 +
# Add a new action column for "delete".
 +
# Publish the page.
  
 +
== Update Blog Configuration Record ==
 
Go to the Blogs Management Page and select the ''Edit App Configuration'' link.  In the form, select the CommonSpot pages that were created in the previous steps.   
 
Go to the Blogs Management Page and select the ''Edit App Configuration'' link.  In the form, select the CommonSpot pages that were created in the previous steps.   
  
 
[[Reset ADF|Reset the ADF]] for the server and site.
 
[[Reset ADF|Reset the ADF]] for the server and site.
 
== Blog Listing Page ==
 
This page will be used to list the Blog Posts.
 
# Create a new page from the Base Plus One template with page name "index" and title "Blogs" in the ''/blogs/'' subsite. 
 
# In the main content of the page, add "Posts2" element.
 
# Select the "Home Page Display" render handler.
 
# Open the elements "Render Mode" and select "Display existing element data (content reuse)" and "Render results dynamically based on a filter, or display all records.". 
 
# Select the "Show all records" option and set the sort order to "Date Posted" is "Descending".
 
# Change the custom render handler to "Home Page Display".
 
# Publish Page
 
 
 
[[Category:Blogs]]
 
[[Category:Blogs]]

Latest revision as of 12:54, 11 September 2012

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 Installation.
  • Open the sites 'ADF.cfc' ( See Site Configuration (ADF.cfc) for more info) file in a text editor. Locate the Load the ADF Application into application space comment in the file. Add the following command under the comment section:
loadApp("ptBlog2");

Import Custom Elements

Create a "PT 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. Blog2 Feature Data (Blog2-Feature-Data-Custom-Element.zip)
  5. PTBlog2 Configuration (PTBlog2-Configuration-Custom-Element.zip)

Import Metadata:

  1. Blogs2 (Blogs2-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.

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

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.
    1. Select Display existing element data (content reuse) on the Rendering Mode tab.
    2. Select the Filter tab.
      1. Select Filter Type to Show subset of records.
      2. Select the field drop-down as the PostID field.
      3. Select the operator as Equals.
      4. Click the '...' button to open the ColdFusion expression window.
      5. Enter the text request.page.metadata.blogs2.postID as the expression and check the force cache checkbox. Click OK and then check the box to Ignore ColdFusion error, then click OK.
      6. Click OK on the render mode window.
      7. Ignore the error message for 'Error: Error evaluating a user-defined expresssion'.
  4. Click More in the element interface. Then the Custom Render Handlers menu option, and choose the Main Display Render Handler. (You may see an error on this page with the Render Handler. That is OK at this point.)
  5. Submit Page and then Save as Template.
  6. Remember to submit the template for public use.
  7. Go to the CommonSpot Site Administration and bind the Blogs2 metadata form to this new Blog Post Template.

Landing Page Template

  1. Create a CommonSpot page called 'Blog Landing' 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. Add the "Posts2" custom element to the page.
  3. Set the render mode for the following:
    1. Rendering Mode: "Display existing element data (content reuse)" and "Render results dynamically based on a filter, or display all records.".
    2. Filter:
      1. Filter: Subset of records
      2. Post2.blogID Equals {request.page.metadata.blogs2.blogID} (this is a ColdFusion expression)
        1. Make sure to check "Force Cache".
        2. Sort Order: "Date Posted" and "Descending"
      3. Save Render Mode
    3. Ignore the error message for "Error evaluating a user-defined expresssion".
  4. Change the custom render handler to "Home Page Display".
  5. Publish the page.
  6. Save the page as a template and submit the template for public use.
  7. Go to the Site Administrator and metadata forms. Add a new binding for the "Blogs2" form to the "Blog Landing" template.

CCAPI Configuration

The Blog Application uses the ADF CCAPI to populate blog post records. This needs to be configured for the site and blog app.

Follow the steps to setup the CCAPI Config file for the site if this is not done. Once this is completed, follow the steps below to setup the CCAPI config for the Blog App. Make sure to update the wsVars section with the correct URL's and username/password.

  1. Create a new page called 'ccapi' under the root subsite and from the base plus one template. When creating the page, disable the standard metadata 'Include In' fields for 'Page Indexes' and 'Full Text and Search Element Results'. This page may already exist within your site, if it does, then continue to the next steps.
  2. Add the 'Posts2' element to the page.
    1. Select the 'Posts2' element indicator and go to 'more...'. Select 'Name' from the menu.
    2. In the Element Name field, enter the text 'ccapiPosts2Element'.
  3. Add the 'Comments2' element to the page.
    1. Select the 'Comments2' element indicator and go to 'more...'. Select 'Name' from the menu.
    2. In the Element Name field, enter the text 'ccapiComments2Element'.
  4. Add the 'Blog2 Feature Data' element to the page.
    1. Select the 'Blog2 Feature Data' element indicator and go to 'more...'. Select 'Name' from the menu.
    2. In the Element Name field, enter the text 'ccapiBlog2FeatureData'.
  5. Add the 'Blog2' element to the page.
    1. Select the 'Blog2' element indicator and go to 'more...'. Select 'Name' from the menu.
    2. In the Element Name field, enter the text 'ccapiBlog2'.
  6. Publish this page and put in read mode.
  7. Edit the 'ccapi.cfm' file (it may be ccapi.xml) for the site and add the following xml block into the <elements> section:
<BlogPost>
  <pageID>#####</pageID>
  <subsiteID>##</subsiteID>
  <elementType>custom</elementType>
  <controlName>ccapiPosts2Element</controlName>
</BlogPost>
<Comments>
  <pageID>#####</pageID>
  <subsiteID>##</subsiteID>
  <elementType>custom</elementType>
  <controlName>ccapiComments2Element</controlName>
</Comments>
<BlogFeatureData>
  <pageID>#####</pageID>
  <subsiteID>##</subsiteID>
  <elementType>custom</elementType>
  <controlName>ccapiBlog2FeatureData</controlName>
</BlogFeatureData>
<Blog>
  <pageID>#####</pageID>
  <subsiteID>##</subsiteID>
  <elementType>custom</elementType>
  <controlName>ccapiBlog2</controlName>
</Blog>
  1. To populate the <pageID> and <subsiteID> tags, view the source code for the 'ccapiBlog' page that was just created.
  2. Identify the following line in the source code and enter this numeric value into the <subsiteID> tag:
var jsSubSiteID = ##;
  1. Identify the following line in the source code and enter this numeric value into the <pageID> tag:
var jsPageID = ####;

Reset the ADF for the server and site.

Proxywhitelist Updates

A security feature within the ADF prevents unauthorized methods from being called. The Blog Application requires certain methods to be authorized by updating the proxyWhiteList.xml file located within your site's _cs_apps/config directory. If there is no proxyWhiteList.xml file located within that directory, you may copy the file from /ADF/apps/pt_blog/components into the _cs_apps/config directory and then reset the ADF. If there is already a proxyWhiteList.xml file located in your config directory, then add the following lines to it:

<blogForms>renderPostForm,renderDeleteForm,renderBlogForm,renderBlogDeleteForm</blogForms>
<commentsService>handleCommentsSubmit,getDashboardData</commentsService>
<PostService>syncPost,createPostPage</PostService>
<blogService>handleBlogUpdate</blogService>
<blogsUserGroupsGC>controller</blogsUserGroupsGC>

The above must be placed between the beginning and ending SETTINGS tags. After adding the above lines, reset the ADF.

Create Blog Management Page

This page will be used to manage the blogs for the site.

  1. Create page from the Base Plus One template called "Blog Manager" in the /webadmin/blogs/ subsite.
  2. Place Custom Script on the page
  3. Select the "/ADF/apps/pt_blog/customcf/all_blogs_manager.cfm" script.
  4. Define a View for the Datasheet Element for this page - call it "All Blogs"
  5. Leave the View Source as the Default: Form Result/Custom Element Sheet
  6. Select the "Blog2" Custom Element and select the following columns: blogID, Name, SubsiteURL, DateCreated, and Active.
  7. Edit the datasheet columns.
    1. Edit the blogID column, change the render handler to:
      1. /ADF/apps/pt_blog/datasheet-modules/blog_edit_delete.cfm
      2. Change the header text to "Edit/Delete".
  8. Edit the datasheet layout
    1. Set default sorting to "Name" field.
    2. Set Results Per Page to "50".
    3. Uncheck "Show Alphabet Characters for Filtering"
    4. Uncheck "Allow JavaScript data sorting"
  9. Publish the Blogs Management page.

Create Blog Configuration Record

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

Go to the Blogs Management Page and select the Edit App Configuration link. In the form, select the CommonSpot pages that were created in the previous steps.

Reset the ADF for the server and site.

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 from the Base Plus One template called "Blog Dashboard" in the /webadmin/blogs/ subsite.
  2. Place Custom Script on the page
  3. Enter the explicit path for the following custom script:
    1. /ADF/apps/pt_blog/customcf/blog_dashboard.cfm
  4. Define a View for the Datasheet Element called "All Blog Posts"
    1. Leave the View Source as the Default: Form Result/Custom Element Sheet
    2. Select the "Posts2" Custom Element and select the following columns: PostID, PostPageID, Title, Created By, and Date Posted.
    3. On the Datasheet, click on the "Filter" and apply the following filter: Field = BlogID; Operator = "equals"; Value = "request.params.blogID" (note: use the UDE button)
  5. Edit the datasheet columns.
    1. Edit the PostID column, change the render handler to:
      1. /ADF/apps/pt_blog/datasheet-modules/lightbox_edit_delete_post.cfm
      2. Change the header text to "Edit/Delete/Comments".
    2. Edit the PostPageID column, change the render handler to:
      1. /ADF/apps/pt_blog/datasheet-modules/post_page_url.cfm
      2. Change the header text to "View Post Page".
    3. Edit the CreatedBy column, change the render handler to:
      1. /ADF/extensions/datasheet-modules/1.0/userID-to-name.cfm
    4. Edit the DatePosted column, make the following settings:
      1. Format Mask: Date/Time
      2. Date/Time Format: 07/24/00
  6. Edit the datasheet layout
    1. Set default sorting to "Title" field.
    2. Set Results Per Page to "50".
    3. Uncheck "Show Alphabet Characters for Filtering"
    4. Uncheck "Allow JavaScript data sorting"
    5. Click "Save"
  7. Submit and publish the page.

Create Blog Feature Data Management Page

This page will be used to manage the blog feature data records for the site.

  1. Create page from the Base Plus One template called "Blog Feature Data" in the /webadmin/blogs/ subsite.
  2. Add a Datasheet element into the page.
    1. Define a View for the Datasheet Element called "Blog Feature Data"
    2. Leave the View Source as the Default: Form Result/Custom Element Sheet
    3. Select the "Blog2 Feature Data" Custom Element and select the following columns: BlogID, FeatureType, FeatureCSPageID, and Last Date Modified.
  3. Add a new action column for "delete".
  4. Publish the page.

Update Blog Configuration Record

Go to the Blogs Management Page and select the Edit App Configuration link. In the form, select the CommonSpot pages that were created in the previous steps.

Reset the ADF for the server and site.