Umer Pasha Blogs

www.umerpasha.com

Sharepoint – Cannot open Visio files FIXED!

This issue comes up in Sharepoint 2013 when you have Visio 2010 installed and also Office 2013 installed.

This seems to be a known problem for Visio 2010 files when you have Visio 2010 and Office 2013 installed on the machine.

If you see the URL, you will see a small prefix “ms-visio:ofv” which is the protocol used for Office 2013. But, as we do not have Visio 2013 installed, it throws an error.

I have created a small registry file that will trick the system into thinking that there is Visio 2013 installed but route it to Visio 2010.

I have attached the file here having default paths. If your Office or Visio is installed elsewhere, please change. here is the source of the .reg file. Otehrwise, all users need to do is rename the file here to open up as a zip file, run the .reg file and accept all warning messages.

Download VisioReg.Zip file here

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\ms-visio]
@="Url:Visio Protocol"
"URL Protocol"=""
"UseOriginalUrlEncoding"=dword:00000001

[HKEY_CLASSES_ROOT\ms-visio\DefaultIcon]
@="C:\\PROGRA~2\\MICROS~1\\Office14\\VISIO.EXE,0"

[HKEY_CLASSES_ROOT\ms-visio\shell]

[HKEY_CLASSES_ROOT\ms-visio\shell\open]

[HKEY_CLASSES_ROOT\ms-visio\shell\open\command]
@="C:\\PROGRA~2\\MICROS~1\\Office15\\PROTOC~1.EXE \"%1\""


5 Comments »

jQuery to change size of the Promoted Links in Sharepoint 2013

Sharepoint 2013 comes with standard Metro UI links app called “Promoted Links”. I will not go into how to set them up as you can google it and find various resources for that.

I was trying to put in two strips of promoted links and also wanted the second strip to be smaller than the first giving it a feel of a sub-menu. Coincidentally, there is no out of the box way of doing that. The images seemed to be scaled to 150px fixed.

So I added in a little bit of jQuery to resize them.

Here is the code that goes into a content editor webpart on the same page. Please change the path to your jQuery library reference. Change the image size you want. Change the WPQ number of the promoted link. You can find it by using developer tools on your browser hitting F12. Look for “promotedlinksbody_WPQ” :

<!--JQuery script to make promoted links any size. Also shifts to 2nd row if more than specified tiles. Author: Umer Pasha , Date: 3/15/2013-->

<script type="text/javascript" src="/scripts/jquery/jquery-1.8.1.min.js"></script>


<script language="javascript">
$(document).ready(function () {
 
// Update this value to the number of links you want to show per row
var numberOfLinksPerRow = 10;

// Set Image Size 
var ImageSize = "76";

// in case we have multiple promoted links on page, name the WPQ here
var promotedlinksbody_WPQ = "4";
 
// local variables
var pre = "<tr><td><div class='ms-promlink-body' id='promlink_row_";
var post = "'></div></td></tr>";
var numberOfLinksInCurrentRow = numberOfLinksPerRow;
var currentRow = 1;
// find the number of promoted links we're displaying

var numberOfPromotedLinks = $('#promotedlinksbody_WPQ' + promotedlinksbody_WPQ + ' > .ms-tileview-tile-root').length;
//var numberOfPromotedLinks = $('.ms-promlink-body > .ms-tileview-tile-root').length;

  // if we have more links then we want in a row, let's continue
  if (numberOfPromotedLinks > numberOfLinksPerRow) {
    // we don't need the header anymore, no cycling through links
    $('.ms-promlink-root > .ms-promlink-header').empty();
    // let's iterate through all the links after the maximum displayed link
    for (i = numberOfLinksPerRow + 1; i <= numberOfPromotedLinks; i++) {


      // if we're reached the maximum number of links to show per row, add a new row
      // this happens the first time, with the values set initially
      if (numberOfLinksInCurrentRow == numberOfLinksPerRow) {
        // i just want the 2nd row to
        currentRow++;

 
        // create a new row of links
        $('.ms-promlink-root > table > tbody:last').append(pre + currentRow + post);
        // reset the number of links for the current row
        numberOfLinksInCurrentRow = 0


    }
    

    // move the Nth (numberOfLinksPerRow + 1) div to the current table row
    $('.ms-promlink-body > .ms-tileview-tile-root:nth-child(' + (numberOfLinksPerRow + 1) + ')').appendTo($('#promlink_row_' + currentRow));
    // increment the number of links in the current row
    numberOfLinksInCurrentRow++;

  }
}


	// Set the size of main promoted links body
	var ControlID='promotedlinksbody_WPQ';
	ControlID=ControlID + promotedlinksbody_WPQ;
	$("#" + ControlID).height(ImageSize);
	
	// iterate through each link and set the size
    for (i = 1; i <= numberOfPromotedLinks; i++) {
        
		ControlID='Tile_WPQ' + promotedlinksbody_WPQ + '_' + i ;
		ControlID= ControlID + '_1';
    	$("#" + ControlID).width(ImageSize);
    	$("#" + ControlID).height(ImageSize);
		
		ControlID='Tile_WPQ' + promotedlinksbody_WPQ + '_' + i ;
		ControlID= ControlID + '_2';
    	$("#" + ControlID).width(ImageSize);
    	$("#" + ControlID).height(ImageSize);

		ControlID='Tile_WPQ' + promotedlinksbody_WPQ + '_' + i ;
		ControlID= ControlID + '_7';
    	$("#" + ControlID).width(ImageSize);
		
		ControlID='Tile_WPQ' + promotedlinksbody_WPQ + '_' + i ;
		ControlID= ControlID + '_4';
    	$("#" + ControlID).width(ImageSize);
    	$("#" + ControlID).height(ImageSize);
    	
    	
		ControlID='Tile_WPQ' + promotedlinksbody_WPQ + '_' + i ;
		ControlID= ControlID + '_4';
    	$("#" + ControlID).width(ImageSize);
    	$("#" + ControlID).height(ImageSize);
    	//$("#" + ControlID).top(ImageSize);

	}

	ControlID="promotedlinksheader_WPQ" + promotedlinksbody_WPQ;
	$("#" + ControlID).hide();


});

</script>

Image

 

I am putting the javascript above in a .js file and putting the link to the .js file in a content editor. The content editor is on the same page as the promoted links.

smallPL1

These are the paths to the online vector icons I am using:

http://modernuiicons.com/icons/svg/appbar.reply.calendar.svg
http://modernuiicons.com/icons/svg/appbar.money.svg
http://modernuiicons.com/icons/svg/appbar.man.suitcase.svg
http://modernuiicons.com/icons/svg/appbar.calendar.14.svg
http://modernuiicons.com/icons/svg/appbar.calendar.svg
http://modernuiicons.com/icons/svg/appbar.places.svg

Here is the link to the .js file. Please rename to .js:   Link

 

73 Comments »

Publishing data from Omniture to Sharepoint 2010 using Power Pivot slice and dice features

Just started a new project to create a dashboard using Power Pivot for MS-Office 2010 and integrate a dashboard in Sharepoint 2010. The data is again coming from Omniture API Soap calls.

PowerPivot is a free add-in to the 2010 version of the spreadsheet application Microsoft Excel. It extends the capabilities of thePivotTable data summarisation and cross-tabulation feature by introducing the ability to import data from multiple sources. As such, PowerPivot falls under Microsoft’s Business Intelligence offering, complementing it with its self-service, in-memory capabilities.

Prior to the release of PowerPivot, Microsoft relied heavily on SQL Server Analysis Services as the engine for its Business Intelligence suite. PowerPivot complements the SQL Server core BI components under the vision of one Business Intelligence Semantic Model (BISM), which aims to integrate on-disk multidimensional analytics previously known as Unified Dimensional Model, or UDM, with a more flexible, in-memory “tabular” model.

As a self-service BI product PowerPivot is intended to allow users with no specialised BI or analytics training to develop data models and calculations, sharing them either directly or through SharePoint document libraries.

 

Publishing data from Omniture to Sharepoint 2010 using Power Pivot slice and dice features

Leave a comment »

Twitter for Sharepoint FREE!

I worked on getting client’s twitter feeds onto their sharepoint based intranet site today. Turned out to be easier than expected. Especially since someone else took the time out to develop a very nice twitter webpart available for free here from Amrein.

The provided instructions are very clear, precise and easy to follow. Somehow, I found the manual installation to be easier than the automated wsp one! This is what it looks like:

This is what it looks like!

1 Comment »

Sharepoint not downloading documents

Today I ran into a problem with Sharepoint 2007 not downloading documents from my document library. The files were pretty big (20 – 200 Megs). It was strange because suddenly the files which I was previously able to download also showed me an internal server error (500). Turned out, the issue was with not having enough disk space on sharepoint server :S Just cleared out some space on C drive of the sharepoint server and it started working fine.

Leave a comment »