Introducing LiquidSilver SharePoint Framework

This is an introductory post to LiquidSilver SharePoint Framework that I’ve been developing with my friend, Riwut Libinuko.

LiquidSilver is a SharePoint Framework that provides various classes and functions to deal with common tasks in any SharePoint development to help you work much easier, faster, more object-oriented, and more productive. LiquidSilver is compatible with WSS 3.0 and MOSS 2007.

The project is hosted in CodePlex where you can download the source code as well as report issues.

We have put a lot of our experience — in Riwut’s case, years of experience that got him an MVP award — in SharePoint development into this framework and been using it in our projects. We love it and benefit greatly from it. So, we hope you will too.

Enough with the introduction, let’s get started with LiquidSilver or visit the LiquidSilver page to look for more resources.

SharePoint Bending: Remove “Send To” Context Menu Without Modifying Core.JS

This is becoming a pretty common requirement. Some people just don’t want the “Send To” menu appearing in the context menu of the document library. You can do it — customize the SharePoint context menu by — by simply making some modification in core.js as suggested by many.

But modifying SharePoint core files should not be done, because your modifications can be overwritten by future SharePoint updates. So here’s a little trick to remove the “Send To” context menu without modifying core.js:

  1. Go to the document’s view url, for example: http://example.com/Documents/Forms/AllItems.aspx.
  2. If it is a web part page, edit the page and add a Content Editor web part. Otherwise you need to edit that page in SharePoint Designer.
  3. Open the source editor (not the rich editor) for the Content Editor web part, or open the code view (not the design view) of that particular page in SharePoint Designer.
  4. Either inside the web part or the code view, insert the following script:


    <script type="text/javascript">
    AddSendSubMenu = function (m,ctx) {}
    </script>

That script will redefine the AddSendSubMenu() function with a new implementation. Since the function body is empty, it simply won’t display anything, thus the “Send To” context menu is removed from the context menu.

You can do this on some pages manually, or if you want to apply this to all pages, just insert the code to your master page.

WSS/SharePoint Extension 1.2 for Visual Studio 2008

Finally it’s out, get it while it’s hot.

Now you SharePoint developers no longer need to hesitate to upgrade to Visual Studio 2008 if you haven’t.

This will greatly help development of SharePoint-based solutions when you’re using Visual Studio 2008 by providing the following features:

Visual Studio 2008 Project Templates

  • Web Part
  • Team Site Definition
  • Blank Site Definition
  • List Definition
  • Empty SharePoint Project

Visual Studio 2008 Item Templates (items that can be added into an existing project)

  • Web Part
  • Custom Field
  • List Definition (with optional Event Receiver)
  • Content Type (with optional Event Receiver
  • Module
  • List Instance
  • List Event Handler
  • Template

SharePoint Solution Generator

  • This stand-alone program generates a Site Definition project from an existing SharePoint site. The program enables developers to use the browser and Microsoft Office SharePoint Designer to customize the content of their sites before creating code by using Visual Studio.

Installing the WSS/SharePoint extension on Windows XP/Vista

If you are using Windows XP/Vista and try to install the extension, it will display the following error:

The product can only be installed if Windows SharePoint Services 3.0 has been installed first.

Instead of replacing your OS with Windows 2003, launching a Virtual PC image preloaded with SharePoint, or trying to install SharePoint on Vista, you can simply create a registry entry to fool the extension installer as if you have installed WSS on your XP/Vista machine. Before following these simple steps, as with any registry modification, do so with caution at your own risk. You can create a registry backup if necessary.

Basically — under the HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Shared Tools\Web Server Extensions\12.0 registry key — you need to add the following string value: Sharepoint="Installed".

Here is the step-by-step instruction:

  1. Run regedit from command prompt or Start > Run.
  2. Navigate to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Shared Tools\Web Server Extensions\12.0.
  3. If you cannot find the “12.0″ folder, right click on the Web Server Extensions, select New > Key from the popup menu, and enter 12.0 as the new key name.
  4. Right click the “12.0″ key/folder, select New > String Value from the popup menu, and enter Sharepoint as the name.
  5. Double click the newly created Sharepoint entry, and enter Installed as the value data.
  6. Now you can try to install the Sharepoint extension for VS 2008.

An easier way to do the above steps is to download the SharePointOnXP.reg file, extract, double click on the file. Then you can try to install the extension.

By the way, if you haven’t done so, you might also want to add SharePoint’s dlls to the GAC. Hence, Visual Studio won’t find troubles when compiling your SharePoint-based projects.