Friday, August 29, 2008

Colorado Springs SharePoint User Group (cossug)

We finally launched the official site of the 'Colorado Springs SharePoint User's Group'. The site was built using the Community Kit for SharePoint. Feel free to check out the site ...

http://www.cossug.com/CoSSUG/default.aspx

Tuesday, August 26, 2008

MSDN Update for SharePoint (SEARCH)

In case you don't get the MSDN new letter or you haven't read it yet, here are the SharePoint related items that you should check out ...


How to Optimize SharePoint Server 2007 Web Content Management Sites for Search Engines Learn techniques to create Microsoft Office SharePoint Server 2007 Web content management (WCM) sites that are optimized for search engines, and what to avoid to help improve search ratings.


Creating an Enterprise Search Crawl Log Viewer for SharePoint Server 2007
Create a Windows Forms application that has the ability to view and filter the entries in the Enterprise Search crawl log.


Using Enterprise Search Property Filters in SharePoint Server 2007
Learn to use Enterprise Search property filters to narrow the focus of keyword searches in Microsoft Office SharePoint Server 2007.

Wire Up a Custom SiteMapProvider

So now that you have used the last post to create a custom site map provider, let's take a look at how to wire it up.

First, open up your web.config and find the area. Inside the , place the follwoing:

add name="Your NewMainProvider" type="ShannonBray.MOSS.MenuProvider.MenuProvider, ShannonBray.MOSS.MenuProvider"

Note: The above is assuming you compiled the dll into an assembly named 'ShannonBray.Moss.MenuProvider'. You will need to change this to fit your naming convention.

Now, you need to create a SiteMapDatasource. You will put this on the page that you plan on using the new navigation on. (Maybe your MasterPage)

asp:SiteMapDataSource ShowStartingNode="False" SiteMapProvider="SPNavigationProvider" id="topSiteMap" runat="server" StartingNodeUrl="sid:1002"



Now you can bind your menu or tree view to the datasource and see it in action.

Create a Multi-Level SiteMapProvider

OK. Out of the Box, MOSS 2007 gives us this nice navigation interface. This is a publishing feature, so if you don't see it, you will need to activate it. We are able to create top level sites that give us two layers of navigation. So, the question is....

How do we get a multi-level navigation in MOSS? You need to write a custom SiteMapProvider. And here is how you do it ...

using System;
using System.Web;
using Microsoft.SharePoint;
using Microsoft.SharePoint.Navigation;
using Microsoft.SharePoint.Publishing;
using Microsoft.SharePoint.Publishing.Navigation;
using Microsoft.Office.Server;
using Microsoft.Office.Server.UserProfiles;

namespace ShannonBray.MOSS.MenuProvider
{
class MenuProvider : SiteMapProvider
{
PortalSiteMapProvider global;

public override SiteMapNode FindSiteMapNode(string rawUrl)
{
return global.FindSiteMapNode(rawUrl);
}

public override SiteMapNodeCollection GetChildNodes(SiteMapNode node)
{
return global.GetChildNodes(node);
}

public override SiteMapNode GetParentNode(SiteMapNode node)
{
return global.GetParentNode(node);
}

protected override SiteMapNode GetRootNodeCore()
{

// get the navigation elements of the current site
global = PortalSiteMapProvider.GlobalNavSiteMapProvider;

// use the settings that are configured on the 'Navigation' screen
global.IncludeAuthoredLinks = true;
global.IncludeHeadings = true;
global.IncludePages = PortalSiteMapProvider.IncludeOption.PerWeb;
global.IncludeSubSites = PortalSiteMapProvider.IncludeOption.PerWeb;

SiteMapNode menuNode;

PortalSiteMapNode currentNode = (PortalSiteMapNode)global.CurrentNode;

// continue to drill down if 'Inherit Navigation' from parent is set
// if not, return the currentNode of global

if (currentNode.WebNode.InheritNavigation == true)
{
SiteMapNode startNode = global.CurrentNode;
PortalSiteMapNode loopNode = (PortalSiteMapNode)startNode.ParentNode;

while (loopNode.WebNode.InheritNavigation == true && loopNode.ParentNode != null)
{
loopNode = (PortalSiteMapNode)loopNode.ParentNode;
}


menuNode = loopNode;

}
else
{
menuNode = global.CurrentNode;

}


return menuNode;


}

public override SiteMapNode CurrentNode
{
get
{
return base.CurrentNode;
}
}

public override SiteMapNode RootNode
{
get
{
return base.RootNode;
}
}


}
}

Create a Sorted Task List

I recently created a sorted task list and I thought I would share. This particular task list sorts the 'Critical' tasks first, the past due, and then the standard. For this excerise I chose to use the Grid View control.





The trick here was to break down the list into two queries. First I used CAML to extract the 'Critcal' and then created a new one for the rest.





For a complete copy of the code, visit the WSS Classroom link that is available on the right panel of this site.
Turn the OOB Task List ....
To something with some color ...

Wednesday, August 13, 2008

Failed Web Part

It is not uncommon for someone to either add a broken web part to a page or a content editor web part with java script that disables SharePoint functionality.


If you need to remove a web part and your 'Site Actions' button is visible but not responding, simply add '?contents=1' to the end of your URL.
This will bring up the 'Web Part Page Maintenance'. From here you will be able to right the wrong and get your site working again.








Sunday, August 10, 2008

SharePoint User Group Now In Colorado Springs, CO

There is a new SharePoint User Group for the Colorado Springs, CO area. The first user group meeting will be on September 2, 2008.

The meetings will be held on the first Tuesday of every month. The LeaderQuest is allowing us to hold the meetings in their building. They are located at

2790 N Academy Blvd
Suite 238
Colorado Springs, CO 80917

for more information, please contact Shannon Bray @ shannon.bray@qortex.com or visit our web site: http://www.cossug.com/CoSSUG/default.aspx.

Wednesday, August 6, 2008

Microsoft TechNet: SharePoint Forums

TechNet has recently migrated their forums over. The process was a little slower than they would have liked, but everything seems to be running smooth now.

I would recommend that you visit the SharePoint forums. They have some really great resources monitoring these threads to help you get answers to your questions.

You can check out the SharePoint forums at http://forums.technet.microsoft.com/en-US/tag/sharepoint/.

Hope to see you there.

Tuesday, August 5, 2008

Top Navigation Gone Wild

I was setting up a new MOSS 2007 site yesterday. The implementation did not require all of the publishing features but I was explainiing what many of the features did. It turns out that if you turn enable the Office SharePoint Server Publishing Infrastructure feature on the top-level site you will get the following issues:


• The name of the tab that represents the top-level site changes. For example, the name of the tab changes from Home to the name that you specified as the title of the top-level site.

• When you click the tab that represents a subsite on the top link bar, you connect to the subsite as expected. However, the tab for the subsite is not selected. Instead, the tab for the top-level site remains selected.

I didn't know exactly what I did at first. After a little research, I found an article entitled....

The tab on the top link bar is not selected when you connect to a subsite after you enable the Office SharePoint Server Publishing Infrastructure feature in SharePoint Server 2007

It is located @ http://support.microsoft.com/kb/925974 that shed some light on the topic.

So I am passing the information on incase you too do the same thing. It would be interesting to know why this happens. If anyone knows, I sure would love to hear about it.