Wednesday, February 22, 2006

Creating a Recycle Bin for Windows SharePoint Services WSS/SPS (Part 1)

In MSDN Magazine, there was an awesome article a few months ago about creating a recycle bin in WSS. However, not all of the information was provided to complete it successfully. This entry fills in the missing information from the MSDN Mag recycle bin article.

  • Configure WSS to allow Web Part Extensions
    To configure SharePoint, you need to enable event handlers. Go here for configuration instructions:
    http://msdn.microsoft.com/library/en-us/odc_SP2003_ta/html/sharepoint_wsseventing.asp

  • Configuring the Recycle Bin
    To make a document library work with the recycle bin, do the following to the recycle bin document library:
    1. Click "Manage Content" On the area home page and select the document library that requires the recycle bin.
    2. In "General Settings" click the link "Change advanced settings"
    3. In the section labeled "Event Handler" enter the following:
      • Assembly Name: My.SharePoint.RecycleBin, Version=1.0.0.0, Culture=neutral, PublicKeyToken=publickeytoken
      • Class Name (Recycle Bin): My.SharePoint.RecycleBin.RecycleBinEventSink
      • Properties:
        <Data>
        <Mirror>Backup</Mirror>
        <Recycle>Recycle Bin</Recycle>
        <Domain>Domain</Domain>
        <User>PortalAdmin</User>
        <Pass>password</Pass>
        <Type>*</Type/>
        <Size>*</Size>
        </Data>
  • Configuring the Document Library
    Follow the same steps as above, but set the class name to My.SharePoint.RecycleBin.DocLibEventSink
  • Configuring the Recycle Bin All Items page
    The recycle bin document library does not have the proper menu structure to restore items from the page. Open the AllItems.aspx page either using front page or mapping the document library using Add Network Places... and add the javascript that came with the recycle bin source code (don't forget the <script> tag) between the tags at the top of the document.
  • Testing it out
    When you go to test out the recycle bin, don't be surprised if something isn't configured right--it takes a few tries. When you delete an item from the document library, it will create a folder in the Recycle Bin document libary that is the same name as the original document library--this allows the recycle bin to retain a reference point for restoration. Inside the folder, you'll see the file you deleted. The javascript you applied will make the drop down menu options be Restore and Delete. When you restore the file, it should return to the document library it came from.

In a future entry, I will go into implementing the document/recycle bin across all SPS/WSS webs. At least this entry covers the missing pieces from the MSDN Mag article.

Tuesday, February 21, 2006

SharePoint Migration utilities

I've been getting really annoyed with the SharePoint 2003 / WSS migration utilities (StsAdmin and SMigrate). I decided it would be much easier to build a GUI around some of their features. The source code and application are available here:

Downloads:

Download
Exe only
Download Exe and source code

Screenshots:

The Logon screen allows you to impersonate another user.

Main application

The application displays 4 tabs: Backup, Restore, Web Part Packages, and Templates.

The Backup tab allows you to use SMigrate to backup a site in SPS or WSS. This will not extract areas from SPS.

The Restore tab allows you to use SMigrate to restore a site in SPS or WSS.

The Web Part Packages tab allows you to use StsAdm to view, add, or remove web part packages from a SPS or WSS site. First, set the url. Then click the List Items button to view all web part packages on the site. You must be an administrator for this function to work. In some cases, you may have to be the single portal administrator account that runs the application pool.

The Templates tab allows you to use StsAdm to view, add, or remove list templates from a SPS or WSS site. First, set the url. Then click the List Items button to view all templates on the site. You must be an administrator for this function to work. In some cases, you may have to be the single portal administrator account that runs the application pool.


Finally, after performing some actions, you will be prompted to perform an IIS Reset. This is available in the menu as shown in the following diagram:

Saturday, January 28, 2006

Super Bowl Bound

In case you haven't heard, the Steelers are going to the Super Bowl. There's been some controversy regarding the media when Joey Porter noted that the media turned its back on the Steelers, but the fans did not. It's very true. When you look at the players going to the Pro Bowl, most of them are not playing right now. Why isn't Ben Roethlisberger in the Pro Bowl? He has maintained one of the highest qb ratings all season. He has only lost 3 games out of 31 games played since falling into his role as the star qb of the Steelers. Does Brady have this record? Manning? Palmer? Greene? None of these players have maintained the poise that Ben has and yet they are regarded as the all-stars of the game, but the media played their names enough that they will go to the Pro Bowl. Roethlisberger better be in the Pro Bowl next year, or I'll be shocked.

Furthermore, Pittsburgh does not have a single team member with off-the-chart stats. That's because Pittsburgh players are unselfish and the offense spreads the work around. In the last few playoff games, Parker and Bettis teamed up to make the normal 100+ rushing games. Randel El, Hines Ward, and Heath Miller have shared the large number of passing yards. This team is dominant because they are a team--no individual is out to become the superstar, instead the they will become Super Bowl champs.

GO STEELERS!!!

Monday, January 16, 2006

Denver to go!

Steelers deserved to win the game. They beat the Colts and they beat the refs bad calls. Ben Rothelisburger was composed, and the defense consistently came up big.

Go Steelers!

Thursday, January 12, 2006

SharePoint unfriendly URLs Cx notation

I am working at a client on a SharePoint Portal Server implementation, and the question came up about maintaining friendly URLs in SPS. After a certain number of areas are created, SPS alters the URL to contain a C1,C2,...Cx before the requested area name. This posed a problem because the client wants users to type in:

http://<path>/IT for IT
http://<path>/HR for Human Resources

I found some information on this by Daniel McPherson here:
https://blogs.msdn.com/danielmcpherson/archive/2005/05/18/419160.aspx