All About SharePoint is a blog about SharePoint, InfoPath and related technologies. It was started in 2005 and has good readership in many countries. It covers SharePoint 2003, 2007, 2010, 2013, 2016 and Office 365. You can read articles, tips, tutorials and news. It has code samples and complete applications as well.
Wednesday, November 21, 2012
Customizing Google News Search Connector For SharePoint
Have you ever used Google News Search Connector for
SharePoint? It allows you to search Google News from within SharePoint. If you
haven’t done it before and would like to learn how to do it, read following
article on my site:
Working With SharePoint 2010 Search - Part 2
By default, Google News are shown on the right side of your
page as shown below:
1.
Go to Central Administration site
2.
Click General Application Settings
3.
Click Farm Search Administration
4.
Click Search Service Application Name
5.
Click Federated Locations on the left
6.
Click Google News to open it.
7.
Expand Display Information Node.
8.
In Federated Search Results Display Metadata
section, click ellipsis to edit the XSL. For you convenience, you can copy the
XSL to a better editor like Notepad or Visual Studio (if you want to see XSL in
colors and with better formatting).
9.
Search for “ms-searchsummarymain” class name and
remove it. You will find it immediately below the “Google News Results”
headline.
/><xsl:variable
name="ChannelTitle">
Google
News Results
</xsl:variable><xsl:if
test="($RowCount > 0)"><div class=”ms-searchsummarymain” xmlns="">
Just leave the class name empty
(class=””).
10.
Immediately after this line, you will find
following line:
<div class=”ms-searchChannelTitle”>
Remove the class name. Your DIV tag should look like this:
<div class=””>
11.Locate
following line:
<span class=”ms-searchChannelTitle”>
Remove class name. Final tag should look like the following:
<span class=””>
12.Search for
“ms-searchsummary” and remove it.
Before the change, tag will look like this:
<xsl:with-param name="StyleClassPrefix"
select="string(‘ms-searchsummary’)" />
After the change, tag will look like this:
<xsl:with-param name="StyleClassPrefix"
select="string(‘’)" />
“ms-searchsummary” appears twice in the XSL. You have to remove
it from the second location as well. Search again and modify the tag by
removing it.
Before: <xsl:with-param name="StyleClassPrefix"
select="string(‘ms-searchsummary’)" />
After: <xsl:with-param name="StyleClassPrefix"
select="string(‘’)" />
13.Search for
following tag:
<xsl:value-of
select="$ShortLink" /></a></div>
After </div> add breaks.
Final tag will look like this:
<xsl:value-of
select="$ShortLink" /></a></div><BR/><BR/>
14.Save the
changes. Go to SharePoint site and run search again, now you will see Google
Search results in the center.
Download completed XSLT (TXT format) from here.
http://walisystemsinc.com/sharepoint/art/googlesearch/googlexsl-11092012.txtMonday, September 3, 2012
Write Powershell output to file
./script.ps1 | Out-File “C:\test.txt”
How to find which site is denying access to the user
Sometimes it happens that you give permissions to the users
to access a site, but they get “Access Denied” when they try to access the
site. Usually the reason is that they do not have access to some lists or
subsites that are part of the main site but have unique permissions. For
example, style library, pages library, etc. Make sure you give them access to
all lists that come under the main site and have unique permissions. One way of
finding the list that denies users access is to check the URL when user gets
the “Access Denied” error. URL looks
like the following:
Name attribute in the URL contains the list ID that is
denying user access.
1.
To see which list it is, log in as a user that
can access the site. Go to the site where you intend to give permissions to the
user.
2.
Open any existing list in the site.
3.
Go to list settings.
URL will look like following:
List attribute contains the current list’s
GUID. Replace it with the one you saw in the previous link (when you/user got
“Access Denied” error). Hit enter. It will show you the list settings. Now you
know the list name. Go to the list permissions and add user there. Now they
should be able to access the main site. If they still get “Access Denied”,
repeat the process to find other lists that have unique permissions. Add user to
all lists with unique permissions.
Subscribe to:
Posts (Atom)





