Обзор возможностей механизма рейтингов:
http://weblogs.asp.net/bsimser/archive/2009/10/19/sharepoint-2010-what-s-new-ratings-spc09.aspx
Настройка страницы поиска:
http://blogs.technet.com/b/speschka/archive/2009/10/28/using-the-new-sharepoint-2010-ratings-feature-in-search.aspx
Использование компонента AverageRatingFieldControl
http://codename-srini.blogspot.com/2010/04/how-to-use-rating-control-in-sharepoint.html
воскресенье, 25 марта 2012 г.
понедельник, 9 января 2012 г.
Проверка исходящей почты SharePoint 2010 PowerShell
$site = New-Object Microsoft.SharePoint.SpSite("http://yoursite/")
$web = $site.OpenWeb("RelativePathOf/TestSite/")
$sent = [Microsoft.Sharepoint.Utilities.SpUtility]::SendEmail($web,0,0,"yourTestMail@yourdomain.com",
"Test mail subject","test mail body")
$sent
http://abstractspaces.wordpress.com/2010/08/13/check-sharepoint-mail-settings-using-powershell/
среда, 28 декабря 2011 г.
Creating custom PortalSiteMapProvider for SharePoint Portal 2010
This provider ables to remove navigation from Cities list and add items from Members list.
CustomNavigationDataProvide.cs
namespace SiteGroup.WebControls
{
public class CustomNavigationDataProvider : PortalSiteMapProvider
{
public override System.Web.SiteMapNodeCollection GetChildNodes(System.Web.SiteMapNode node)
{
PortalSiteMapNode portalNode = (PortalSiteMapNode)node;
SPQuery query = new SPQuery() { Query = "" };
{
public class CustomNavigationDataProvider : PortalSiteMapProvider
{
public override System.Web.SiteMapNodeCollection GetChildNodes(System.Web.SiteMapNode node)
{
PortalSiteMapNode portalNode = (PortalSiteMapNode)node;
SPQuery query = new SPQuery() { Query = "" };
// Remove nodes wich include in "Cities" list
SiteMapNodeCollection nodeCities = this.GetCachedListItemsByQuery(
portalNode.WebNode, "Cities", query, SPContext.Current.Web);
foreach (SiteMapNode nodeCity in nodeCities)
{
for (int nNodeIndex = coll.Count - 1; nNodeIndex >= 0; nNodeIndex--)
{
if (coll[nNodeIndex].Title == nodeCity.Title)
{
coll.RemoveAt(nNodeIndex);
}
}
}
// Add nodes to Members node
if (node.Title == "Members")
{
// PortalSiteMapNode portalNode = (PortalSiteMapNode)node;
//SPQuery query = new SPQuery() { Query = "" };
SiteMapNodeCollection listItemNodes = this.GetCachedListItemsByQuery(
portalNode.WebNode, "Members", query, SPContext.Current.Web);
coll = new SiteMapNodeCollection(listItemNodes.Count);
SPWeb web = SPContext.Current.Site.RootWeb;
Guid guidBank = web.Lists["Members"].ID;
foreach (PortalListItemSiteMapNode nodeList in listItemNodes)
{
PortalSiteMapNode nodeNew = new PortalSiteMapNode(
portalNode.WebNode,
string.Format("{0}_add", nodeList.Key),
Microsoft.SharePoint.Publishing.NodeTypes.ListItem,
nodeList.Url,
nodeList.Title,
nodeList.Description);
coll.Add(nodeNew);
}
return coll;
}
return coll;
}
}
} SiteMapNodeCollection nodeCities = this.GetCachedListItemsByQuery(
portalNode.WebNode, "Cities", query, SPContext.Current.Web);
foreach (SiteMapNode nodeCity in nodeCities)
{
for (int nNodeIndex = coll.Count - 1; nNodeIndex >= 0; nNodeIndex--)
{
if (coll[nNodeIndex].Title == nodeCity.Title)
{
coll.RemoveAt(nNodeIndex);
}
}
}
// Add nodes to Members node
if (node.Title == "Members")
{
// PortalSiteMapNode portalNode = (PortalSiteMapNode)node;
//SPQuery query = new SPQuery() { Query = "" };
SiteMapNodeCollection listItemNodes = this.GetCachedListItemsByQuery(
portalNode.WebNode, "Members", query, SPContext.Current.Web);
coll = new SiteMapNodeCollection(listItemNodes.Count);
SPWeb web = SPContext.Current.Site.RootWeb;
Guid guidBank = web.Lists["Members"].ID;
foreach (PortalListItemSiteMapNode nodeList in listItemNodes)
{
PortalSiteMapNode nodeNew = new PortalSiteMapNode(
portalNode.WebNode,
string.Format("{0}_add", nodeList.Key),
Microsoft.SharePoint.Publishing.NodeTypes.ListItem,
nodeList.Url,
nodeList.Title,
nodeList.Description);
coll.Add(nodeNew);
}
return coll;
}
return coll;
}
}
Creating Navigation module
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
<Control
Id="TopNavigationDataSource"
Sequence="40"
ControlClass="Microsoft.SharePoint.Publishing.Navigation.PortalSiteMapDataSourceSwitch"
ControlAssembly="Microsoft.SharePoint.Publishing, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c">
<Property Name="ID">topSiteMap</Property>
<Property Name="SiteMapProvider">CustomNavigationDataProvider</Property>
<Property Name="EnableViewState">false</Property>
<Property Name="StartFromCurrentNode">true</Property>
<Property Name="ShowStartingNode">true</Property>
<Property Name="TreatStartingNodeAsCurrent">true</Property>
<Property Name="TrimNonCurrentTypes">Heading</Property>
</Control>
</Elements>
<Control
Id="TopNavigationDataSource"
Sequence="40"
ControlClass="Microsoft.SharePoint.Publishing.Navigation.PortalSiteMapDataSourceSwitch"
ControlAssembly="Microsoft.SharePoint.Publishing, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c">
<Property Name="ID">topSiteMap</Property>
<Property Name="SiteMapProvider">CustomNavigationDataProvider</Property>
<Property Name="EnableViewState">false</Property>
<Property Name="StartFromCurrentNode">true</Property>
<Property Name="ShowStartingNode">true</Property>
<Property Name="TreatStartingNodeAsCurrent">true</Property>
<Property Name="TrimNonCurrentTypes">Heading</Property>
</Control>
</Elements>
web.config registration
<actions>
<add path="configuration/system.web/siteMap/providers">
<add name="LifeGlobalNavSiteMapProvider" description="" type="SiteGroup.WebControls.CustomNavigationDataProvider, SiteGroup, Version=1.0.0.0, Culture=neutral, PublicKeyToken=ce31f39e24cadf59" NavigationType="Combined" EncodeOutput="true" />
</add>
</actions>
You need to activate feature with Navigation module.
пятница, 23 декабря 2011 г.
Как получить информацию о Feature SharePoint 2010
Get-SPFeature -Identity "ADV.Life_List instances" | Format-List
Пример
Get-SPFeature -Identity "SearchWebParts" | Format-List
PS C:\Users\Administrator.SP> Get-SPFeature -Identity "SearchWebParts" | Format-List Name : FeatureDefinition/eaf6a128-0482-4f71-9a2f-b1c650680e77 Id : eaf6a128-0482-4f71-9a2f-b1c650680e77 DisplayName : SearchWebParts SolutionId : 00000000-0000-0000-0000-000000000000 ReceiverAssembly : ReceiverClass : UIVersion : UpgradeReceiverAssembly : UpgradeReceiverClass : Properties : {} Version : 12.0.0.0 Scope : Site AutoActivateInCentralAdmin : False ActivateOnDefault : True RootDirectory : C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\Template\FeaturesSearchWebParts Hidden : False ActivationDependencies : {} AlwaysForceInstall : False RequireResources : False DefaultResourceFile : Microsoft.Office.Server.Search TypeName : Microsoft.SharePoint.Administration.SPFeatureDefinition Status : Online Parent : SPFarm Name=SharePoint_Config Farm : SPFarm Name=SharePoint_Config UpgradedPersistedProperties : {}
среда, 7 декабря 2011 г.
Как убрать задержку при открытии выпадающего меню SharePoint
При открытии динамического подменю SharePoint 2010 на базе AspMenu возникает задержка при перемещении на другой пункт меню. Чтобы исправить это, достаточно добавить следующий стиль.
li.hover-off>ul
{
display:none;
}
см. также http://blog.voltje.be/?p=208
понедельник, 5 декабря 2011 г.
How to get ImageList in SharePoint 2010
PublishingWeb pubSite = PublishingWeb.GetPublishingWeb(SPControl.GetContextWeb(HttpContext.Current));
pubSite.ImagesLibrary
понедельник, 21 ноября 2011 г.
JavaScript error object doesn't support this property or method on Navigation page SharePoint
I had Javascrip error "object doesn't support this property or method" after modify master page of my SharePoint 2010 site. This error fired on Edit Navigation page _layouts/AreaNavigationSettings.aspx. You able to look at description of this error on yhis link.
I used JQuery library for fixing this error. I was modified LAYOUTS\\HierarchicalListBox.js (line 1482).
HierarchicalListBox.prototype.updateInspector=function()
{ULSY9G:;
if (this.showInspector)
{
var inspectorHtml='';
if (this.selected !=null)
{
var name=this.selected.name;
var url=this.selected.url;
var description=this.selected.description;
var typeName=this.types[this.selected.type].name;
var typeImage=this.types[this.selected.type].image;
inspectorHtml+='<div style="margin: 5px 0px 5px 0px;"><b>'+L_Title_TEXT+'</b> '+STSHtmlEncode(name)+'</div>';
inspectorHtml+='<div style="margin: 5px 0px 5px 0px;"><b>'+L_Url_TEXT+'</b><span dir="ltr"> '+STSHtmlEncode(url)+'</span></div>';
inspectorHtml+='<div style="margin: 5px 0px 5px 0px;"><b>'+L_Description_TEXT+'</b> '+STSHtmlEncode(description)+'</div>';
inspectorHtml+='<div style="margin: 5px 0px 5px 0px; vertical-align: middle"><b>'+L_Type_TEXT+'</b> <img src="'+typeImage+'" width="16" height="16" border="0" align="absmiddle" alt=""/> '+STSHtmlEncode(typeName)+'</div>';
}
else
{
inspectorHtml+='<div style="margin: 5px 0px 5px 0px;">'+this.noSelectionMessage+'</div>';
}
/* container=document.getElementById('InsertInspectorPane');*/ $('#InsertInspectorPane').html(inspectorHtml);
//container.innerHTML=inspectorHtml;
}
}
You have to add jQuery library on your masterpage for this script.
{ULSY9G:;
if (this.showInspector)
{
var inspectorHtml='';
if (this.selected !=null)
{
var name=this.selected.name;
var url=this.selected.url;
var description=this.selected.description;
var typeName=this.types[this.selected.type].name;
var typeImage=this.types[this.selected.type].image;
inspectorHtml+='<div style="margin: 5px 0px 5px 0px;"><b>'+L_Title_TEXT+'</b> '+STSHtmlEncode(name)+'</div>';
inspectorHtml+='<div style="margin: 5px 0px 5px 0px;"><b>'+L_Url_TEXT+'</b><span dir="ltr"> '+STSHtmlEncode(url)+'</span></div>';
inspectorHtml+='<div style="margin: 5px 0px 5px 0px;"><b>'+L_Description_TEXT+'</b> '+STSHtmlEncode(description)+'</div>';
inspectorHtml+='<div style="margin: 5px 0px 5px 0px; vertical-align: middle"><b>'+L_Type_TEXT+'</b> <img src="'+typeImage+'" width="16" height="16" border="0" align="absmiddle" alt=""/> '+STSHtmlEncode(typeName)+'</div>';
}
else
{
inspectorHtml+='<div style="margin: 5px 0px 5px 0px;">'+this.noSelectionMessage+'</div>';
}
/* container=document.getElementById('InsertInspectorPane');*/ $('#InsertInspectorPane').html(inspectorHtml);
//container.innerHTML=inspectorHtml;
}
}
Подписаться на:
Сообщения (Atom)
