Home » Articles posted by pathikhrawal

Author Archives: pathikhrawal

2012 in review


The WordPress.com stats helper monkeys prepared a 2012 annual report for this blog.

Here’s an excerpt:

4,329 films were submitted to the 2012 Cannes Film Festival. This blog had 32,000 views in 2012. If each view were a film, this blog would power 7 Film Festivals

Click here to see the complete report.

My Links Migration from MOSS 2007 to SP 2010- Part 2


Hi There,

I discussed about My Links migration in post 1 here https://pathikhrawal.wordpress.com/2011/07/14/my-site-migration-from-moss-2007-to-sp-2010/  . In this post I am going to provide code snippet for migration of My links.

The actual migration process involves 2 major activities

1) EXPORT- Export My Links on MOSS 2007’s My Site (C# Code)

2) IMPORT- Import all My Links on SharePoint 2010’s My Site (PowerShell)

Export Process:

Details Steps

1) You can create a console application/Windows Applciation or WPF Application in Visual Studio 2008 with .Net Framework 2.0

2) Create an XML with links data. (By running our application on MOSS 2007 which will create an XML file)

XML format:

<UserProfiles>
    <UserProfile userNames=“user1″ accountName=“VM-MOSS01\user1″>
<UserLinks>
     <Link>
         <title>hello</title>
        <group>General</group>
        <groupType>General</groupType>
        <privacy>Public</privacy>
       <url>
         <![CDATA[ http://teamsites.moss.com/  ]]>
       </url>
  </Link>
</UserLinks>
  </UserProfile>
  </UserProfiles>
 
 
The actual code is provided below ( this is function you can copy to you console application). The
only one Parameter is URL- You need to provide the Central Admin URL
 
Code to export My links
public static void ExportUserProfiles(string url)
       {
           //accessing the profile manager to get profile properties
           UserProfileManager profileManager = default(UserProfileManager);
 
           using (SPSite site = new SPSite(url))
           {
               ServerContext serverContext = ServerContext.GetContext(site);
               profileManager = new UserProfileManager(serverContext);
           }
 
           //declaration of xml file
           XmlDocument xmlDoc = null;
           XmlNode userProfilesNode = null;
 
                  //creating new XMl document
                   xmlDoc = new XmlDocument();
                   XmlDeclaration xmlDeclaration = xmlDoc.CreateXmlDeclaration(“1.0”, “UTF-8″, “yes”);
                   xmlDoc.AppendChild(xmlDeclaration);
 
                   //creation first node of userprofile
                   userProfilesNode = xmlDoc.CreateElement(“UserProfiles”);
                   xmlDoc.AppendChild(userProfilesNode);
 
 
           foreach (UserProfile userProfile in profileManager)
           {
               try
               {
                  
 
                   //creating user profile node
                   XmlNode userProfileNode = xmlDoc.CreateElement(“UserProfile”);
                   userProfilesNode.AppendChild(userProfileNode);
                   XmlAttribute userProfileAttribute;
 
                   // creating username property for profile node
                   userProfileAttribute = xmlDoc.CreateAttribute(“userNames”);
                   userProfileAttribute.Value = userProfile[PropertyConstants.UserName].Value.ToString();
                   userProfileNode.Attributes.Append(userProfileAttribute);
 
                   // creating accountName property for profile node
                   userProfileAttribute = xmlDoc.CreateAttribute(“accountName”);
                   userProfileAttribute.Value = userProfile[PropertyConstants.AccountName].Value.ToString();
                   userProfileNode.Attributes.Append(userProfileAttribute);
 
 
                   ////creating myLink node in export xml file
                   XmlNode myLinksNode = xmlDoc.CreateElement(“UserLinks”);
                   userProfileNode.AppendChild(myLinksNode);
 
                   QuickLinkManager linkManager = userProfile.QuickLinks;
 
                   foreach (QuickLink link in linkManager.GetItems())
                   {
                       try
                       {
                           XmlNode linkNode = xmlDoc.CreateElement(“Link”);
                           myLinksNode.AppendChild(linkNode);
 
                           XmlNode linkTitleNode = xmlDoc.CreateElement(“title”);
                           linkNode.AppendChild(linkTitleNode);
                           linkTitleNode.InnerXml = link.Title;
 
                           XmlNode linkGroupNode = xmlDoc.CreateElement(group);
                           linkNode.AppendChild(linkGroupNode);
                           linkGroupNode.InnerXml = link.Group;
 
                           XmlNode linkGroupTypeNode = xmlDoc.CreateElement(“groupType”);
                           linkNode.AppendChild(linkGroupTypeNode);
                           linkGroupTypeNode.InnerXml = link.GroupType.ToString();
 
                           XmlNode linkPrivacyeNode = xmlDoc.CreateElement(“privacy”);
                           linkNode.AppendChild(linkPrivacyeNode);
                           linkPrivacyeNode.InnerXml = link.PrivacyLevel.ToString();
 
                           XmlNode linkUrlNode = xmlDoc.CreateElement(“url”);
                           linkNode.AppendChild(linkUrlNode);
                           XmlCDataSection linkValCData;
 
                           linkValCData = xmlDoc.CreateCDataSection(link.Url);
                           linkUrlNode.AppendChild(linkValCData);
 
                       }
                       catch (Exception ex)
                       {
                       }
 
                   }
 
                   xmlDoc.Save(“MyLinksExported.XML”);
 
               }
 
               catch (Exception ex)
               {
               }
 
 
           }
       }

 

Import

Now for Import I am going to provide you PowerShell script to import all links for all users.

Details Steps:

1) Copy the XML file to a folder

2) Create a New ImportLinks.PS1 in the same folder and copy below code to PS1 file

 
$commonconfig = “links.xml”
 
$executingScriptDirectory = Split-Path -Path $MyInvocation.MyCommand.Definition -Parent
#region scripts body
cls
#region snapin inclusion
Add-PSSnapin Microsoft.SharePoint.PowerShell -erroraction SilentlyContinue
# if snapin is not installed then use this method
[Void][System.Reflection.Assembly]::LoadWithPartialName(“Microsoft.SharePoint”)
#endregion
 
[xml]$configurations = Get-Content “$executingScriptDirectory/$commonconfig” 
 
 
$site = new-object Microsoft.SharePoint.SPSite(“http://w7-pathikr:15767”)
$ServiceContext = [Microsoft.SharePoint.SPServiceContext]::GetContext($site);
$ProfileManager = new-object Microsoft.Office.Server.UserProfiles.UserProfileManager($ServiceContext)
 
#provision managed accounts
 
    foreach($UserProfile in $configurations.UserProfiles.UserProfile)
    {
       
        Write-Host $UserProfile.accountName;
        $User = $ProfileManager.GetUserProfile($UserProfile.accountName);
        $quickLinkManager = $User.QuickLinks;
             
       foreach($Link in $UserProfile.UserLinks.Link)
        {
           $title=$Link.title;
           $group=$Link.group;
           $groupType=$Link.groupType;
           $privacy=$Link.privacy;
           $url=$Link.url.InnerText;
           $quickLinkManager.Create($title, $url, $group, $null, $privacy)       
        
        }
       
    }
 
 
 
 

 

Now Run the PowerShell script on SharePoint 2010 Management Shell (Run as Administrator)

Thats all ! All Links from MOSS 2007’s My Site to SP 2010’s My Site for all users.

..

Manage Timer Jobs with PowerShell


In this small post lets see how you can configure Time Jobs using PowerShell. Lets say you want to enable “Activity Feed Job” which is by default “Disabled” on the Server.

a) First run below command to Get the job definition like Name, status, GUID

Command:

get-sptimerjob | sort-object name | where {$_.Name -match “ActivityFeedJob”}

Output:

image

Note down the Name of the job. Usually it will be <<User Profile Service Name>>_ActivityFeedJob

More details on Get-SPTimeJob visit http://msdn.microsoft.com/en-us/site/ff607914

b) Run below command to enable Time job

Command:

Enable-SPTimerJob -Identity <<Name of Job captured in step a>>

Output:

image

More details on Enable-SPTimerJob visit http://msdn.microsoft.com/en-us/site/ff607892

c) Set timer job- Schedule a time job now after it is enabled

Command:

Set-SPTimerJob “upa_ActivityFeedJob” -schedule “Every 30 minutes between 0 and 59″

Output:

image

More details on Set-SPTimeJob visit  http://msdn.microsoft.com/en-us/site/ff607916

that’s it

SharePoint 2010- Document Sets-Introduction


Introduction

Document Set is new feature added to SharePoint 2010’s document management capabilities. This a great feature to manage different set of documents within one document library. Document Set is very similar to folder within a document library but it comes with a lot of great useful features.

Document Set enables users to group multiple documents, that support a single project or task, together into a single entity. All documents in a Document Set share the metadata and the entire set can also be versioned.

Example of Document Sets

1) If you want to have a document library named Training. Training Document Library may content below set of documents

  • Course Content
  • Presentation
  • Books for Reference
  • Hands on Lab

For this you Could easily create a new Document library and then enable Document Sets for the document library. Then you can create 4 document sets as shown in below picture

Steps to create Document Library and Document Set

  • Enable Document Set Feature (Site Collection Feature)
    • Navigate to Site Collection Feature & Enable “Document Sets” Feature as shown in below picture

image

  • Create a New Document Library First
    • Click on Site Action ==> More Option ==> “Document Library” from available templates

                               image

    • Enter name as “Trainings”
    • After the Document library is created, navigate to Library (Ribbon Tab) ==>Library Setting ==> Advanced Settings ==>  Content Type and select Allow Management of Content type (see below screen shot)

               

     image

    • Now Navigate to
    • Trainings ==> Document Library Settings ==>
      Content Types ==> Add from existing site content types ==> Select “Document Set” Content Type from Available Site Content Types ==> Click Add ==> Click OK

      (This will associate your document library to OOB Document Sets Content Type

 

  • Create Document Sets within Trainings Document Library
    • With in Document Library ==> Select Document Ribbon Tab ==> Click on arrow of New Document Button ==> Select Document Set

                                  image

    • Enter Name as “Course Content” and enter some description

image

    • Follow above steps to create below Document sets
        • Presentation
        • Books for Reference
        • Hands on Lab

Training Document Library will look like as shown in below screen shot

image

& each Document set view is as shown in below screen shots (Welcome Page). This page can be used to upload documents to the document set, create/define properties, assign workflow, define view.

image

Below is the ribbon control for document set.

Some considerations:

  • Folders are not allowed in a Document set
  • You can not use Metadata Navigation in a document set
  • No limit on number of documents in a document set however the display load is limited by list view threshold (which is 5,000 items)

In this post I explained about what is Document Sets and how to create/associate. I am going to explain about customization of Document Sets Content type, Programmatically create “Document Sets”

PowerShell Script to enable Visual Upgrade for all webs under a site collection


When you upgrade from Microsoft Office SharePoint Server 2007 to Microsoft SharePoint Server 2010, you can choose to use the Visual Upgrade feature to give site collection owners and site owners the opportunity to preserve the previous user interface temporarily

When you upgrade, either by using in-place upgrade or by using the database attach upgrade method, you can choose to use Visual Upgrade.

How to use this script

1) Copy below code to .PS1 file

2) Run the .PS1 using SharePoint 2010 Management Shell

3) Parameters to .PS1

ex: visualupgrade.ps1 1 “http://w7-pathikhr”

Param 1: 0 or 1

Param 2: URL of the Site Collection

param([int] $RestrictVisualUpgrade = 0,$siteurl)
[System.Reflection.Assembly]::Load(“Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c”) | out-null
 
$oContentService = [Microsoft.SharePoint.Administration.SPWebService]::ContentService;
 
[Microsoft.SharePoint.Administration.SPWebApplicationCollection]$waColl = $oContentService.WebApplications;
 
$waCollNonAdmin = $waColl | where-object {$_.IsAdministrationWebApplication -eq $FALSE}
 
 
write-host $siteurl
 
$siteColl = Get-SPSite $siteurl
 
        $siteColl.UIVersionConfigurationEnabled = $RestrictVisualUpgrade
        foreach($web in $siteColl.AllWebs)
        {
$web.UIVersionConfigurationEnabled = $RestrictVisualUpgrade
            $web.Update()
        }
   
   
 
 
 

 

To learn more about Visual upgrade visit http://technet.microsoft.com/en-us/library/ff607998.aspx

Thanks

SharePoint 2010-Backup and Recovery Guidelines


 

Introduction

This blog post describes best practices that you can use to help ensure that backup and recovery operations in Microsoft SharePoint Server 2010 are successful and that the environment is protected against data loss or continuity gaps. The article includes best practices for performance, quality assurance, security, and operational excellence

Backup strategy

There are two different approaches for backup and restore

  • Content/Config Database Backup using SQL Server
  • Backup using SharePoint Server

Lets look at each approach in details

1) Content/Config Database Backup using SQL Server

 Approach one is to use SQL Server backup to back content DBs and Configuration DBs with a complete script for deployment of Web application, Site Collection, Service Provisioning.

Backup Method

a. Create Deployment script of entire Farm. This will include below components of SharePoint

i. Web Application Creation

ii. Site Collection Creation

iii. Service Application Creation and Provisioning

iv. Association of Service Application with Web Application

v. Deployment of Custom Code (WSP)

b. Use SQL Server Backup for backing up all Content Database & Configuration Database

c. Backup the entire 12 hive (c:\program files\common files\microsoft shared\web server extensions\12). This is because, frequently you will deploy code to your SharePoint farm, and you will need to restore the supporting physical files for the site to work properly.

d. You need to keep monitoring the size of your content databases. If you start hitting the 50GB mark, think of splitting them up, so the backups are done overnight before users start hitting the database in the morning.

e. Backup the entire INETPUB directory.

Restore Method

In case of disaster we need to follow below steps to recover/restore content for approach 1

a. Create Web Application and Site collection using the deployment script

b. Attach/de-attach Content database for new created Site collection

Protecting customizations

Customizations to SharePoint sites can include the following:

a. Master pages, page layouts and cascading style sheets. These objects are stored in the content database for a Web application.

b. Web Parts, site or list definitions, custom columns, new content types, custom fields, custom actions, coded workflows, or workflow activities and conditions.

c. Third-party solutions and their associated binary files and registry keys, such as IFilters.

d. Changes to standard XML files.

e. Custom site definitions (Webtemp.xml).

f. Changes to the Web.config file.

How customizations are deployed, and how changes are made to the Web.config file, have a significant effect on which tools can be used to back up and recover customizations. To provide the greatest opportunity for recovery, we recommend that you deploy customizations by using solution packages and configure the Web.config file by using Central Administration or the SharePoint APIs and object model.

Advantages:

1) it is easy to maintain and backup/restore over many SharePoint farms.

2) It needs little administrative work when moving site collection from one farm to another or one web application to another web application

3) Takes less time to backup and restore.

4) Unattached Content Database Recovery allows you to browse through the content database using SharePoint, navigate to a list or document library and save the list or library into .cmp file which can easily be moved between sites

Disadvantage

1) When restoring, web application or Site collection has be created using Central admin or PowerShell before restore

2) SQL Server does not provide SharePoint Farm backup

 

2) Backup using SharePoint Server:

Approach two is to use SharePoint Server backup to backup Farm, Web application, content DBs and Configuration DBs

Backup Method

a. Create backup script of entire Farm. This will include below components of SharePoint

i. Web Application backup

ii. Site Collection backup

iii. Service Application backup

Restore Method

In case of disaster we need to follow below steps to recover/restore content for approach 1

a. Restore entire farm or restore individual Web application or site collection separately

Advantages:

a. Web interface for backup and restore within Central Admin Site

b. SharePoint backup provides granular level backup for Site Collection and Web

c. SharePoint backup provides Entire Farm Level backup

Disadvantage

a. High restore time

b. No back up directly to tape

c. no custom solution files backup

Performance best practices

Backup and restore operations can consume server resources and limit server performance while the operations are running. By following these best practices, you can reduce resource usage and increase the performance of servers and the backup or restore operation

Minimize latency between SQL Server and the backup location

1. In general, it is best to use a local disk on the database server, not a network drive, for backups, and then copy the data later to a shared folder on the network. Network drives with 1 millisecond or less latency between them and the database server will perform well.

2. To avoid I/O bottlenecks, perform the main backup to a separate disk from the disk running Microsoft SQL Server 2008 with Service Pack 1 (SP1) and Cumulative Update 2.

3. By design, most backup jobs consume all available I/O resources to complete the job. Therefore, you might see disk queuing, which can result in greater than usual I/O request latency. This is typical and should not be considered a problem.

Avoid processing conflicts

1. Do not run backup jobs during times when users require access to the system. Consider staggering backups so that not all databases are backed up at the same time.

Keep databases small for faster recovery times

1. Keep databases small to speed both backup and recovery. You can do this by using multiple content databases for a Web application instead of one large content database.

Use incremental backups for large databases

1. Use incremental backups for large database such as those available with DPM 2010. Incremental backups can be restored faster and more efficiently than full backups for larger databases

Use compression during backup

1. In some circumstances, you can use compression to improve backup size (30% decrease) and times (25% decrease). Backup compression has been in introduced in SQL Server 2008 Enterprise

Follow SQL Server backup and restore optimization recommendations

1. If you are using SQL Server backups, use a combination of full, differential, and transaction log backups (for the full or bulk-logged recovery model) to minimize recovery time. Differential database backups are usually faster to create than full database backups and reduce the amount of transaction log required to recover the database

Configure SharePoint settings for better backup or restore performance

1. You can configure settings in both Central Administration and Windows PowerShell to increase backup or restore efficiency and performance

2. If you are using the Export-SPWeb Windows PowerShell cmdlet, you can use the NoFileCompression parameter. By default, SharePoint Server 2010 uses file compression while exporting Web applications, site collection, lists, or document libraries. You can use this parameter to suppress file compression while exporting and importing. File compression can use up to 30% more resources, but the exported file will use approximately 25% less disk space. If you use the NoFileCompression parameter when exporting, you must also use it when you import the same content.

3. You can also use the NoLogFile parameter. By default, SharePoint Server 2010 always creates a log file when you export content. You can use this parameter to suppress log file creation to save resources. However, we recommend that you always create logs. This is because logs can be used in troubleshooting. Moreover, log creation does not use many resources

4. If you are using the Backup-SPFarm cmdlet, you can use the BackupThreads parameter to specify how many threads SharePoint Server 2010 will use during the backup process. The more threads you specify, the more resources that backup operation will take, but the faster that it will finish, if sufficient resources are available. However, each thread is reported individually in the log files, so using fewer threads makes interpreting the log files easier. By default, three threads are used. The maximum number of threads available is 10

Consider site collection size when determining the tools to use

1. If the business requires site collection backups in addition to farm-level or database-level backups, select the tools that you will use based on the site collection size

a. Less than 15 gigabytes (GB): Use the Windows PowerShell command Backup-SPSite.

b. 15-100 GB: Use a SharePoint Products and Technologies tool, a SQL Server tool, or other database backup tool to protect the content database that contains the site collection.

c. Larger than 100 GB: Use a differential backup solution, such as Microsoft SQL Server 2005 or DPM 2010, instead of the built-in backup and recovery tools

Quality assurance best practices

You can follow these best practices to help ensure the quality of the backups of the farm environment and reduce the chances of data loss

Ensure you have adequate storage space

Be certain that the system has adequate disk space to accommodate the backup

Routinely test backup quality

Routinely test backups and validate their consistency. Run practice recovery operations to validate the contents of the backup and to ensure that you can restore the entire environment. For geographically dispersed environments, prepare for disaster recovery by setting up a remote farm. Then you can restore the environment by using the database attach command to upload a copy of the database to the remote farm and redirect users. Periodically perform a trial data recovery operation to verify that the files are correctly backed up. A trial restoration can expose hardware problems that do not show up with software verifications.

Back up ULS trace logs

The SharePoint Server 2010 tools do not back up the ULS trace logs. Data in ULS trace logs can be useful for performance analysis, troubleshooting, monitoring compliance with service-level agreements, and legal, regulatory, or business reasons. Therefore, protect this data as part of the routine maintenance. For more information about backing up the ULS logs

Store a copy of backup files off-site

To safeguard against loss from a catastrophic event, such as a fire or earthquake, maintain duplicate copies of backups in a separate location from the servers. Doing so can help protect you against the loss of critical data. As a best practice, keep three copies of the backup media, and keep at least one copy offsite in a controlled environment. This should include all backup and recovery materials, documents, database and transaction log backups, and usage and trace log backups

Procedural best practices

You can use these procedural best practices to help plan and perform backup and restore operations with better documentation, more ease, and greater assurance.

Use FQDN server names

When referring to servers in a different domain, always use fully qualified domain names (FQDN).

Keep accurate records

When you deploy SharePoint Server 2010, record the accounts that you create, and the computer names, passwords, and setup options that you choose. Keep this information in a safe place.

Have a recovery environment ready

Prepare for restore testing and disaster recovery by setting up a remote farm. Then you can restore the environment by using the database attach command to upload a copy of the database to the remote farm and redirect users. Similarly, you can set up a standby environment running the same version of software as the production environment so that you can restore the databases and recover documents quickly.

Schedule backup operations

If you want to schedule backups, you can use the Windows Task Scheduler to run them by using a Windows PowerShell script file (*.ps1).

Use the SQL FILESTREAM provider with BLOB storage

If you are using BLOB storage using the SQL FILESTREAM provider and you back up the content database with that Remote BLOB Store (RBS) defined, both the RBS and the content database will be backed up and restored when you use SharePoint tools or SQL Server tools. We do not recommend that you use RBS with other restore methods.

Source: MSDN

SharePoint 2010- Social Feedback


With SP 2010 you get a great feature called social feedback in form of Tags, Notes & Rating. While talking to my clients, colleagues and friends about SP 2010, I observed that mostly they are unaware of “Social Feedback” feature of SP 2010 and its capabilities & strong collaboration feature. I have also observed on a large SP 2010 with around 100K My Site, Tags, Notes and rating hardly utilized by My Site Users. With this post, I would like to provide more insight on how to use tags, notes and rating.

Note:This blog post is mainly targeted for end user.

Background

  • Mostly users are familiar My links which used to be the top link in MOSS 2007
  • However the “My Links” drop down is not available on SP 2010 by default
  • The functionality exists, but hidden.
  • There is a /_layouts/MyQuickLinks.aspx page on SP 2010 as well.
  • SP 2010 recommends using Tags, Notes & Rating over My Links because of its rich capabilities.

Why Tags and Notes?

  • Social tagging helps users categorize information in ways that are meaningful to them.
  • The social tagging features of SharePoint Server 2010 help businesses to improve collaboration
  • Improve the discoverability of business information
  • Improve collaboration to encourage innovation
  • Social tagging features help users to share information and to retrieve relevant, high-quality content more efficiently.
  • Tags make it easy to find and share information about a specific subject or task
  • Social tagging can improve the quality of search results by filtering against specific tags
  • It can also connect individuals who want to share information with other users who have like interests.

What is a Tag

  • A tag is a word or phrase that identifies an individual piece of information according to a set of attributes or criteria
  • Tags make it easy to find and share information about a specific subject or task.
  • Social tags, which enable users to save items of interest, organize all information for a project, and connect to others who share their interests.
  • User can now “tag” any source on the internet(or intranet) which has a URL
  • This is stored in User’s “tags” section on his/her My Site

What is Notes

Other users can also post “notes” relating to your tag, which effectively creates a discussion board around the “tagging” activity

Ratings

  • Ratings are a feature that can be enabled at a library or list level, allowing users to give documents or items a specific rating
  • The ratings are then compiled at regular intervals, and the average rating is displayed to users
  • This can be of immense value for capturing feedback, and it can be applied to many, or even all, types of content
  • A rating in SharePoint Server 2010 is an assessment or classification of content on a scale according to how well the content meets specific criteria

How Tags and Notes work

Lets us see How “Pathik Rawal” uses tags and notes to keep track of content he is interested in

Picture1

How to Create Tags – “I like it” Tag

  • As Pathik visits any page on SharePoint on any site he sees two icons, I like it and Tags& Notes
  • For Example Pathik likes the “firstdoc” and wants to tag it for later review, simply select the doc and click “I Like it”
  • When a user clicks on I like it, it is saved as bookmark

Picture3

How to Create Tags – “your own” Tag

  • If Pathik is tagging lot of content, he may classify with his own keyword to find it easily
  • When user clicks on Tags and Notes, small snippets and description can be added to the page which can be set as  private or public by the user.

Picture4

 

 

Manage & View Tags (How to access tags, notes and bookmarks  again)

  • If a user wants to see all of their bookmarks\tags, the feature that is provided for this is the Activities web part that is on the Tags and Notes view of the user’s My Profile page of their My Site
  • User clicks on Tags and Notes and user can see all Tags he/she has created (My Profile Page à Tags and Notes Tab)
  • Sort: User can sort tags “Alphabetically or size”
  • Refine by type like Tags, Notes, Private & Public

Picture5

 

Tag Profile Page

 

  • “The Tag Profile page is designed to show a list of all of the content where the tag has been used and the number of users who have used the tag on each content item”
  • This is really the functionality of social bookmarking and tagging that makes it “social”
  • In SharePoint 2010, every tag that is created has its own Tag Profile page

 

Picture5

 

Note Board

  • The Tag Profile Page also provides a section to write a “Note” about the tag using Note Board
  • It lists all Note Board for the given tag

Picture7

 

Tag Cloud

  • SharePoint Server 2010 includes a tag cloud Web Part that appears by default on a My Site.
  • Administrators and users can filter the tag cloud to display tags that are used by the owner of the My Site, specific groups, or everyone who can view the My Site
  • The display can also be filtered based on date and language
  • Frequently used tags are displayed in large, bold text, whereas tags that are less often used appear in smaller text.
  • Each tag can display an associated number that indicates how many times the tag was applied.

image

 

Thanks!!

My Links Migration from MOSS 2007 to SP 2010 – Part 1


Note: Part 2 of this post is here https://pathikhrawal.wordpress.com/2011/12/04/my-links-migration-from-moss-2007-to-sp-2010-part-2/

 

While working on design of My Site for SharePoint 2010 and migration approach, I found that many users have lots of links under My Link section which should be migrated to SP 2010 as My links on their My Site.

Some back ground about My Links

My links used to be the top link in MOSS 2007 as shown below

MyLinks

This links “My Links” is not available on SP 2010 my Site by default unlike MOSS 2007, however functionality exists as is. There is a /_layouts/MyQuickLinks.aspx page on SP 2010 as well as shown below.

image

Where are links stored

In MOSS 2007, links are stored in USERLINKS table which is part of SSP Database.

In SP 2010, links are stored in USERLINKS table which is part of Profile DB database.

Now you can easily create links on Top bar or on My Profile Page with an additional tab. Which ever you like it. But the challenge is how will you migrate data from MOSS 2007 to SP 2010.

I will write about best approach for migration of My links from MOSS 2007 to SharePoint 2010 in next article

Please visit part 2 of this post for code snippet.

https://pathikhrawal.wordpress.com/2011/12/04/my-links-migration-from-moss-2007-to-sp-2010-part-2/

Thanks

Custom List Definition: Adding Custom List Pages (AllItems.aspx, DispForm.aspx, EditForm.Aspx & NewForm.aspx)


There is always a need for adding Custom List Pages (AllItems.aspx, DispForm.aspx, EditForm.Aspx & NewForm.aspx) to your list definition. By adding custom list pages to your custom List Definition

  •   You get more control on Customization of View, Edit and New form for your custom list definition
  •   Add JavaScript, Web parts to those pages

This is very easy to achieve. All you need to do is make your Custom List Definition refer those pages instead of default Out of Box pages. Below are steps

1. Making a Copy of existing files

Here instead of creating our own pages, you can just copy the existing pages.

  1. You can deploy your Custom List Definition to your development server.
  2. Create a List instance from your Custom List Definition
  3. Open Site in SharePoint Designer 2010
  4. Copy content of all list pages Allitems.aspx, DispForm.aspx, EditForm.aspx & NewForm.aspx to different files and named them MyAllItems.aspx, MyDispForm.aspx, MyEditForm.aspx & MyNewForm.aspx
  5. Now Open the MyAllItems.aspx and remove the code <WebPartPages:XsltListViewWebPart … >  & 

    </WebPartPages:XsltListViewWebPart>. What you need to do just remove the XSLTLISTVIEWWEBPART from the MyAllItems.Aspx

  6. Save the modified file.

Follow above steps 1 to 4 or all other files. Please skip steps 5 & 6 for other files.

2. Deploying above files to Feature Folder

Here we will have to add all modified files to our solution in VS, so that those modified will be deployed to server when List Definitions features is deployed

  1. In Visual Studio add all above modified files to List Definition folder where you Schema.xml exists
  2. Open SharePointProjectItem.spdata file from your List Definition folder in VS
  3. Add below code

<ProjectItemFile Source=”MyAllItems.aspx” Target=”MyListDefinition\” Type=”ElementFile” /> in files tag.

similarly follow steps 2.1 to 2.3  for all other files

3. Changing the association of list pages

Now the final step is to associate modified list pages with List Definition.

  1. Open Schema.xml file of List Definition.
  2. Under <Forms>, remove attribute SetupPath=”pages\form.aspx” from all forms types like DisplayForm, EditForm & NewForm.

Note: By deleting the “SetupPath” attribute, we are telling SharePoint to look for “.aspx” pages named after the “Type” attribute in the same folder as Schema.xml

3. “AllItems.aspx” is associated with the default view of the list. so, delete “SetupPath” attribute from the default view node in the schema.

    This is all we have to do for having custom list pages for list definitions.

    Enjoy!!

     

Ghost Text issue with IE6.0


I was facing an issue with IE6.0. This issue happens only on IE6.0, same code works fine on other higher version of IE and Firefox Internet explorer. I have referred http://www.impressivewebs.com/ie6-ghost-text-bug-with-multiple-solutions/ link to resolve this and tried many other possible solutions but could not find a solid solution.

What is the IE6 Ghost Text Bug?

Due to a bizarre rendering error in IE6, a well-organized, W3C-compliant web page that contains clean, semantic markup, and that looks perfectly fine in all other browsers (IE7, Firefox, Opera, Safari, etc.), will sometimes display duplicate text in a DIV that is floated and is followed by an HTML comment. The consensus is that the bug occurs when multiple comments are placed between a series of floated DIV tags, with the actual bug taking place inside the final floated DIV.

Actual Fix:

————–

This is very strange as IE6.0 will have trouble rendering when we use <ul> & <Li> within div control. In my project we were using a list (ul) and each list item (li) contained a header (h2) and image (img). After reading this post http://benstewart.net/2008/05/ie6-ghost-text-bug/ I tried removing below code

<ul id=”nav-pageactions”>

<li id=”pa-list-view”><a title=”List view”>List view</a> </li>

<li id=”pa-grid-view”><a title=”Grid view”>Grid view</a> </li>

</ul>

And to my surprise it worked like charm. Now instead of removing the above code I wrapped above code in another <div> as shown below

<div>

<ul id=”nav-pageactions”>

<li id=”pa-list-view”><a title=”List view”>List view</a> </li>

<li id=”pa-grid-view”><a title=”Grid view”>Grid view</a> </li>

</ul>

</div>

After doing above change it seems to work fine.

Apart from above changes I have tried many things which did not work

1) Margin for <Div> control with Float attribute- I tried to set left margin for right div and right margin for left div, but it did not solve the problem.

2) We are using <Div> control and Table control both for Grid view, We tried converting all Table controls to Div controls but even this did not work out

3) White Space: It seems white space is the major problem with IE6.0. This blog has more info (http://benstewart.net/2008/05/ie6-ghost-text-bug/)- we tried to put some hack but even it did not work for all scenarios.

4) Having a WRAPPER for actual Grid view- As initially I thought ghost is appearing only in Grid view the problem is with that div only.

5) Adding extra space (TR, TD) for main table in grid view.

Lesson Learnt:

1) While targeting your application as IE6.0 compatible, make sure “You know the limitation of IE6.0” while designing CSS

2) Smartly use <Div> specially floats div with lots of data in it.

3) Be care full with White Space as IE6.0 does not handle white space nicely.

————

Follow

Get every new post delivered to your Inbox.

Join 81 other followers