Thursday, October 15, 2009

DIY Dilbert RSS Reader for SharePoint 2007


 

Everyone seems to be jumping on the "Here's my custom web part to do this…" band-wagon, so here's my "Here's how to do it out of the box…"

Everyone loves Dilbert, and Scott Adams has been on the money for so long, it's a wonder he isn't a gazillionaire…

Various people have posted ways to get around the fact that the out-of-the-box RSS Reader in WSS 3.0/MOSS2007 doesn't display the images from the Dilbert.com
RSS feeds, unless you expand the item. Their primary solutions are based around new web parts, or worse. But why bother? Most of them aren't packaged up properly, so require a skilled and privileged user to set them up.

Here's my solution, all it requires is the ability to add the built-in RSS Reader to a page and that SharePoint can already access, external to your organisation, RSS feeds (usually requires some proxy details in the web.config).

Steps:

  1. Create a new blank web part page or edit an existing one (e.g. the default page on your MySite).
  2. Add a Web Part to the appropriate zone (preferably a wide zone)
  3. Tick the RSS Viewer Web Part, click Add.
  4. On the newly inserted Web Part, click edit | Modify Shared Web Part (or click Open the Tool Pane)
  5. Type the feed URL (e.g. http://feeds2.feedburner.com/DilbertDailyStrip )
  6. Limit the feed to how ever many strips you want to display at once (e.g. 1)
  7. Click the XSL Editor button
  8. Copy and paste the XSL into something useful (at worst, there's always notepad)
  9. Search for: toggleitemdescription
  10. And replace:

    <div class="item link-item" >
    <a href="{concat(&quot;javascript:ToggleItemDescription('&quot;,$CurrentElement,&quot;')&quot;)}" >
    <xsl:value-of select="rss1:title"/>
    </a>
    <xsl:if test="$rss_ExpandFeed = true()">
    <xsl:call-template name="RSSMainTemplate.description">
    <xsl:with-param name="DescriptionStyle" select="string('display:block;')"/>
    <xsl:with-param name="CurrentElement" select="$CurrentElement"/>
    </xsl:call-template>
    </xsl:if>
    <xsl:if test="$rss_ExpandFeed = false()">
    <xsl:call-template name="RSSMainTemplate.description">
    <xsl:with-param name="DescriptionStyle" select="string('display:none;')"/>
    <xsl:with-param name="CurrentElement" select="$CurrentElement"/>
    </xsl:call-template>
    </xsl:if>
    </div>

    With:

    <div class="item link-item" >
    <xsl:call-template name="RSSMainTemplate.description">
    <xsl:with-param name="DescriptionStyle" select="string('display:block;')"/>
    <xsl:with-param name="CurrentElement" select="$CurrentElement"/>
    </xsl:call-template>
    </div>

  11. At this point, you could also do the same for the RDF and ATOM sections (keep searching for toggleitemdescription), just for the sake of completeness.
  12. Copy and paste the XSL code from your editor, back into the XSL Editor (in SharePoint)
  13. Click Save
  14. You can now make any other changes to the Web Part (say restricting the chrome) and click OK
  15. Check-in/publish/Exit Edit Mode and you're done

All this does is stops the Web Part from collapsing the RSS items, which in Dilbert's case, means you get to see the images. The down side, is that it still ends up displaying the date to the left of the image. So not clean, but it works and it's out-of-the-box.

You could dig around in the XSL a bit more and probably find a way to get rid of the date.

If you want to use this over and over again, just export the web part, and import it again, giving it a unique name and next time just use your new one. No special privileges required (at least not on your MySite) and no DLLs, no config editing, just nice and easy.

I really should look into how XKCD.com does their feeds, as the RSS Viewer web part has no problems at all with displaying the images.

Monday, August 31, 2009

The wonders of Kerberos, SharePoint and SQL Reporting Services

OK, so we’re trying to get a little more modern here, decreasing our reliance on Oracle Reports (yetch!) and Access based reporting (shudder) and move on to the spiffy SQL Server Reporting Services, only 2005, but hey, we have to start somewhere.

Given that our Intranet is SharePoint based (full MOSS2007), I of course wanted to run SSRS in integrated mode, so along came Kerberos.

I’ve had Kerberos working for SharePoint for some time now, so thought it would be a doddle to get SSRS integrated, boy was I wrong.

First up, turned out that none of our SQL servers had registered server principal names with AD, so:

Setspn –a MSSQLSvc/NETBIOSNAME_IN_UPPERCASE:PORT DOMAIN\DOMAINACCOUNT_THAT_SQL_IS_RUNNING_UNDER
Setspn –a MSSQLSvc/FQDN_NAME_IN_UPPERCASE:PORT DOMAIN\DOMAINACCOUNT_THAT_SQL_IS_RUNNING_UNDER

Note: the inclusion of the PORT, not all of the documentation mentions that for SQL…
Note: uppercase – yes, dispite the MS documentation stating that “as long as you’re only using Kerberos against Windows machines, it’s case-insensitive”, I found that it didn’t work until I pushed the case up. No I haven’t tried combinations of case to find exactly where the case is important. Though according to the Kerberos tickets on my PC, my domain ticket has an all uppercase domain, but one of my SQL tickets has only the server name (and not the domain) in uppercase… go figure.

Having discovered the case sensitivity, I had to go back and re-do all my SharePoint SPNs and just to make sure, I doubled up on the ports too:

Setspn –a HTTP/NETBIOSNAME_IN_UPPERCASE DOMAIN\DOMAINACCOUNT_THAT_THE_SP_APPPOOL_IS_RUNNING_UNDER
Setspn –a HTTP/FQDNNAME_IN_UPPERCASE DOMAIN\DOMAINACCOUNT_THAT_THE_SP_APPPOOL_IS_RUNNING_UNDER
Setspn –a HTTP/NETBIOSNAME_IN_UPPERCASE:80 DOMAIN\DOMAINACCOUNT_THAT_THE_SP_APPPOOL_IS_RUNNING_UNDER
Setspn –a HTTP/FQDNNAME_IN_UPPERCASE:80 DOMAIN\DOMAINACCOUNT_THAT_THE_SP_APPPOOL_IS_RUNNING_UNDER

And now it all works, yay, with the current user authenticating all the way back to the DB.

Only took a few days to track that down. Kudos to the MS team producing the Troubleshooting Kerberos Delegation in Windows document which took me through a very rigorous set of steps to ensure I was configured correctly (though more help on what Kerberos should look like in NetMon would be good!) though doesn’t mention case-sensitivity, had to dig that up HERE.

Now we can get back to concentrating to actually delivering reports…

Wednesday, June 06, 2007

Microsoft Web Experience Events

Microsoft is hosting free Microsoft Web Experience events at the Los Angeles Microsoft office on June 8th and the Denver Microsoft office on June 15th. They will be presenting information on building the next generation user experience on the web. They are providing breakfast and lunch, hosting a reception with beer and wine, and attendees are automatically registered in a drawing for an XBox 360 and a Zune that will be given away at each event. For more information, visit http://kaevans.sts.winisp.net/Shared%20Documents/webexperience.aspx.

Thursday, October 26, 2006

VMWare vs MS Virtual Server for MOSS2007 Development

OK, so it's been nearly two months since I last posted, but then the work I've been doing is a little hush, hush, at least as far as our competitors are concerned.

But here's a hint:

While investigating the state of MOSS2007 BDC generator tools, I came across Todd's post on
virtual machine performance for MOSS2007 development.

Makes for very interesting reading and his results are probably not all that surprising. Pitty he didn't compare with a real machine as well...

Friday, April 07, 2006

Windows on a Mac is here

Windows on a Mac is here - Product Review - CNET Asia

Apparently some non-IT industry guys won the US$14000 competition to get Windows on Mac/Intel and now it looks like Apple are releasing the method into the wild!

Spot the entry that points to Photoshop running faster on Windows than on OS/X (on the same hardware)...

I don't think the writing is on the wall for OS/X fans, but at least they now have the option to switch OS's to suit the application they're running, without having to switch the hardware too...

I think this will be a boon (well, bust actually) for the Mac gaming industry, since there will no longer be a point to releasing Mac ports of popular games, since they could just run Windows anyway... It'll be interesting to see how the Mac community jumps on this one, since we've already seen what the Linux community feels...

Sunday, March 05, 2006

Google Copies Corporate Data to Google's Servers?

Slashdot Google Copies Corporate Data to Google's Servers?

It's clearly stated during the install, but Google is getting busted for copying corporate files to Google's servers via Google Desktop.

I hate to say it, but it's all about user education and standardising corporate desktops.

If non-standard applications are being installed by uneducated users... the corporate already has an a problem.

We have a single standard desktop (IT Admins and Developers being the only major exceptions) and a rappidly improving change control process to go through if exceptions are required.

You're average corporate user should not have sufficient privledges to install aplications on their desktops. And yeah, I know the software people are finding new and clever ways to get around this, especially through the use of browser plug-ins, which often seem to require minimal privs to install/work.

If you must install Google Desktop or anything really, use Group Policy to limit or even lock down the configuration. Then if that's not enough, you can always use your firewalls or Intrusion Prevention devices to block the outgoing traffic.

But that's just my 2c. It's nice to feel that corporately, we're pretty much on top of this one... it's rare.

Thursday, March 02, 2006

Chapman Tripp makes waves in the Geek Community - Slashdot | 'Infectious' Open Source Software?

Slashdot 'Infectious' Open Source Software?

Some of our lawyers wrote a piece for the New Zealand State Services Commission on the use of Open Source Software.

While I don't agree with everything they say, I wont speak up about it here (I have internally).

There a few more relevant bits on our website here & here.