Saturday, May 26, 2007

Popfly and Sharepoint integration already?

Yes! Check out Mike Gannotti's video where he tells you how to use Sharepoint as a datasource for PopFly:

http://wm.microsoft.com/ms/gsd/mikegannotti/Popfly_SharePoint_Integration.wmv 

If you wanna know what PopFly is read this little snippet from Channel9: "You probably haven't heard of it, but you're also probably going to start hearing a lot about it in the near future. Popfly is being announced today - as I'm posting this, actually. To keep it short and simple so you can get right to watching the video, Popfly makes it easy for non-devs to create web sites, mashups, and more. Drag, drag, click - you've got a Flikr + Virtual Earth mashup. You can even point and click your way to a Vista Gadget. "

 If want to know more about PopFly check out these sites :

 

 

Technorati tags: , ,

Thursday, May 24, 2007

PIDY and something else you want to have ;)

Mate of mine has started something that I think a lot of people are dreaming (and perhaps not even knowing that they are dreaming of it) of to have! And on top of that the team created PIDY (not yet trademarked I reckon, so.. guys.. if you read this.. trademark it! :)) which is that really cool flash thing that you see on the toprightside of this page. To get you in the dreaming mood read this snippet:

This is all I want.

A little bit of the internet that truly belongs to me.
Something I can keep forever.
Somewhere people will always know they can find me.
Somewhere people can go to get my business card.
Somewhere I can publish my photos from Flickr, my links from Del.icio.us, my blog posts from Wordpress.
Somewhere I can keep track of my contacts and their contact details.

But it has to be mine, I don’t want to put all this in the hands of any more faceless corporations, and it has to be easy.

So go out and check the http://www.internetaddressbook.com and get your own PIDY!

 

Tuesday, May 22, 2007

SPS/WSS 2003 : Overview of custom webparts

There are some steps that you have to take when you want to upgrade your existing 2003 environment to a 2007 environment. One of those steps is to get an overview of all the installed custom webparts. Now this is not that difficult, you just use the STSADM command to retrieve all the installed webparts.
But what you want to know (and this is even not only desirable information to have when you are not upgrading) is, are the custom webparts used by our users? If so, on which site and on which page is the custom webpart dropped?

To find out these answers we use the GetWebPartCollection method from the SPWeb object. This method returns a collection of WebParts. If you take a look at all of the properties of this object there is nothing that truly identifies the webpart. Sure you've got the ID and ClientID but those ID's are unique for the webpage where the webpart is hosted. What I found was that the Description property is the only property that is easily identified and unique (unless you've build all you're webparts with "WebPart1." as the default description :P)

The next thing to overcome was that you use the GetWebPartCollection method with a specifaction of the page (e.g. default.aspx), now this works fine for a default sitetemplate. But if your sites are based upon the workingspace template, the possibility exists that there are more pages on the sites where the webpart could be found. So you've got to enumarate through all the pages as well.

So here's the function:

 

static void GetWebparts (string url)
{
    
    //boolean to determine when we want to add an WebpartItem to the ArrayList
    bool GotWebPart = false;
    
    
    //Opening the site
    SPSite siteCollection = new SPSite(url);
    SPWeb web = siteCollection.OpenWeb();
    
    try
    {
        //Retrieving all the webparts on a particular page. 
        SPWebPartCollection collection = web.GetWebPartCollection("default.aspx", 
            Microsoft.SharePoint.WebPartPages.Storage.Shared);

        foreach (Microsoft.SharePoint.WebPartPages.WebPart webpart in collection)
        {
            //If the webpart has a description like the description that can be found in the .DWP file, we are gonna add this webpart to the collection
            if (webpart.Description == "WhatNew." 
                
                )
            {
                WebpartItem item = new WebpartItem();
                item.OriginalTitle = GetOriginalTitle(webpart.Description);
                item.Webpart = webpart.Title;
                string LinkToSite = web.Url.ToString() + ", " + web.Title.ToString();
                item.Site = LinkToSite;
                item.Page = "default.aspx";
                
                GotWebPart = true;
                
                //If the webtemplate is based on a workspace, we have not only the default.aspx 
                //page but also for every tab a new .aspx file
                if (web.WebTemplate == "MPS")
                {
                    SPFolder srcFolder = web.Folders["pages"];
                    foreach(SPFile file in srcFolder.Files)
                    {
                        SPWebPartCollection pagescollection = 
                            web.GetWebPartCollection("pages/"+file.Name.ToString(), 
                            Microsoft.SharePoint.WebPartPages.Storage.Shared);
                        foreach (Microsoft.SharePoint.WebPartPages.WebPart _webpart in pagescollection)
                        {
                            if (_webpart.Description == webpart.Description)
                            {
                                item.Page += " | " + file.Name.ToString();
                            }
                        }
                        
                    }
        
                }
                if (GotWebPart == true)
                {
                    //Finally we put the item in the ArrayList                        
                    items.Add(item);
                }
            }
        }
    }
    catch (Exception error)
    {
        Console.WriteLine(error.Message.ToString() + "    " + url.ToString());
    }

    finally
    {
        web.Close();
        web.Dispose();

        siteCollection.Close();
        siteCollection.Dispose();
        
    }

}

 

Hope this helps somebody out  :)

 

Technorati tags: , ,

Sunday, May 20, 2007

Book review : Sharepoint 2007 Unleashed

 I've had the privilege to get a free copy of a book called Sharepoint 2007 Unleashed by Michael Noel and Colin Spence (no blogs found?!). The audience level of this book is aimed at intermediate to advanced.  As stated in the introduction of the book, it is divided in to four sections :

  1. Sharepoint 2007 overview, Planning and Implementation, provides an introduction to SharePoint 2007 technologies and covers the architecture process. Details on installing SharePoint 2007 and processes for migrating from SharePoint 2003 are included.
  2. Using Sharepoint 2007 technologies, covers the core feature set of SharePoint 2007 that power users and administrators will need to master, including libraries, lists, designing and managing pages, workspaces, and sites.
  3. Managing a Sharepoint 2007 environment, provides best practices on managing and administering the SharePoint infrastructure, securing the environment, maintaining and managing the environment and databases, and backing up and restoring the SharePoint 2007 environment
  4. Extending a Sharepoint 2007 environment, goes into detail on the topics of configuring email-enabled content, Exchange Server integration, enabling presence information with Office Communication Server 2007, and securing remote access with ISA Server 2006. In addition, chapters are included on using SharePoint Designer 2007.

I was most amazed by the first section, as it describes all the possible scenarios which I could not (yet) find on the Microsoft site and provides valuable information how-to implement that scenario as well. The other sections were fairly straightforward and about 80% of the information can be found on the net. But in contradication to the net, all the information is neatly placed (read : aggregated) and the style of the writers reads very well ;)

Conclusion:
A very good book for those who want to have a complete overview of Sharepoint 2007 (WSSv3 & MOSS) and those who want to get more indepth information. I think the audience level is better if it is set to intermediate alone instead of intermediate to advanced. Since the 'advanced' audience probably knows about everything what is covered in the book.
I give it a 8/10

 

Technorati tags:

Friday, May 18, 2007

SharePoint 2007 Maximum Limitations

From Harsh Chiplonkar comes this table of the limitations of Sharepoint 2007 :

Following is a list of names and other parameters with the maximum allowable size on each.

Entity                        Max Permissible Size
Site Name                    128 characters
Site URL                 255 characters
Display name                 128 characters
Connection string                 384 characters
Email address                    128 characters
Version numbers                064 characters
Virtual Server Friendly Name            064 characters
SQL Database Name                123 characters
SQL Database Column                128 characters
SQL Database Table Name            128 characters
SQL Role Name                    128 characters
Server Name                    128 characters
Windows User Name                300 characters
Windows Password                300 characters
Dependencies per object            032 objects
Zone enumeration value            004 zones
Default SQL command timeout             300 seconds
Number of simultaneous
workflows that can be run             015

If during your course of using the product, you inadvertently cross these limits, then you would end up with errors. These are hard limits.

Technorati tags: , ,

Tuesday, May 15, 2007

Wanna chat in Sharepoint?

Check out what Lawrence has to say on the Sharepoint Team blog:

Have you ever wanted to have a persistent chat session right on your SharePoint team or collaboration site? It can be much easier and quicker for typing a message than SharePoint’s built-in Discussion Board. The ChatterBox web part provides an example of how such a persistent chat session can be implemented by utilizing a SharePoint list, so there’s no need to create a custom database. If you need more than one chat session on your site, you can simply create another instance of the ChatterBox web part and associate it with another SharePoint list. Here’s a screenshot of it in action.
I have not implemented this yet so I don't really know what to expect, but I do see a future for this in the helpdesk areas.

Master Pages vs. Themes: Which Do You Choose?

A great article by Heather Solomon (the Sharepoint diva of branding :)) about the differences between a theme and master pages. The key differences are :

So, to run down some key points:

Master Pages

  • Can totally change the look of a site.
  • Can hide SharePoint components that you don't want to use.
  • Will allow you to alter the layout of the page, in addition to changing the colors and images used in the site.
  • Will not affect _layouts pages.  You will need to use a workaround.

Themes

  • Can re-skin the layout of a site to use different images and colors.
  • Can only hide SharePoint components that can be controlled through hiding it in the CSS (display: none set on a class/ID).
  • Affects _layouts pages.
  • Can be used as an alternate CSS file application method, similar to alternate CSS setting in MOSS sites.
  • Are installed on the web server unless you customize the file.   

Friday, May 11, 2007

Frustations with Infopath and MOSS

I've been very busy the last few months with building Infopath forms that are published to a MOSS server and during this period I came accross some pretty annoying things. And ofcourse I want to share my frustations with you in the hope you don't get these frustations as well (or just to let you know you are not the only one ;)

1. Content Types

Be very aware of the functionality of ContentTypes, as soon as you publish your infopath form with custom code in it, it becomes a contenttype. This is not ideal if you are not sure which fields you wanted to promote as columns in Sharepoint.  You could end up with a contenttype with several columns you never use. Or even worse, new fields are not added (c.q. promoted) to the existing contenttype, so you cannot use them in your custom workflow.

2. Deletion of the feature elements by MOSS

Every once in a while I am deploying a new version of a form, using the central administration page to upload the form, I receive the following error:

Failed to find the XML file at location '12\Template\Features\FT-01-15c4e6f3-1f3b-d12c-fcac-6cf906ce99b6\Feature.xml'

What happens is that Sharepoint is trying to upgrade the form. During this upgrade a new subfolder is created in the "FT-xxx" folder where the last version is stored. And what I think is happening is that the new version of the solution file is not stored in a main folder so Sharepoint cannot update the feature.xml and elements.xml and therefore deletes them.
To solve this problem, you just copy the feature.xml and elements.xml from another form template and modify these accordingly to the 'corrupt' form template.

3. The form has been closed

This one I do not yet understand, sometimes if successfully published a new version of my form template and want to to view/open the form and then without any error I'm confronted with 'the form has been closed' message. My solution to this is just republish the same form and waste another 5mins and then it works..

 

Don't get me wrong btw, it is a great feature and I will continue to use to build relatively easy forms with it. I just had to write off my frustations :)

Thursday, May 10, 2007

William Baer's database management concepts for large and growing content databases

As I pointed out last month in this post Sharepoint and databases that knowledge and experience in SQL Server 200x is getting more and more important, William Baer published an article about Database Management Concepts for Large and Growing Content Databases which goes really into detail what a best practice could be if you have a large and fast growing content database and want to manage the load (remember in 2003 that STSADM backup locks tables and therefore sites were unreachable during the backup process?). Not only does he describe how you should implement this, he also points out the benefits if you implement this :)

Tuesday, May 08, 2007

Ontolica Wildcard Search Released!!

From Liam :

Great news!! The *FREE* yes *FREE* wildcard search is now available here: http://www.ontolica.com/Download.aspx

Once installed it adds two new site templates: Ontolica Search Center and Ontolica Search Center with Publishing

They are all enabled as a feature!! Very nice. Very cool little features as well. The refine by Site, Author and File Type is great!! Also the instant reload of the reslts when selecting "All", "Documents Only" and "List Items Only" is a great touch...!! Go get it and try it for your self.

 

Bloody great news eh? :)

Friday, May 04, 2007

This form was customized not working with attachment

Update 31-03-2009

Folks, another update.. it’s fixed!! Get the hotfix for SharePoint Designer here KB960311 and make sure that your SharePoint environment is patched with the infrastructure updates.

Update 09-07-2007

Folks, the solution given below does not work! Also there is no fix for it yet, please look in the following forum http://forums.microsoft.com/TechNet/showpost.aspx?postid=1826359&siteid=17 for more details. I am very sorry if you found this blogpost via Google hoping you get an answer.. :(

Well until recently I did not know how to fix this (and I wasn't the only one if you check out this forum post on TechNet and these comments on a post of Jan Tielens's blog) until I received an alert from the forum that there was a new post with the solution. And here is the solution :

This is the code you need for attachments to work:

<SharePoint:AttachmentUpload ControlMode="Edit" runat="server"
ID="fileupload{$Pos}">
</SharePoint:AttachmentUpload>
<SharePoint:AttachmentsField ControlMode="Edit"
FieldName="Attachments" runat="server" Visible="true">
</SharePoint:AttachmentsField>

This will display the input field and the buttons as well as what you're trying to upload.

1) First make sure your field and test case works (Edit form) without the attachments.

2) What I did was put the attachments in a separate xsl template:

<xsl:template name="attachments">
<xsl:param name="Pos" />
  <tr><td>
    <SharePoint:AttachmentUpload ControlMode="Edit" runat="server"
ID="fileupload{$Pos}">
    </SharePoint:AttachmentUpload>
    <SharePoint:AttachmentsField ControlMode="Edit"
FieldName="Attachments" runat="server" Visible="true">
    </SharePoint:AttachmentsField>
  </td></tr>
</xsl:template>

3) and then I changed the dvt_1 template:

<xsl:template name="dvt_1">
  <xsl:variable name="dvt_StyleName">ListForm</xsl:variable>
  <xsl:variable name="Rows"
select="/dsQueryResponse/Rows/Row"/>
  <table border="0" width="100%" id="part1{$noop}">
    <xsl:call-template name="dvt_1.body">
      <xsl:with-param name="Rows" select="$Rows"/>
    </xsl:call-template>
  </table>
  <table border="0" width="100%">
    <xsl:call-template name="attachments">
      <xsl:with-param name="Pos" select="concat('_',
position())" />
    </xsl:call-template>
  </table>
</xsl:template>

A few things that are important to remember:

The JavaScript in SharePoint will look for  the object with id part1 in the final HTML and hide the object (display:hidden css style) and the object id partAttachment and display that object. The partAttachment object (span) is automatically generated when you introduce the SharePoint:AttachmentUpload code. The part1 id however, you need to introduce yourself.

Now, if you don't want that anything hides, just put in an empty element somewhere with the id part1{$noop}, otherwise, just use my example for the dvt_1 template (it's neater).

The $noop is to fool SharePoint Designer since it will introduce {generate-id()} after the id if you don't specify anything there (to guarantee unique identifiers or something, I don't know) and thus it would fail the javascript since it can't find id=part1, but there will be a part1KLV532.

You can specify the noop parameter to be empty in the beginning of your xsl stylesheet:

<xsl:param name=noop></xsl:param>

Evi

So thanks Evi! :)

Tuesday, May 01, 2007

Site Delete Capture Feature by MS

A feature that is created by Joel Oleson and William Baer that does the following :

The Microsoft IT Site Delete Capture feature 1.0 is a shared component library (DLL); by registering the Microsoft IT Site Delete Capture feature 1.0 shared component library in the Global assembly cache, SharePoint Products and Technologies administrators can intercept both site/web delete requests and archive the site/web to a resource local to the web front-end computer or UNC path before the site/web is removed the configuration and content databases. The Microsoft IT Site Delete Capture feature 1.0 also exposes functionality allowing SharePoint Products and Technologies administrators to send e-mail notification to the end-user indicating the site has been archived and deleted, additionally any failure in the event receiver will generate an e-mail message to the end-user indicating that the site/web has not been deleted. The message format, text, and language are stored in a flexible, culture-independent extensible markup language configuration file to support any localization requirement.

Very handy! You can download the tool from Codeplex