Monday, December 24, 2007

Disable Right Click in SharePoint Site

You can prevent users from right-clicking in your sharepoint site. Add a content editor web part and add the following piece of code in the source editor of the content editor web part.




Save the content editor web part. Users are now prevented from the right click option on the page. Happy coding

Creating custom links in the Quick Launch bar

Quick launch bar is the left panel in the SharePoint site that is used for navigation.

1. Navigate to the Site Actions Menu to the Site Settings Page of your site


2. In the Quick Launch page the Add Heading is used to create a new Group in the Quick launch, and new link can also be added in the already existing Headings


3. To create a new Heading, click on the New Heading link which will open the following page,


4. To create a new link, click on the New Link and add the new link with the group header for the link


5. The new link is now created under the Heading Yahoo and the link is now visible in the Quick Launch bar


WhitePaper for SQL Storage and Performance for SharePoint

Microsoft has released a whitepaper that provides recommendations on the database architecture, Network Topology recommendations and the Physical storage recommendations. The whitepaper also provides information on monitoring, maintaining and troubleshooting storage issues. The whitepaper can be downloaded from, http://technet2.microsoft.com/Office/f/?en-us/library/ca472046-7d4a-4f17-92b1-c88a743a5e3c1033.mspx

Saturday, December 22, 2007

Workflow Permissions in SharePoint 2007

Workflows are designed under the security concept that they run as System Account in the Windows SharePoint Services and the App Pool Identity on the server computer and domain. In Windows SharePoint Services the workflows always have administrator privileges, whatever privileges the App Pool has. This makes it possible for the workflows to perform actions routing of documents etc.

Workflows running under administrator privileges enable users who are not administrators to elevate their own privileges by running a workflow to perform actions they ordinarily could not. This setting cannot be changed, it is up to the workflow to detect user actions and decide whether or not to continue or rollback changes or impersonate a user to mimic their permissions.

When associating a workflow, the Start Options, allow users to manually start a workflow with edit permissions which is enabled by default. This means that any authenticated Windows SharePoint Services user with edit permissions on the list can start an instance of this workflow association. If the administrator checks the “Require Manage List Permissions to start the workflow”, then only the list administrators can start an instance of the workflow’s association. Administrators can use restrict users enabling user defined workflows associated to the site. This option is available in the Central Administration.





The enable user-defined workflows for this site option in the workflow settings of the application management of Central Administration, will enable custom workflows to be associated with the particular site. This option is enabled by default. Settings for alert notifications can also be changed for alert notifications need to be sent or not for internal users who do not have site access when they are assigned a workflow task, and also for sending alert notifications to external users to participate in workflow by sending them a copy of the document.

Friday, December 21, 2007

Programmatically retrieving Site Usage in SharePoint 2007

Site Usage reports can be retrieved programmatically by using the GetUsageData method from the SPWeb class. This method would return a Data Table that contains information about the usage of the site based on the specified type of report, interval, number of columns and the last day to display. The GetUsageData method can be obtained from the Microsoft.SharePoint Namespace.

Alternatively site usage reports can also be viewed from the site settings menu. However this option is available when it is enabled from the Central Administration's Usage Analysis Logging. The log file is located by default in the 12 hive of SharePoint in the LOGS folder. However there is an option available in central administration to change the logging path.

Thursday, December 20, 2007

Summary Link Web Part

Summary Link Webpart can be used to provide a summary of links from both inside of your SharePoint site and also from outside for SharePoint. The Summary link webpart provides an easy way to build a page of links to various resources. This webpart is an out of the box webpart available in SharePoint. The Summary link webpart can be added to any page that supports the following welcome page layouts,
  1. Advanced Search
  2. Intranet Home
  3. News home
  4. People search results page
  5. Search page
  6. Search results
  7. Site directory home
  8. Welcome page with Table of contents

The summary link webpart can be configured to contain styles, headers, and groups. The links provided in this webpart can also contain images.

Wednesday, December 19, 2007

Activating Intellisense for CAML

XML files developed for Windows SharePoint Services 3.0 can be modified or new xml files for WSS 3.0 can be created using CAML. However by default Microsoft Visual Studio does not provide intellisense for CAML development. It is possible to enable intellisense for CAML based xml files in the following manner,
Create a new text file and name it as CAML.xml and add the following code,

targetNamespace="http://schemas.microsoft.com/sharepoint/"/>


Save the CAML.xml in the following path, C:\Program Files\Microsoft Visual Studio 8\XML\Schemas\CAML.xml

Shutdown and restart Visual Studio, intellisense will begin to work that rely on the following schema of CAML,
http://schemas.microsoft.com/sharepoint/namespace

Intellisense can be enabled for any schema in a similar method, however visual studio will only detect the schema, only when after restarting the same as visual studio examines the xml files in the directory at startup to determine which xml schema to be loaded to drive intellisense.

Monday, December 24, 2007

Disable Right Click in SharePoint Site

You can prevent users from right-clicking in your sharepoint site. Add a content editor web part and add the following piece of code in the source editor of the content editor web part.




Save the content editor web part. Users are now prevented from the right click option on the page. Happy coding

Creating custom links in the Quick Launch bar

Quick launch bar is the left panel in the SharePoint site that is used for navigation.

1. Navigate to the Site Actions Menu to the Site Settings Page of your site


2. In the Quick Launch page the Add Heading is used to create a new Group in the Quick launch, and new link can also be added in the already existing Headings


3. To create a new Heading, click on the New Heading link which will open the following page,


4. To create a new link, click on the New Link and add the new link with the group header for the link


5. The new link is now created under the Heading Yahoo and the link is now visible in the Quick Launch bar


WhitePaper for SQL Storage and Performance for SharePoint

Microsoft has released a whitepaper that provides recommendations on the database architecture, Network Topology recommendations and the Physical storage recommendations. The whitepaper also provides information on monitoring, maintaining and troubleshooting storage issues. The whitepaper can be downloaded from, http://technet2.microsoft.com/Office/f/?en-us/library/ca472046-7d4a-4f17-92b1-c88a743a5e3c1033.mspx

Saturday, December 22, 2007

Workflow Permissions in SharePoint 2007

Workflows are designed under the security concept that they run as System Account in the Windows SharePoint Services and the App Pool Identity on the server computer and domain. In Windows SharePoint Services the workflows always have administrator privileges, whatever privileges the App Pool has. This makes it possible for the workflows to perform actions routing of documents etc.

Workflows running under administrator privileges enable users who are not administrators to elevate their own privileges by running a workflow to perform actions they ordinarily could not. This setting cannot be changed, it is up to the workflow to detect user actions and decide whether or not to continue or rollback changes or impersonate a user to mimic their permissions.

When associating a workflow, the Start Options, allow users to manually start a workflow with edit permissions which is enabled by default. This means that any authenticated Windows SharePoint Services user with edit permissions on the list can start an instance of this workflow association. If the administrator checks the “Require Manage List Permissions to start the workflow”, then only the list administrators can start an instance of the workflow’s association. Administrators can use restrict users enabling user defined workflows associated to the site. This option is available in the Central Administration.





The enable user-defined workflows for this site option in the workflow settings of the application management of Central Administration, will enable custom workflows to be associated with the particular site. This option is enabled by default. Settings for alert notifications can also be changed for alert notifications need to be sent or not for internal users who do not have site access when they are assigned a workflow task, and also for sending alert notifications to external users to participate in workflow by sending them a copy of the document.

Friday, December 21, 2007

Programmatically retrieving Site Usage in SharePoint 2007

Site Usage reports can be retrieved programmatically by using the GetUsageData method from the SPWeb class. This method would return a Data Table that contains information about the usage of the site based on the specified type of report, interval, number of columns and the last day to display. The GetUsageData method can be obtained from the Microsoft.SharePoint Namespace.

Alternatively site usage reports can also be viewed from the site settings menu. However this option is available when it is enabled from the Central Administration's Usage Analysis Logging. The log file is located by default in the 12 hive of SharePoint in the LOGS folder. However there is an option available in central administration to change the logging path.

Thursday, December 20, 2007

Summary Link Web Part

Summary Link Webpart can be used to provide a summary of links from both inside of your SharePoint site and also from outside for SharePoint. The Summary link webpart provides an easy way to build a page of links to various resources. This webpart is an out of the box webpart available in SharePoint. The Summary link webpart can be added to any page that supports the following welcome page layouts,
  1. Advanced Search
  2. Intranet Home
  3. News home
  4. People search results page
  5. Search page
  6. Search results
  7. Site directory home
  8. Welcome page with Table of contents

The summary link webpart can be configured to contain styles, headers, and groups. The links provided in this webpart can also contain images.

Wednesday, December 19, 2007

Activating Intellisense for CAML

XML files developed for Windows SharePoint Services 3.0 can be modified or new xml files for WSS 3.0 can be created using CAML. However by default Microsoft Visual Studio does not provide intellisense for CAML development. It is possible to enable intellisense for CAML based xml files in the following manner,
Create a new text file and name it as CAML.xml and add the following code,

targetNamespace="http://schemas.microsoft.com/sharepoint/"/>


Save the CAML.xml in the following path, C:\Program Files\Microsoft Visual Studio 8\XML\Schemas\CAML.xml

Shutdown and restart Visual Studio, intellisense will begin to work that rely on the following schema of CAML,
http://schemas.microsoft.com/sharepoint/namespace

Intellisense can be enabled for any schema in a similar method, however visual studio will only detect the schema, only when after restarting the same as visual studio examines the xml files in the directory at startup to determine which xml schema to be loaded to drive intellisense.