Geeks With Blogs



Lance Robinson

Create Your Badge

Lance Robinson is a software engineer in Durham, Chapel Hill, Raleigh, and surrounding areas. More about Lance.


Lance's TextBox » About Me » My Resume »Twitter

I added a little newsgroup browser to my SharePoint site with about a one page RSSBus SharePoint WebPart template.  It works by importing the RSSBus NntpOps Connector.  It calls its nntpListArticles operation to list the articles of a particular newsgroup and displays them in a table.  Then when an article is clicked on, it calls the nntpGetArticle operation to retrieve the actual article – don’t worry – it will only retrieve the first 1000 lines of the article – if the thread is larger than that it will provide a link to view the message in Google Groups intead so that your SharePoint page doesn’t end up with a huge newsgroup article on it!  Here is the WebPart template itself – just copy and paste it into your own RSSBus SharePoint WebPart (with the NntpOps connector installed) and it will work right away.  This template browses the microsoft.public.sharepoint.windowsservices group, but you can set your own news server, group, etc.

<rsb:import lib="RSSBus.NntpOps" />
<div style="height:100;overflow:auto">
<table width="98%">
<th style="background-color:LightGrey; white-space:nowrap">Subject</th>
<th style="background-color:LightGrey; white-space:nowrap">Author</th>
<th style="background-color:LightGrey; white-space:nowrap">Size</th>
<th style="background-color:LightGrey; white-space:nowrap">Date</th>

<rsb:set attr="group" value="microsoft.public.sharepoint.windowsservices" />
<rsb:set attr="range" value="25" />
<rsb:set attr="server" value="" />
<rsb:call op="nntpListArticles">
<td style="white-space:nowrap"><a href="?msgnumber=[[nntp:number]]">[[nntp:subject | truncate('60')]]</a></td>
<td style="white-space:nowrap">[[nntp:author]]</td>
<td style="white-space:nowrap">[[nntp:size]]</td>
<td style="white-space:nowrap">[[nntp:date]]</td>
<rsb:check attr="_request.msgnumber">
<hr />
<rsb:call op="nntpGetArticle?maxlines=1000&article=[[_request.msgnumber]]">
<div id="headers">
<table width="98%" style="background-color:LightGrey">
<td width="75px">From:</td>
<td><a href="mailto:[[nntp:author | htmlencode]]">[[nntp:author | htmlencode]]</a></td>
<td width="75px">Date:</td>
<td width="75px">Subject:</td>
<tr />
<td colspan="2"><a href="[[nntp:id | Replace('<', '') | Replace('>', '') | urlencode]]">View in Google Groups</a></td>
<div id="body" style="height:400;overflow:auto">
<hr />
[[nntp:body | Replace('0A','<br>','true')]]
<p />
<a href="[[nntp:id | Replace('<', '') | Replace('>', '') | urlencode]]">View in Google Groups</a>

If you want to make the news server and group editable via the “Modified Shared WebPart” property settings instead of having it hard coded, thats easy to do too.  Just kill the rsb:set lines where they are hard-coded in the tempate, and at the top of the empty add the following:

<rsb:info title="RSSBus SharePoint WebPart: USENET Newsgroup Browser">
<input name="Server" default="" required="true" />
<input name="Group" default="microsoft.public.sharepoint.windowsservices" required="true" />
<input name="Range" default="25" />

this tells the WebPart to create 3 inputs – Server, Group, and Range.  The NntpOps Connector will be able to see those and work with them.

Technorati Tags: , ,
Posted on Tuesday, May 19, 2009 1:12 PM | Back to top

Comments on this post: Usenet Newsgroup Browser in SharePoint

No comments posted yet.
Your comment:
 (will show your gravatar)

Copyright © Lance Robinson | Powered by: