Archive for the ‘SharePoint 2007’ Category

Weird bug while updating WelcomePage using C#

weird-bug-while-updating-welcomepage-using-c

You can change the WelcomePage of your site by updating the value of SPFolder.WelcomePage. However, you might experience some strange behavior if your are trying to update this value directly.
(more…)

Conditionally enable/disable Ribbon buttons based on user permissions

Conditionally enable-disable Ribbon buttons based on user permissions

Using custom action you can create your own ribbon elements. In a post I have published a while ago I showed how to add a button to the ribbon to generate a QR-Code. But what if you want your button only to be enabled under certain circumstances. For example; if the user has sufficient privileges.

(more…)

Changing the URL of an existing document library or list

Changing the URL of an existing document library or list

When you create a new list or document library in SharePoint the Name you supply for your new list is also used to in the URL. Characters like spaces are replaced by their HTML equivalents (%20). Changing the title of the list afterwards is easy, so is changing the URL of an existing list. You just have to know where to look. This post explains how to change both the title and the URL of existing lists and libraries using several techniques.

(more…)

Load an external JavaScript file on demand using a Custom Action in SharePoint 2007

Load an external JavaScript file on demand using a Custom Action in SharePoint 2007

I build a lot of SharePoint Solutions that use JavaScript to enhance user experience. Most of the JavaScript I put in dedicated .js files and deploy them to the 12-hive (or 14-hive) in the layouts-folder. Deploying a JavaScript file (*.js) layouts-folder of SharePoint and loading external JavaScript files (*.js) in SharePoint 2007 can be accomplished in a couple of ways.

(more…)

Enumerating SharePoint groups and group members through its webservices using PowerShell

Enumerating SharePoint groups and group members through its webservices using PowerShell

SharePoint offers a large variety of webservices and consuming such a webservice with PowerShell takes only a few lines of code:

$SPService = New-WebServiceProxy -Uri ($WebUrl + "/_vti_bin/SomeWebService.asmx?WDSL") -UseDefaultCredential
$SPService.SomeMethod()

You can use PowerShell to enumerate all SharePoint groups and save them to a CSV-file without logging in to the SharePoint server.

(more…)

Displaying the filename in the SharePoint search results

Displaying the filename in the SharePoint search results

By default the SharePoint search web part ‘Core Search Results Web Part’ displays the document’s title as a hyperlink to the document (or list item). While this is fine for most cases, recently a customer explained to me:

We are crawling all our old file shares using the SharePoint Search. Our end users are used to finding documents by their filename, however the SharePoint search is displaying the document’s title which confuses our end-users

(more…)