Wednesday, September 23, 2009

First look at Google Chrome's Frame

Are you willing to use Google chrome you don't have privileges to install the new browser. There might be the IT department which may block installing new applications. You might be a SharePoint guy using IE heavily for development related works and also using Google apps like Gmail, Google reader etc for personal things Are you one of them. Google comes up with Chrome Frame

There's a way to leverage Chrome's state-of-the art rendering engine within Internet explorer without installing Google Chrome. Again Google leverages the existing capability to give more comfort to its users just like what happened for XmlHttp object.

Google developed a IE plugin/addon to replace Microsoft's traditional Trident layout engine with Chrome's layout engine based upon Webkit. You can call this Chrome layout by adding the prefix of cf: before any url. For eg:- Google home page will be cf:http://www.google.co.in/

So as a web developer do you want to use the feature of Chrome which is not present in IE(for eg Canvas tags). You just need to add the following meta tag to you code

<meta http-equiv="X-UA-Compatible" content="chrome=1">

Google provides a Javascript code snippet to detect whether Chrome frame exists or not,if not then it will prompt the users to install the plugin

Google's Search home page in Frame

Google Frame's About page


This Frame project is still in its early stages so expect some buggy things too. Let's see how Microsoft handles this plugin in future.

Thursday, September 17, 2009

How to find the site template used on a Site ?

Some times I stumble upon some heavily modified sites to find out the site template(Team site/Blank site etc) used for provisioning that instance. That's quite easy using the object model but I wondered is it possible through some out-of-the box tool or UI's

Recently came across the WSS RPC methods It has a function called GetProjSchema which does this magic

Authenticate with the web application

Remove all strings after the site name from the address bar and append the following string

/_vti_bin/owssvr.dll?Cmd=GetProjSchema

So if you have application as Foo and it has a site called PWA then the URL might be looking like this

http://Foo/PWA/_vti_bin/owssvr.dll?Cmd=GetProjSchema

GetProjSchema requests the CAML Schema for a Web site, this is a blend of ONET.XML for that specific site definition and some resources which are related to that provisioned site instance. This CAML schema is cached in IIS, so we've retrieved this cached version to find out the site template

This gives more details than required but we are now interested in the site template used, look at the first line "Project Title=". This is the current site template being used

A sample screen snap


Anything which comes OOTB capable of solving real world problems is good. Exploit the rendered CAML . .. .

Tuesday, September 1, 2009

SharePoint thesaurus files explained

Thesaurus files are used to tailor the search requests to serve a better search results to the end users. We can define multiple synonyms and patterns in thesaurus files

Where to Find the thesaurus files in my Web front end ?
C:\Program Files\Microsoft Office Servers\12.0\Data\Office Server\Applications\GUID\Config

Find TSneu.xml and open it in a editor, this is the language neutral thesaurus files which affects across the site. This file is commented out as an OOTB setting, uncomment this file before proceeding.

insert the following snippet in that file

<replacement>
<pat> laptop </pat>
<pat> notebook </pat>
<sub> Dell </sub>
</replacement>



This configuration explains that if a user searches with string "laptop" or "notebook" those strings were considered as "Dell" before triggering a search.

Restart the Office search service to apply thesaurus changes to the server.
NOTE: NO need for an IISReset or Crawling the content or Index reset just restart the search service

net stop OSearch
net start OSearch

when you search for "Dell" that will be highlighted(technically it is HitHighlightSummary) in the Search description text



When the search string is replaced/handled by a thesaurus in between(in our case it is laptop/notebook) then you cannot see any text as highlighted in its description