5/20/2009

Adobe 64 bit PDF iFilter Finally

    ( was (Adobe 64 bid PDF iFilter (sort of) )

Time to update this item… Adobe has released a 64 bit version of their iFilter: (the file date in the download is 11/26/08)
 
and they have tested it with:

• Microsoft Windows Server® 2003 x64 Edition R2 with Service Pack 2: SharePoint Server 2007, Exchange Server 2007, Windows Desktop Search 3
• Microsoft Windows Server 2008 x64 with Service Pack 1: SharePoint Server 2007, SQL Server 2005, Windows Search 4

 
For an interesting comparison of the Adobe 64 bit iFilter vs the FoxIt 64 bit iFilter see:
(FoxIt is 5 times faster!?)
 
 
 
 
The older stuff….
 
Word around the blogs is that Adobe has finally released a 64 bit PDF iFilter. Not true! (as of 12/5/07 anyway) What they have released is a workaround that lets you install their 32 bit iFilter on a 64 bit system. Here's the URL:
http://labs.adobe.com/wiki/index.php/PDF_iFilter_8_-_64-bit_Support

If you are running the 64 bit version of MOSS Indexing then you need the 64 bit versions of your iFilters, or the Adobe 32 bit workaround. You still may want to consider the FoxIt 64 bit PDF iFilter. Do a some blog searches and see what people are saying about features and performance. The FoxIt version sounds pretty good!

http://www.foxitsoftware.com/pdf/ifilter/



5/18/2009

SharePoint: Conventions and Shows

 

Upcoming SharePoint Conferences and Events


SPTechCon: The SharePoint Technology Conference Boston!
June 22-24, 2009
http://www.sptechcon.com

 

Best Practices Conference
August 24-26, 2009 - Washington, D.C.
http://www.bestpracticesconference.com/

 

SharePoint Conference 2009 - Las Vegas
October 19-22, 2009
http://www.mssharepointconference.com

5/17/2009

SharePoint 2010 News!

 

Search the web… lots of rumors out there… (and by the way, it’s now just “Microsoft Server 2010”, no more MOSS)

 

The “Official” Sneak Preview Site:  watch these videos!

http://sharepoint.microsoft.com/2010/Sneak_Peek/Pages/default.aspx

 

Some videos from Partner’s Conference in New Orleans:

Visio Services
http://www.youtube.com/watch?v=pW-AjRO5YyY

Access Services
http://www.youtube.com/watch?v=79D_r17fnnA

Microsoft SharePoint Workspace 2010
(And if you watch carefully you will see some “home page” screens and some interesting stuff in the Site Actions menu)http://www.youtube.com/watch?v=QNUxYjFJEs4

 

Blog articles… (popping up everywhere!)

http://knowledgeforward.wordpress.com/2009/07/18/a-first-look-at-sharepoint-2010/

http://kalsing.blogspot.com/2009/07/accessing-business-data-with-sharepoint.html

 

 

Here’s something that‘s at least “official”:

Announcing SharePoint Server 2010 Preliminary System Requirements

http://blogs.msdn.com/sharepoint/archive/2009/05/07/announcing-sharepoint-server-2010-preliminary-system-requirements.aspx

 

And in preparation for Server 2008:

Windows Server 2008 and SharePoint Resources

http://blogs.msdn.com/sharepoint/archive/2008/01/16/windows-server-2008-and-sharepoint-resources.aspx

 

Computerworld says 2010 (invitation-only) beta due in two months:

http://news.idg.no/cw/art.cfm?id=48E662D2-1A64-67EA-E4337461F8125E8C

 

ZDNet: 201 will have a “Ribbon”, Silverlight, more search options:

http://blogs.zdnet.com/microsoft/?p=2761&tag=nl.e539

SharePoint: STSADM notes

 

  • A new Silverlight based help tool!
  • Charts!
  • A GUI!
  • A speed up!

 

A new Silverlight based help tool!

This is a pretty cool tool to both browse the commands and documentation, but to also see what’s new in each service pack.

For WSS:
http://technet.microsoft.com/en-us/windowsserver/sharepoint/dd418924.aspx

For MOSS:
http://technet.microsoft.com/en-us/windowsserver/sharepoint/dd418924.aspx

Charts!

Microsoft has wall sized charts for WSS and MOSS STSADM commands:

Remember… STSADM is extendable and will generally have commands added with each service pack. Here’s how to add your own extensions (for .Net developers!):
http://msdn.microsoft.com/en-us/library/bb417382.aspx

Some examples of additional STSADM commands:

http://stsadm.blogspot.com/

 

Microsoft Reference

A list of STSADM commands and documentation is here:
http://technet.microsoft.com/en-us/library/cc263384.aspx

 

A GUI for STSADM!

“stsadmWin 2007 is here”http://blogs.msdn.com/ronalus/archive/2007/01/04/stsadmwin-has-an-2007-version.aspx

 

STSADM slow???

http://www.dynasign.nl/blog/?p=9

5/16/2009

SharePoint: A better Yes/No field for surveys and lists

 

The out of the box Yes / No column type in SharePoint just displays a checkbox with no text next to it. If you are using it in a survey then you have biased the question as the field is either pre-unchcecked or pre-checked. (and it defaults to YES!)

The workaround? Just use a Choice field with two choices “Yes” and “No”. When used in surveys the end result is exactly the same as Yes/No and it defaults to neither choice selected.

And, you can be more verbose when needed: “Yes I agree” / “No I don’t agree”.

 

Both a normal Yes/No and the Choice Yes/No in a survey (or list) form.

The survey report:

5/15/2009

Silverlight: A few notes on HTML / JavaScript access from Silverlight

 

You can call into a Silverlight control from JavaScript in the HTML page and access Silverlight managed code properties and methods. The process is relatively straight forward really lets you use a Silverlight object as a true control, and not just a fancy animated advertisement (Sorry Flash designers…)

I will follow shortly with notes on the other half of the picture, accessing HTML objects and JavaScript functions from Silverlight code.

 

 

Accessing data / method in Silverlight from JavaScript

Step 1:  Add a reference

Add a reference to System.Windows.Browser, and add a using or Imports to your code file.

        using System.Windows.Browser;

 

Step2: Mark the item or class to be scriptable

The item can be either a property or a method. The attribute is [ScriptableMember] (<ScriptableMember> in VB.Net). Some examples show [ScriptableMemberAttribute], but the short form is preferred.

A sample property:

        private int x=9;

        [ScriptableMember]
        public int MyProperty { get { return x; } set { x = value; } }

 

The entire class can be marked as Scriptable using [ScriptableType], but note that all public members are then available for access from JavaScript.

See notes at the end of this article for more info on the use of the attributes.

 

Example:

or the entire class (warning: all publics are exposed)
[ScriptableType]
public class Calculator2
{
    public int Add(int a, int b)
       { return a + b; }

    public int Subtract(int a, int b)
    { return a – b; }
}

 

Step 3: Register the class as scriptable

Register the class as scriptable either in the app.xaml.cs, but more likely in yourpage.xaml.cs file.

Example if registered from Page.xaml

        private void UserControl_Loaded(object sender, RoutedEventArgs e)
        {
            HtmlPage.RegisterScriptableObject("Page", this);

        }

Example to register another class:

         private void UserControl_Loaded(object sender, RoutedEventArgs e)
        {

            HtmlPage.RegisterScriptableObject("MyPage",  new Class1());

        }

 

Step 4: Make the call from the HTML page:

This example makes the call from a button, but could also be done from the <BODY> onload event or the Siverlight control’s load event.

    <script>
    function GetSomeData() {
        sl = document.getElementById("Xaml1");
        alert(sl.Content.Page.MyProperty);
     }
    </script>
    <button onclick="GetSomeData()" >Get Data</button>

or as a single line:
        <button onclick="sl = document.getElementById('Xaml1');alert(sl.Content.Page.MyProperty);" >Get Data 2</button>

or even...
        <button value="Get Data" onclick="alert(document.getElementById('Xaml1').Content.Page.MyProperty);" >Get Data 2</button>

 

Some observations and discoveries…

  • Both attributes are not needed!
    Some sources say that both the class must be marked as [ScriptableType] and the property or method must be marked as [ScriptableMember]. I found that just marking the class as [ScriptableType] made all public members script accessible. I also found that marking a property or method as [ScriptableMember] was all that was needed to expose the one member. It was not necessary to mark up the class at all.

    And I would say that Microsoft agrees with me!  ;-)
    http://msdn.microsoft.com/en-us/library/system.windows.browser.scriptabletypeattribute(VS.95).aspx
  • “ScriptableTypeAttribute Class - Indicates that all public properties, methods, and events on a managed type are available to JavaScript code when they are registered by using the RegisterCreateableType method.”

    “If you want to expose only a subset of properties, methods, and events as scriptable endpoints, do not use a ScriptableTypeAttribute object. Instead, attribute the subset of properties, methods, and events with a ScriptableMemberAttribute object.”

    If you do choose to use [ScriptableType] and want to hide one of the public members mark it with:

       [ScriptableMember(EnableCreateableTypes = false)]

    Note: the preferred notation for the attributes excludes the word “Attribute”, so use [ScriptableType] and [ScriptableMember].

     

  • "HtmlAccess=Enabled" is not needed for calls INTO Silverlight, only to enable calls out.
      <asp:Silverlight ID="Xaml1" HtmlAccess=Enabled ...

 

Useful web resources:

SharePoint: Survey Options – Show user names and Allow multiple responses…

 

Trying to find how to change these two Survey list options after you have created the survey?

  • Show user names in survey results?
  • Allow multiple responses?

Based on using other types of lists you would expect to find these in the “Advanced settings” section. For a Survey they put them in “Title, description and navigation”. Go figure…

5/02/2009

SharePoint: With Service Pack 2 (SP2) Forms Based Authentication and Client Integration Works!

 

Forms Based Authentication (FBA) now works with Office Integration! But only for Office 2007 Service Pack 2.

 

Here are my tests:

 

Tests were done on a VPC with SharePoint and Office on the same VPC.

The VPC started with Server 2003 Std Edition, MOSS Enterprise Edition SP1 and Office 2003 Std Edition

Installed WSS SP2 and MOSS SP2

SP2 install instructions: http://fabianwilliams.spaces.live.com/Blog/cns!DC80CE4E9C963237!536.entry

Created a new application, site collection and configured FBA in a typical manner using the ASP.Net membership and role providers.

Client Integration was disabled by default! (in spite of what was said in the MSDN articles.)  In enabled Client Integration for these tests.

Tests with Office 2003

  • Upload Multiple worked!
  • Open in Microsoft Word - did not work, instead it opened login.aspx as a Word document!
  • Export to Spreadsheet – did not work: "To export a list, you must have a Windows SharePoint Services-compatible application"
  • Connect to Outlook – did not work: "error (0x8004110): 'An error occurred either in Outlook or Windows SharePoint Services...."

So, except for Upload Multiple, Client Integration does not work with Office 2003.

Office 2007 (Enterprise Edition) initial release 12.0.6213.1000

  • Open in Microsoft Word - Word launched, but no errors, nothing, just empty word.
  • Open from Word using full URL to document. ("Could not open "http://.....")
  • Connect to Outlook - Displayed normal SharePoint to Outlook messages, but then displayed an emtpy calendar, so the calendar was created in Outlook, but the data was not linked. Clicking on calendar displays the "read only" message usually seen in Outlook 2003.
  • Export to Spreadsheet - "You do not have adequate permissions to modify this list ..."

So, except for Upload Multiple, Client Integration does not work with Office 2007 (without SP2).

 

Office 2007 (Enterprise Edition) SP2

  • It all works! (with one extra click)
  • Open in Microsoft Word – displays a login page (looks just like login.aspx) and after logging in display the document (and saves it) just fine.
  • Connect to Outlook, Export to Excel both fail… but….
  • If you checkmark “Sign me in automatically” while logging in then every thing I have tested so far works.
    • Connect to Outlook works
    • Export to Excel works

So as long as you checkmark “Sign me in automatically” when you login FBA now supports Client Integration!

How does it work?

Cookies. Deleting cookies in the middle of a session will break Client Integration.

If you have written your own custom membership provider or your own custom login page then you will need to implement a “remember me” feature using an ASP cookie.

 

More tests needed…. Does Client Integration work with Office 2007 SP2 without WSS or MOSS SP2???  Don’t know yet…

 

.

4/27/2009

SharePoint: Displaying Pictures and Thumbnails in a Data View Web Part

 

This is in response to a question about displaying a thumbnail from a Picture Library in a Data View web part…

 

Displaying the full size picture is really easy. When selecting your fields for the Data View web part select “Url Path”. This will be added to the XSLT of the Data View web part as:

<img border="0" src="{@FileRef}" alt="{@FileRef}"/>

(@FileRef is the XSLT fieldname used for “Url Path”)

 

The trick is getting the URL to the picture library’s auto-created thumbnail. The thumbnail for “test.jpg” is “/_t/test_jpg.jpg” and is not a field in the SharePoint Designer list of fields. To get it you will need to do some XSLT string work:

concat(@FileDirRef,'/_t/', substring-before(@FileLeafRef,'.'),'_',substring-after(@FileLeafRef,'.'),'.',@FileType)

Note: the above will only work if only one “.” exists in the file name. It will fail for a file named my.airshow.picture.jpg

    @FileDirRef is the name of the library (airshow%20pictures)

    @FileLeafRef is the file name (helicopter.jpg)

    @FileType is the file type (jpg)

    ‘/_t/’ is the path to the auto-created thumbnails

  substring-before / after are XSLT string functions

The above “stuff” will convert:

   /airshow%20pictures/helicopter.jpg

into

   /airshow%20pictures/_t/helicopter_jpg.jpg 

which is the path to the thumbnail.

 

The final <IMG> tag looks like this:

<img border="0" src="{concat(@FileDirRef,'/_t/', substring-before(@FileLeafRef,'.'),'_',substring-after(@FileLeafRef,'.'),'.',@FileType)}" alt="{@FileRef}"/>

 

If you would like to let the user click on the thumbnail to see the full picture and meta data then wrap the <IMG> in a <A> tag and supply the ID of the picture:

<a href="{concat(@FileDirRef,'/Forms/DispForm.aspx?ID=', @ID)}">
<img border="0" src="{concat(@FileDirRef,'/_t/', substring-before(@FileLeafRef,'.'),'_',substring-after(@FileLeafRef,'.'),'.',@FileType)}" alt="{@FileRef}"/>
</a>

SharePoint: Synchronize Document Library Web Part Column Widths

When you add document library web parts to a page, SharePoint automatically sets the width of the columns leaving you with multiple web parts, all with different column widths, and an unstructured look to the page.

Synchronizing the column widths can be done with yet another Content Editor Web Part (CEWP) trick. The trick this time is finding something in common across all of the library web parts on a page, and it turns out that this is the table ID: "onetidDoclibViewTbl0". It looks like this ID is used for Document Libraries and Wiki Libraries.

The JavaScript below will take the column widths from the first web part on the page and then adjust the column widths for all other library web parts on the same page. This should only impact library web parts, and not others such as Tasks or Calendars, but you will need to do some testing!

Steps:

  1. In 2010 create a Notepad file with the 2010 version of the code. Save the file to a local drive and then upload to a SharePoint library in the site. In the library, right-click the file name, click Properties and copy the URL to the file. In the Content Editor Web Part, paste the URL in the Source Link box. Site Actions, Site Settings, Edit Page
  2. Add a Content Editor web part and move it below the library web parts
  3. Click Edit, Modify Shared Web Part
  4. In the Appearance section set the title of the web part to something like “Document Library Column Width Adjuster” so you will know what it is for six months from now.
  5. In the Appearance section find Chrome and select None to hide the title bar
  6. In 2007 click Source Editor and paste the following JavaScript

 

The Code

(this is the 2007 version, scroll down for the 2010 version)

<script type="text/javascript" language="javascript">

function CoordinateColWidths() {

try
{

  //find all document library web parts
  var x = document.all["onetidDoclibViewTbl0"]

  //Get first table's column widths
  var cw = []
  var j
  for (j=0;j<x[0].rows[0].cells.length;j++)
  {
    cw[j] = x[0].rows[0].cells[j].offsetWidth
  }

  //Set all other tables
  var i;
  for (i=1;i<x.length;i++)
  {
    for (j=0;j<cw.length;j++)
    {
      x[i].rows[0].cells[j].width = cw[j]
    }
  }

}
catch(err)
{
  txt="<font size=1>There was an error adjusting column widths.<br/>";
  txt+="Error description: " + err.description + "</font>";
  CoordinateColWidthsErr.innerHTML=txt
}
}

//call only after page fully loaded
_spBodyOnLoadFunctionNames.push("CoordinateColWidths")

</script><span id=CoordinateColWidthsErr></span>

 

Watch outs and warnings!

  • This has not been tested in a production environment – you are on your own! (Please let me know if it works or does not work for you)
  • So far I have only tested this:
    • in IE 6 on a MOSS Enterprise installation, but it should work in WSS.
    • in IE 7, IE 8 and Firefox in SharePoint Server 2010
  • As this uses a hidden web part, remember to document this somewhere so you can recreate the site when needed..
  • Batteries not included, your mileage may vary…

Have fun, and let me know if this works or does not work for you.

 

Code for 2010

<script language="javascript" type="text/javascript">

// SP 2010 version

function CoordinateColWidths() 
{
  try
  {

    //find all document library web parts
    var x = [];
    var tables = document.getElementsByTagName("table");
    for (var i=0; i<tables.length; i++)
    {
      if (tables[i].id=="onetidDoclibViewTbl0")
      {
        x[x.length]=tables[i];
      }
    }

    //Get first table's column widths
    var cw = [];
    var j;
    for (j=0;j<x[0].rows[0].cells.length;j++)
    {
      cw[j] = x[0].rows[0].cells[j].scrollWidth-16;
    }

    //Set all other tables
    var i;
    for (i=1;i<x.length;i++)
    {
      for (j=0;j<cw.length;j++)
      {
        x[i].rows[0].cells[j].width = cw[j];
      }
    }

  }
  catch(err)
  {
    txt="<font size=1>There was an error adjusting column widths.<br/>";
    txt+="Error description: " + err.description + "</font>";
    CoordinateColWidthsErr.innerHTML=txt;
  }
}

//call only after page fully loaded
_spBodyOnLoadFunctionNames.push("CoordinateColWidths");

</script>
<span id="CoordinateColWidthsErr"></span>

 

 

.

Note to spammers!

Spammers, don't waste your time... all posts are moderated. If your comment includes unrelated links, is advertising, or just pure spam, it will never be seen.