in

SharePoint Blogs

The Best Place for SharePoint-related Blogs

This Blog

Syndication

News

Interested in consulting work or becoming a consultant? Contact Me.

- Quick Links -


- Blog Bits -
 My Professional Profile




Subscribe in NewsGator Online
Add to My MSN
Add to Google

Subscribe with Bloglines





Tags:

Translate Text or URLs
Who links to my website?

The Boiler Room - Mark Kruger (5 Year Microsoft SharePoint MVP)

November 2006 - Posts

  • 2007 Microsoft Office Suites Comparison White Paper

    With the 2007 Microsoft Office system, you and your organization can use the new set of powerful tools for creating, managing, analyzing, and sharing information to work more efficiently and effectively. The newly redesigned user interface simplifies the way the Microsoft Office applications work. And the new graphics capabilities help you easily create great-looking, high-impact documents.

    This paper compares and contrasts the three volume licensing suites of the 2007 Microsoft Office system: Microsoft Office Standard 2007, Microsoft Office Professional Plus 2007, and Microsoft Office Enterprise 2007. Each suite provides the core Microsoft Office applications as well as features that support integrated content management, information rights and policy, and integrated electronic forms. The suites differ in the selection of included applications and the ways in which advanced features are implemented. This paper is intended to help organizations understand the applications and capabilities offered, and to identify the suite that best fits their needs.

    Download Here: http://office.microsoft.com/en-us/suites/HA101864981033.aspx

  • Download Windows SharePoint Services 3.0 Today!!!

    Today is SharePoint day!!  Windows SharePoint Services has been released and is available for download!!! I've updated my ongoing list of MOSS Resource Links with the these links and more so go and download Windows SharePoint Services 3.0 and the MOSS Trial version! 

    Check out the Microsoft SharePoint Team Blog RTW Announcement which includes Installation Instructions, Build to Build Upgrade Info, Version to Version Upgrade info, and related Resources.

    Note: Downloads are English only at the moment.

    The MOSS Resource Links contain almost 500 links and are categorized by the following:

    • Product Downloads
    • General Product Information
    • Newsgroup/Community Resources
    • Planning Guides & Starter Kits
    • Videos & Web Casts
    • Posters
    • Technical Information/HowTo's
      • Administration
      • Architecture
      • Authentication/Security
      • Design/Customization
      • Development
      • Features of SharePoint
    • Training Resources
    • Web Parts / Tools / Other Downloads
    • Whitepapers
    • Additional Resources

    I hope that you find the list useful as I've been collecting links from experts and community members around the SharePoint blogosphere. In my opinion, the links are intuitive and extremely helpful in getting started and continuing forward with a successfull SharePoint implementation.

    -Mark Kruger

  • Common (and simple) coding tasks in SharePoint (By Ishai Sagi)

    Note the summary below is for archiving purposes... please see the original post for updates and full description.

    I see a lot of people in the microsoft public sharepoint developer forums asking these questions over and over again, so I thought I will save everyone some time by answering these right here.
    Some people may say these are RTFM questions, since the SDK contains all of these examples, but apperantly people dont bother with the SDK, or find it confusing to navigate through. So here is my 2 cents.

    The purpose here is to give some code samples to common tasks like:

    • getting a reference to a site
    • Iterating over all lists in a site
    • getting a reference to a list
    • getting a reference to an item in a list
    • getting a reference to the item's properties
    • getting a reference to a document and its properties
    • adding a new item to a list
    • modifying an item in a list

    If you feel I should add to this list, let me know and I will write some sample code. However, please remember this is for simple, common tasks and I wont start giving application samples here.

    So, lets get down to it!

    Getting a reference to a site

    Ok, you have a sharepoint site in a URL "http://server/sites/site" and you want to get the object of the site from its URL. What do you do?

    SPSite mySite = new SPSite("http://server/sites/site");
    SPWeb myWeb = mySite.OpenWeb();

    Now you have the SPWeb object, allowing you to get information about the site you used in the URL. For example, iterating all lists in the site:

    SPSite mySite = new SPSite("http://server/sites/site");
    SPWeb myWeb = mySite.OpenWeb();
    string linksHtml = "";
    foreach(SPList list in myWeb.Lists)
    {
    string listLink = "<a href='" + list.DefaultView.Url.ToString() + "'>" + list.Title + "</a>(<b>"+list.Items.Count+"</b>)<br>";
    linksHtml += listLink;
    }

    The above example also showed how to get a reference to a list by iterating over the lists in a site. But what if you want a specific list called "contacts"? The following will show you how to get the object for a list that you know the name of:

    SPSite mySite = new SPSite("http://server/sites/site");
    SPWeb myWeb = mySite.OpenWeb();
    SPList contactsList = myWeb.Lists["Contacts"];

    Now lets iterate through the items in the list and get item's properties:

    SPSite mySite = new SPSite("http://server/sites/site");
    SPWeb myWeb = mySite.OpenWeb();
    SPList contactsList = myWeb.Lists["Contacts"];
    foreach (SPListItem contact in contactsList)
    {
    string contactLastName = contact["Last Name"].ToString();
    }

    Now some of you are saying - "what about documents?", to which I answer that document libraries are the same as lists (ok, there are some differences but we will leave that for future articles). To get to a document in a document library you can either use the code above to iterate through the library and its files, or, if you know the file's URL, you can do this:

    SPSite mySite = new SPSite("http://server/sites/site");
    SPWeb myWeb = mySite.OpenWeb();
    SPFile file = myWeb.GetFile("http://server/sites/site/library/folder/file");

    File properties are available through its Item property. If you have for example a text field in the document library called "My Custom String Property", and you want to know the value for that field in a specific file, use the following code:

    SPSite mySite = new SPSite("http://server/sites/site");
    SPWeb myWeb = mySite.OpenWeb();
    SPFile file = myWeb.GetFile("http://server/sites/site/library/folder/file");
    string filePropertyValue = file.Item["My Custom String Property"].ToString();

    We now want to add a new item to a list:

    SPSite mySite = new SPSite("http://server/sites/site");
    SPWeb myWeb = mySite.OpenWeb();
    SPList contactsList = myWeb.Lists["Contacts"];
    SPListItem newItem = contactsList.Items.Add();
    newItem["First Name"] = "Ishai";
    newItem["Last Name"] = "Sagi";
    newItem.Update();

    Lets change all items in the list to build the email address based on the first and last name (in the format of 'first.last@testing.com') :

    SPSite mySite = new SPSite("http://server/sites/site");
    SPWeb myWeb = mySite.OpenWeb();
    SPList contactsList = myWeb.Lists["Contacts"];
    foreach(SPListItem existingItem in contactsList.Items)
    {
    existingItem["E-mail Address"] = existingItem["First Name"] + "." + existingItem["Last Name"] + "@testing.com";
    newItem.Update();
    }
  • SharePoint Community Search - Check it out!

    If you havent had the chance to check out the SharePoint Community Search, you're missing out.  The Windows Live Search Macro was created by Lawrence Liu and provides some great results for those of you targeting SharePoint specific results.  Here's an example search for "MOSS Resource Links":

    Yes, I cheated since I come up #1 but check out the #2, #3, etc. which are much more accurate.  Enjoy!

  • Javascript getElementsByClassName

    As I was working with some customization of forms in SPS 2003, I came across the following script which I thought would benefit many of you going through similar types of customizations:

    [code]

    // ---

    /*

    Written by Jonathan Snook, http://www.snook.ca/jonathan

    Add-ons by Robert Nyman, http://www.robertnyman.com

    */

    function getElementsByClassName(oElm, strTagName, strClassName){

    var arrElements = (strTagName == "*" && oElm.all)? oElm.all : oElm.getElementsByTagName(strTagName);

    var arrReturnElements = new Array();

    strClassName = strClassName.replace(/\-/g, "\\-");

    var oRegExp = new RegExp("(^|\\s)" + strClassName + "(\\s|$)");

    var oElement;

    for(var i=0; i<arrElements.length; i++){

    oElement = arrElementsidea;

     

     

    if(oRegExp.test(oElement.className)){

    arrReturnElements.push(oElement);

    }

     

    }

    return (arrReturnElements)

    }

    // ---

    /*

    Revised to support looking for multiple class names,

    no matter in which order they're applied to the element

    */

    function getElementsByClassName(oElm, strTagName, oClassNames){

    var arrElements = (strTagName == "*" && oElm.all)? oElm.all : oElm.getElementsByTagName(strTagName);

    var arrReturnElements = new Array();

    var arrRegExpClassNames = new Array();

    if(typeof oClassNames == "object"){

    for(var i=0; i<oClassNames.length; i++){

    arrRegExpClassNames.push(new RegExp("(^|\\s)" + oClassNamesidea.replace(/\-/g, "\\-") + "(\\s|$)"));

    }

    }

    else{

    arrRegExpClassNames.push(new RegExp("(^|\\s)" + oClassNames.replace(/\-/g, "\\-") + "(\\s|$)"));

    }

    var oElement;

    var bMatchesAll;

    for(var j=0; j<arrElements.length; j++){

    oElement = arrElements[j];

    bMatchesAll = true;

    for(var k=0; k<arrRegExpClassNames.length; k++){

    if(!arrRegExpClassNames[k].test(oElement.className)){

    bMatchesAll = false;

    break;

    }

    }

    if(bMatchesAll){

    arrReturnElements.push(oElement);

    }

    }

    return (arrReturnElements)

    }

    // ---

    // Array support for the push method in IE 5

    if(typeof Array.prototype.push != "function"){

    Array.prototype.push = ArrayPush;

    function ArrayPush(value){

    this[this.length] = value;

    }

    }

    // ---

    /*

    Examples of how to call the function:

     

    To get all a elements in the document with a "info-links" class:

    getElementsByClassName(document, "a", "info-links");

     

    To get all div elements within the element named "container", with a "col" and a "left" class:

    getElementsByClassName(document.getElementById("container"), "div", ["col", "left"]);

    */

    // ---

    [/code]


Need SharePoint Training? Attend a SharePoint Bootcamp!

Posts (c) their respective authors. Everything else (c) 2007 SharePoint Experts