Wednesday 24 August 2016

How to add footer in SharePoint 2013 Master page

Summary : How to add footer Message in SharePoint 2013,add footer in SharePoint 2013 Master page

In this post, we will look at an example of how to add a footer message in SharePoint 2013 Master page using SharePoint Designer 2013. (I am adding the footer in "oslo.master" page in this example)

Lets look at the detailed steps below –
  1. Open the site in SharePoint 2013 Designer and then select “Master Pages” in the left Navigation.
  2. Select the oslo.master (Please save copy of it before editing)
  3. Now open oslo.master for editing
  4. To specify custom footer, replace the block
<SharePoint:AjaxDelta id="DeltaPlaceHolderFooter" BlockElement="true" runat="server">
   <SharePoint:DelegateControl runat="server" ControlId="PageFooter" AllowMultipleControls="false" />
</SharePoint:AjaxDelta>

with below

<SharePoint:AjaxDelta id="DeltaPlaceHolderFooter" BlockElement="true" runat="server">
  <%--SharePoint:DelegateControl runat="server" ControlId="PageFooter" AllowMultipleControls="false" /--%>
   <div id="footer" class="noindex">
       <p style="text-align:center;">Some fancy footer is displayed here.</p>
   </div>
</SharePoint:AjaxDelta>

That's it!! :)
Cheers...

How to hide "recent" in the navigation (SharePoint 2013)

Hey folks,

I have found an out of the box solution.

Try below actions:

  1. *Settings -> Site contents
  2. *Site permissions
  3. *Create Group
  4. Make a new group with no permissions.
  5. Delete all users from the group.
  6. *Settings -> Site contents
  7. *Navigation
  8. Select the "Recent" heading
  9. *Click on Edit
  10. Set Audience = the group from step 4
  11. *OK
  12. *OK

BINGO!! :)
Now only members of a group, with no members, are able to see the "Recent" heading.

Thursday 5 February 2015

Missing DropDown Menu for Choosing Different List Views

In SharePoint 2010 you loose the list view selector in a list view if there are more than 1 web part in the page. This makes navigating the list views very cumbersome.

It disappears if you:
  • Add another list view web part
  • Add any other web part such as a Content Editor Web Part containing things like instructions for the list
  • 3rd party web parts like our PivotPoint or FilterPoint tools that work really well alongside list views for creating dynamic dashboards.
  • use your list on a wiki page – and remember most of the pages in SharePoint 2010 are wiki pages by default now.

Solution 1:

Open the View page in SharePoint Designer and Edit in advanced mode.

Replace: 

SharePoint:ListTitleViewSelectorMenu component.
Details are given in follwoing source location.

Source:
https://vintentou.wordpress.com/2010/08/03/missing-dropdown-menu-for-choosing-of-views/

Known issue in solution 1:
SharePoint Designer to be opened in advanced mode which can require Detaching pages from their site definition. Below are some extracts explaining why this can be damaging. “Enable Detaching Pages from the Site Definition: Enables or disables the ability to detach pages from the site definition. When checked, SharePoint Designer allows users to edit pages in Advanced Mode, giving them access to every part of the page and consequently when they save, the page is detached from its site definition.” “Detaching pages from their site definition . When you do this, intentionally or not, the page overrides the site definition and therefore won't be recognized the next time the site definition is updated. So this one is not the best approach.


Solution 2:

Free update from Pentalogic.They provides a way to solve it.

Once activated solution on a site it :
  • Looks for List View Web Parts that are present on a page but not set to visible and sets them to visible.
  • On other web part and wiki pages it adds a List View Selector Menu for the first list view web part it can find.
  • It uses the exact same interface that SharePoint normally uses, the user doesn't have to do anything different to what they normally do.
Source:
http://www.pentalogic.net/sharepoint-products/free-stuff/view-rescue


Solution 3:

Very nicely done by Alexander. (Recommended)

To achieve this, put this code 

http://spjsfiles.com/index.php?dir=SharePoint+JavaScripts%2FListViewSelectorForSharePoint2010%2F

in a text-file and place it in a shares document library (all users must have read access), or in a folder created in SharePoint Designer. You then copy the file’s url and paste it into the “Content Link” field in the “Edit web part”.

Kindly find his full blog from below source location.

Source:
http://spjsblog.com/2011/10/27/sharepoint-2010-the-view-selector-is-back/

Friday 1 November 2013

SharePoint 2010: Configure access request settings using Powershell


# Get All Web Application
$webApp=Get-SPWebApplication
   # Get All site collections
    foreach ($SPsite in $webApp.Sites)
    {
       # get the collection of webs
       foreach($SPweb in $SPsite.AllWebs)
        {
              # if a site inherits permissions, then the Access request mail setting also will be inherited
             if (!$SPweb.HasUniquePerm)
               {
                  Write-Host $SPweb.Name "Inheriting from Parent site"
               }
             elseif($SPweb.RequestAccessEnabled)
           {
        #Write-Host $SPweb.Name "Not Iheriting from Parent Site"
              $SPweb.RequestAccessEmail ="ram001@sample.com"
          $SPweb.Update()
           }
        }
    }

****** HAPPY CODING ********

SharePoint 2010: Setting Value for Web Part’s Custom Properties


To set the Custom Properties of web part programmatically, Following approach is useful. 


if (string.Equals(webPart.GetType().ToString(), “MyWebpartram001”)) 


  PropertyInfo[] pinProperties = webPart.GetType().GetProperties(BindingFlags.NonPublic | BindingFlags.Public | BindingFlags.Instance); 
foreach (PropertyInfo pinProperty in pinProperties) 

  if (pinProperty.Name == "Toolbar") 
 { 
   pinProperty.SetValue(webPart, false, null); 
   break; 
  } 
 } 
} 

****** HAPPY CODING ********

Tuesday 23 August 2011

List of all Web Services (with all methods) available with WSS 3.0 / MOSS 2007

List of SharePoint Web Services:

1) Administration Web Service (http:///_vti_bin/Admin.asmx):
The Administration Web service provides methods that can beused to manage Windows SharePoint Services such as creating or deleting site collections. Following are the main methods provided by this service:

CreateSite
DeleteSite
GetLanguages
RefreshConfigCache

2) Alerts Web Service (http:///_vti_bin/Alerts.asmx):
The alerts web service provides methods for working with alert subscriptions for the listitems in a SharePoint site remotely. Alert subscriptions specify when and how notifications are sent to users when changes are made to content stored on the server. Following are the two main methods provided by this service:

GetAlerts
DeleteAlerts

3) Copy Web Service (http:///_vti_bin/Copy.asmx):
This web service provides capability to move files from one list to another within a SharePoint site or between different SharePoint sites. Following are the main methods provided by this service:

GetItem
CopyIntoItems
CopyIntoItemsLocal

4) Document Workspace Web Service (http:///_vti_bin/Dws.asmx):
This web service provides methods for managing Document Workspace sites and the data they contain. Following are the main methods provided by this service:

a) Managing Document Workspace sites
CanCreateDwsUrl
CreateDws
RenameDws
DeleteDws
b) Managing data for the Document Workspace site
GetDwsData
GetDwsMetaData
UpdateDwsData
c) Managing folders in the Document Workspace site
CreateFolder
DeleteFolder
d) Managing documents in the Document Workspace site
FindDwsDoc
e) Managing site users for the Document Workspace site
RemoveDwsUser

5) Forms Web Service (http:///_vti_bin/Forms.asmx):
The Forms service provides methods for returning forms that are used in the user interface when working with the contents of a list. There are following two methods available:

GetForm
GetFormCollection

6) Imaging Web Service (http:///_vti_bin/Imaging.asmx):
The Imaging service provides methods that enable you to create and manage picture libraries. There are following methods that can be utilized with the imaging web service:

CheckSubwebAndList
CreateNewFolder
Delete
Download
Edit
GetItemsByIds
GetItemsXMLData
GetListItems
ListPictureLibrary
Rename
Upload

7) Lists Web Service (http:///_vti_bin/Lists.asmx):
The Lists Web service provides methods for working with SharePoint lists, content types, list items, and files. There are following methods that can be utilized with the Lists web service:

AddAttachment
AddDiscussionBoardItem
AddList
AddListFromFeature
ApplyContentTypeToList
CheckInFile
CheckOutFile
CreateContentType
DeleteAttachment
DeleteContentType
DeleteContentTypeXmlDocument
DeleteList
GetAttachmentCollection
GetList
GetListAndView
GetListCollection
GetListContentType
GetListContentTypes
GetListItemChanges
GetListItemChangesSinceToken
GetListItems
GetVersionCollection
UndoCheckOut
UpdateContentType
UpdateContentTypeXmlDocument
UpdateList
UpdateListItems

8) Meetings Web Service (http:///_vti_bin/Meetings.asmx):
This web service enables you to create and manage Meeting Workspace sites. Following are the main methods available in the web service:

AddMeeting
AddMeetingFromICal
CreateWorkspace
DeleteWorkspace
GetMeetingWorkspaces
GetMeetingsInformation
RemoveMeeting
RestoreMeeting
SetAttendeeResponse
SetWorkspaceTitle
UpdateMeeting
UpdateMeetingFromICal

9) People Web Service (http:///_vti_bin/People.asmx):
This service provides methods that can be used to associate user identifiers (IDs) with security groups for SharePoint Web site permissions. It contains following methods:

GetPrincipalsInGroup
ResolvePrincipals
SearchPrincipals

10) Permissions Web Service (http:///_vti_bin/Permissions.asmx):
Permissions Web service provides methods for working with SharePoint list and site permissions. Following are the various methods available in this service:

AddPermission
AddPermissionCollection
GetListItemPermissionsByUser
GetListPermissionsByUser
GetPermissionCollection
GetPermissionsByToken
GetPermissionsByUser
RemovePermission
RemovePermissionCollection
UpdatePermission

11) SharePoint Directory Management Service (http:///_vti_bin/sharepointemailws.asmx):
This service provides methods for managing Active Directory e-mail distribution groups and their membership. It provides following main methods:

CreateContact
DeleteContact
ModifyContact
CreateDistributionGroup
DeleteDistributionGroup
ModifyDistributionGroup
RenameDistributionGroup
ChangeContactsMembershipInDistributionGroup
ChangeUsersMembershipInDistributionGroup

12) Site Data Web Service (http:///_vti_bin/SiteData.asmx):
The Site Data service provides methods that return metadata or list data from sites or lists in Microsoft Windows SharePoint Services. This web service is read only. Following are the main methods provided by this service:

GetList
GetListCollection
GetListItems
EnumerateFolder
GetAttachments
GetChanges
GetContent
GetSite
GetWeb
GetSiteAndWeb
GetSiteUrl
GetURLSegments

13) Sites Web Service (http:///_vti_bin/Sites.asmx):
The Sites service provides a method for returning information about the collection of site templates on the virtual server. Following are the main methods provided by this service:

ExportWeb
ImportWeb
GetSiteTemplates
GetUpdatedFormDigest

14) Search Web Service (http:///_vti_bin/search.asmx):
The QueryService can be used to query the search indexes in the same way that you would search from the home page of a SharePoint site. Main methods available in this service are as below:

Query
QueryEx
GetPortalSearchInfo
GetSearchMetadata
Registration
Status

15) Users and Groups Web Service (http:///_vti_bin/usergroup.asmx):
The Users and Groups Web service provides methods for working with users, role definitions, and groups. It provides huge number of methods which are listed below:

AddGroup
AddGroupToRole
AddRole
AddRoleDef
AddUserCollectionToGroup
AddUserCollectionToRole
AddUserToGroup
AddUserToRole
GenerateXmlMappings
GetAllUserCollectionFromWeb
GetGroupCollection
GetGroupCollectionFromRole
GetGroupCollectionFromSite
GetGroupCollectionFromUser
GetGroupCollectionFromWeb
GetGroupInfo
GetHashCode
GetLifetimeService
GetRoleCollection
GetRoleCollectionFromGroup
GetRoleCollectionFromUser
GetRoleCollectionFromWeb
GetRoleInfo
GetRolesAndPermissionsForCurrentUser
GetRolesAndPermissionsForSite
GetUserCollection
GetUserCollectionFromGroup
GetUserCollectionFromRole
GetUserCollectionFromSite
GetUserCollectionFromWeb
GetUserInfo
GetUserLoginFromEmail
RemoveGroup
RemoveGroupFromRole
RemoveRole
RemoveUserCollectionFromGroup
RemoveUserCollectionFromRole
RemoveUserCollectionFromSite
RemoveUserFromGroup
RemoveUserFromRole
RemoveUserFromSite
RemoveUserFromWeb
UpdateGroupInfo
UpdateRoleDefInfo
UpdateRoleInfo
UpdateUserInfo

16) Versions Web Service (http:///_vti_bin/Versions.asmx):
Versions Web service provides methods for working with file versions in SharePoint document libraries. Methods included in this service:

DeleteAllVersions
DeleteVersion
GetVersions
RestoreVersion

17) Views Web Service (http:///_vti_bin/Views.asmx):
Views Web service provides methods for creating, deleting, or updating list views. Methods included in this service are as below:

AddView
DeleteView
GetView
GetViewCollection
GetViewHtml
UpdateView
UpdateViewHtml

18) Web Part Pages Web Service (http:///_vti_bin/WebPartPages.asmx):
Web Part Pages service provides methods for working with Web Parts. Following are the various methods provided by this service:

AddWebPart
AddWebPartToZone
AssociateWorkflowMarkup
ConvertWebPartFormat
DeleteWebPart
ExecuteProxyUpdates
FetchLegalWorkflowActions
GetCustomControlList
GetDataFromDataSourceControl
GetFormCapabilityFromDataSourceControl
GetWebPart
GetWebPart2
GetWebPartCrossPageCompatibility
GetWebPartPage
GetWebPartPageConnectionInfo
GetWebPartPageDocument
GetWebPartProperties
GetWebPartProperties2
GetXmlDataFromDataSource
RemoveWorkflowAssociation
RenderWebPartForEdit
SaveWebPart
SaveWebPart2
ValidateWorkflowMarkupAndCreateSupportObjects

19) Webs Web Service (http:///_vti_bin/Webs.asmx):
Webs service provides methods for working with sites and subsites. Following are the various methods provided by this service:

CreateContentType
CustomizeCss
DeleteContentType
GetActivatedFeatures
GetAllSubWebCollection
GetColumns
GetContentType
GetContentTypes
GetCustomizedPageStatus
GetListTemplates
GetWeb
GetWebCollection
RemoveContentTypeXmlDocument
RevertAllFileContentStreams
RevertCss
RevertFileContentStream
UpdateColumns
UpdateContentType
UpdateContentTypeXmlDocument
WebUrlFromPageUrl

To get the full details of above SharePoint Web Services and their respective Methods please visit SharePoint Web Services MSDN Page @ http://msdn.microsoft.com/en-us/library/ms479390.aspx.

Happy Coding...

Friday 27 February 2009

SharePoint DateTimeControl Validation

I have been using a DateTimeControl for a custom aspx Page in my Sharepoint site, this control is really nice and having so many features inbuilt.
However, I noticed one small drawback with it - Validation.Internally the DateTimeControl of SharePoint is just a calendar dropdown and a text box. Also, they already implemented a simple required field validation by just using the IsRequiredField property. However, if you try to put an asp.net validator (i.e.: CompareValidator, RegularExpressionValidtator, etc...) on it, it says it can't find the control. This is happening because the DateTimeControl is just a wrapper around this textbox and if you set the Validator ControlToValidate property to the DateTimeControl it isn't smart enough to know to really validate against the actual textbox.So, how do we accomplish this. Actually, it is pretty easy - SharePoint is giving an ID to that Textbox programatically and this ID is the same name as your control with the word "Date" added to the end.So, in your ControlToValidate just put "{nameofcontrol}${nameofcontrol}Date".

Here is an example:




Thursday 20 November 2008

How MOSS Search Determines Relevance

Relevance is a measure of how well the results returned by a search system meet the user’s needs. With each search request, the system should be directing the user to the most relevant items (from a corpus of potentially millions of items!).
SharePoint’s relevance settings affect how rankings for items are calculated, which affects the order in which search results appear in a search results list. Microsoft focused a lot on improving relevance for search results in MOSS 2007, which is tuned for searching enterprise content and Line of Business (LOB) application data.
The following are used to calculate relevance:

Title and filename. Is the search term in the document’s title? Its
filename?
Metadata. Is the search term in the metadata properties (Site
Columns)?
Search Term Density. What’s the density of that search term within
the document (for example, 20 mentions in a one-page document
versus 20 mentions in a 100-page document)?
Keywords. Words or phrases that you identify as significant to your
organization. They provide a way to provide additional information
(and recommended links) on the initial results page that would not
otherwise be displayed in the search results for queries containing
that keyword. Two pieces of information can be displayed for a keyword—
a definition of the term and the best bets, which are a list of
links identified as being very relevant for that term.
Best Bets. Items tagged manually as best bets show up first in a
search results list, as just described.
Security. SharePoint excludes results that the user does not have
permission to see. This is called security trimming.
Hyperlink Click Distance. SharePoint determines the number of
links between a URL and any of the authoritative sites that a search
administrator specifies. The more links that the search needs to
travel from an authoritative site to the content item, the lower the
relevance score.
Anchor Text. This is the text that is included with a hyperlink to
describe the target content of that hyperlink. When the search
crawls an item, this anchor text is included in the index for that content,
but only for ranking, not for results matching. For example, if
the anchor text matches but the content in the corresponding item
doesn’t, the link is not included in results.
URL Depth. Shorter URLs are placed higher in the ranking.
SharePoint determines “depth” by looking at the number of slashes
in the URL.
URL Text Matching. SharePoint looks for the presence of the text in
the URL itself.
Title Extraction. For Office documents, SharePoint uses the title
property of the document to help return highly relevant content,
provided it’s not the default value (Slide1, Document1, and so on).
Result Collapsing. SharePoint search combines similar results. This
prevents things such as users getting the same document as the first
20 hits.
Language. Users typically want content in their own language.

SharePoint looks at the browser language and defaults to searches in
that language. English is also ranked highly regardless of browser
language.
-------- Have A Nice Time !!! -------------

Wednesday 28 May 2008

Use PeopleEditor (People Picker) in SharePoint Custom application development

Use PeopleEditor (People Picker) in SharePoint Custom App Dev

How to add the PeopleEditor (People Picker) control to your custom application development (ASPX, user controls, web parts, etc.)

The control we are interested in is the Microsoft.SharePoint.WebControls.PeopleEditor control.

First, we need to add a reference to the Namespace containing our control:

<%@ Register Tagprefix="wssawc" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>


Next, add the PeopleEditor control to your page:

<wssawc:PeopleEditor
AllowEmpty="false"
ValidatorEnabled="true"
id="userPicker"
runat="server"
ShowCreateButtonInActiveDirectoryAccountCreationMode="true"
SelectionSet="User" />


Next, add an object on the server to work with the control:


using Microsoft.SharePoint.WebControls; //add a reference to Microsoft.SharePoint.dll if needed

public class MyPageName : Page
{
protected PeopleEditor userPicker;

}


Now, add your code needed to retrieve the entities:

public void btnSave_Click(object sender, System.EventArgs e)
{
….
PickerEntity pe = (PickerEntity)userPicker.Entities[0]; //gets first user in list
string username = pe.Description;

}

Notes:
The Description property will return the full account name (e.g. domain\username)
The DisplayText property will return the resolved name in the editor control (e.g. First Last)

----------------- Have A Nice Time !!! --------------------