Tuesday, July 8, 2008

sharepoint e-books.

Beginners
Beginning.SharePoint.2007.Building.Team.Solutions.with.MOSS.2007.Jun.2007
This book is very good for beginners, One who wants to start of with sharepoint can go ahead and read this book.
Download this book
Lets move on with Professional Development
The book that really of interest and provides a deep into WSS 3.0 is
Microsoft.Press.Inside.Microsoft.Windows.SharePoint.Services.3.0.Apr.2007
To know tits and bits of how wss works from inside, i suggest you to read this bookAfter all, its from Microsoft Press :)
Download this book

Wednesday, July 2, 2008

How to set access permission to a Sharepoint List

My list called "WorkFlowTempDocLib" has Read permission for group called
siteGroupNamePublisher="Publisher";

SPList yourList = site.Lists["WorkFlowTempDocLib"];
SPGroup secGroupCertifier = site.SiteGroups[siteGroupNameCertifier];
yourList.BreakRoleInheritance(true);
SPRoleAssignment roleAssignment3 = new SPRoleAssignment(secGroupCertifier);
SPRoleDefinition roleDefinition3 = site.RoleDefinitions.GetByType(SPRoleType.Contributor);
roleAssignment3.RoleDefinitionBindings.Add(roleDefinition3);
yourList.RoleAssignments.Add(roleAssignment3);
yourList.Update();

Tuesday, July 1, 2008

Adding Links to QuickLaunchBar....


Sample Lists.xml

public override void FeatureActivated(SPFeatureReceiverProperties properties)
{
//Begin--Adding a Link to QuickLaunchBar....
ABCConfig config = new ABCConfig();
SPWeb site = (SPWeb)properties.Feature.Parent;
SPWeb rootsite = site.Site.RootWeb;
SPNavigationNodeCollection navColl = site.Navigation.QuickLaunch;
SPNavigationNode navNode = new SPNavigationNode("Submissions", "");
navColl.AddAsFirst(navNode);

//Read name and urls from the xml file
XmlDocument doc = new XmlDocument();

string ListOperationXMLPath = config.GetConfigValue(rootsite, "ABCLinks");
doc.Load(ListOperationXMLPath);
XmlNodeList lists = doc.GetElementsByTagName("Link");
foreach (XmlNode node1 in lists)
{
XmlElement fieldElement = (XmlElement)node1;
string FieldNameTitle = "";
string xmlUrl = "";
string siteUrl = "";
if (fieldElement.HasAttributes)
{
FieldNameTitle = fieldElement.Attributes["Title"].InnerText;
xmlUrl = fieldElement.Attributes["Url"].InnerText;
siteUrl = "/" + site.Title + "/"+xmlUrl;
SPNavigationNode node = new SPNavigationNode(FieldNameTitle, siteUrl);
foreach (SPNavigationNode nodes in site.Navigation.QuickLaunch)
{
if (nodes.Title.Equals("Submissions", StringComparison.InvariantCultureIgnoreCase))
{
nodes.Children.AddAsLast(node);
break;
}
}
}
}