Another Custom Search Result WebPart. Document Details page in WSS!
I was recently asked how to change the search results for SharePoint Portal Server 2003 so that when a user selected a document from the search results, instead of actually opening the document which is the current default behaviour of SPS, that the user should be directed to the documents' details page within the relevant WSS site. This is because typically some users actually want to view the documents details before deciding to open it. This also gives the user the ability to check out the document before opening it, etc.
So, the solution we came up with was to change the default search results webpart to look like below:

The code is pretty easy but got a bit messy with document libraries that has a folder structure within it. But it looks like it works!
As you can see, there is an option to "To open this document Click Here", instead the URL of the document which is normally displayed by default. On selecting this option, you are taken to the relevant WSS document details page as shown below: (This is also true if you select the document name)

For the fully built CAB and source files, and the Visual Studio Project directory, please go here.
- Extract the files to your SharePoint Portal Server, i.e. your C:\ root directory. (If you extract to another location, then you will have to modify the setup and removal batch files to point to the new location)
- Drill down through the /Deploy/Debug directory and there you will find the built CAB and batch files
- Run the SearchOverrideSetup.BAT file and run it or if you are familiar with the STSADM utility, just install the CAB
To see the enhanced results in your portal, follow the instructions from my previous thread http://blogs.msdn.com/nigelbridport/archive/2004/10/27/248439.aspx
But basically:
- http://<SPSserver>/search.aspx?mode=edit&PageView=Shared on the portal you want to effect
- Browse through your Virtual Server catalog looking for Search Results Document Detail web part
- Drag it to just below the default Search Results web part
- Close the default Search Results web part (otherwise you will get two sets of results and a script error)
- Go back to your Portals home page and do a search.
That's it!
I would be really interested to hear if this works for you and if you make any modifications to it.