Tuesday, April 30, 2013

SP Designer Caching Issues

Issue - If you want to clear up the SharePoint Designer Cache
Resolution - Delete everything from this location %USERPROFILE%\AppData\Local\Microsoft\WebsiteCache
SPD 2007, SPD 2010, SPD 2013


Issue - If you want to remove the recent sites when you open SPD.
Resolution - Goto this location %USERPROFILE%\AppData\Local\Microsoft\WebsiteCache and open WebSites.XML file to remove any entry you want.


Note: When you uninstall SPD, this above file is never deleted.
SPD 2007, SPD 2010, SPD 2013

Monday, April 29, 2013

Hide "Share" & "Follow" & "Focus Icon" From Home Page Master Page in SP2013

Comment the following controls on MasterPage..


<!-- Removes Share Button -->
                        <!--<SharePoint:SPSharePromotedActionButton runat="server"/>-->
                        <!--Removes Follow Button-->
                        <!--<SharePoint:DelegateControl runat="server" ControlId="PromotedActions" AllowMultipleControls="true" />-->


<!--<span id="fullscreenmodebox" class="ms-qatbutton">
                    <span id="fullscreenmode">
                        <SharePoint:ThemedClusteredHoverImage
                        runat="server"
                        ID="fullscreenmodeBtn"
                        ThemeKey="spcommon"
                        TouchMode="true"
                        TouchModeWidth="30"
                        TouchModeHeight="30"
                        TouchModePaddingLeft="7"
                        TouchModePaddingTop="7"
                        TouchModePaddingRight="7"
                        TouchModePaddingBottom="7"
                        ImageUrl="/_layouts/15/images/spcommon.png?rev=23"
                        Width="16"
                        Height="16"
                        OffsetX="143"
                        OffsetY="178"
                        HoverOffsetX="125"
                        HoverOffsetY="178"
                        NavigateUrl="#"
                        onclick="SetFullScreenMode(true);PreventDefaultNavigation();return false;"
                        AlternateText="<%$Resources:wss,multipages_fullscreenmodelinkalt_text%>"
                        ToolTip="<%$Resources:wss,multipages_fullscreenmodelinkalt_text%>"
                        />
                    </span>
                    <span id="exitfullscreenmode" style="display: none;">
                        <SharePoint:ThemedClusteredHoverImage
                            runat="server"
                            ID="exitfullscreenmodeBtn"
                            ThemeKey="spcommon"
                            TouchMode="true"
                            TouchModeWidth="30"
                            TouchModeHeight="30"
                            TouchModePaddingLeft="7"
                            TouchModePaddingTop="7"
                            TouchModePaddingRight="7"
                            TouchModePaddingBottom="7"
                            ImageUrl="/_layouts/15/images/spcommon.png?rev=23"
                            Width="16"
                            Height="16"
                            OffsetX="107"
                            OffsetY="178"
                            HoverOffsetX="179"
                            HoverOffsetY="96"
                            NavigateUrl="#"
                            onclick="SetFullScreenMode(false);PreventDefaultNavigation();return false;"
                            AlternateText="<%$Resources:wss,multipages_fullscreenmodelinkalt_text%>"
                            ToolTip="<%$Resources:wss,multipages_fullscreenmodelinkalt_text%>"
                            />
                    </span>
                </span>-->



Tuesday, April 16, 2013

Export/Import TermStore without any code (Exception XSLT) especially for O365

  •     Use Office 2010 client to the output from the web server.
  •     In SP2010, create a new document library.
  •     Add a MM type column.
  •     Open MSFT Word 2010 and save the document lib in the SP lib.
  •     Goto %LOCALAPPDATA%\Microsoft\Office\TermSets and look for GUID.XML file that was recently added. (Note: Ensure you hidden files are viewable)
  •     Select this file and copy it to you folder.
  •     Use XSLT to transfer this content into the Format required to Import CSV.
       
        Here is a document from MSFT, which provides details on the format
        http://technet.microsoft.com/en-us/library/ee424396%28v=office.14%29.aspx   

Wednesday, April 3, 2013

Welcome, First Name Last Name (JQuery Library for SharePoint Web Services)


When a user signs into SP Portal, on the top right hand corner you see name in Format of Last Name, First Name. You could change that by simply using Jquery + SPService (JQuery Library for SharePoint Web Services)

SPService is absolutely phenomenal. It can simply do so much with so little code.

Here is what you need to do to accomplish the desired results.

  • Create a new JS file and link it from your master page.
  • Add a reference to JQuery.SPServices-0.N.N.js to your master page and before your custom .JS File.
  • In the .js file add the following code:

$(document).ready(function() {
    $(".ms-welcomeMenu a.ms-menu-a span").text("Welcome, " + userName);   
        window.userName = "";
   
    var thisUserFirstName = $().SPServices.SPGetCurrentUser({
    fieldName: "FirstName",
    debug: false
    });
   
    var thisUserLastName = $().SPServices.SPGetCurrentUser({
    fieldName: "LastName",
    debug: false
    });

    window.userName = thisUserFirstName + " " + thisUserLastName;
}

Once this code has been put in place, when a user sign in to SP, they will see Welcome, First Name + " " + LastName on the right hand top corner.

Tuesday, April 2, 2013

Render (Published Mode/Edit Mode) OOTB RSS Control

Worked on an OOTB Rss Control web part in O365. It suddenly stopped working on the Home Page. It still works fine on a couple of other pages, but stopped working on the Home Page. The stopped working means that the "loading graphic" stays on Home Page and the RSS Feed never gets rendered. The moment you go into the edit mode, the RSS feed is rendered correctly. This is one of the strangest issues I have seen either this is something related to Office 365?

Here is what I did
  • Master Page is same across the site. Same set of JS/CSS files are loaded on all pages.
  • PageLayout is different. Tried all combinations with using same page layout/rebuilding page layout/ adding components 1 by 1, but still would not work.
  • There are not many configuration settings that you can modify for OOTB RSS Feed.  
Spent lot of hours in order to troubleshoot this crazy issue. Still could not resolve the issue other than this:

Solution:
Used XMLViewer WebPart in place of RSS Control web part and then wrote XSLT used for rendering the content. The 2 things to note here are that
  1. Produce the same look & feel
  2. Limit the Results to a certain number.
This was accomplished, by literally adding the same styles that existed in XSLT/OOTB Control and adding logic to limit to certain number.