Thursday 10 November 2011

Replace or change "Search this site…" text in SharePoint 2010

Described below is a simple fix to replace “Search this site…” text within the search box in SharePoint 2010 site.

First of all locate these 2 folders –
  1. %14Hive%\Template\Features\OSearchBasicFeature
  2. %14 Hive%\Template\Features\OSearchEnhancedFeature
Now go to first folder, before proceeding take a backup of "SearchArea.xml", and then open the file in Notepad or SharePoint Designer 2010. Add the below property –

<Property Name="QueryPromptString">Some Text</Property>

In the property above, replace “Some Text” with the required text, in my case I have replaced this with “Keyword”. Repeat the above steps for "SearchArea.xml" file in second folder as well. Now after iisreset you will get the desired result.


Note: Only after changes in both the folders and iisreset you will get the result.

===========================================================

Thursday 3 November 2011

Delete Extended Web Application in SharePoint 2010

  1. Start Central Administration
  2. Go to Application Management
  3. Select the Web Application from which the site(to be deleted) was extended from.


  4. Click Remove SharePoint from IIS Web Site (as shown above)
  5. Select the extension (zone) to be deleted


  6. Select Yes to delete the IIS Web site.


  7. Finally click OK and you are done !!

====================================================

Wednesday 2 November 2011

Text Captcha with InfoPath form in SharePoint 2010

For past few days I have been searching blogs/forums to find a way to use Text Captcha with InfoPath form, but in vain. I have a created a simple Text Captcha functionality in InfoPath form and penning it down here, so that somebody outside there will face less pain than me.  

To start with, create a new InfoPath form in InfoPath Designer 2010. Change the color of the Text Box and make it Read-only, which will hold the Captcha text. We call it “Security Check” Text Box.




In Text Box Properties of “Security Check”, set the Default Value as the below formula.




This formula will generate a new number each time the page is loaded --
substring(string(number(concat(number(substring(substring-after(string(now()), "T"), 7, 2)) * 3 + 31, number(substring(substring-after(string(now()), "T"), 7, 2)) * 5 + 17, number(substring(substring-after(string(now()), "T"), 7, 2)) * 9 + 37))), 2, 5)

Now go to “Manage Rule” for “Enter the numbers shown” Text Box, as shown below.


In Rules window, click on Condition and add the below condition. The condition states that Captcha-Text should not be equal to Entered-Text. Click “OK” and enter "ScreenTip" in Rules window on right side.



Now publish the page and see the result. It will display a page with a Text-Captcha.


On entering incorrect value, it display screen tip and will not proceed further.



On entering correct value, the data is submitted.


==========================================