Web Design and Maintenance Prices

The newly updated Price List and Maintenance Packages have been update for MowenWorks.com. This is in concert with the new website design and release.

MowenWorks provides professional Web Development as well as Web Maintenance and Services. We strive to bring you the best web experience possible by keeping your project running smoothly and as efficiently as possible. We are the perfect choice whether you are looking for business, personal, or even Fortune 500 support and maintenance.

Our packages are scaled based on the need or size of your project. Start your project off right with our different Maintenance and Service options today!

New Site:

http://mowenworks.com/

Updated Design Prices:

MowenWorks Website Price List

Updated Maintenance Prices:

MowenWorks Web Maintenance Price List

 

web_prices

MowenWorks Web Prices

maintenance_prices

MowenWorks Maintenance Prices

Advertisements

SharePoint 2013 Solution Deployment Script

A script that would loop through the containing folder for any WSP solution files and deploy it to a predetermined Web Application was our original deployment method. Moving to a 2013 deployment scheme, we had a few issues reusing our 2010 solution deployment script. The primary problem that we came across was that our solutions were not being identified by the servers with their solution name (aka. their WSP file name). Every once in a while we would have duplicates or our solution would not deploy right out.

Sooooo, we created a new deployment method that was a more precise deployment method using the feature ID instead.

With this method each WSP file has to have an accompanying PowerShell deployment script. This ensured that the solution would be identified properly and we could reuse the same deployment script on any server (using a Web URL prompt).

Let me take you on a tour of what we have.

 

The Setup

The only two things that are hard coded are the Solution Name and the Feature ID. You can get the Feature ID from the solution properties in Visual Studio.

Expand your Features folder > Double Click on your feature name. The Feature ID field in the property window is what you want.

#Example parameters
$solutionName = 'MySolution.wsp'
$featureSiteId = '44452204-308b-4c22-bg10-19c45dadcc9d'

We added a loop that checks to make sure that the solution was installed and completed by polling the solution deployment timer job.

function WaitForJobToFinish()
{ 
 $JobName = "*solution-deployment*$solutionName*"
 $job = Get-SPTimerJob | ?{ $_.Name -like $JobName }
 
 if ($job -eq $null) 
 {
 Write-Host 'Timer job not found'
 }
 else
 {
 $JobFullName = $job.Name
 Write-Host -NoNewLine "Waiting job" $JobFullName
 while ((Get-SPTimerJob $JobFullName) -ne $null) 
 {
 Write-Host -NoNewLine .
 Start-Sleep -Seconds 2
 }
 Write-Host "Finished!"
 }
}

We then needed to know what Web Application this solution was going to be installed on.

Param($parmWebUrl) #add this line to the very top of your PowerShell to check for a parameter.

if($parmWebUrl -eq $null) {
 $webUrl = read-host "Web URL? Enter for exit" 
}
else {
 $webUrl = $parmWebUrl 
}

if($webUrl -eq ""){break}

$web = Get-SPWeb $webUrl
$siteUrl = $web.Site.Url
$webApp = Get-SPWebApplication -Identity $siteUrl

 

Enable SP Admin Service

Ensure that the administration service is running on the server. This is a precaution in case it has been disabled.

#Enable Admin service
Write-Host "Checking SPAdmin Service"
$srvName = "SPAdminV4"
$service = Get-Service $srvName
$serviceStatus = $service.status
If ($serviceStatus -eq "Stopped") 
{
 Write-Host 'Starting SPAdmin Service'
 Start-Service $srvName
}
else
{
 Write-Host 'SPAdmin Service already started'
}

 

Disable/Uninstall > Install > Enable Solution

We do a complete deployment cycle by removing any existing solution then re-installing with an enable. We first used the Upgrade path but found that our files were not being truly updated.

#Disabling feature
Write-Host "Disabling feature"
Disable-SPFeature -Identity $featureSiteId -Url $siteUrl -Confirm:$false -force

$solution = Get-SPSolution | where {$_.Name -eq $solutionName } -ErrorAction SilentlyContinue
if($solution)
{
 if($solution.Deployed -eq $true)
 {
 Write-Host 'Unistalling solution'
 
 Uninstall-SPSolution -Identity $solutionName -WebApplication $siteUrl -confirm:$false 
 WaitForJobToFinish 
 }
 Write-Host 'Removing solution'
 Remove-SPSolution –Identity $solutionName -confirm:$false
}
#Add & Install Solution
Write-Host 'Adding solution'
$scriptPath = Split-Path -parent $MyInvocation.MyCommand.Definition

$solutionPath = "$scriptPath\$solutionName"
$solution = Add-SPSolution $solutionPath

Write-Host 'Installing solution'
Install-SPSolution –Identity $solutionName –GACDeployment -WebApplication $siteUrl -Force
WaitForJobToFinish
#Restart-Service W3SVC -force
#Enable Features
Write-Host "Enabling feature"
Enable-SPFeature -Identity $featureSiteId -Url $siteUrl -Confirm:$false -force

if ($serviceStatus -eq "Stopped") 
{
 Write-Host 'Stopping SPAdmin Service'
 Stop-Service $srvName
}
Write-Host 'Deploy finished'

Our new deployment plan ensures that the correct solution is handled with each deploy. We also included additional checks along the way to ensure that our deployment wasn’t stepping on itself. We also added in a few user dialog responses to know where the script might have failed or what step it is on.

Give this a try and drop me a line if you see any room for improvement.

 

Full Code

Param($parmWebUrl)

$solutionName = ''
$featureSiteId = ''

function WaitForJobToFinish()
{
$JobName = "*solution-deployment*$solutionName*"
$job = Get-SPTimerJob | ?{ $_.Name -like $JobName }
if ($job -eq $null)
  {
    Write-Host 'Timer job not found'
  }
else
  {
     $JobFullName = $job.Name
     Write-Host -NoNewLine "Waiting job" $JobFullName
     while ((Get-SPTimerJob $JobFullName) -ne $null)
       {
          Write-Host -NoNewLine .
          Start-Sleep -Seconds 2
       }
     Write-Host "Finished!"
  }
}

if($parmWebUrl -eq $null) {
     $webUrl = read-host "Web URL? Enter for exit"
}
else {
     $webUrl = $parmWebUrl
}

if($webUrl -eq ""){break}

$web = Get-SPWeb $webUrl
$siteUrl = $web.Site.Url
$webApp = Get-SPWebApplication -Identity $siteUrl

#Enable Admin service
Write-Host "Checking SPAdmin Service"
$srvName = "SPAdminV4"
$service = Get-Service $srvName
$serviceStatus = $service.status
If ($serviceStatus -eq "Stopped") 
{
     Write-Host 'Starting SPAdmin Service'
     Start-Service $srvName
}
else
{
     Write-Host 'SPAdmin Service already started'
}

#Disabling feature
Write-Host "Disabling feature"
Disable-SPFeature -Identity $featureSiteId -Url $siteUrl -Confirm:$false -force

$solution = Get-SPSolution | where {$_.Name -eq $solutionName } -ErrorAction SilentlyContinue
if($solution)
{
 if($solution.Deployed -eq $true)
 {
    Write-Host 'Unistalling solution'
 
    Uninstall-SPSolution -Identity $solutionName -WebApplication $siteUrl -confirm:$false 
    WaitForJobToFinish 
 }
 Write-Host 'Removing solution'
 Remove-SPSolution –Identity $solutionName -confirm:$false
}

#Add & Install Solution
Write-Host 'Adding solution'
$scriptPath = Split-Path -parent $MyInvocation.MyCommand.Definition

$solutionPath = "$scriptPath\$solutionName"
$solution = Add-SPSolution $solutionPath

Write-Host 'Installing solution'
Install-SPSolution –Identity $solutionName –GACDeployment -WebApplication $siteUrl -Force

WaitForJobToFinish

#Restart-Service W3SVC -force
#Enable Features
Write-Host "Enabling feature"
Enable-SPFeature -Identity $featureSiteId -Url $siteUrl -Confirm:$false -force
if ($serviceStatus -eq "Stopped") 
{
    Write-Host 'Stopping SPAdmin Service'
    Stop-Service $srvName
}

Write-Host 'Deploy finished'

 

Deploying solutions to a specific Web Application Issues Resolved

I’ve ran across a problem with multiple deployment packages that don’t want to deploy to the specified Web Application that has been identified. I get the “This solution contains no resources scoped for a Web application and cannot be deployed to a particular Web application” error message and myself banging my head against the wall. This is what worked for me.

Even if everything about your solution package and your PowerShell script is catered to a specific Web Application, SharePoint can deny your deployment plans.

Deploying a solution to a specific Web App cannot be deployed.

Deploying a solution to a specific Web App cannot be deployed error message

Another way to trick SharePoint to deploy a Web Application scoped solution is to add an empty/dummy safe control assembly to your deployment package.

In Visual Studio (im using VS13)

  1. Open up your “Package.package” file
  2. Switch the tab to the “Advanced” tab
  3. Click the “Add” then “Add Assembly from Project Output
  4. Select your existing project name for the source
  5. Click the button to add a new item in the “Safe Controls” area.
  6. The Namespace and Assembly name can be the same as your project
  7. Click Ok
  8. Your new dummy Assembly item should look similar to the following:
Add a dummy Safe Control to your Package Manifest in Visual Studio.

Add a dummy Safe Control to your Package Manifest in Visual Studio.

The trick is fooling SharePoint into registering your solution as a web application scoped solution. SharePoint checks whether there are items which have to be deployed to a specific web application when your solution is added to the solution gallery. One of the elements that SharePoint checks for are safe control entries. These have to be merged into a web.config for a specific web application. The easiest way to force deployment to a specific web application is adding a dummy safe control entry to your package.

Now go ahead and re-create your deployment package and add it to your specific Web Application. This solution specifically worked for me and I have not had any problems on my Farm. There are other solutions out there that resolve problems SIMILAR to this, so I’m going to list them below as well.

References

Simple Pagination with the Content Search Web Part

The default paging function within the SharePoint 2013 Content Search web part is lacking a few features. One of them is the ability to know how many items you’re looking at and which set of items you are currently looking at. You basically had little to no indication on where you were in the document results, especially if you had a lot of results to display at once.

The original SharePoint 2013 Search Query results paging

Original SharePoint 2013 Content Search results paging

The simple paging control that I created displays some basic information about the results you’re seeing. I display the total pages, total results, and which page you’re currently on. This is ideal for my solution because I wanted to use a compact Web Part display. Leveraging the power of Display Templates (new with SharePoint 2013) I used some OOTB functionality mixed in with my own code. Let me show you how I did that.

This my revised Paging for the Search Query results

This is my revised Paging for the Content Search results

Brief Intro on Display Templates

Display templates in SharePoint Server 2013 are templates used in Web Parts that use search technology to show the results of a query made to the search index. Display templates control which managed properties are shown in the search results, and how they appear in the Web Part. I created a new custom Control Template for my Display Template. We already have a custom Item Template that we use to display our content in a grid form, so I did not need to modify anything there.

There are two primary types of display templates:

  • Control templates determine the overall structure of how the results are presented. Includes lists, lists with paging, and slide shows.
  • Item templates determine how each result in the set is displayed. Includes images, text, video, and other items.

After you add a Search Web Part (such as the Content Search Web Part) to a page, to configure the Web Part, you select both a control display template and an item display template, as shown below.

Control Template and Item Template selections.

Control Template and Item Template selections.

Continue reading the MSDN article here (Display Templates – https://msdn.microsoft.com/en-us/library/office/jj945138.aspx) on Display Templates on how to create, modify, or add Display Templates to your solution.

Breakdown

This is all wrapped within a Bootstrap styled DIV container that flexes with my display resolution. I’m leaving out my own custom style sheet in case you want to style the CSS the way you want. I can provide my own CSS style that I used to create the exact look if you’d like. Just message me and I’ll email you the source.

I treated the paging functionality in 4 separate stages to display as expected

  1. Current/Previous Page
  2. Last Page
  3. Next Page
  4. Total Pages

The first thing that I did was place all of the known information that I was going to be using into variables.

 var pagingInfo = ctx.ClientControl.get_pagingInfo();
 var rowsPerPage = ctx.ClientControl.get_numberOfItems();
 var totalRows = ctx.DataProvider.get_totalRows();
 var currentPage = ctx.ClientControl.get_currentPageNumber();
 var totalPages = Math.ceil(totalRows / rowsPerPage);
 var selfLinkId = "SelfLink_";
 var imagesUrl = GetThemedImageUrl('searchresultui.png');
 var pl = '';

I then added logic to check when the “Previous” arrow needed to be shown and what page number to display at the current page.

for (var i = 0; i < pagingInfo.length; i++) {
 var pl = pagingInfo[i];
 if(!$isNull(pl)) {
 var imagesUrl = GetThemedImageUrl('searchresultui.png');
 if(pl.startItem == -1 && currentPage != totalPages) { 
 var selfLinkId = "SelfLink_" + pl.pageNumber;
 _#-->
 <div id="PagingSelf">Page _#= $htmlEncode(pl.pageNumber) =#_</div>
 <!--#_ 
 } else if(pl.pageNumber == -1) { 
 var iconClass = Srch.U.isRTL() ? "ms-srch-pagingNext" : "ms-srch-pagingPrev"; 
 _#-->
 <div id="PagingImageLink ">
 <a id="PageLinkPrev" href="#" class="ms-commandLink ms-promlink-button ms-promlink-button-enabled ms-verticalAlignMiddle" title="_#= $htmlEncode(pl.title) =#_" onclick="$getClientControl(this).page(_#= $htmlEncode(pl.startItem) =#_);return Srch.U.cancelEvent(event);">
 <span class="ms-promlink-button-image">
 <img src="_#= $urlHtmlEncode(imagesUrl) =#_" class="_#= $htmlEncode(iconClass) =#_" alt="_#= $htmlEncode(pl.title) =#_" />
 </span>
 </a> 
 </div>
 <!--#_ 
 } else if(pl.pageNumber == -2) { 
 var iconClass = Srch.U.isRTL() ? "ms-srch-pagingPrev" : "ms-srch-pagingNext";
 //Do not display anything.
 } 
 }
 }

 

I then added the part to check for the Last Page and display correctly once reached.

//Display the last page
 if((currentPage != totalPages) && totalPages > 2) {
 _#--> 
 <div id="PagingLink" class="">of _#= $htmlEncode(totalPages) =#_</div> 
 <!--#_
 }else if(currentPage == totalPages){
 _#--> 
 <div id="PagingLink" class="">Page _#= $htmlEncode(totalPages) =#_ of _#= $htmlEncode(totalPages) =#_</div> 
 <!--#_
 }

 

The “Next Page” logic should always show until the Last Page is reached.

for (var i = 0; i < pagingInfo.length; i++) {
 var pl = pagingInfo[i];
 if(!$isNull(pl)) {
 var imagesUrl = GetThemedImageUrl('searchresultui.png');
 if(pl.pageNumber == -2) { 
 var iconClass = Srch.U.isRTL() ? "ms-srch-pagingPrev" : "ms-srch-pagingNext";
 _#-->
 <div id="PagingImageLink">
 <a id="PageLinkNext" href="#" class="ms-commandLink ms-promlink-button ms-promlink-button-enabled ms-verticalAlignMiddle" title="_#= $htmlEncode(pl.title) =#_" onclick="$getClientControl(this).page(_#= $htmlEncode(pl.startItem) =#_);return Srch.U.cancelEvent(event);">
 <span class="ms-promlink-button-image">
 <img src="_#= $urlHtmlEncode(imagesUrl) =#_" class="_#= $htmlEncode(iconClass) =#_" alt="_#= $htmlEncode(pl.title) =#_" />
 </span>
 </a>
 </div>
 <!--#_ 
 } 
 }
 }

 

Finally, to display the “Total Count” section, I simply re-used the existing SharePoint Search Result controls. Search results uses the “Default Result” template in Control_SearchResults.html.  The Search Results template can be found in your Site SettingsMaster Page Gallery > Display Template > Search folder in your Site Collection.

 <!-- Total item count. -->
<!--#_ 
 if(ctx.ClientControl.get_showResultCount() && ctx.DataProvider.get_totalRows() > 0){ 
 var start = ctx.DataProvider.get_currentQueryState().s;
 var resultsPerPage = ctx.DataProvider.get_resultsPerPage();
 var totalRows = ctx.DataProvider.get_totalRows();
 var countDisplayString = Srch.Res.rs_ApproximateResultCount;
 var exactCount = Srch.Res.rs_ResultCount;
 if (start + resultsPerPage > totalRows) { countDisplayString = (totalRows == 1)? Srch.Res.rs_SingleResultCount : Srch.Res.rs_ResultCount; }
_#-->
 <div id="ResultCount" class="ms-srch-resultscount">
 _#= String.format($htmlEncode(exactCount), $htmlEncode(totalRows.localeFormat("N0"))) =#_ 
 </div>
<!--#_ 
 }

Summary

With this paging functionality, you will be able to quickly know where you are on within the Content Search results. There are much more complicated Paging functionality that are out there, such as the ones with ellipses and multiple page numbers.

This Paging design can give your customers a simple solution to knowing what they are looking at. I have also created a more complex pagination solution in our current SharePoint 2013 environment, but its a hard pill to swallow if you need to conserve real estate. My solution had 11 elements to display a truncated pagination on our Content Search displays.

Advanced Pagniation

More advanced pagination can have up to 13 elements. That’s a lot of real estate for a web part. (img source: http://static.bbci.co.uk/)

 

Full Code

Here is the full code that I used to achieve the simple paging for my Control Template.

<div id="Control_ListWithPaging">

<!--#_ 
 if (!$isNull(ctx.ClientControl) &&
 !$isNull(ctx.ClientControl.shouldRenderControl) &&
 !ctx.ClientControl.shouldRenderControl())
 {
 return "";
 }
 ctx.ListDataJSONGroupsKey = "ResultTables";
 var $noResults = Srch.ContentBySearch.getControlTemplateEncodedNoResultsMessage(ctx.ClientControl);

 var isRollupPageInDisplayMode = Srch.ContentBySearch.isRollupPage(ctx.ClientControl) && !Srch.U.isPageInEditMode();
 var noResultsClassName = isRollupPageInDisplayMode ? "ms-attractMode ms-uppercase ms-alignCenter" : "ms-srch-result-noResults";

 var ListRenderRenderWrapper = function(itemRenderResult, inCtx, tpl)
 {
 var iStr = [];
 iStr.push('<li>');
 iStr.push(itemRenderResult);
 iStr.push('</li>');
 return iStr.join('');
 }
 ctx['ItemRenderWrapper'] = ListRenderRenderWrapper;
_#-->
 <ul class="cbs-List MWS_Control_ListWithPaging">
 _#= ctx.RenderGroups(ctx) =#_
 </ul>
<!--#_

 if (ctx.ClientControl.get_shouldShowNoResultMessage())
 {
_#-->
 <div class="_#= noResultsClassName =#_">_#= $noResults =#_</div>
<!--#_
 }
_#-->

 <!-- Paging Display -->
<!--#_
 if(ctx.ClientControl.get_showPaging()){
 var pagingInfo = ctx.ClientControl.get_pagingInfo();
 var rowsPerPage = ctx.ClientControl.get_numberOfItems();
 var totalRows = ctx.DataProvider.get_totalRows();
 var currentPage = ctx.ClientControl.get_currentPageNumber();
 var totalPages = Math.ceil(totalRows / rowsPerPage);
 var selfLinkId = "SelfLink_";
 var imagesUrl = GetThemedImageUrl('searchresultui.png');
 var pl = '';
 if(!$isEmptyArray(pagingInfo)){ 
_#-->
 <div class="MWS_Control_ListWithPaging_Paging_Wrapper col-xs-6 col-sm-12"> 
 <!--#_ 
 for (var i = 0; i < pagingInfo.length; i++) {
 var pl = pagingInfo[i];
 if(!$isNull(pl)) {
 var imagesUrl = GetThemedImageUrl('searchresultui.png');
 if(pl.startItem == -1 && currentPage != totalPages) { 
 var selfLinkId = "SelfLink_" + pl.pageNumber;
 _#-->
 <div id="PagingSelf">Page _#= $htmlEncode(pl.pageNumber) =#_</div>
 <!--#_ 
 } else if(pl.pageNumber == -1) { 
 var iconClass = Srch.U.isRTL() ? "ms-srch-pagingNext" : "ms-srch-pagingPrev"; 
 _#-->
 <div id="PagingImageLink ">
 <a id="PageLinkPrev" href="#" class="ms-commandLink ms-promlink-button ms-promlink-button-enabled ms-verticalAlignMiddle" title="_#= $htmlEncode(pl.title) =#_" onclick="$getClientControl(this).page(_#= $htmlEncode(pl.startItem) =#_);return Srch.U.cancelEvent(event);">
 <span class="ms-promlink-button-image">
 <img src="_#= $urlHtmlEncode(imagesUrl) =#_" class="_#= $htmlEncode(iconClass) =#_" alt="_#= $htmlEncode(pl.title) =#_" />
 </span>
 </a> 
 </div>
 <!--#_ 
 } else if(pl.pageNumber == -2) { 
 var iconClass = Srch.U.isRTL() ? "ms-srch-pagingPrev" : "ms-srch-pagingNext";
 //Do not display anything.
 } 
 }
 } 
 
 //Display the last page
 if((currentPage != totalPages) && totalPages > 2) {
 _#--> 
 <div id="PagingLink" class="">of _#= $htmlEncode(totalPages) =#_</div> 
 <!--#_
 }else if(currentPage == totalPages){
 _#--> 
 <div id="PagingLink" class="">Page _#= $htmlEncode(totalPages) =#_ of _#= $htmlEncode(totalPages) =#_</div> 
 <!--#_
 } 
 
 
 for (var i = 0; i < pagingInfo.length; i++) {
 var pl = pagingInfo[i];
 if(!$isNull(pl)) {
 var imagesUrl = GetThemedImageUrl('searchresultui.png');
 if(pl.pageNumber == -2) { 
 var iconClass = Srch.U.isRTL() ? "ms-srch-pagingPrev" : "ms-srch-pagingNext";
 _#-->
 <div id="PagingImageLink">
 <a id="PageLinkNext" href="#" class="ms-commandLink ms-promlink-button ms-promlink-button-enabled ms-verticalAlignMiddle" title="_#= $htmlEncode(pl.title) =#_" onclick="$getClientControl(this).page(_#= $htmlEncode(pl.startItem) =#_);return Srch.U.cancelEvent(event);">
 <span class="ms-promlink-button-image">
 <img src="_#= $urlHtmlEncode(imagesUrl) =#_" class="_#= $htmlEncode(iconClass) =#_" alt="_#= $htmlEncode(pl.title) =#_" />
 </span>
 </a>
 </div>
 <!--#_ 
 } 
 }
 } 
 _#-->
 <!-- Total item count. -->
<!--#_ 
 if(ctx.ClientControl.get_showResultCount() && ctx.DataProvider.get_totalRows() > 0){ 
 var start = ctx.DataProvider.get_currentQueryState().s;
 var resultsPerPage = ctx.DataProvider.get_resultsPerPage();
 var totalRows = ctx.DataProvider.get_totalRows();
 var countDisplayString = Srch.Res.rs_ApproximateResultCount;
 var exactCount = Srch.Res.rs_ResultCount;
 if (start + resultsPerPage > totalRows) { countDisplayString = (totalRows == 1)? Srch.Res.rs_SingleResultCount : Srch.Res.rs_ResultCount; }
_#-->
 <div id="ResultCount" class="ms-srch-resultscount">
 _#= String.format($htmlEncode(exactCount), $htmlEncode(totalRows.localeFormat("N0"))) =#_ 
 </div>
<!--#_ 
 } 
_#-->
 </div> <!-- //Close MWS_Control_ListWithPaging_Paging_Wrapper -->
<!--#_ 
 } 
 } 
_#-->

 </div>

Resources

Search Page Refinement Page Mods

documentsearchEver wanted to know how to control that Refinement Panel on your search pages? The out of the box options are OK, but you’re looking for something to take it over the top. With the SharePoint 2010 search Refinement Panel web part, you can add extended find-ability to your content.

You can define how the search refiners are displayed such as sort order, group order, group name, and number of filters to display. Slapping FAST Search on top of your Farm will launch your capabilities into another level….but may also give you some headaches….

I’ve had a request for our Refinement Panel to sort by descending frequency and show over 1000 options. For something like that, I had to create my own groupings with updated attributes. At the end of the day, I had to re-write my own categories and options. But it’s not too difficult if you have the road map to the attributes.

Now, if you’re using FAST Search for SharePoint 2010, then you’re going to have extended capabilities with the Facets. You are able to extend further than just the first 100 items to help define the Facets, which was the case in my site. I’ll leave that details for another post since FAST is a beast in itself.

Here is a list of the common attributes that you’d want to use if you’re ever in the same situation as myself.

Attribute Description
Title A string specifying the filter category title, displayed in the Refinement Panel Web Part.For taxonomy filter categories, use the following titles:

  • The column name for taxonomy filter categories based on columns.
  • Managed Metadata Columns for taxonomy column filter categories that use owsmetadatafacetinfo to display the most appropriate columns.
  • Tags for taxonomy tags filter categories by using owsmetadatafacetinfo to display the generated category.
Description A string specifying the filter category description, displayed as a tooltip in the Refinement Panel Web Part.
Type The type of data that the refinement is based on.Valid values are:

  • Microsoft.Office.Server.Search.WebControls.TaxonomyFilterGenerator  The refinement is based on taxonomy data.
  • Microsoft.Office.Server.Search.WebControls.ManagedPropertyFilterGenerator  The refinement is based on a managed property.
  • Microsoft.Office.Server.Search.WebControls.RankingModelFilterGenerator  The refinement is based on a ranking model.
  • CustomFilterGenerator  The refinement is based on a custom filter generator.
MappedProperty A string specifying the name of the managed property for refinement. For taxonomy columns or tags, specify ows_MetadataFacetInfo. For popular social tags, useows_MetadataFacetInfo,popularsocialtags.
MetadataThreshhold An integer greater than or equal to 1 that specifies the number of results that must contain a value to display the filter generator under the filter category.
NumberOfFiltersToDisplay An integer from 1 to 50 that specifies the number of filters to display in the filter category.
MaxNumberOfFilters An integer that specifies the maximum number of filters to display when the show more link in the Refinement Panel Web Part is clicked. To display all the filters, specify 0 for this attribute.
SortBy Specifies the sort criteria for displaying the filter values in the Refinement Panel Web Part.Valid values are:

  • Frequency
  • NumericValue
  • Name
  • Custom  Displays filters in the order specified in the XML for the Refinement Panel Web Part.
SortDirection Specifies the sort direction for the filter values.Valid values are Ascending or Descending.
SortByForMoreFilters Applies to: Microsoft SharePoint Server 2010 search
Specifies the sort criteria for the filter values when show more link is clicked. This attribute is optional, and if it is not included, the value specified in the SortBy attribute is used as the sort criteria.Valid values are:

  • Frequency
  • Numeric  Requires a range mapping.
  • Name
  • Custom  Displays filters in the order specified in the XML for the Refinement Panel Web Part XML.
SortDirectionForMoreFilters Applies to: Microsoft SharePoint Server 2010 search
Specifies the sort direction for the filter values when the show more link is clicked.Valid values are Ascending or Descending.This attribute is optional, and if it is not included, the value specified in the SortDirection attribute is used instead.
ShowMoreLink Specifies whether to display the show more link in the Refinement Panel Web Part.true to display the link; otherwise, false.
MoreLinkText A string specifying the link text for the show more link.
LessLinkText A string specifying the link text for the show less link.
ShowCounts Specifies whether the count or percentage is displayed with the filter.Valid values are:

  • Count
  • Percentage

You can specify a custom value for this attribute if the XSLT of the Refinement Web Part is customized to handle the custom value.

 

Reference

Making it Snow on SharePoint

snowflakeEvery once in a while I like to bring some additional holiday spirit here to INPO. I saw this as an opportunity to liven up the place a little. Since Georgia doesn’t get as much snow, I decided to bring a little snow to us. I found a plugin that allows me to quickly add snowfall to my SharePoint 2010 site.

To reduce the distraction of flurries falling all over the place, I only added the snow fall to the home page of our site. With a 3rd party jQuery plugins and jQuery 1.7.1, I was able to add the snowy effect.

Granted, this was only added to a single page. You can add this same plugin to your Master Page and get the same effect on every page. I just chose to not have it all over my farm.

Demo

http://www.jqueryrain.com/?LeiRAVGW

 

What you’ll need to make it snow on a page:

  • At LEAST jQuery 1.7.1
  • jQuery Snowing Effect Plugin – by jQueryRain
  • Content Editor Web Part

The first thing you’re going to want to do is add the jQuery file somewhere you can access it from the page you want to add the snow effect on. Or you could use the CDN from Google. You must use at least jQuery 1.7.1 or newer.

When you have your CDN link, add the source code as well as the CDN to the HTML side of the Content Query Web Part. If all goes well, you should start seeing flurries across your screen.

There are options for the snowflake that you can adjust

minSize – min size of snowflake, 10 by default

maxSize – max size of snowflake, 20 by default

newOn – frequency in ms of appearing of new snowflake, 500 by default

flakeColor – color of snowflake, #FFFFFF by default

Source Code

 

<script type=”text/javascript”>

$(document).ready(function() {

var $flake = $('
').css({'position': 'absolute', 'top': '-50px'}).html('❄'),

documentHeight              = $(document).height(), documentWidth               = $(document).width(), defaults                               = { minSize                                : 10, maxSize                               : 20, newOn                 : 500, flakeColor           : "#FFFFFF" },

options  = $.extend({}, defaults, options); var interval = setInterval( function(){

var startPositionLeft   = Math.random() * documentWidth - 100, startOpacity               = 0.5 + Math.random(), sizeFlake                   = options.minSize + Math.random() * options.maxSize, endPositionTop          = documentHeight - 40, endPositionLeft          = startPositionLeft - 100 + Math.random() * 200, durationFall                = documentHeight * 10 + Math.random() * 5000;

$flake.clone().appendTo('body').css( {

left: startPositionLeft, opacity: startOpacity, 'font-size': sizeFlake, color: options.flakeColor

}).animate( {

top: endPositionTop, left: endPositionLeft, opacity: 0.2

},

durationFall, 'linear', function() { $(this).remove() });

}, options.newOn); });

</script>

 

Demo

http://www.jqueryrain.com/?LeiRAVGW

 

References