neatComponents is the hybrid-cloud database engine that powers clearString. | ||
Previous page | Techniques & KB Articles | Next page |
Creating a private message system |
Creating a private message system
Start with a blank template site, and use the following method to end up with this site
In the User Group Manager, Registered Visitor, Access Codes, add a new access code, with Accessing Group of ‘Visitor’ and leave the ‘Access Code’ blank. In the Layout Manager: Before ‘Section 1’,
Set this as the Site Default Page BE / Permissions / Visitor / View Page = Deny Delete ‘Section 1’ and ‘Section 2’ Under the Home page,
Under the ‘Compose message’ page,
Set this Hidden
Set this Hidden Under the ‘Inbox’ page,
Set this Hidden Under the ‘Sent messages’ page,
Set this Hidden
In the Layout Manager: Under the Admin page,
Under the Tables page,
Under the Feeds page,
Under the Queries page,
Under the Views page
Configure the Admin page,
Set the Record Identifier to be the Username field.
Link to: Table – Profile Auto-complete Complete with ‘record id’ page parameter = Always
Link to: Table – Message Auto-complete Complete with ‘record id’ page parameter = Always Set the Record Identifier to Record ID
Configure the User Data Feed to include users from the ‘Registered Visitor’ user group
Create some users Using a different browser (so you can login and out as different users without interrupting your site configuring) browse to the site, and on the login page, click the ‘Register Here’ link. Fill in the registration form as a test user. Log out, and repeat a few more times with different fake usernames. This will make testing and visualising your configuration easier.
Configure the Send new message Data Entry Form:
Subject Style: Layout / Width = 100% Message (initially show editor toolbar expanded) Recipient (Always hidden (update using page parameters)) Submit button (with button text set to ‘Send’) Reply to (Always hidden (update using page parameters))
Configure the Message Sent Page
Configure the query Users to email
Local page – Send new message Configure the Users Search View
Configure the Compose message page
Configure the Table ‘Reply prompt’ - Add a field “Reply” (type Text) - In the ‘View Table’ mode, add a record o In the Reply field, enter the word ‘Reply’
Configure the Query ‘Message List’ - Add the following Data Sources: o Message o Profile o User Data Feed o Profile (this will appear as ‘Profile_1’)
- Join the Data Sources: o User Data Feed.User Id – Profile.Username o Profile.Username – Message.Sender o Message.Recipient – Profile_1.Record Id
- Add the fields in order: o User Data Feed.First Name o User Data Feed. Last Name o Message.Subject § On-click link: · Local Page / View message · Parameters: custom / Message.RecordId o Message.Created § Sort Descending § Format: select a format that shows both the date and the time o Profile_1.Userame § Uncheck ‘Show’
Configure the ‘Inbox’ Page - Embed the Query ‘Message List’ o View: Grid o Records: Criteria § Username Equal to Current User
Configure the Query ‘Message’ - Add the following Data Sources: o Message o Profile o User Data Feed o Profile (this will appear as ‘Profile_1’) o Reply prompt
- Join the Data Sources: o User Data Feed.User Id – Profile.Username o Profile.Username – Message.Sender o Message.Recipient – Profile_1.Record Id o (note: there should be no join to the ‘Reply prompt’ data source)
- Add the fields: o Message.Subject o Message.Message o Message.Created § Format: select a format that shows both the date and the time o User Data Feed.First Name o User Data Feed.Last Name o Message.Record Id o Profile.Username § Title=Sender o Profile_1.Username § Title=Recipient o Reply prompt.Reply § On-click link: · Local page / Send new message · Querystring: action=edit&replyid=-1 · Parameters: custom o Profile.RecordId o Message.RecordId
Configure the Custom View ‘Message Detail’ - Select the Query ‘Message’ and Apply - Edit the ‘Records’ surface: o Add the fields: § Subject § First Name § Last Name § Created § Message § Reply o Arrange them in a layout of your choice.
Configure the page ‘View Message’ - Embed the Query ‘Message’ o View: Message Detail o Records: Criteria § Recipient Equal to Current User § Record Id Equal To Parent parameters · Require value = Checked
Configure the Query ‘Message List - Sent’ - Add the following Data Sources: o Message o Profile o User Data Feed o Profile (this will appear as ‘Profile_1’) o User Data Feed (this will appear as ‘User Data Feed_1’)
- Join the Data Sources: o User Data Feed.User Id – Profile.Username o Profile.Username – Message.Sender o Message.Recipient – Profile_1.Record Id o Profile_1.Username – User data Feed_1.User Id
- Add the fields in order: o User Data Feed_1.First Name o User Data Feed_1. Last Name o Message.Subject § On-click link: · Local Page / View sent message · Parameters: custom / Message.RecordId o Message.Created § Sort Descending § Format: select a format that shows both the date and the time o Profile.Username § Uncheck ‘Show’
Configure the page ‘Sent messages’
- Embed the Query ‘Message List - Sent’ o View: Grid o Records: Criteria § Username Equal to Current User
Configure the page ‘View sent message’ - Embed the Query ‘Message’ o View: Message Detail o Records: Criteria § Sender Equal to Current User § Record Id Equal To Parent parameters · Require value = Checked
|
|