SharePoint

Using the SharePoint SiteMapProvider

Did you ever wanted to create a Webpart for site navigation? Well, you can use the SPSiteMapProvider from SharePoint. In your Webpart you could use this code to access the SPSiteMapProvider. 1: SPSiteMapProvider sitemapProvider = (SPSiteMapProvider)SiteMap.Providers["SPSiteMapProvider"]; <pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none"><span style="color:#606060"> 2:</span> SiteMapDataSource datasource = <span style="color:#0000ff">new</span> SiteMapDataSource();</pre> <pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:white;border-bottom-style:none"><span style="color:#606060"> 3:</span> datasource.Provider = sitemapProvider;</pre> This Datasource can be the datasource for a regular ASP.

Many SharePoint Features

CodePlex has a project for SharePoint 2007 Features. Within this workplace there are features like: Ajax Config Feature Content Type Hierarchy Feature Debug Config Feature Debugger Feature Features Source Code Log Viewer Feature Manage Configuration Modifications Manage Form Users Feature Manage Hierarchical Object Store Feature Manage Layouts Site Map Feature Minimal Master Minimal Publishing Site Placeholder Master Feature Presence Contact List Feature Print List Feature Task Alert Feature Task Mover Feature Theme Changer Feature Window Links Feature Especially the Ajax Config Feature is great.

SharePoint – External Storage Provider

As you probably know, you can store documents on e.g. a fileserver instead of your SQL content databases. To make it short, some key features: Storing blobs not in your content database, but e.g. in a local folder, or a network share With the current version only the SPFarm is supported. Meaning ALL content will be stored externally After you have implemented an external storage provider, all new documents will be stored in this place.

SharePoint Server TechCenter

Within the “SharePoint Serever TechCenter” a new page “SharePoint Products and Technologies Service Pack 1 Resource Center” started, which shows some interesting information about the SP1 for WSS and MOSS. SharePoint Products and Technologies Service Pack 1 Resource Center

Office 2007 SP1 released

Since everybody tells you this… Description of Windows SharePoint Services 3.0 Service Pack 1 and of Windows SharePoint Services Language Pack 3.0 Service Pack 1 Description of the 2007 Microsoft Office Servers Service Pack 1

Updated WikiWebpart + Tool to install it

I updated my WikiWebpart. You can now download it as a SharePoint Solution. Steps to install the solution: Install the solution via “stsadm -o addsolution -filename RH.WikiWebpart.wsp” Go to your "Central Administration > Operations" and deploy the solution 1. * * Active the Feature for your Sitecollection Go to “Site Actions > Site Settings > Site Collection Administration > Site collection features” and active the feature ##### Add the Webpart to your Wiki library

HowTo Create a contact form

A contact form is a must have on all websites. You can realize such a form with build in functionality, even if you have anonymous “logins” on your SharePoint site. Steps to create a contact form: Create a custom list, and configure it with all the fields you need. Change the security settings in the advanced settings for the new contact list Create a link in your navigation to the NewForm.

SharePointConsole

I wrote a Console application, which will allow you do some common tasks for your SharePoint environment. stsadm lacks some functionality like recyling all list items from a list… Just copy the exe to your SharePoint Server, and execute it with an account which has the appropriate rights on your farm. Usage: SharePointConsole http://siteurl[/weburl] Command [Parameter1 Parameter2] The SharePointConsole has the following parameters: EnumContentTypes CreateContentType RenameContentType DeleteContentType DeleteAllListItems ShowInNewForm ShowInEditForm ShowInDisplayForm DeleteAllVersions RecycleAllVersions SetTitleWithFilename SetSearchCenterUrl SystemUpdate FeatureManager EmptyRecycleBin EnumContentType:

HowTo create an object if you only have its type as string

Sometimes you have only the type of an object, which you want to create. Meaning you want to create an object dynamically. This is how you would achieve your goal: In my case I wanted to create a SPField from its typename. 1: string typename = “Microsoft.SharePoint.SPFieldText, Microsoft.SharePoint, “+ <span class=lnum> 2: </span> <span class=str>"Version=11.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c"</span>; 3: Type t = Type.GetType(typename, true, true); <span class=lnum> 4: </span><span class=kwrd>object</span> newObject = System.

Create an audience which contains an Active Directory Group

In the SDK are examples on how to create an audience which adds a rule like: 1: AudienceRuleComponent r1 = new AudienceRuleComponent("FirstName", "Contains", "John"); But how do you create a rule which takes the membership of an Active Directory Group? Well, look at this: 1: string groupName = "CN=Users,CN=Builtin,DC=domain,DC=tld"; <pre style="padding-right:0px;padding-left:0px;font-size:8pt;padding-bottom:0px;margin:0em;overflow:visible;width:100%;color:black;border-top-style:none;line-height:12pt;padding-top:0px;font-family:consolas, 'Courier New', courier, monospace;border-right-style:none;border-left-style:none;background-color:#f4f4f4;border-bottom-style:none"><span style="color:#606060"> 2:</span> AudienceRuleComponent r1 = <span style="color:#0000ff">new</span> AudienceRuleComponent(<span style="color:#006080">"DL"</span>, <span style="color:#006080">"Member of"</span>, groupName);</pre> To get the ‘distinguishedName’ from a group, you can use ADSI Edit (open up a MMC and add the ADSI Edit Snap-In).

Display all my alerts

The "old" SharePoint Server 2003 offered the ability to display all alerts from a user on his/her MySite. MOSS and SharePoint 2010 lacks this functionality. So I wrote a Webpart, which will display all my alerts. Of course is multilingual. Currently there is English, German and Spanish language support included. And it will work on Windows SharePoint Services V3 as well ass SharePoint Foundation. You don’t need the Office Server / SharePoint Server 2010 for it 🙂

Index a remote SharePoint Site

Did you ever want to crawl a remote SharePoint site and were unsuccessfull doing so? Well I did. The only solution I found, was not to crawl the remote site with the default crawler credentials, but with an account from the remote site. You can do so by creating a crawl rule in your SharedServices Provider, which only includes the remote site.

Target Audiences

You can specify a Target Audience in a Webpart, for it to only be visible to e.g. members of a certain AD group. Have you ever wonderd yourself why on earth the new group does not appear in the list and is not valid? Well, I did 🙁 The reason is quite simle. Shortly after the userimport from your AD or another LDAP source there is another import started. This one imports groups and memberships.

Updated Wiki Webpart

Please use my custom field type. It is more flexible –> http://www.hezser.de I updated my Wiki Webpart. For all of you who don’t know what it does: The normal Wiki Edit Form misses the ability to upload pictures. My Webpart, which has to be included to the EditForm.aspx, allows you to upload a picture. It also creates a link in your Wiki post, which displays the uploaded image. This release of the Webpart is multi lingual.