Blog Search
     
DotNetNuke Gold Benefactor
    

Blog
Dec 5

Written by: Chris Garrett
12/5/2009

We have a solution to produce printable chat logs. We know it's long overdue and for that we apologize. So anyway, on to how to accomplish this task. We are using a free and open source DotNetNuke module called Open Web Studio (OWS) formerly known as ListX. Which can be obtained by visting their website http://www.openwebstudio.com. I won't tell you all the great things this module can do, but I will say, if you have not installed it on your site, it is definitely one to look into. OWS is THE most versatile DNN module I've ever used.

First, go out to the Open Web Studio site (link above) and register to download the module. Or you can go and get it directly from their SourceForge project page. The version I used to develop this solution was 2.1.17, which is the latest version and the one I recommend downloading. Also, I developed this solution using DNN 5.01.01. Please check all version requirements before installing, and even then we recommend installing this module on a non production server to ensure compatibility with your site. We cannot be held responsible software incompatibilities

Once you've downloaded the module install it just as you would any other module. Then create a page on your site to house the module. We recommend locking this page down using the DNN security so that not everyone can view the chat logs. There is no internal security built in. Drop  the module on the newly created page and click on the "Administration" link on the module. If you do not see the "Administration" link use the module option menu and click on "Administration" from there. This will spawn a new window or tab (depending on your browser and settings) with the OWS administration page.

Download the JSON configuration file and open it up in a text editor such as notepad. Copy all of the contents to your clipboard. Now, back on the OWS Administration page, click on the "Import" button1 near the top left hand corner and paste over the "Place configuration here." text2. Click the "No" radio button under "Preserve Configuration ID"3. And then hit save. Click on the thumbnail below for a full screen example.

OWS Administration Screen Example

 

Once you've saved the configuration. You will be taken to a page that says "Region - OnRender" you may click the plus sign to expand and view each level if you wish. I will detail each component below. To finish loading the settings and get it onto your page, you must click the "Publish" button below the "Import" and "Export" buttons. Once you've clicked on publish, you should see to the right of your screen a confirmation such as the one below.

Now your Configuration is ready to be attached to the OWS module you loaded on your page earlier. Go to your page and click on the module settings for the OWS module. At the bottom of the page you should see a dropdown box containing your configuration. Select your configuration and click "Update". The logs that display by default are for the past 7 days in the "Default Room" more specifically the room with the ID of 1.

To use the "log viewer" simply enter a start date and end date (MM/DD/YYYY) format, select the room you wish to look at the logs for, and check the box if you wish to show system messages (ex. "User {joined_room}", "User {left_room}", etc...).

If you want to look for one day, you can just put the same date in the start and end dates.

That's it. You now have a log viewer that you can print from. If you wish to continue reading I'll go into more detail about what the different parts of this configuration are, in case you wish to make changes, it may help.

 

---------------------------------------------------------------------

Action Explanation in OWS Administration:

  1. Region - OnRender: This is just a top level container to hold all of the Actions.
  2. Query Template: This is the default query that runs when the page loads.
  3. Header [0] Template: The is the top part of the template, you'll notice that it's indented under Query Template, that just means that it is attached to that query. The results of that query will be displayed in that template. This header builds the style, search form, and column headers for the records table.
  4. Detail Template: This is the template for your records, it determines how each record will be displayed on the page. It is attached to the Header Template.
  5. Detail (Alternate) Template: Same as the Detail template, except that this one controls every other record displayed. The only thing I changed between the two Detail templates is the row color. Each alternating row will have a light grey background.
  6. Footer [0] Template: Ends the table built by the Header template.
  7. Message: This Action is fired when the form is submitted by clicking "Get Logs".
  8. Query Template: This is a parameterized query, same as above only this replaces the default values with those that were entered into the form.
  9. 9 - 12 are the same as 3 - 5 displaying the records from the chat logs query.
  10. ...
  11. ...
  12. ...
  13. No Results Template: This displays if either query runs but return 0 rows.

I hope all this helps and if there are any problems running it. Please let us know by emailing us at support@swirlhost.com.

Tags:
     
Copyright (c) 2012 Swirlhost
Privacy Statement | Terms Of Use