|
|
|
|
|
|
|
|
|
|
|
|
|
|
Great scripts for discussion forums (continued)
Mapping discussion threads Earlier attempts at developing thread maps fail with large views because of return value size limitations. To get around this limitation, I created a WebQueryOpen agent that builds the thread map dynamically. This agent relies on a view sorted by the unique ID of the parent document of the discussion.
The agent builds the thread map by first getting the unique ID of the document the user is opening and then getting the parent document of the discussion based on that ID. The agent then loops through all the documents with the same parent document unique ID. The first step in the loop is to determine if the document being evaluated is the document being opened by the user. If so, a small arrow icon is added to the line to indicate where the user is in the discussion. Finally, the agent tests the form of the document being added to the thread map and generates the appropriate HTML based on that form's fields.
Users can view the documents in the discussion from two views, one where the user can add comments and another for read-only purposes. So, before we actually begin the loop to create the thread map, the agent parses the HTTP Query_String field to determine the referring view. Once we determine the view, the agent then places the appropriate JavaScript code to load the correct navigation document in the navigation frame, mentioned earlier.
Print a discussion In one project, my client required a printable version of any thread in the discussion. These printable versions, similar to DominoPower's EasyPrint feature, are simply plain text, no graphics, and the most basic HTML versions of the same information. To do this, I created a simple form where the user selects the parent document of a particular thread. Then a QuerySaveAgent does the real work.
After declaring all the variables, the agent builds a document collection based on the value the user selected from the form. Then, the agent checks the HTTP_User_Agent field to determine the user's browser. This allows the agent to generate the appropriate JavaScript code.
If ((Left(pDoc.HTTP_User_Agent(0),9) = "Mozilla/4") And (Not (pDoc.HTTP_User_Agent(0) Like "*MSIE*") )) Then
Print {<A HREF="javascript:window.print()">Print</A> }
Else
Print "Click FILE - PRINT to print this page. "
End If
|
Then the agent begins a loop through the document collection. This loop generates the HTML for the entire thread of the discussion. To get around the problem of hard returns in the body field, the agent uses the Evaluate command, as shown in this code chunk:
eval = Evaluate(|@ReplaceSubstring( Body; @Char(13) ; " " )|, doc)
Print eval(0) & "<P>"
|
The agent also adds the author and creation date.
Search, keyword, and category My client also required very specific search functionality and formatting of search results. These requirements could not be met using the existing search solutions provided with Domino. The solution here uses two forms, one sub-form, two QuerySaveAgents and a script library. The main search form contains two HTML <FORM> tags. One offers the user the ability to do a general text search. The second allows the user to choose specific field values through a drop down list and search based on those values.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
-- Advertisement --
Find unused Lotus Notes groups and clean up your address book
Have you ever wanted to get rid of old Lotus Notes groups that were cluttering up your address book, but you weren't sure if they were used? Find Unused Groups can help.
Find Unused Groups will check your ACL, mail, multi purpose and server groups to help you determine if they are used, and who uses them.
Learn how to easily clean up your address book. |
-- Advertisement --
Integrate your Notes Applications with Microsoft Office and Symphony
Integra for Notes Integrates Microsoft Office and/or IBM Lotus Symphony
Requires NO change to the design of the appliation or Installations of DLL's and EXE's
- Integra is a ready to use solution, enhance static reports with Excel data analysis, pivot tables, macros
- User friendly aproach, using a point and click access to features
- Reports from any Lotus Notes databases
- Runs reports through a Notes client, web browser and scheduled basis
- Allows use of LotusScript for advanced data manipulation
- Enables self service reporting capabilities to end-users
Learn more at www.integra4notes.com. |
|
|
|
|
|
|
|
|
|
|