Friday, December 14, 2012

Import export in SharePoint 2010

Export-SPWeb -Identity http://m2010:82/site5 -Path c:\Exportback.dat

Import-SPWeb -Identity http://m2010/site2/site3 -Path c:\Exportback.dat

provided the sites site5 and site 3 have the same template.

http://www.sharepoint.inf4web.com/326/how-to-import-export-sharepoint-subsite/

http://  ............./.../,.../OAC/.../ETCB/ETCB%20Project%20Meeting/default.aspx

Export-SPWeb [-Identity] -Path [-AppLogFilePath ] [-AssignmentCollection ] [-CompressionSize ] [-Confirm []] [-Force ] [-HaltOnError ] [-HaltOnWarning ] [-IncludeUserSecurity ] [-IncludeVersions CurrentVersion
LastMajorAndMinor
All>] [-ItemUrl ] [-NoFileCompression ] [-NoLogFile ] [-UseSqlSnapshot ] [-WhatIf []]

http:// /.../.../..../............../ETCB/test

http://   ............./.../,.../OAC/.../ETCB/ETCB Project Meeting/



testETCBProjectmeeting
Import-SPweb http://  ............./.../,.../OAC/...//TechStaff/ETCB/test -path c:\MriTestCalendar.cmp



Export-SPWeb -Identity &"http  ............./.../,.../OAC/.../TechStaff/ETCB/ETCB Project Meeting/" -path c:\MriTestCalendar -IncludeUserSecurity





Wednesday, December 12, 2012

SharePoint features 2010

SharePoint Branding Solution for 2010

Microsoft version: http://msdn.microsoft.com/en-us/library/gg447066.aspx

To uninstall a feature go to Microsfot SharePoint 2010 Products -> SharePoint 2010 Management Shell
                     uninstall-SPFeature   -force
exact feature name can be found in 14 hive-->templates --> features to test the feature in web application..

creating webapp- got error- create database cannot be performed, check config db and content db creation permissions

using System;
using System.Runtime.InteropServices;
using System.Security.Permissions;
using Microsoft.SharePoint;
using Microsoft.SharePoint.Security;
namespace Branding.Features.Feature1
{
    ///
    /// This class handles events raised during feature activation, deactivation, installation, uninstallation, and upgrade.
    ///

    ///
    /// The GUID attached to this class may be used during packaging and should not be modified.
    ///

    [Guid("18aee99d-0efa-4fe3-91c1-6fd688e7f05c")]
    public class Feature1EventReceiver : SPFeatureReceiver
    {
        public override void FeatureActivated(
                         SPFeatureReceiverProperties properties)
        {
            SPSite siteCollection = properties.Feature.Parent as SPSite;
            if (siteCollection != null)
            {
                SPWeb topLevelSite = siteCollection.RootWeb;
                // Calculate relative path to site from Web Application root.
                string WebAppRelativePath = topLevelSite.ServerRelativeUrl;
                if (!WebAppRelativePath.EndsWith("/"))
                {
                    WebAppRelativePath += "/";
                }
                // Enumerate through each site and apply branding.
                foreach (SPWeb site in siteCollection.AllWebs)
                {
                     site.MasterUrl = WebAppRelativePath +
                                         "_catalogs/masterpage/v4_508.master";
                     site.CustomMasterUrl = WebAppRelativePath +
                                       "_catalogs/masterpage/v4_508.master";
                                      site.UIVersion = 4;
                    site.Update();
                }
            }
        }
public override void FeatureDeactivating(
                       SPFeatureReceiverProperties properties) {
  SPSite siteCollection = properties.Feature.Parent as SPSite;
  if (siteCollection != null) {
    SPWeb topLevelSite = siteCollection.RootWeb;
    // Calculate relative path of site from Web Application root.
    string WebAppRelativePath = topLevelSite.ServerRelativeUrl;
    if (!WebAppRelativePath.EndsWith("/")) {
      WebAppRelativePath += "/";



}    // Enumerate through each site and remove custom branding.
    foreach (SPWeb site in siteCollection.AllWebs) {
      site.MasterUrl = WebAppRelativePath +
                       "_catalogs/masterpage/v4.master";
      site.CustomMasterUrl = WebAppRelativePath +
                             "_catalogs/masterpage/v4.master";
      site.AlternateCssUrl = "";
      site.SiteLogoUrl = "";
      site.Update();
    }
  }
}
    }
}


feature event receiver code: SharePoint Feature Stapling allows a feature to be "stapled" to one or more site collections/webapplications/farm

Wednesday, July 27, 2011

Embedding video in html


autoplay="true"
loop ="false"
width="200"
height="200"
/>

Monday, March 7, 2011

web part styling

to change the border color for webpart:
.ms-WPHeader TD{ border-bottom:1px solid #4e7cb7; border-collapse:collapse; }

Thursday, January 20, 2011

Background on html/rich text editor in CEWP

When I added a graphic as background image to the site, CEWP's rich text editor picked it up as its background. Found a simple solution here

simply add a div within the body tag and
body .MyDiv {
background: url("myimage.gif");
}

instead of just
body {
background: url("myimage.gif");
}

Wednesday, October 13, 2010

Styling week view sharepoint calendar - related classes

ms-cal-weekedge
ms-cal-wtopdayL
ms-cal-wtopdayLover
ms-cal-wtopday
ms-cal-wtopday-today
ms-cal-workhourF
ms-cal-workhourFover
ms-cal-enoworkhourF
ms-cal-dayhourF
ms-cal-dayhour
ms-cal-workhourhalfhour
ms-cal-workhourhalfhourover
ms-cal-enoworkhour
ms-cal-workhourover
ms-cal-workhour
ms-cal-enoworkday
ms-cal-dayhalfhour
ms-cal-dayhalfhourF
ms-cal-eworkday
ms-cal-dayhour
ms-cal-dayhourF
ms-cal-tweekitem
ms-cal-dayitem

Tuesday, July 27, 2010

sharepoint solution

http://geekswithblogs.net/evgenyblog/archive/2008/01/27/118966.aspx