Usman's profileOz's SharePoint 2007/WSS...BlogListsGuestbook Tools Help

Oz's SharePoint 2007/WSS 3.0 and .NET Blog.

My Experiments with SharePoint 2007 and Project Server 2007. Please Note this blog is just for knowlege/information sharing and all the information posted here is my own personal view.

Usman Zubair

Occupation
Interests
I am Usman Zubair I live in Lahore, Pakistan. I have a passion for programming especially in Microsoft technologies. I am working on Sharepoint 2007 as a developer. For further contact please email me at usman.zubair@gmail.com

My Linkedin Profile

View Usman Zubair's profile on LinkedIn

Need Help?

This list will have a list of some of my favourite books.
Thanks for visiting!
Please wait...
Sorry, the comment you entered is too long. Please shorten it.
You didn't enter anything. Please try again.
Sorry, we can't add your comment right now. Please try again later.
To add a comment, you need permission from your parent. Ask for permission
Your parent has turned off comments.
Sorry, we can't delete your comment right now. Please try again later.
You've exceeded the maximum number of comments that can be left in one day. Please try again in 24 hours.
Your account has had the ability to leave comments disabled because our systems indicate that you may be spamming other users. If you believe that your account has been disabled in error please contact Windows Live support.
Complete the security check below to finish leaving your comment.
The characters you type in the security check must match the characters in the picture or audio.
No namewrote:
Wonderful blog indeed . Keep up the good work.
Nov. 23
Ahlam Eissawrote:
Great blog indeed:)
Best of luck
 
Nov. 22
A really nice blog for beginners + intermediates to SharePoint. Keep up the good work dude.

Regards
SharePoint_Guru
Nov. 22
No namewrote:
Hello there OZ....
You have some good Blog Entries on SharePoint.
Looks like you have good experience in developing for the Microsoft SharePoint Platform.
It was quite fruitful going through all your Blog entries

Take Care
Regards,
Usman Jamil
Nov. 20
Hi Oz,
 
Good to see you are learning about blogging real quickly.  Increase the number of posts.  Add more stuff you find during searches or RND.  Write posts by yourself and add other blog links.  You will do best.
 
I wish you best of luck.
 
Jerry
Oct. 23
December 26

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.

November 25

DUMMY’S Introduction to Concept of Sites and Site Collection

Today going through files on my hard disk, I came across this tutorial which I wrote about 2-3 months back for one of my very close friend Salman, who was interested in learning SharePoint so I thought I should share this tutorial on my blog for benefit of those people who get themselves confused between Sites and Site Collection concepts in SharePoint 2007.

---------------------------------------------------------------------------------------------------------------------------------

Most people find it difficult to grasp the concept of sites and site collections when they first begin with SharePoint. Today I would discuss in detail both of these concepts and then we will also see how we can create some sample sites and site collection. Before we proceed further lets define a few things.

Site:

  • Site typically would store lists of documents, events, tasks, discussions and many other types of information.
  • Sites may also contain pages and web parts that provide access to information that is either on stored within the site or in some external locations.
  • Sites would also control access and define permissions levels for users and groups within a site (We will discuss this further in Security Authorization section)

Site Template:

The initial configuration of lists, pages and web parts constitutes a site template.

Site Collection:

A site collection is a set of sites connected together, and of course there is a relation between sites and that is that one site is the parent site (also known as the Root Site) and the rest are sub-sites or child sites.

clip_image002

 

Site Type:

When you create a site the site creation page allows you to select a site template for the site which would determine the functionality and the initial configuration of content on the site

clip_image002[4]

Create a site collection

Now let’s create a new Site Collection step by step.

1) Log in to windows using the Admin Account.

2) Go to Start -->Administrative Tools--> SharePoint 3.0 Central Administration

clip_image004

3) This would open the Central Administration Page. On the Central Administration page click on the top navigation bar, click Application Management.

clip_image006

4) On the Application management page, in the SharePoint Management Section click on Create Site Collection.

To download the complete document please click here.

November 19

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))
            return;
    }

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';

    setDocType();

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

           CAMSep(m);
   }
    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.

Customized Context Menu






      






November 13

My New Apple IPHONE- 8 GB

Today I am not going to write about SharePoint, rather I will discuss about my new Mobile phone--Apple IPHONE (8-GB). I have been really excited to get this amazing product from Apple in my hands ever since its launch and finally the day has arrived and I have one of these revolutionary mobile phone of the future, all for myself.

Having spent a good amount of hours exploring the various features of  Iphone I thought to share them with you all.

1) Activation:

Iphones recently came to pakistan, and most of its vendors sell a cracked version of the apple software so you dont really need to activate your set which is a good thing but still one drop act that comes with it is that if you try to install an update for the phone software your set would be eventually locked and you will have to totally get the firmware reinstalled..which ofcourse would cost you more money.

2) Synchronization:

Syncing is really really FAST. The iPhone automatically syncs your contacts, calendars, and mail accounts. It also will sync your Bookmarks from Internet Explorer or Safari; sorry no Firefox option. Syncing is easy, and that is really all there is to it.

3)
Design:

I seriously have no words to describe its amazing looks, if you are looking for a best looking mobile phone then I think Iphone should be your top most choice. You only have one button and thats the home button which will take you to the home menu.

4) iPod

The iPod on the iPhone is awesome. I love flicking through my music, and when turned horizontally, the cover flow is cool. Just like Steve Jobs said himself, you can touch your music.


As I explore more n more this amazing mobile phone + IPOD...I will keep posting.



November 12

LIVE MOSS 2007 Based Site


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

http://www.wssdemo.com/Pages/websites.aspx


November 04

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.
October 21

SharePoint 2007 and Microsoft EPM Training in Lahore

 

Hi Everyone,

We, a group of SharePoint Developers would like to announce that we are planning (SharePoint User Group Platform) to conduct a series of (Free of Cost) SharePoint 2007 and EPM 2007 Training Sessions in Lahore in upcoming weeks.  In order to do so we would like to get feedback from those interested to Join us for these sessions.   If you are interested in these training session please do reply @ Yasir.attiq@gmail.com & CC to usman.zubair@gmail.com or Leave the comment under this topic with the following information.

First Name :

Last Name :

Job Designation:

Experience and Details (if you are already a SharePoint Expert please state your experience with the technology) :

Company Working :

Any Topic of your interest on SharePoint/Project Server:

Based on your feedback we will announce the details and venue for the session on these forums.  Please note that this announcement is not for commercial purposes and solely for the benefit of SharePoint Developers in Pakistan . 

October 01

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.
 
 
September 29

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.