April 26th, 2007 by mdp
I've found this guide from Tony Zink of the SharePoint Reporter Blog very handy for a walkthrough of installing MOSS 2007. The guide gives you screen shots of every step along the way so that you can check your progress:
How to Create a MOSS 2007 VPC Image: The Whole 9 Yards
It is broken down into 20 parts, so you can view them all or skip to the one you want.
Posted in Uncategorized | No Comments »
April 24th, 2007 by mdp
Willie Rust posted part two of his article about Using a SharePoint list as an Authentication Provider.
Posted in Uncategorized | No Comments »
April 20th, 2007 by mdp
My colleague Willie Rust wrote an excellent article on how to implement Forms Based Authentication using a SharePoint List Provider. This allows you to manage your users using SharePoint's built in list interfaces and set permissions to this list inside of SharePoint.
Posted in Uncategorized | No Comments »
April 13th, 2007 by mdp
If you need to import or export user profile properties from one server to another, There is now a command line tool on codeplex.com called SharePoint 2007 Shared Services Provider User Profile Property Replicator. It's a very handy utility so far, the syntax ends up being:
export user profiles to an output file
ProfilePropertyMgr.exe -url <url> -filename output.xml -export
import user profiles from an import file
ProfilePropertyMgr.exe -url <url> -filename input.xml -import
Easy enough. One thing that I would like to see in a future release is that it keeps the order of the properties. Ordering the properties in the UI is a pain in the rear.
Posted in Uncategorized | No Comments »
April 13th, 2007 by mdp
As a MCMS 2002 developer it is sometimes hard to get used to the MOSS API for Publishing. I have found that this Mapping MCMS 2002 APIs to SharePoint Server 2007 site to be very useful. I have supplied some example comparisons from the site below:
|
CmsHttpContext Properties
|
SPContext Properties |
| Channel |
PublishingWeb.GetPublishingWeb(SPContext.Current.Web); |
| Posting |
SPContext context = SPContext.Current; PublishingPage currentPage = PublishingPage.GetPublishingPage(context.ListItem); |
| RootChannel |
PublishingWeb.GetPublishingWeb(SPContext.Current.Web.Site.RootWeb); |
| User |
SPContext.Current.Web.CurrentUser |
Getting Posting Values
In MCMS 2002:
Posting p = null;
//Code to get to the posting
AttachmentPlaceholder att = p.Placeholders["attachment1"] as
AttachmentPlaceholder;
String attachmentText = att.AttachmentText;
HtmlPlaceholder html = p.Placeholders["html1"] as HtmlPlaceholder;
String htmlContents = html.Html;
ImagePlaceholder img = p.Placeholders["image1"] as ImagePlaceholder;
String ImageUrl = img.Href;
In SharePoint Server 2007:
PublishingPage p = null;
//Code to get to the page
LinkFieldValue linkfieldValue = p.ListItem["attachment1"]
as LinkFieldValue;
String linkText = null;
if (null != linkfieldValue)
{
linkText = linkfieldValue.Text;
}
String html = p.ListItem["html1"] as string;
ImageFieldValue imagefieldValue = p.ListItem["image1"] as ImageFieldValue;
String ImageUrl = null;
if (null != imagefieldValue)
{
ImageUrl = imagefieldValue.ImageUrl;
}
Setting Postings Values
In MCMS 2002:
Posting p=null;
String text1 = "new attachment text";
String text2 = "new html";
String text3 = "new image href";
//Code to get to the posting
AttachmentPlaceholder att = p.Placeholders["attachment1"] as
AttachmentPlaceholder;
att.AttachmentText = text1;
HtmlPlaceholder html = p.Placeholders["html1"] as HtmlPlaceholder;
html.Html = text2;
ImagePlaceholder img = p.Placeholders["image1"] as ImagePlaceholder;
img.Href = text3;
CmsHttpContext.Current.CommitAll();
In SharePoint Server 2007:
Posted in Uncategorized | No Comments »
March 6th, 2007 by mdp
I was having trouble building a solution in VIsual Studio 2005 and I was getting the following error.
"sgen.exe" exited with code 1
I found that following the steps below fixed it:
Open up the project properties.
Open up the build tab.
Set "Generate Serialization Assembly" to "Off"
Posted in Uncategorized | No Comments »
February 26th, 2007 by mdp
If you need to insert data into a HyperLink column in a list, you can use the following code:
item["HyperLinkColumn"] = "http://www.google.com, Google";
Make sure you have a space after the comma.
Posted in Uncategorized | No Comments »
February 26th, 2007 by mdp
Colligo Reader allows a user to access offline content for all versions of SharePoint which includes SharePoint Services (WSS 3.0 & 2.0) as well as MOSS 2007 and SharePoint Portal Server SPS 2003. The install is rather small and requires no server modifications since it uses standard web services and site permissions to access content.
Download it here:
http://www.colligo.com/products/sharepoint/reader_home.asp
Posted in Uncategorized | No Comments »
February 26th, 2007 by mdp
Mirjam's blog lists some uses of SPContext. Here are a few I grabbed from his post:
SPList currentList = SPContext.Current.List;
SPWeb currentSite = SPContext.Current.Web;
SPSite currentSiteCollection = SPContext.Current.Site;
SPWebApplication currentWebApplication = SPContext.Current.Site.WebApplication;
SPListItem item = (SPListItem)SPContext.Current.Item;
SPUser user = SPContext.Current.Web.CurrentUser;
He also explains the difference between the SPSiteDataQuery object and the SPQuery object.
Check it out here: /mirjam/archive/2007/02/23/19983.aspx
Posted in Uncategorized | No Comments »
February 26th, 2007 by mdp
The following code can be used to create a custom list in MOSS and apply a custom view to it:
// create list
web.Lists.Add(listName, "", SPListTemplateType.GenericList);
list = web.Lists[listName];
// Add your fields to the list
list.Fields.Add("Field1", SPFieldType.Text, false);
list.Fields.Add("Field2", SPFieldType.Text, false);
// You can change the title of a field by accessing the SPField object
SPField field1 = list.Fields["Field1"];
field1.Title = "Title Of Field 1";
field1.Update();
// You have to use a specialized string collection to add fields to a view
System.Collections.Specialized.StringCollection strCol = new System.Collections.Specialized.StringCollection();
strCol = new System.Collections.Specialized.StringCollection();
strCol.Add("Field1");
strCol.Add("Field2");
// You can use a standard query here to only return certain data
string query = string.Empty;
query = "";
SPView view = null;
view = list.Views.Add("Items Sorted By Field1", strCol, query, 20, true, false);
list.Update();
Posted in Uncategorized | No Comments »