Difference between revisions of "PT Forums Manage User Settings"

From ADF Docs
Jump to: navigation, search
(Automatically adding a user to Forum User Setting)
(Automatically adding a user to Forum User Settings)
Line 41: Line 41:
 
The Forum User Setting custom element is used to store forum specific user data (date joined, number of posts, etc.) An important aspect of this is making sure a user is added to this global custom element before they can post a message. One way to achieve this is through the use of the CommonSpot 'after--login.cfm' hook to automatically add the user to after they have logged in in to the site (if they don't already exist).
 
The Forum User Setting custom element is used to store forum specific user data (date joined, number of posts, etc.) An important aspect of this is making sure a user is added to this global custom element before they can post a message. One way to achieve this is through the use of the CommonSpot 'after--login.cfm' hook to automatically add the user to after they have logged in in to the site (if they don't already exist).
  
@If you don't currently have an after--login.cfm file  
+
*If you don't currently have an after--login.cfm file  
 
##Copy the 'after--login.cfm' file from the ''/ADF/apps/ptforums/site-files/'' folder  into the root of your site .  
 
##Copy the 'after--login.cfm' file from the ''/ADF/apps/ptforums/site-files/'' folder  into the root of your site .  
 
##Restart Coldfusion
 
##Restart Coldfusion
  
@If you currently have an 'after--Login.cfm' file   
+
*If you currently have an 'after--Login.cfm' file   
 
##Copy and Paste the code from the 'after--login.cfm' file in the ''/ADF/apps/ptforums/site-files/'' folder into your current after--login.cfm file on the root of your site.
 
##Copy and Paste the code from the 'after--login.cfm' file in the ''/ADF/apps/ptforums/site-files/'' folder into your current after--login.cfm file on the root of your site.
 
##Restarting Coldfusion should not be needed.
 
##Restarting Coldfusion should not be needed.

Revision as of 23:45, 27 March 2010

Back to Build Templates/Pages

Overview

The Forum User Settings element is a global custom element. Managing data for global custom elements can be configured easily through the use of Datasheets. The following sections will describe how to configure the datasheet to manage the Forum User Settings element data.

Steps

  1. Create a new page called 'Manage Forum User Settings' from the Base Plus One (or a Web Admin) template and in the /webadmin/forums/ subsite.
  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_forums/customcf/manage_usersettings_header.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: Forum User Settings
    2. Private: unchecked
    3. Default View: unchecked
    4. Description: View to manage the Forum User Settings
    5. Datasheet Source: Form Result/Custom Element Sheet
  8. From the Datasheet Source dialog choose the "Forum User Settings" custom element and click "Next".
  9. From the Datasheet Columns Dialog select the columns userSettingsID, profileID and Messages from the Available Columns list and move them to the Selected Columns list and then click "Finish".
  10. You will be brought to the Datasheet View page; click "Close" to return to your page.
  11. You will see the datasheet element on this page now. Click the Datasheet element interface icon again and this time choose "Edit Columns".
  12. From the Datasheet View Column Properties dialog choose the link for "Add a new action column" again.
  13. Within the Action Column Properties dialog enter the following information and click "Finish":
    1. Header: Edit
    2. Hide Header: Checked
    3. Column Text: edit
    4. Window Target Name: <leave blank>
    5. Modules: edit-form-data.cfm
  14. From the Datasheet View Column Properties dialog, choose the link for "Add a new action column" again.
  15. Within the Action Column Properties dialog enter the following information and click "Finish":
    1. Header: Delete
    2. Hide Header: Checked
    3. Column Text: delete
    4. Window Target Name: <leave blank>
    5. Modules: delete-form-data.cfm
  16. Close the Edit Column window.
  17. Publish this page.

Automatically adding a user to Forum User Settings

The Forum User Setting custom element is used to store forum specific user data (date joined, number of posts, etc.) An important aspect of this is making sure a user is added to this global custom element before they can post a message. One way to achieve this is through the use of the CommonSpot 'after--login.cfm' hook to automatically add the user to after they have logged in in to the site (if they don't already exist).

  • If you don't currently have an after--login.cfm file
    1. Copy the 'after--login.cfm' file from the /ADF/apps/ptforums/site-files/ folder into the root of your site .
    2. Restart Coldfusion
  • If you currently have an 'after--Login.cfm' file
    1. Copy and Paste the code from the 'after--login.cfm' file in the /ADF/apps/ptforums/site-files/ folder into your current after--login.cfm file on the root of your site.
    2. Restarting Coldfusion should not be needed.