Archive for Sharepoint 2007

Comparison of Various SharePoint Products

 The attached excel sheet gives a good comparison of the following SharePoint products:

  • Windows SharePoint Services 3.0
  • SharePoint Portal Server 2003
  • Office SharePoint Server 2007 for Search
  • Office Forms Server 2007
  • Office SharePoint Server 2007 Standard CAL
  • Office SharePoint Server 2007 Enterprise CAL or for Internet Site

 Comparison of the products is based on the following features:

  • Collaboration
  • Portal
  • Search
  • Content Management
  • Business Process and Forms
  • Business Intelligence
  • Management
  • Platform

 Click here to download the complete excel sheet for your reference.


Comments (4)

Customizing Context Menu in SharePoint 2007

A couple of days back I got an email request from one of my friends who wanted to know that how can he customize the context menu for items in the document library for WSS 3.0, and the very next day I was assigned a project at my job in which I had to do exactly this as one of the requirements. So today I am writing this post to put a little light on how we can customize the context menu for items in a document library. Ok I am going to illustrate this with the help of an example problem.

Problem Statement:
Whenever we upload an excel file in the document library, the context menu should have an extra item in named as lets say "View Excel Sheet as a webpage" ofcourse in this post I am not going to illustrate how we would render that excel sheet as webpage to the user but this is just to give you an idea of how things are done. This menu item would also have an "excel" like icon along site it and whenever we will click on the menu item it would just alert the user the location of the excel file .i.e. where it is stored with reference to the site.

Ok now having stated the problem lets get to some basics first.

The context menu is itself a javascript program means that the context menu is generated by a javascript code . This javascript program can be found at

\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\LAYOUTS\1033\Core.js

Yes the name of the file has changed to Core.js from ows.js, menus in Windows SharePoint Services and SharePoint Portal Server 2003 were located in a javascript files at the following location

\Program Files\Common Files\Microsoft Shared\web server extensions\60\TEMPLATE\LAYOUTS\1033\ows.js

Ok now lets dig in a bit in the Core.js file, in the Core.js file the main function responsible for the document library drop down menus is AddDocLibMenuItems(m, ctx) and this provides a hook by which we can insert additional menu items.

The first few lines of the function are as follows

if (typeof(Custom_AddDocLibMenuItems) !="undefined")
        if (Custom_AddDocLibMenuItems(m, ctx))

Ok now what this piece of code does? it is basically looking as to whether a function named Custom_AddDocLibMenuItems is defined or not, if it is defined then it simply calls it. So the main idea here is to override this Custom_AddDocLibMenuItems function by our own script which we can use to extend the context menu, adding new items.

Note: It is recommended that you make a copy of your Core.js before you make any changes to it.

Ok now we can override the Custom_AddDocLibMenuItems function in core.js adding our own script as follows.

function Custom_AddDocLibMenuItems(m, ctx)
    var strDisplayTextCustom = ‘View Excel Sheet in Browser’;


    if(currentItemAppName.toLowerCase() == "microsoft office excel")
           var strImagePath = ctx.imagesPath+"XLS16.GIF";
           // Add menu item
           CAMOpt(m, strDisplayTextCustom, strAction, strImagePath);
          // add a separator to the menu

    return false;

How does the function above works?

The Custom_AddDocLibMenuItems function takes two parameters m and ctx, the first parameter m is basically representing the menu object itself, where as ctx provides HTTP context information about the web request. To add an item to the menu only one function call is needed.

CAMOpt(m, strDisplayTextCustom, strAction, strImagePath);

The CAMOpt function takes 4 parameters which are as follows:

1) The menu object to add item to.
2) The display text of the menu item.
3) Javascript action to perform when item is clicked.
4) Path to an image associated with the menu item.

CAMSep function simply adds a separator bar to the menu. Finally the function returns a false which means that standard menu items should also be included, if we had returned true then standard menu items would not have been included.

Having done all this simply save the Core.js file and open your sharepoint site and a few excel sheets to the document library and check its context menu. The context menu should be as shown in the image below.


Comments (39)

LIVE MOSS 2007 Based Site

If you are looking for a LIVE MOSS 2007 based site, you can find an excellent collection here

Comments (1)

Application pages VS Safe Pages

Application Pages: is a template page from _layouts virtual directory and has the following the characteristics

1) It is available within every site.
2) Only one copy of the page is there on the server.
3) NOT accessible via the designer.
4) Accessible through the IIS.

Safe Pages: Template page that comes from site definitions and has the following characteristics.

1) Exists only on sites where it has been specified by a template or created by a user.
2) More than one copies can exist on the server.
3) Accessible via designer.
4) NOT accessible via IIS.

Comments (2)

Important Links for WSS 3.0 and MOSS 2007

Comments (8)

Common SharePoint terms explained

A Server Farm can have one or more Virtual Servers (IIS Web Sites)
A Virtual Servers must have one or more Managed Paths (including the root)
A Managed Path can have one or more Site Collections
A Site Collection must have one or more Webs (or Areas)
A Web can have one or more Lists but can also have one or more Subwebs
An Area is a special Web created for use only with SPS
A Listing is a special link create for use only with an SPS Area
A List can have one or more ListItems
A ListItem must have one or more Fields.

Comments (19)

Interesting query from a friend across the border :)

Today a friend from across the border scrapped me on orkut and asked an interesting question


is it necessary to install sharepoint to create the web parts? I have windows 2000?


"I have to use existing sharepoint webparts in my aspx page. for that do i need to install sharepoint ? "



Well this is quite a common question so I wanted to post the answer to it on my blog


So there are a few things we should keep in mind.


a)      To develop SharePoint webparts, we need a machine that runs Windows 2003, in case of any other operating system you can always Remote Desktop to work on another machine which has Windows 2003 this is quite a common practice.


b)      Webparts cannot run in complete isolation so you need to create a sample SharePoint site to play with the webparts you create.


c)   I assume SharePoint Service development is integrated with the Visual Studio .Net IDE on your machine (we’re talking about the .Net 1.1 framework. In .Net 2.0, Web Part development support is default) so that you have Web Part templates as you create a new project.

      d)  To make your life easy download Visual Studio 2005 Extensions 3. 0 for WSS, that really makes the webpart creating  process  quite easy. Click here to download Visual Studio 2005 Extensions for WSS.


Comments (2)

Older Posts »