Wednesday, August 25, 2010

How To: exclude welcome pages in search results

Remember there was a ‘welcome page search retrieval’ issue in SP 2007? If not… take a look at http://svengillis.blogspot.com/2009/02/no-searchresults-for-content-available.html

Fortunately, this issue has been fixed in SP 2010. In some cases, you still want to exclude welcome pages in the search results – just like in the old days.

To do this - follow the steps below:

  • Navigate to the Search Service Application
  • Make sure you did a full crawl on your content source
  • Create a new rule in your search scope (all sites or whatever) as follow:

    clip_image001[4]

    By creating this rule you’ll eliminate the site URL (eg. /news) items. At this moment, the site default page URL is still included (/news/pages/default.aspx). In the next step we are going to eliminate them too…
  • Create a new Crawl Rule

    clip_image002
  • Make sure you’ll do a full crawl again and that the Search Scopes are updated
  • Notice that no welcome pages are found in the search results

Sunday, August 8, 2010

Tuesday, July 6, 2010

Multi-value lookup fields and CQWP 2010

The CQWP in SharePoint 2010 supports querying multi-value lookup fields against a single list or single-value lookup fields in multiple lists, but it does not support querying multi-value lookup fields against multiple lists.

Saturday, June 12, 2010

Inconvenient EditmodePanel Control

You can use the EditModePanel control in a publishing scenario to control the visibility of other controls in relation to the display mode. With other words – it acts like a container that shows or hides its child controls based on the mode of the page. You can use the PageDisplayMode property to indicate whether this control is visible in Edit Mode or Display Mode.

<PublishingWebControls:EditModePanel id="EditModePanel1"
runat="server" PageDisplayMode=”Display”/>

I frequently embed two EditModePanels into my pagelayout. One with its PageDisplayMode ‘Display’ and one with ‘Edit’. This way you have a styled and an non-styled presentation of your field controls. The styled presentation will be shown only in display mode. The non-styled presentation will be only used in edit mode.

While this works great in SP 2007 – I discovered that this control behaves a little different in SP 2010. I discovered that it only works as expected if you’re an authenticated user. So, what’s the difference? Well… I noticed that when you set the PageDisplayMode property to “Display” – The child controls will never be shown for anonymous users.

I was wondering why this is the case in SP 2010, while this works great in SP 2007, so I investigated the EditModePanel class in the Microsoft.SharePoint.Publishing assembly and found the evil-doer. MS added an extra check in the CalculateShouldRender method, which prevent rendering for anonymous users:

if (!ConsoleUtilities.CheckPermissions(SPBasePermissions.EditListItems))
{
this.shouldRender = false;
}

Workaround

Create your own Panel webcontrol and write the exact same logic as the EditModePanel control – without that little check. You can check the form mode like this
if (SPContext.Current.FormContext.FormMode == SPControlMode.Display)
{
//display mode
}
else
{
//edit mode
}

Attention: Don’t write your logic in the overridden Render method, use the AddParsedSubObject method instead. If you use the Render method, you will have some problems with the Ribbon.

Saturday, May 1, 2010

Cooliris 3D Wall

This is definitely the most amazing picture - video gallery I have ever seen.

02-17-09Cooliris is a browser plug-in that revolutionizes how you find, view, and share photos and videos. Whether you're browsing the Web or your desktop, Cooliris presents media on an infinite "3D wall" that lets you enjoy content without clicking page to page.


Watch the following demo to see this cooliris stuff in action. Definitely don’t forget to watch it in full screen mode. To find out more detailed information – go to Cooliris.


Btw, I already implemented the gallery in my site and it’s working great.

Saturday, April 24, 2010

The PNG Gamma Dilemma

While working on a design I came across a strange issue with my background image (.PNG format) in IE. The colors of my image were darker… which off course ruined my whole design.

IE

IE

FF
FireFox

Formulation of the problem:

The problem arises from the fact that browsers have traditionally treated the RGB values specified in CSS (and HTML), GIF and JPEG as identical (numerically and colorimetrically). With PNG, however, the stored gamma information is used to "correct" the RGB values prior to displaying the image, which means that they won't match other design elements when viewed in certain browsers.

I was able to remove the gamma information with a freeware PNG optimizer, called PNGCrush.


For more information about this issue – read:

Sunday, March 21, 2010

Changed event in browser-enabled InfoPath form

I have designed an InfoPath form and added managed code to the changed event for a field. This works in the client preview. However, after deploying as a browser-enabled form, my changed event never triggered.


The reason is quite obvious. The form requires a postback to execute our managed code in the changed event. To realize this, you need to modify the postback settings of your control.


PostBackSettings