<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Dave Cavins &#187; SharePoint</title>
	<atom:link href="http://davecavins.com/tag/sharepoint/feed/" rel="self" type="application/rss+xml" />
	<link>http://davecavins.com</link>
	<description>web design, SharePoint customization &#38; random stuff</description>
	<lastBuildDate>Wed, 28 Mar 2012 18:07:27 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>#SharePoint Featured Content Slider Digitally Remastered for #SP2010</title>
		<link>http://davecavins.com/2012/03/sharepoint-featured-content-slider-digitally-remastered-for-sp2010/</link>
		<comments>http://davecavins.com/2012/03/sharepoint-featured-content-slider-digitally-remastered-for-sp2010/#comments</comments>
		<pubDate>Wed, 28 Mar 2012 17:01:01 +0000</pubDate>
		<dc:creator>davecavins</dc:creator>
				<category><![CDATA[General SharePoint]]></category>
		<category><![CDATA[SharePoint Design]]></category>
		<category><![CDATA[content slider]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[SharePoint Designer]]></category>

		<guid isPermaLink="false">http://davecavins.com/?p=671</guid>
		<description><![CDATA[So I rewrote this web part to work a little better in SharePoint 2010. I made a few minor changes and improvements. If you can think of other improvements put them in the comments. Whats new Added an order field to the List template to allow more control of the display order. In the list [...]
Related posts:<ol>
<li><a href='http://davecavins.com/2010/04/anything-slider-in-sharepoint-update/' rel='bookmark' title='Anything Slider in SharePoint &#8211; Update'>Anything Slider in SharePoint &#8211; Update</a></li>
<li><a href='http://davecavins.com/2009/05/dynamic-drive-featured-content-slider-v24-in-sharepoint/' rel='bookmark' title='Dynamic Drive&#8217;s Featured Content Slider in Sharepoint'>Dynamic Drive&#8217;s Featured Content Slider in Sharepoint</a></li>
<li><a href='http://davecavins.com/2010/11/zoomable-photo-grid/' rel='bookmark' title='Zoomable Photo Grid'>Zoomable Photo Grid</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>So I rewrote this web part to work a little better in SharePoint 2010. I made a few minor changes and improvements. If you can think of other improvements put them in the comments.</p>
<h2>Whats new</h2>
<ul>
<li>Added an order field to the List template to allow more control of the display order. In the list template this field is setup to require unique values.</li>
<li>Re-wrote the CSS to include some new CSS3 enhancements. If you are using a newer browser the slider will look better.</li>
<li>Tested across muliple browsers. See screenshots below.</li>
</ul>
<div><span id="more-671"></span></div>
<h2>The Code</h2>
<p>Here is the XSL needed to add the web part to the page.</p>
<pre class="brush: plain; title: ; notranslate">
&lt;XSL&gt;
&lt;xsl:stylesheet xmlns:x=&quot;http://www.w3.org/2001/XMLSchema&quot; xmlns:d=&quot;http://schemas.microsoft.com/sharepoint/dsp&quot; version=&quot;1.0&quot; exclude-result-prefixes=&quot;xsl msxsl ddwrt&quot; xmlns:ddwrt=&quot;http://schemas.microsoft.com/WebParts/v2/DataView/runtime&quot; xmlns:asp=&quot;http://schemas.microsoft.com/ASPNET/20&quot; xmlns:__designer=&quot;http://schemas.microsoft.com/WebParts/v2/DataView/designer&quot; xmlns:xsl=&quot;http://www.w3.org/1999/XSL/Transform&quot; xmlns:msxsl=&quot;urn:schemas-microsoft-com:xslt&quot; xmlns:SharePoint=&quot;Microsoft.SharePoint.WebControls&quot; xmlns:ddwrt2=&quot;urn:frontpage:internal&quot;&gt;
	&lt;xsl:output method=&quot;html&quot; indent=&quot;no&quot;/&gt;
	&lt;xsl:decimal-format NaN=&quot;&quot;/&gt;
	&lt;xsl:param name=&quot;dvt_apos&quot;&gt;'&lt;/xsl:param&gt;
	&lt;xsl:param name=&quot;ManualRefresh&quot;&gt;&lt;/xsl:param&gt;
	&lt;xsl:param name=&quot;dvt_firstrow&quot;&gt;1&lt;/xsl:param&gt;
	&lt;xsl:param name=&quot;dvt_nextpagedata&quot; /&gt;
	&lt;xsl:variable name=&quot;dvt_1_automode&quot;&gt;0&lt;/xsl:variable&gt;

	&lt;xsl:template match=&quot;/&quot; xmlns:x=&quot;http://www.w3.org/2001/XMLSchema&quot; xmlns:d=&quot;http://schemas.microsoft.com/sharepoint/dsp&quot; xmlns:asp=&quot;http://schemas.microsoft.com/ASPNET/20&quot; xmlns:__designer=&quot;http://schemas.microsoft.com/WebParts/v2/DataView/designer&quot; xmlns:SharePoint=&quot;Microsoft.SharePoint.WebControls&quot;&gt;
		&lt;xsl:choose&gt;
			&lt;xsl:when test=&quot;($ManualRefresh = 'True')&quot;&gt;
				&lt;table width=&quot;100%&quot; border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot;&gt;
					&lt;tr&gt;
						&lt;td valign=&quot;top&quot;&gt;
							&lt;xsl:call-template name=&quot;dvt_1&quot;/&gt;
						&lt;/td&gt;
						&lt;td width=&quot;1%&quot; class=&quot;ms-vb&quot; valign=&quot;top&quot;&gt;
							&lt;img src=&quot;/_layouts/images/staticrefresh.gif&quot; id=&quot;ManualRefresh&quot; border=&quot;0&quot; onclick=&quot;javascript: {ddwrt:GenFireServerEvent('__cancel')}&quot; alt=&quot;Click here to refresh the dataview.&quot;/&gt;
						&lt;/td&gt;
					&lt;/tr&gt;
				&lt;/table&gt;
			&lt;/xsl:when&gt;
			&lt;xsl:otherwise&gt;
				&lt;xsl:call-template name=&quot;dvt_1&quot;/&gt;
			&lt;/xsl:otherwise&gt;
		&lt;/xsl:choose&gt;
	&lt;/xsl:template&gt;

	&lt;xsl:template name=&quot;dvt_1&quot;&gt;
		&lt;xsl:variable name=&quot;dvt_StyleName&quot;&gt;Table&lt;/xsl:variable&gt;
		&lt;xsl:variable name=&quot;Rows&quot; select=&quot;/dsQueryResponse/Rows/Row&quot;/&gt;
		&lt;xsl:variable name=&quot;dvt_RowCount&quot; select=&quot;count($Rows)&quot;/&gt;
		&lt;xsl:variable name=&quot;RowLimit&quot; select=&quot;10&quot; /&gt;
		&lt;xsl:variable name=&quot;FirstRow&quot; select=&quot;$dvt_firstrow&quot; /&gt;
		&lt;xsl:variable name=&quot;LastRow&quot; select=&quot;$FirstRow + $dvt_RowCount - 1&quot; /&gt;
		&lt;xsl:variable name=&quot;IsEmpty&quot; select=&quot;$dvt_RowCount = 0&quot; /&gt;
		&lt;xsl:variable name=&quot;dvt_IsEmpty&quot; select=&quot;$dvt_RowCount = 0&quot;/&gt;

		&lt;xsl:choose&gt;
			&lt;xsl:when test=&quot;$dvt_IsEmpty&quot;&gt;
				&lt;xsl:call-template name=&quot;dvt_1.empty&quot;/&gt;
			&lt;/xsl:when&gt;
			&lt;xsl:otherwise&gt;
			&lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;../SiteAssets/contentslider.css&quot;/&gt;
			&lt;script type=&quot;text/javascript&quot; src=&quot;../SiteAssets/contentslider.js&quot;&gt;&lt;/script&gt;
				&lt;div class=&quot;sliderContainer&quot;&gt;
				&lt;div id=&quot;slider1&quot; class=&quot;sliderwrapper&quot;&gt;
					&lt;xsl:call-template name=&quot;dvt_1.body&quot;&gt;
						&lt;xsl:with-param name=&quot;Rows&quot; select=&quot;$Rows&quot;/&gt;
						&lt;xsl:with-param name=&quot;FirstRow&quot; select=&quot;1&quot; /&gt;
						&lt;xsl:with-param name=&quot;LastRow&quot; select=&quot;$LastRow - $FirstRow + 1&quot; /&gt;
					&lt;/xsl:call-template&gt;
				&lt;/div&gt;
				&lt;div id=&quot;paginate-slider1&quot; class=&quot;pagination&quot;&gt;&lt;/div&gt;
				&lt;/div&gt;
				&lt;script type=&quot;text/javascript&quot;&gt;
				featuredcontentslider.init({
				id:&amp;quot;slider1&amp;quot;,
				contentsource:[&amp;quot;inline&amp;quot;,&amp;quot;&amp;quot;],
				toc: &amp;quot;#increment&amp;quot;,
				nextprev:[&amp;quot;Prev&amp;quot;,&amp;quot;Next&amp;quot;],
				enablefade:[true,0.2],
				autorotate:[true,3000],
				onChange: function(previndex,curindex){}
				})
				&lt;/script&gt;
			&lt;/xsl:otherwise&gt;
		&lt;/xsl:choose&gt;
		&lt;xsl:call-template name=&quot;dvt_1.commandfooter&quot;&gt;
			&lt;xsl:with-param name=&quot;FirstRow&quot; select=&quot;$FirstRow&quot; /&gt;
			&lt;xsl:with-param name=&quot;LastRow&quot; select=&quot;$LastRow&quot; /&gt;
			&lt;xsl:with-param name=&quot;RowLimit&quot; select=&quot;$RowLimit&quot; /&gt;
			&lt;xsl:with-param name=&quot;dvt_RowCount&quot; select=&quot;$dvt_RowCount&quot; /&gt;
			&lt;xsl:with-param name=&quot;RealLastRow&quot; select=&quot;number(ddwrt:NameChanged('',-100))&quot; /&gt;
		&lt;/xsl:call-template&gt;
	&lt;/xsl:template&gt;
	&lt;xsl:template name=&quot;dvt_1.body&quot;&gt;
		&lt;xsl:param name=&quot;Rows&quot;/&gt;
		&lt;xsl:param name=&quot;FirstRow&quot; /&gt;
		&lt;xsl:param name=&quot;LastRow&quot; /&gt;
		&lt;xsl:for-each select=&quot;$Rows&quot;&gt;
			&lt;xsl:variable name=&quot;dvt_KeepItemsTogether&quot; select=&quot;false()&quot; /&gt;
			&lt;xsl:variable name=&quot;dvt_HideGroupDetail&quot; select=&quot;false()&quot; /&gt;
			&lt;xsl:if test=&quot;(position() &amp;gt;= $FirstRow and position() &amp;lt;= $LastRow) or $dvt_KeepItemsTogether&quot;&gt;
				&lt;xsl:if test=&quot;not($dvt_HideGroupDetail)&quot; ddwrt:cf_ignore=&quot;1&quot;&gt;
					&lt;xsl:call-template name=&quot;dvt_1.rowview&quot; /&gt;
				&lt;/xsl:if&gt;
			&lt;/xsl:if&gt;
		&lt;/xsl:for-each&gt;

	&lt;/xsl:template&gt;
	&lt;xsl:template name=&quot;dvt_1.rowview&quot;&gt;
		&lt;div class=&quot;contentdiv&quot;&gt;
			&lt;img src=&quot;{@Image}&quot; alt=&quot;{@Title}&quot; align=&quot;left&quot;/&gt;
				&lt;h2&gt;&lt;a href=&quot;{@Link_x0020_URL}&quot;&gt;&lt;xsl:value-of select=&quot;@Title&quot;/&gt;&lt;/a&gt;&lt;/h2&gt;
				&lt;p&gt;&lt;xsl:value-of select=&quot;substring(@Body,1,355)&quot;/&gt;&lt;/p&gt;
				&lt;a class=&quot;readMoreButton&quot; href=&quot;{@Link_x0020_URL}&quot; title=&quot;{@Link_x0020_URL.desc}&quot;&gt;&lt;xsl:value-of select=&quot;@Link_x0020_URL.desc&quot; disable-output-escaping=&quot;yes&quot;/&gt;
				&lt;/a&gt;
		&lt;/div&gt;
	&lt;/xsl:template&gt;
	&lt;xsl:template name=&quot;dvt_1.empty&quot;&gt;
		&lt;xsl:variable name=&quot;dvt_ViewEmptyText&quot;&gt;There are no items to show in this view.&lt;/xsl:variable&gt;
		&lt;table border=&quot;0&quot; width=&quot;100%&quot;&gt;
			&lt;tr&gt;
				&lt;td class=&quot;ms-vb&quot;&gt;
					&lt;xsl:value-of select=&quot;$dvt_ViewEmptyText&quot;/&gt;
				&lt;/td&gt;
			&lt;/tr&gt;
		&lt;/table&gt;
	&lt;/xsl:template&gt;
	&lt;xsl:template name=&quot;dvt_1.commandfooter&quot;&gt;
		&lt;xsl:param name=&quot;FirstRow&quot; /&gt;
		&lt;xsl:param name=&quot;LastRow&quot; /&gt;
		&lt;xsl:param name=&quot;RowLimit&quot; /&gt;
		&lt;xsl:param name=&quot;dvt_RowCount&quot; /&gt;
		&lt;xsl:param name=&quot;RealLastRow&quot; /&gt;
		&lt;table cellspacing=&quot;0&quot; cellpadding=&quot;4&quot; border=&quot;0&quot; width=&quot;100%&quot;&gt;
			&lt;tr&gt;
				&lt;xsl:if test=&quot;$FirstRow &amp;gt; 1 or $dvt_nextpagedata&quot;&gt;
					&lt;xsl:call-template name=&quot;dvt_1.navigation&quot;&gt;
						&lt;xsl:with-param name=&quot;FirstRow&quot; select=&quot;$FirstRow&quot; /&gt;
						&lt;xsl:with-param name=&quot;LastRow&quot; select=&quot;$LastRow&quot; /&gt;
						&lt;xsl:with-param name=&quot;RowLimit&quot; select=&quot;$RowLimit&quot; /&gt;
						&lt;xsl:with-param name=&quot;dvt_RowCount&quot; select=&quot;$dvt_RowCount&quot; /&gt;
						&lt;xsl:with-param name=&quot;RealLastRow&quot; select=&quot;$RealLastRow&quot; /&gt;
					&lt;/xsl:call-template&gt;
				&lt;/xsl:if&gt;
			&lt;/tr&gt;
		&lt;/table&gt;
	&lt;/xsl:template&gt;
	&lt;xsl:template name=&quot;dvt_1.navigation&quot;&gt;
		&lt;xsl:param name=&quot;FirstRow&quot; /&gt;
		&lt;xsl:param name=&quot;LastRow&quot; /&gt;
		&lt;xsl:param name=&quot;RowLimit&quot; /&gt;
		&lt;xsl:param name=&quot;dvt_RowCount&quot; /&gt;
		&lt;xsl:param name=&quot;RealLastRow&quot; /&gt;
		&lt;xsl:variable name=&quot;PrevRow&quot;&gt;
			&lt;xsl:choose&gt;
				&lt;xsl:when test=&quot;$FirstRow - $RowLimit &amp;lt; 1&quot;&gt;1&lt;/xsl:when&gt;
				&lt;xsl:otherwise&gt;
					&lt;xsl:value-of select=&quot;$FirstRow - $RowLimit&quot; /&gt;
				&lt;/xsl:otherwise&gt;
			&lt;/xsl:choose&gt;
		&lt;/xsl:variable&gt;
		&lt;xsl:variable name=&quot;LastRowValue&quot;&gt;
			&lt;xsl:choose&gt;
				&lt;xsl:when test=&quot;$LastRow &amp;gt; $RealLastRow&quot;&gt;
					&lt;xsl:value-of select=&quot;$LastRow&quot;&gt;&lt;/xsl:value-of&gt;
				&lt;/xsl:when&gt;
				&lt;xsl:otherwise&gt;
					&lt;xsl:value-of select=&quot;$RealLastRow&quot;&gt;&lt;/xsl:value-of&gt;
				&lt;/xsl:otherwise&gt;
			&lt;/xsl:choose&gt;
		&lt;/xsl:variable&gt;
		&lt;xsl:variable name=&quot;NextRow&quot;&gt;
			&lt;xsl:value-of select=&quot;$LastRowValue + 1&quot;&gt;&lt;/xsl:value-of&gt;
		&lt;/xsl:variable&gt;
		&lt;td nowrap=&quot;nowrap&quot; class=&quot;ms-paging&quot; align=&quot;right&quot;&gt;
			&lt;xsl:if test=&quot;$dvt_firstrow &amp;gt; 1&quot; ddwrt:cf_ignore=&quot;1&quot;&gt;
				&lt;a&gt;
				&lt;xsl:attribute name=&quot;href&quot;&gt;javascript: &lt;xsl:value-of select=&quot;ddwrt:GenFireServerEvent('dvt_firstrow={1};dvt_startposition={}')&quot; /&gt;;&lt;/xsl:attribute&gt;
				Start&lt;/a&gt;
				&lt;xsl:text disable-output-escaping=&quot;yes&quot; ddwrt:nbsp-preserve=&quot;yes&quot;&gt;&amp;amp;nbsp;&lt;/xsl:text&gt;
				&lt;a&gt;
				&lt;xsl:attribute name=&quot;href&quot;&gt;javascript: history.back();&lt;/xsl:attribute&gt;
				&lt;img src=&quot;/_layouts/images/prev.gif&quot; border=&quot;0&quot; alt=&quot;Previous&quot; /&gt;
				&lt;/a&gt;
				&lt;xsl:text disable-output-escaping=&quot;yes&quot; ddwrt:nbsp-preserve=&quot;yes&quot;&gt;&amp;amp;nbsp;&lt;/xsl:text&gt;
			&lt;/xsl:if&gt;
			&lt;xsl:value-of select=&quot;$FirstRow&quot; /&gt;
			 - &lt;xsl:value-of select=&quot;$LastRowValue&quot; /&gt;
			&lt;xsl:text disable-output-escaping=&quot;yes&quot; ddwrt:nbsp-preserve=&quot;yes&quot; xmlns:ddwrt=&quot;http://schemas.microsoft.com/WebParts/v2/DataView/runtime&quot;&gt;&amp;amp;nbsp;&lt;/xsl:text&gt;

			&lt;xsl:if test=&quot;$LastRowValue &amp;lt; $dvt_RowCount or string-length($dvt_nextpagedata)!=0&quot; ddwrt:cf_ignore=&quot;1&quot;&gt;
				&lt;a&gt;
				&lt;xsl:attribute name=&quot;href&quot;&gt;javascript: &lt;xsl:value-of select=&quot;ddwrt:GenFireServerEvent(concat('dvt_firstrow={',$NextRow,'};dvt_startposition={',$dvt_nextpagedata,'}'))&quot; /&gt;;&lt;/xsl:attribute&gt;
				&lt;img src=&quot;/_layouts/images/next.gif&quot; border=&quot;0&quot; alt=&quot;Next&quot; /&gt;
				&lt;/a&gt;
			&lt;/xsl:if&gt;
		&lt;/td&gt;
	&lt;/xsl:template&gt;
&lt;/xsl:stylesheet&gt;	&lt;/XSL&gt;
</pre>
<ul>
<li><a title="CSS Download" href="http://davecavins.com/wp-content/uploads/2012/03/contentslider.css" target="_blank">CSS (contentslider.css)</a> &#8211; This file will need to be referenced in the page for it to work properly</li>
<li><a title="javascript" href="http://davecavins.com/wp-content/uploads/2012/03/contentslider.js" target="_blank">Javascript (contentslider.js)</a> - This file will need to be referenced in the page for it to work properly</li>
<li><a title="List template" href="http://davecavins.com/wp-content/uploads/2012/03/FeaturedContentList.zip" target="_blank">List Template</a> &#8211; Change the file extension to stp once you download this file.</li>
</ul>
<div>For  instructions on how to set everything up <a title="Old post" href="http://davecavins.com/2009/05/dynamic-drive-featured-content-slider-v24-in-sharepoint/">please see my previous post</a>.  Questions or suggestions? Leave them in the comments.</div>
<h2>Here is what you get</h2>
<p>IE7</p>
<div id="attachment_677" class="wp-caption aligncenter" style="width: 600px"><img class="size-full wp-image-677" title="IE" src="http://davecavins.com/wp-content/uploads/2012/03/IE.jpg" alt="" width="590" height="347" /><p class="wp-caption-text">Internet Explorer 7</p></div>
<p>Google Chrome</p>
<div id="attachment_679" class="wp-caption aligncenter" style="width: 600px"><img class="size-full wp-image-679" title="chrome" src="http://davecavins.com/wp-content/uploads/2012/03/chrome.jpg" alt="" width="590" height="323" /><p class="wp-caption-text">Google Chrome</p></div>
<p>FireFox</p>
<div id="attachment_678" class="wp-caption aligncenter" style="width: 600px"><img class="size-full wp-image-678" title="ff" src="http://davecavins.com/wp-content/uploads/2012/03/ff.jpg" alt="" width="590" height="324" /><p class="wp-caption-text">Mozilla Firefox</p></div>
<p>Related posts:<ol>
<li><a href='http://davecavins.com/2010/04/anything-slider-in-sharepoint-update/' rel='bookmark' title='Anything Slider in SharePoint &#8211; Update'>Anything Slider in SharePoint &#8211; Update</a></li>
<li><a href='http://davecavins.com/2009/05/dynamic-drive-featured-content-slider-v24-in-sharepoint/' rel='bookmark' title='Dynamic Drive&#8217;s Featured Content Slider in Sharepoint'>Dynamic Drive&#8217;s Featured Content Slider in Sharepoint</a></li>
<li><a href='http://davecavins.com/2010/11/zoomable-photo-grid/' rel='bookmark' title='Zoomable Photo Grid'>Zoomable Photo Grid</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://davecavins.com/2012/03/sharepoint-featured-content-slider-digitally-remastered-for-sp2010/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Some thoughts on #SharePoint Adoption</title>
		<link>http://davecavins.com/2011/11/some-thought-on-sharepoint-adoption/</link>
		<comments>http://davecavins.com/2011/11/some-thought-on-sharepoint-adoption/#comments</comments>
		<pubDate>Tue, 08 Nov 2011 18:00:50 +0000</pubDate>
		<dc:creator>davecavins</dc:creator>
				<category><![CDATA[General SharePoint]]></category>
		<category><![CDATA[Random Stuff]]></category>
		<category><![CDATA[adoption]]></category>
		<category><![CDATA[print view]]></category>
		<category><![CDATA[SharePoint]]></category>

		<guid isPermaLink="false">http://davecavins.com/?p=633</guid>
		<description><![CDATA[SharePoint is a powerful tool for collaboration and information sharing. Working on documents, tracking issues, tasks and projects can all be made easier using the tool. In many demos I have seen SharePoint can be used as a complete solution for managing the complete life-cycle of a business process. It all seems so great. In [...]
Related posts:<ol>
<li><a href='http://davecavins.com/2009/12/updating-the-people-picker/' rel='bookmark' title='Updating the #SharePoint People Picker'>Updating the #SharePoint People Picker</a></li>
<li><a href='http://davecavins.com/2010/08/my-first-sharepoint-conference-bpc2010/' rel='bookmark' title='My first #SharePoint Conference #BPC2010'>My first #SharePoint Conference #BPC2010</a></li>
<li><a href='http://davecavins.com/2009/06/corasworks-essentials-training/' rel='bookmark' title='CorasWorks Essentials Training'>CorasWorks Essentials Training</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>SharePoint is a powerful tool for collaboration and information sharing. Working on documents, tracking issues, tasks and projects can all be made easier using the tool. In many demos I have seen SharePoint can be used as a complete solution for managing the complete life-cycle of a business process. It all seems so great.</p>
<p>In the real world of actual organizations (at least in my experience) not everyone is willing or interested in using SharePoint. There are ways to integrate external applications with SharePoint that can create very powerful solutions but in some cases the issues is more than just connecting to other data sources. There are cases where you just need to pull information out of SharePoint for a report to management or for a meeting where you will not have access to your SharePoint site.<span id="more-633"></span></p>
<p>This is one place where things could be made easier. SharePoint does allow users to export content to excel or access for manipulation but in 2007 there was not a very good print view. For instance, if I was to run a search and needed to print the results or manipulate them to generate a report there is not an easy way of doing so. There are some add-ons you can install to make the process easier such as <a title="Metadata Search Web Part " href="http://www.spmetadatasearch.com/print-sharepoint-list-report/" target="_blank">this one</a> from ZenPo Software Innovations.</p>
<p>I think this issue can in some cases help hinder adoption. Users are comfortable with Excel, Word and Outlook and expect to easily transfer information between them. When users are new to SharePoint it’s can be daunting when they hear they are supposed to do all their work in this new tool.</p>
<p>There are several simple ways to help ease the transition.</p>
<ul>
<li>Don’t just focus on SharePoint features in training, also show the user how they can easily transition information from SharePoint into tools they are more comfortable</li>
<li>Exporting to Excel, using the data sheet view to copy/paste from Excel and connecting lists to outlook are all very useful features that can make using SharePoint far more palatable for a novice user.</li>
</ul>
<p>Related posts:<ol>
<li><a href='http://davecavins.com/2009/12/updating-the-people-picker/' rel='bookmark' title='Updating the #SharePoint People Picker'>Updating the #SharePoint People Picker</a></li>
<li><a href='http://davecavins.com/2010/08/my-first-sharepoint-conference-bpc2010/' rel='bookmark' title='My first #SharePoint Conference #BPC2010'>My first #SharePoint Conference #BPC2010</a></li>
<li><a href='http://davecavins.com/2009/06/corasworks-essentials-training/' rel='bookmark' title='CorasWorks Essentials Training'>CorasWorks Essentials Training</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://davecavins.com/2011/11/some-thought-on-sharepoint-adoption/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Simple Search Box with Radio Buttons</title>
		<link>http://davecavins.com/2011/08/simple-search-box-with-radio-buttons/</link>
		<comments>http://davecavins.com/2011/08/simple-search-box-with-radio-buttons/#comments</comments>
		<pubDate>Mon, 22 Aug 2011 14:26:43 +0000</pubDate>
		<dc:creator>davecavins</dc:creator>
				<category><![CDATA[General SharePoint]]></category>
		<category><![CDATA[SharePoint Design]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[search]]></category>
		<category><![CDATA[SharePoint]]></category>

		<guid isPermaLink="false">http://davecavins.com/?p=605</guid>
		<description><![CDATA[So lets say you want users to be able to selectively search content from 3 (or more) different lists (The lists may or may not be on the same site). Out of the Box there is not an easy way to do this. Having the user browse to each list or library and search it [...]
Related posts:<ol>
<li><a href='http://davecavins.com/2009/04/adding-suggestiong-to-the-sharepoint-search-box/' rel='bookmark' title='Adding Suggestions to the Sharepoint search box'>Adding Suggestions to the Sharepoint search box</a></li>
<li><a href='http://davecavins.com/2009/10/suggestions-foto-the-sharepoint-search-box-part-2/' rel='bookmark' title='Adding Suggestions to the Sharepoint search box : Part 2'>Adding Suggestions to the Sharepoint search box : Part 2</a></li>
<li><a href='http://davecavins.com/2009/09/filter-by-date-range/' rel='bookmark' title='Filter Lists by Date Range'>Filter Lists by Date Range</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>So lets say you want users to be able to selectively search content from 3 (or more) different lists (The lists may or may not be on the same site). Out of the Box there is not an easy way to do this.</p>
<ul>
<li>Having the user browse to each list or library and search it specifically</li>
<li>Use the site wide search which will return results from the whole site.</li>
</ul>
<p>You could setup search scopes for each list but if you manage a large number of sites this could become a lot of work to maintain.</p>
<p>So the plan is to build one search box with radio buttons that will let you choose what list or scope you want to query.  Here is how I did it. <span id="more-605"></span></p>
<h2>The HTML</h2>
<p>Here is the basci HTML I used. I have a container div I use for styling, the input box, 3 radio buttons, and a search link.  Things to notice:</p>
<ul>
<li>On the container div I have included javascript to call a function named &#8216;submitSearch&#8217; if the user presses the enter key.  See line 1.</li>
<li>Instead of a submit button I am using a regular link that calls the same function as above.</li>
</ul>
<pre class="brush: xml; title: ; notranslate">&lt;/pre&gt;
&lt;div id=&quot;multisearch&quot; onkeydown=&quot;javascript:if (event.keyCode == 13) submitSearch();&quot;&gt;&lt;input id=&quot;search_txt&quot; title=&quot;Enter search words&quot; type=&quot;text&quot; name=&quot;k&quot; maxlength=&quot;200&quot; /&gt;
&lt;label for=&quot;all&quot;&gt;
&lt;input id=&quot;all&quot; type=&quot;radio&quot; name=&quot;radiou&quot; value=&quot;http://myurl.com/sites/SharePoint&quot; checked=&quot;checked&quot; /&gt;
All
&lt;/label&gt;
&lt;label for=&quot;posts&quot;&gt;
&lt;input id=&quot;posts&quot; type=&quot;radio&quot; name=&quot;radiou&quot; value=&quot;http://myurl.com/sites/SharePoint/Lists/Tasks&quot; /&gt;
Tasks
&lt;/label&gt;
&lt;label for=&quot;disc&quot;&gt;
&lt;input id=&quot;disc&quot; type=&quot;radio&quot; name=&quot;radiou&quot; value=&quot;http://myurl.com/sites/SharePoint/Lists/Discussion&quot; /&gt;
Discussions&lt;/label&gt;&lt;/div&gt;
&lt;pre&gt;
Search
</pre>
<h2>JavaScript</h2>
<p>Because we cannot include an actual form in the page and I did not want to use a page viewer web part for this solution we will use JavaScript to submit the values from the search box.  I am using  jQuery as usual.  To keep it simple the function checks the value of the selected radio button, if it is the url of the current site the search is run using the &#8216;This Site&#8217; scope. Otherwise the search uses the scope that is defined by the value of the radio button and the &#8216;This List&#8217; scope.</p>
<p>See the comments in the code for more information.</p>
<pre class="brush: jscript; title: ; notranslate">
// include jquery
&lt;script type=&quot;text/javascript&quot; src=&quot;https://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js&quot;&gt;// &lt;![CDATA[

// ]]&gt;&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot; language=&quot;JavaScript&quot;&gt;// &lt;![CDATA[
function submitSearch()
{
// If the all radio button is selected search everything on the site
if(the_value = &lt;a href=&quot;http://myurl.com/sites/SharePoint&quot;&gt;http://myurl.com/sites/SharePoint&lt;/a&gt;){
//set the search terms to the value ofthe text box
queryVal = $('#search_txt').val();
the_value = $('input[name=&quot;radiou&quot;]:checked', '#multisearch').val();
//build the url with the url of the search page, the search terms and search scope and browse to it
window.parent.location='search.aspx?k=' + queryVal + '&amp;u=' + the_value + '&amp;cs=This Site';
}
else {
// get the search terrm from the text box
queryVal = $('#search_txt').val();
// Use the radio button value as the url for the search scope
the_value = $('input[name=&quot;radiou&quot;]:checked', '#multisearch2').val();
//build the url with the url of the search page, the search terms and search scope and browse to it
window.parent.location='search.aspx?k=' + queryVal + '&amp;u=' + the_value + '&amp;cs=This List'; } };
// ]]&gt;&lt;/script&gt;
</pre>
<h2>Using the query string</h2>
<p>Like most search engines SharePoint uses the query string to pass the information you want to search for.  A quick look at the search results page tells us what we need to send in order to get the results we need.  The rest is just simple JavaScript. In the code above you can see how I built the query string using the various elements.</p>
<div id="attachment_619" class="wp-caption alignnone" style="width: 450px"><a href="http://davecavins.com/wp-content/uploads/2011/08/search.jpg"><img class="size-full wp-image-619" title="search" src="http://davecavins.com/wp-content/uploads/2011/08/search.jpg" alt="" width="440" height="210" /></a><p class="wp-caption-text">Disceting the Query String</p></div>
<h2>All together now</h2>
<pre class="brush: xml; title: ; notranslate">
&lt;script type=&quot;text/javascript&quot; src=&quot;https://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js&quot;&gt;&lt;/script&gt;&lt;script type=&quot;text/javascript&quot; language=&quot;JavaScript&quot;&gt;// &lt;![CDATA[
 function submitSearch() { if(the_value = &quot;http://myurl.com/sites/SharePoint&quot;){ queryVal = $('#search_txt').val(); the_value = $('input[name=&quot;radiou&quot;]:checked', '#multisearch').val(); window.parent.location='search.aspx?k=' + queryVal + '&amp;u=' + the_value + '&amp;cs=This Site'; } else { queryVal = $('#search_txt').val(); the_value = $('input[name=&quot;radiou&quot;]:checked', '#multisearch2').val(); window.parent.location='search.aspx?k=' + queryVal + '&amp;u=' + the_value + '&amp;cs=This List'; } };
// ]]&gt;&lt;/script&gt;&lt;/pre&gt;
&lt;div id=&quot;multisearch&quot; onkeydown=&quot;javascript:if (event.keyCode == 13) submitSearch();&quot;&gt;&lt;input id=&quot;search_txt&quot; title=&quot;Enter search words&quot; type=&quot;text&quot; name=&quot;k&quot; maxlength=&quot;200&quot; /&gt;
&lt;label for=&quot;all&quot;&gt;
&lt;input id=&quot;all&quot; type=&quot;radio&quot; name=&quot;radiou&quot; value=&quot;http://myurl.com/sites/SharePoint&quot; checked=&quot;checked&quot; /&gt;
All
&lt;/label&gt;
&lt;label for=&quot;posts&quot;&gt;
&lt;input id=&quot;posts&quot; type=&quot;radio&quot; name=&quot;radiou&quot; value=&quot;http://myurl.com/sites/SharePoint/Lists/Tasks&quot; /&gt;
Tasks
&lt;/label&gt;
&lt;label for=&quot;disc&quot;&gt;
&lt;input id=&quot;disc&quot; type=&quot;radio&quot; name=&quot;radiou&quot; value=&quot;http://myurl.com/sites/SharePoint/Lists/Discussion&quot; /&gt;
Discussions&lt;/label&gt;&lt;/div&gt;
Search
</pre>
<p><img class="alignnone size-full wp-image-666" title="search" src="http://davecavins.com/wp-content/uploads/2011/08/search1.jpg" alt="" width="533" height="92" /></p>
<h2>Search Results</h2>
<p>In the code above you will notice I am passing the search term to a page called search.aspx. This is a page I created by adding the search web parts. I used my own search results page because I wanted to have control of the look and feel. You could also send the results to a search center site or the out of the box search page (_layouts/OSSSearchResults.aspx), this might be different in 2010.</p>
<h2>Useful Resouces</h2>
<ul>
<li><a title="Getting Started with jQuery" href="http://www.sharepointhillbilly.com/archive/2011/07/28/a-dummies-guide-to-sharepoint-and-jqueryndashgetting-started.aspx" target="_blank">Getting started with jQuery</a></li>
<li><a title="How to create Custom Search and Results page" href="http://www.metaoption.com/pages/ContentReader.aspx?eqs=9C6CB26346D187F57D7E44E63BE6EC07B460E04D484E258910385B4CDC9A3D25" target="_blank">How to create Custom Search and Results page</a></li>
</ul>
<p>Related posts:<ol>
<li><a href='http://davecavins.com/2009/04/adding-suggestiong-to-the-sharepoint-search-box/' rel='bookmark' title='Adding Suggestions to the Sharepoint search box'>Adding Suggestions to the Sharepoint search box</a></li>
<li><a href='http://davecavins.com/2009/10/suggestions-foto-the-sharepoint-search-box-part-2/' rel='bookmark' title='Adding Suggestions to the Sharepoint search box : Part 2'>Adding Suggestions to the Sharepoint search box : Part 2</a></li>
<li><a href='http://davecavins.com/2009/09/filter-by-date-range/' rel='bookmark' title='Filter Lists by Date Range'>Filter Lists by Date Range</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://davecavins.com/2011/08/simple-search-box-with-radio-buttons/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Zoomable Photo Grid</title>
		<link>http://davecavins.com/2010/11/zoomable-photo-grid/</link>
		<comments>http://davecavins.com/2010/11/zoomable-photo-grid/#comments</comments>
		<pubDate>Tue, 23 Nov 2010 16:05:54 +0000</pubDate>
		<dc:creator>davecavins</dc:creator>
				<category><![CDATA[SharePoint Design]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[photo grid]]></category>
		<category><![CDATA[SharePoint]]></category>

		<guid isPermaLink="false">http://davecavins.com/?p=538</guid>
		<description><![CDATA[I started on this post back in July and I am just getting around to publishing it. The out of the box SharePoint image library is nice and offers lots of options for viewing the images. However as more and more sites begin to use jQuery plugins and other methods for presentation the SharePoint views seem [...]
Related posts:<ol>
<li><a href='http://davecavins.com/2010/04/anything-slider-in-sharepoint-update/' rel='bookmark' title='Anything Slider in SharePoint &#8211; Update'>Anything Slider in SharePoint &#8211; Update</a></li>
<li><a href='http://davecavins.com/2009/12/css-tricks-anythingslider-in-sharepoint/' rel='bookmark' title='CSS-Tricks AnythingSlider in SharePoint'>CSS-Tricks AnythingSlider in SharePoint</a></li>
<li><a href='http://davecavins.com/2012/03/sharepoint-featured-content-slider-digitally-remastered-for-sp2010/' rel='bookmark' title='#SharePoint Featured Content Slider Digitally Remastered for #SP2010'>#SharePoint Featured Content Slider Digitally Remastered for #SP2010</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>I started on this post back in July and I am just getting around to publishing it.</p>
<p>The out of the box SharePoint image library is nice and offers lots of options for viewing the images. However as more and more sites begin to use jQuery plugins and other methods for presentation the SharePoint views seem limited at best.</p>
<p>A few weeks ago while doing some random browsing I found <a href="http://www.gethifi.com/demos/jphotogrid" target="_blank">this</a> photo grid plugin and decided to try to implement it in SharePoint, here is how I did it.</p>
<p><span id="more-538"></span></p>
<h3>Add links and scripts to the page</h3>
<pre class="brush: xml; title: ; notranslate">
&lt;script src=&quot;http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js&quot;&gt;&lt;/script&gt;
&lt;script src=&quot;jphotogrid.js&quot;&gt;&lt;/script&gt;
/* Setup.js is where you can change settings for the plugin*/
&lt;script src=&quot;setup.js&quot;&gt;&lt;/script&gt;
&lt;link href=&quot;jphotogrid.css&quot; rel=&quot;stylesheet&quot; media=&quot;screen&quot; /&gt;
&lt;!--[if IE]&gt;
&lt;link href=&quot;jphotogrid.ie.css&quot; rel=&quot;stylesheet&quot; media=&quot;screen&quot; /&gt;
&lt;![endif]--&gt;
</pre>
<h3>XSL Code</h3>
<p>This is the easy part.  Each image is wrapped in an &lt;li&gt;tag.  The unordered list has an id of &#8220;pg&#8221; that is used to call the script. The caption for each item is wraped in a &lt;p&gt; tag.  The rest is handled by javascript.</p>
<pre class="brush: plain; title: ; notranslate">

&lt;Xsl&gt;
&lt;xsl:stylesheet xmlns:x=&quot;&lt;a href=&quot;http://www.w3.org/2001/XMLSchema&quot;&gt;http://www.w3.org/2001/XMLSchema&lt;/a&gt;&quot; xmlns:d=&quot;&lt;a href=&quot;http://schemas.microsoft.com/sharepoint/dsp&quot;&gt;http://schemas.microsoft.com/sharepoint/dsp&lt;/a&gt;&quot; version=&quot;1.0&quot; exclude-result-prefixes=&quot;xsl msxsl ddwrt&quot; xmlns:ddwrt=&quot;&lt;a href=&quot;http://schemas.microsoft.com/WebParts/v2/DataView/runtime&quot;&gt;http://schemas.microsoft.com/WebParts/v2/DataView/runtime&lt;/a&gt;&quot; xmlns:asp=&quot;&lt;a href=&quot;http://schemas.microsoft.com/ASPNET/20&quot;&gt;http://schemas.microsoft.com/ASPNET/20&lt;/a&gt;&quot; xmlns:__designer=&quot;&lt;a href=&quot;http://schemas.microsoft.com/WebParts/v2/DataView/designer&quot;&gt;http://schemas.microsoft.com/WebParts/v2/DataView/designer&lt;/a&gt;&quot; xmlns:xsl=&quot;&lt;a href=&quot;http://www.w3.org/1999/XSL/Transform&quot;&gt;http://www.w3.org/1999/XSL/Transform&lt;/a&gt;&quot; xmlns:msxsl=&quot;urn:schemas-microsoft-com:xslt&quot; xmlns:SharePoint=&quot;Microsoft.SharePoint.WebControls&quot; xmlns:ddwrt2=&quot;urn:frontpage:internal&quot;&gt;
&lt;xsl:output method=&quot;html&quot; indent=&quot;no&quot;/&gt;
&lt;xsl:decimal-format NaN=&quot;&quot;/&gt;
&lt;xsl:param&gt;'&lt;/xsl:param&gt;
&lt;xsl:variable&gt;0&lt;/xsl:variable&gt;
&lt;xsl:template match=&quot;/&quot; xmlns:x=&quot;&lt;a href=&quot;http://www.w3.org/2001/XMLSchema&quot;&gt;http://www.w3.org/2001/XMLSchema&lt;/a&gt;&quot; xmlns:d=&quot;&lt;a href=&quot;http://schemas.microsoft.com/sharepoint/dsp&quot;&gt;http://schemas.microsoft.com/sharepoint/dsp&lt;/a&gt;&quot; xmlns:asp=&quot;&lt;a href=&quot;http://schemas.microsoft.com/ASPNET/20&quot;&gt;http://schemas.microsoft.com/ASPNET/20&lt;/a&gt;&quot; xmlns:__designer=&quot;&lt;a href=&quot;http://schemas.microsoft.com/WebParts/v2/DataView/designer&quot;&gt;http://schemas.microsoft.com/WebParts/v2/DataView/designer&lt;/a&gt;&quot; xmlns:SharePoint=&quot;Microsoft.SharePoint.WebControls&quot;&gt;
&lt;xsl:call-template/&gt;
&lt;/xsl:template&gt;
&lt;xsl:template&gt;
&lt;xsl:variable&gt;BulTitl&lt;/xsl:variable&gt;
&lt;xsl:variable select=&quot;/dsQueryResponse/Rows/Row&quot; /&gt;
&lt;ul&gt;
&lt;xsl:call-template&gt;
&lt;xsl:with-param select=&quot;$Rows&quot; /&gt;
&lt;/xsl:call-template&gt;
&lt;/ul&gt;
&lt;/xsl:template&gt;
&lt;xsl:template&gt;
&lt;xsl:param /&gt;
&lt;xsl:for-each select=&quot;$Rows&quot;&gt;
&lt;xsl:call-template /&gt;
&lt;/xsl:for-each&gt;
&lt;/xsl:template&gt;
&lt;xsl:template&gt;
&lt;li&gt;
&lt;img border=&quot;0&quot; src=&quot;{@FileRef}&quot; alt=&quot;&lt;a href=&quot;mailto:{@Title&quot;&gt;{@Title&lt;/a&gt;}&quot; /&gt;
&lt;p&gt;&lt;a href=&quot;mailto:{@Title&quot;&gt;{@Title&lt;/a&gt;}&lt;/p&gt;
&lt;/li&gt;&lt;/xsl:template&gt;
&lt;/xsl:stylesheet&gt;&lt;/Xsl&gt;
</pre>
<p>I had some issues with the caption not displaying propely in IE7 but I did not have the time to find a fix.  Its always best to resize your images before you load them into SharePoint but if for some reason you don&#8217;t the plugin forces them to be the right size so vertical images may be stretched. Overall this solution would only work well in specific situations that require this type of functionality.  If you have questions feel free to comment.</p>
<h3>Resources</h3>
<ul>
<li>Zoomable Photo Grid <a href="http://www.gethifi.com/demos/jphotogrid">http://www.gethifi.com/demos/jphotogrid</a></li>
<li>jQuery</li>
</ul>
<p>Related posts:<ol>
<li><a href='http://davecavins.com/2010/04/anything-slider-in-sharepoint-update/' rel='bookmark' title='Anything Slider in SharePoint &#8211; Update'>Anything Slider in SharePoint &#8211; Update</a></li>
<li><a href='http://davecavins.com/2009/12/css-tricks-anythingslider-in-sharepoint/' rel='bookmark' title='CSS-Tricks AnythingSlider in SharePoint'>CSS-Tricks AnythingSlider in SharePoint</a></li>
<li><a href='http://davecavins.com/2012/03/sharepoint-featured-content-slider-digitally-remastered-for-sp2010/' rel='bookmark' title='#SharePoint Featured Content Slider Digitally Remastered for #SP2010'>#SharePoint Featured Content Slider Digitally Remastered for #SP2010</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://davecavins.com/2010/11/zoomable-photo-grid/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>#BCP2010 Part 1</title>
		<link>http://davecavins.com/2010/08/bcp2010-part-1/</link>
		<comments>http://davecavins.com/2010/08/bcp2010-part-1/#comments</comments>
		<pubDate>Tue, 31 Aug 2010 18:00:59 +0000</pubDate>
		<dc:creator>davecavins</dc:creator>
				<category><![CDATA[General SharePoint]]></category>
		<category><![CDATA[BCP2010]]></category>
		<category><![CDATA[SharePoint]]></category>

		<guid isPermaLink="false">http://davecavins.com/?p=564</guid>
		<description><![CDATA[I meant to post this last week during the conference but I was too busy or too tired to do so. So the conference started off with an hour long keynote presentation that began with short a welcome from Bill English from Mindsharp. The welcome was follow by an hour long advertisement for Microsoft&#8217;s SharePoint [...]
Related posts:<ol>
<li><a href='http://davecavins.com/2010/08/my-first-sharepoint-conference-bpc2010/' rel='bookmark' title='My first #SharePoint Conference #BPC2010'>My first #SharePoint Conference #BPC2010</a></li>
<li><a href='http://davecavins.com/2009/12/updating-the-people-picker/' rel='bookmark' title='Updating the #SharePoint People Picker'>Updating the #SharePoint People Picker</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>I meant to post this last week during the conference but I was too busy or too tired to do so.</p>
<p>So the conference started off with an hour long keynote presentation that began with short a welcome from Bill English from Mindsharp. The welcome was follow by an hour long advertisement for Microsoft&#8217;s SharePoint MCM program. Various MCM&#8217;s came up and talked about how great the program is and how much smarter they are as a result of attending it.</p>
<p>Overall this session was somewhat interesting but for the most part I don&#8217;t feel that it really applied to most of the audience of the conference. There are only 24 slots available for the MCM course each quarter and the training is rather expensive ($30k). Needless to say I would not have felt bad if I had come late.</p>
<p>The rest of the day I attended sessions by various presenters mainly focused on the new features in SharePoint 2010. I wish there had been more sessions focused on MOSS 2007 or just general best practices because although the presentations were interesting I know it will be quite some time before I will get to use SP2010 at work.<br />
This was my first conference and it felt good to be able to learn so much from others and talk to people who are working with the same tools. I was glad to see such a diverse group of people including developers, administrators, project managers and other users.</p>
<p>You can read <a href="http://veroniquepalmer.wordpress.com/2010/08/31/sharepoint-best-practices-conference-the-rock-stars/">more discussion about #BPC2010 here. </a></p>
<p>I’ll write more later but right now it’s time to get back to work.</p>
<p>Related posts:<ol>
<li><a href='http://davecavins.com/2010/08/my-first-sharepoint-conference-bpc2010/' rel='bookmark' title='My first #SharePoint Conference #BPC2010'>My first #SharePoint Conference #BPC2010</a></li>
<li><a href='http://davecavins.com/2009/12/updating-the-people-picker/' rel='bookmark' title='Updating the #SharePoint People Picker'>Updating the #SharePoint People Picker</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://davecavins.com/2010/08/bcp2010-part-1/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>My first #SharePoint Conference #BPC2010</title>
		<link>http://davecavins.com/2010/08/my-first-sharepoint-conference-bpc2010/</link>
		<comments>http://davecavins.com/2010/08/my-first-sharepoint-conference-bpc2010/#comments</comments>
		<pubDate>Tue, 24 Aug 2010 15:16:45 +0000</pubDate>
		<dc:creator>davecavins</dc:creator>
				<category><![CDATA[General SharePoint]]></category>
		<category><![CDATA[SharePoint]]></category>

		<guid isPermaLink="false">http://davecavins.com/?p=559</guid>
		<description><![CDATA[So I am at the Best Practices Conference here in Reston VA. I am going to try to post about what I learn and some of my opinions on the conference as a whole.  This is my first time attending a SharePoint Conference so it should be interesting.   I hope to learn a lot about [...]
Related posts:<ol>
<li><a href='http://davecavins.com/2010/08/bcp2010-part-1/' rel='bookmark' title='#BCP2010 Part 1'>#BCP2010 Part 1</a></li>
<li><a href='http://davecavins.com/2011/03/spd-custom-activities-risks/' rel='bookmark' title='#SharePoint Designer Custom Activities Risky?'>#SharePoint Designer Custom Activities Risky?</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>So I am at the Best Practices Conference here in Reston VA. I am going to try to post about what I learn and some of my opinions on the conference as a whole.  This is my first time attending a SharePoint Conference so it should be interesting.   I hope to learn a lot about both 2007 and 2010.</p>
<p>Most best practices information I have read before has been pretty good but because of the many uses ad types of SharePoint deployments it seems to be very difficult to establish many best practices that will always be true no matter the size or type of your deployment.</p>
<p>Related posts:<ol>
<li><a href='http://davecavins.com/2010/08/bcp2010-part-1/' rel='bookmark' title='#BCP2010 Part 1'>#BCP2010 Part 1</a></li>
<li><a href='http://davecavins.com/2011/03/spd-custom-activities-risks/' rel='bookmark' title='#SharePoint Designer Custom Activities Risky?'>#SharePoint Designer Custom Activities Risky?</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://davecavins.com/2010/08/my-first-sharepoint-conference-bpc2010/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A Better Annoucements Ticker</title>
		<link>http://davecavins.com/2010/08/a-better-annoucements-ticker/</link>
		<comments>http://davecavins.com/2010/08/a-better-annoucements-ticker/#comments</comments>
		<pubDate>Wed, 04 Aug 2010 21:08:14 +0000</pubDate>
		<dc:creator>davecavins</dc:creator>
				<category><![CDATA[General SharePoint]]></category>
		<category><![CDATA[SharePoint Design]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[Data View Web Part]]></category>
		<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[SharePoint Designer]]></category>
		<category><![CDATA[ticker]]></category>
		<category><![CDATA[xsl]]></category>

		<guid isPermaLink="false">http://davecavins.com/?p=540</guid>
		<description><![CDATA[A while back I did a post about how to make a vertical news ticker, in the comments several people pointed out problems with the code so I decided to write a better version of the code. Here it is. For this ticker I started out with a default Annoucements list. Because I wanted to [...]
Related posts:<ol>
<li><a href='http://davecavins.com/2010/11/zoomable-photo-grid/' rel='bookmark' title='Zoomable Photo Grid'>Zoomable Photo Grid</a></li>
<li><a href='http://davecavins.com/2010/04/anything-slider-in-sharepoint-update/' rel='bookmark' title='Anything Slider in SharePoint &#8211; Update'>Anything Slider in SharePoint &#8211; Update</a></li>
<li><a href='http://davecavins.com/2009/12/css-tricks-anythingslider-in-sharepoint/' rel='bookmark' title='CSS-Tricks AnythingSlider in SharePoint'>CSS-Tricks AnythingSlider in SharePoint</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>A while back I did a post about <a href="http://davecavins.com/2009/11/sharepoint-vertical-news-ticker/">how to make a vertical news ticker</a>, in the comments several people pointed out problems with the code so I decided to write a better version of the code. Here it is.</p>
<div id="attachment_550" class="wp-caption alignnone" style="width: 466px"><a href="http://davecavins.com/wp-content/uploads/2010/08/ticker.jpg"><img class="size-full wp-image-550   " title="ticker" src="http://davecavins.com/wp-content/uploads/2010/08/ticker.jpg" alt="" width="456" height="447" /></a><p class="wp-caption-text">New Ticker</p></div>
<p>For this ticker I started out with a default Annoucements list. Because I wanted to display a thumbnail for each annoucement I added a signle line of text column called <strong>Subtitle </strong>and a Picture column called <strong>Picture</strong>. Here are the columns I used.<br />
<img class="alignnone size-full wp-image-546" title="columns" src="http://davecavins.com/wp-content/uploads/2010/07/columns.jpg" alt="List Columns" width="399" height="221" /></p>
<p><span id="more-540"></span>Here is the basic structure of the ticker.</p>
<pre class="brush: plain; title: ; notranslate">
&lt;div id=&quot;actions&quot;&gt;
&lt;a class=&quot;prev&quot;&gt;« Back&lt;/a&gt;	&lt;a class=&quot;next&quot;&gt;More pictures »&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;scrollable vertical&quot;&gt;
    &lt;div class=&quot;items&quot;&gt;
      &lt;div class=&quot;item&quot;&gt;
           &lt;img src=&quot;#&quot; alt=&quot;Thumbnail Image&quot; /&gt;
           &lt;h3&gt;Title&lt;/h3&gt;
          &lt;strong&gt;
              &lt;span&gt;Subtitle Text&lt;/span&gt;
          &lt;/strong&gt;
        &lt;p&gt;First 200 Characters of the body&lt;/p&gt;
       &lt;p&gt;&lt;a href=&quot;#&quot;&gt;Read more&lt;/a&gt;&lt;/p&gt;
    &lt;/div&gt;
   &lt;/div&gt;
&lt;/div&gt;
</pre>
<p>Below is the xsl code I used to build the ticker.</p>
<pre class="brush: plain; title: ; notranslate">

&lt;Xsl&gt;
&lt;xsl:stylesheet xmlns:x=&quot;http://www.w3.org/2001/XMLSchema&quot; xmlns:d=&quot;http://schemas.microsoft.com/sharepoint/dsp&quot; version=&quot;1.0&quot; exclude-result-prefixes=&quot;xsl msxsl ddwrt&quot; xmlns:ddwrt=&quot;http://schemas.microsoft.com/WebParts/v2/DataView/runtime&quot; xmlns:asp=&quot;http://schemas.microsoft.com/ASPNET/20&quot; xmlns:__designer=&quot;http://schemas.microsoft.com/WebParts/v2/DataView/designer&quot; xmlns:xsl=&quot;http://www.w3.org/1999/XSL/Transform&quot; xmlns:msxsl=&quot;urn:schemas-microsoft-com:xslt&quot; xmlns:SharePoint=&quot;Microsoft.SharePoint.WebControls&quot; xmlns:ddwrt2=&quot;urn:frontpage:internal&quot;&gt;
	&lt;xsl:output method=&quot;html&quot; indent=&quot;no&quot;/&gt;
	&lt;xsl:decimal-format NaN=&quot;&quot;/&gt;
				&lt;xsl:param name=&quot;dvt_apos&quot;&gt;'&lt;/xsl:param&gt;
				&lt;xsl:param name=&quot;url_PATH_INFO&quot; /&gt;
				&lt;xsl:param name=&quot;url_HTTP_HOST&quot; /&gt;
	&lt;xsl:param name=&quot;Today&quot;&gt;CurrentDate&lt;/xsl:param&gt;
				&lt;xsl:variable name=&quot;dvt_1_automode&quot;&gt;0&lt;/xsl:variable&gt;
				&lt;xsl:template match=&quot;/&quot; xmlns:x=&quot;http://www.w3.org/2001/XMLSchema&quot; xmlns:d=&quot;http://schemas.microsoft.com/sharepoint/dsp&quot; xmlns:asp=&quot;http://schemas.microsoft.com/ASPNET/20&quot; xmlns:__designer=&quot;http://schemas.microsoft.com/WebParts/v2/DataView/designer&quot; xmlns:SharePoint=&quot;Microsoft.SharePoint.WebControls&quot;&gt;
					&lt;xsl:call-template name=&quot;dvt_1&quot;/&gt;
	&lt;/xsl:template&gt;
				&lt;xsl:template name=&quot;dvt_1&quot;&gt;
					&lt;xsl:variable name=&quot;dvt_StyleName&quot;&gt;Table&lt;/xsl:variable&gt;
					&lt;xsl:variable name=&quot;Rows&quot; select=&quot;/dsQueryResponse/Rows/Row&quot;/&gt;
						&lt;script&gt;
$(function() {
	$(&quot;.scrollable&quot;).scrollable({ vertical: true, mousewheel: true, circular: true, keyboard: true });
// scrollable has to match the class on the div you use to wrap your items.
});
&lt;/script&gt; &lt;div id=&quot;actions&quot;&gt;
	&lt;a class=&quot;prev&quot;&gt;« Back&lt;/a&gt;
	&lt;a class=&quot;next&quot;&gt;More pictures »&lt;/a&gt;
&lt;/div&gt;
		&lt;div class=&quot;scrollable vertical&quot;&gt;
		&lt;div class=&quot;items&quot;&gt;
			&lt;xsl:call-template name=&quot;dvt_1.body&quot;&gt;
				&lt;xsl:with-param name=&quot;Rows&quot; select=&quot;$Rows&quot;/&gt;
			&lt;/xsl:call-template&gt;
			&lt;/div&gt;
			&lt;/div&gt;
	&lt;/xsl:template&gt;
				&lt;xsl:template name=&quot;dvt_1.body&quot;&gt;
					&lt;xsl:param name=&quot;Rows&quot;/&gt;
					&lt;xsl:for-each select=&quot;$Rows&quot;&gt;
						&lt;xsl:call-template name=&quot;dvt_1.rowview&quot;/&gt;
		&lt;/xsl:for-each&gt;
	&lt;/xsl:template&gt;
		&lt;xsl:template name=&quot;dvt_1.rowview&quot;&gt;
		&lt;div class=&quot;item&quot;&gt;
		&lt;xsl:if test=&quot;not(normalize-space(@Picture) = '')&quot;&gt;&lt;img src=&quot;{substring-before(@Picture,',')}&quot; /&gt;&lt;/xsl:if&gt;
		&lt;h3&gt;&lt;xsl:value-of select=&quot;@Title&quot;/&gt;&lt;/h3&gt;

				&lt;strong&gt;
		&lt;xsl:if test=&quot;not(normalize-space(@SubTitle) = '')&quot;&gt;&lt;span&gt;&lt;xsl:value-of select=&quot;@SubTitle &quot; disable-output-escaping=&quot;yes&quot; /&gt;&lt;/span&gt;&lt;/xsl:if&gt;
		&lt;/strong&gt;

				&lt;p&gt;&lt;xsl:value-of select=&quot;substring(@Body,0,200)&quot; disable-output-escaping=&quot;yes&quot; /&gt;&lt;/p&gt;
				&lt;p&gt;&lt;a href=&quot;http://{$url_HTTP_HOST}/{@FileDirRef}/DispForm.aspx?id={@ID}&quot;&gt;Read more&lt;/a&gt;&lt;/p&gt;
		&lt;/div&gt;
	&lt;/xsl:template&gt;
&lt;/xsl:stylesheet&gt;&lt;/Xsl&gt;
</pre>
<p>If you try to run the page with just this XSL it will give an error. You will also need to add these two lines to the parameter bindings section of your dataview web part. I used these 2 parameters to get the URL of the current page in order to built the &#8216;read more&#8217; link. This is what I would call a best practice because other wise you would have to hard code the URL to your site which makes it harder for others to use your code.</p>
<pre class="brush: plain; title: ; notranslate">
&lt;ParameterBinding Name=&quot;url_PATH_INFO&quot; Location=&quot;ServerVariable(PATH_INFO)&quot; DefaultValue=&quot;&quot;/&gt;&lt;ParameterBinding Name=&quot;url_HTTP_HOST&quot; Location=&quot;ServerVariable(HTTP_HOST)&quot; DefaultValue=&quot;&quot;/&gt;
</pre>
<p>In addition to this code you will also need to add links to these two files.</p>
<pre class="brush: plain; title: ; notranslate">
&lt;script src=&quot;http://cdn.jquerytools.org/1.2.3/jquery.tools.min.js&quot;&gt;&lt;/script&gt;
/* css file to style the ticker */
&lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;scroll.css&quot; /&gt;
</pre>
<p>Here is the css I used to style my ticker.</p>
<pre class="brush: css; title: ; notranslate">
/* root element for scrollable */
.vertical {
	/* required settings */
	position:relative;
	overflow:hidden;
	/* vertical scrollers have typically larger height than width */
	height: 665px;
	width: 700px;
	border-top:1px solid #ddd;
}

/* root element for scrollable items */
.items {
	position:absolute;
	/* this time we have very large space for height */
	height:20000em;	margin: 0px;
}

/* single scrollable item */
.item {
	border-bottom:1px solid #85b1ee;
	border-top:1px solid #85b1ee;
	margin:10px 0; padding:15px; font-size:12px;
	height:180px; background:#d6e8ff;
}

/* elements inside single item */
.item img {
	float:left;
	margin-right:20px;
	height:180px;
	width:240px;
	border:5px solid #fff;
}

.item h3 {
	margin:0 0 5px 0;
	font-size:16px;
	color:#4a6499;
	font-weight:normal;
}

.item p a{padding:3px;}

.item p a:hover{ background:#fff; text-decoration:none;}

.item p { padding:3px; margin:5px;}

/* the action buttons above the scrollable */
#actions { width:700px; margin:30px 0 10px 0;}

#actions a {font-size:11px;	cursor:pointer; color:#666;}

#actions a:hover {text-decoration:underline; color:#000;}

.disabled {visibility:hidden;}

.next {float:right;}
</pre>
<h2>Notes</h2>
<ul>
<li>The XSL is setup so that if no thumbnail is provided it will automatically adjust. The same is true if no subtitle is entered.  This is done using conditional formating.</li>
<li>Only the first 200 characters of the body are shown. To change this amount you can just change this line of code <strong>xsl:value-of select=&#8221;substring(@Body,0,200)&#8221;. </strong></li>
<li>You do not need the whole jQuery library in order for this to run.</li>
</ul>
<p><strong> </strong></p>
<h2>Resources</h2>
<ul>
<li><a href="http://plugins.jquery.com/project/scrollable" target="_blank">jQuery Scrollable Plugin<br />
</a>http://plugins.jquery.com/project/scrollable</li>
<li><a href="http://www.jwc3.net/2008/05/how-to-get-url-in-xsl.html">How to get the Current URL in XSL</a>
<p>http://www.jwc3.net/2008/05/how-to-get-url-in-xsl.html</li>
</ul>
<p>Related posts:<ol>
<li><a href='http://davecavins.com/2010/11/zoomable-photo-grid/' rel='bookmark' title='Zoomable Photo Grid'>Zoomable Photo Grid</a></li>
<li><a href='http://davecavins.com/2010/04/anything-slider-in-sharepoint-update/' rel='bookmark' title='Anything Slider in SharePoint &#8211; Update'>Anything Slider in SharePoint &#8211; Update</a></li>
<li><a href='http://davecavins.com/2009/12/css-tricks-anythingslider-in-sharepoint/' rel='bookmark' title='CSS-Tricks AnythingSlider in SharePoint'>CSS-Tricks AnythingSlider in SharePoint</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://davecavins.com/2010/08/a-better-annoucements-ticker/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Switch Themes Without a Page Refresh: Part 2</title>
		<link>http://davecavins.com/2010/06/switch-styles-in-sharepoint-with-jquery/</link>
		<comments>http://davecavins.com/2010/06/switch-styles-in-sharepoint-with-jquery/#comments</comments>
		<pubDate>Mon, 14 Jun 2010 14:50:09 +0000</pubDate>
		<dc:creator>davecavins</dc:creator>
				<category><![CDATA[General SharePoint]]></category>
		<category><![CDATA[SharePoint Design]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[SharePoint Designer]]></category>
		<category><![CDATA[theme]]></category>

		<guid isPermaLink="false">http://davecavins.com/?p=506</guid>
		<description><![CDATA[So in part one of this post we got all the CSS and other theme file we needed to stuck them in a document library. With JavaScript you can change the CSS file a page uses without requiring a page refresh.  I have used this technique many times on non-SharePoint sites but there are some [...]
Related posts:<ol>
<li><a href='http://davecavins.com/2010/06/switch-themes-without-a-page-refresh-part-1/' rel='bookmark' title='Switch Themes Without a Page Refresh: Part 1'>Switch Themes Without a Page Refresh: Part 1</a></li>
<li><a href='http://davecavins.com/2010/04/switch-list-displays-with-jquery-and-css/' rel='bookmark' title='Switch List Displays with JQuery and CSS'>Switch List Displays with JQuery and CSS</a></li>
<li><a href='http://davecavins.com/2009/10/sharepoint-blog-comments-p2/' rel='bookmark' title='Styling SharePoint Blog Comments: Part 2'>Styling SharePoint Blog Comments: Part 2</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>So in <a href="http://davecavins.com/2010/06/switch-themes-without-a-page-refresh-part-1/" target="_blank">part one of this post </a>we got all the CSS and other theme file we needed to stuck them in a document library.</p>
<p>With JavaScript you can change the CSS file a page uses without requiring a page refresh.  I have used this technique many times on non-SharePoint sites but there are some special challenges implementing this in SharePoint.  Most of the scripts I have used in the past use the <a href="http://www.alistapart.com/articles/alternate/" target="_blank">alternate style sheet method as describred by A List Apart here</a>. That method works fine but I had to find another way because I was already using that script to allow users to change the font size. After some research I found <a href="http://www.cssnewbie.com/example/stylesheet-switcher/" target="_blank">this script from CSS Newbie</a> that worked pretty well without using alternate style sheets.</p>
<h2>The problem</h2>
<p>While the script works just fine on regular HTML pages it cause problems in SharePoint here is why :</p>
<pre class="brush: jscript; title: ; notranslate"> $(&quot;link&quot;).attr(&quot;href&quot;,$(this).attr('rel')); </pre>
<p>This line of code basically finds all the linked CSS files in the page and changes thier value to point to the new style sheet you select.  This is fine on a site that just uses one CSS file but in SharePoint bad things happen.  In most cases we dont want to completely remove the reference to core.css. For most themes many elements don&#8217;t need to be changed so we only have to write the CSS to change them and let core.css do the rest.  If you remove core.css its like using a global reset (<a href="http://www.visual28.com/articles/css-reset" target="_blank">discussed in more detail here</a>) which means you will have to restyle everything.  So them point is we want to leave core.css in the page and just add our theme.</p>
<p>To do this I had to make some changes to the master page to create to interface users will use to swap themes.</p>
<p><span id="more-506"></span></p>
<h2>Edit the Masterpage</h2>
<p>Here is the code I added to the masterpage. This can be styled to look however you want and can be added anywhere in the page that makes sense.</p>
<pre class="brush: xml; title: ; notranslate">
&lt;ul&gt;
	&lt;li&gt;&lt;a rel=&quot;&quot; href=&quot;#&quot;&gt;Reset CSS&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a rel=&quot;/Site Styles/Verdant/theme.css&quot; href=&quot;#&quot;&gt;Verdant&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a rel=&quot;/Site Styles/Belltown/theme.css&quot; href=&quot;#&quot;&gt;Belltown&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a rel=&quot;/Site Styles/Petal/theme.css&quot; href=&quot;#&quot;&gt;Petal&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
</pre>
<p>In addition to this we also need to add a link to our css file to the master page. I put it at the end of the head section.</p>
<pre class="brush: xml; title: ; notranslate"> &lt;link class=&quot;altStyle&quot; href=&quot;&quot; type=&quot;text/css&quot; rel=&quot;stylesheet&quot;/&gt;</pre>
<p>I added a class to the link so that we can use jQuery to target only that css link and change it to match the theme the user selects. Initially I left the href value blank but if you want to apply some default styles you would just add the link to the css file there.</p>
<h2>Use jQuery to Swap the CSS</h2>
<p>So here is the code I used to swap the stylesheet. The main thing I changed is on lines 7 and 12.  I changed the selector so it will only target &lt;link&gt; tags with a class of &#8216;altStyle&#8217;.  This allows us to swap themes without breaking the link to core.css.</p>
<pre class="brush: jscript; title: ; notranslate"> &lt;script src=&quot;http://ajax.googleapis.com/ajax/libs/jquery/1.3.1/jquery.min.js&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;

&lt;script src=&quot;cookie.js&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;

&lt;script type=&quot;text/javascript&quot;&gt;// &lt;![CDATA[
 if($.cookie(&quot;css&quot;)) {
 $(&quot;link.altStyle&quot;).attr(&quot;href&quot;,$.cookie(&quot;css&quot;));
 }
$(document).ready(function() {
//alert( $.cookie(&quot;css&quot;) );
 $(&quot;#nav li a&quot;).click(function() {
 $(&quot;link.altStyle&quot;).attr(&quot;href&quot;,$(this).attr('rel'));
 $.cookie(&quot;css&quot;,$(this).attr('rel'), {expires: 365, path: '/'});
 return false;
 });
});
// ]]&gt;&lt;/script&gt;
</pre>
<h2>Resources</h2>
<ul>
<li>You will need jQuery either locally or linked from Google.  Just update the link on line 1 as needed.</li>
<li>In the code above you will notice a link to <strong>cookie.js</strong>, this is the jQjuery cookie plugin that you will need in order to save users&#8217; theme selections.  In the code above on line 13 you will see where I create a cookie named css.  For testing purposes you can uncomment line 10 to see what the cookie value is on page load.   You can download the plugin from here.  <a href="http://plugins.jquery.com/project/cookie" target="_blank">jQuery Cookie Plugin</a></li>
<li>You can see the original code I started from in <a href="http://www.cssnewbie.com/example/stylesheet-switcher/" target="_blank">this script from CSS Newbie</a></li>
</ul>
<h2>Conclusion</h2>
<p>While this is a very simple solution it is a quick way to add in some fuctionality that many users want without alot of custom code or requiring the user to navigate to multiple pages.  Users like to feel that they have some control over the site (even if its just changing the color).  Feel free to post any questions or comments.</p>
<p>Related posts:<ol>
<li><a href='http://davecavins.com/2010/06/switch-themes-without-a-page-refresh-part-1/' rel='bookmark' title='Switch Themes Without a Page Refresh: Part 1'>Switch Themes Without a Page Refresh: Part 1</a></li>
<li><a href='http://davecavins.com/2010/04/switch-list-displays-with-jquery-and-css/' rel='bookmark' title='Switch List Displays with JQuery and CSS'>Switch List Displays with JQuery and CSS</a></li>
<li><a href='http://davecavins.com/2009/10/sharepoint-blog-comments-p2/' rel='bookmark' title='Styling SharePoint Blog Comments: Part 2'>Styling SharePoint Blog Comments: Part 2</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://davecavins.com/2010/06/switch-styles-in-sharepoint-with-jquery/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Switch Themes Without a Page Refresh: Part 1</title>
		<link>http://davecavins.com/2010/06/switch-themes-without-a-page-refresh-part-1/</link>
		<comments>http://davecavins.com/2010/06/switch-themes-without-a-page-refresh-part-1/#comments</comments>
		<pubDate>Mon, 07 Jun 2010 19:03:26 +0000</pubDate>
		<dc:creator>davecavins</dc:creator>
				<category><![CDATA[SharePoint Design]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[stylesheet]]></category>
		<category><![CDATA[theme]]></category>

		<guid isPermaLink="false">http://davecavins.com/?p=522</guid>
		<description><![CDATA[Many sites offer the ability for users to change the color and style of the site to fit their preference.  SharePoint has this feature to some extend through themes but changing themes is not a very simple process and requires browsing to several pages. With JavaScript you can change the CSS file a page uses [...]
Related posts:<ol>
<li><a href='http://davecavins.com/2010/06/switch-styles-in-sharepoint-with-jquery/' rel='bookmark' title='Switch Themes Without a Page Refresh: Part 2'>Switch Themes Without a Page Refresh: Part 2</a></li>
<li><a href='http://davecavins.com/2009/07/styling-the-moss-horizontal-navigation-menu/' rel='bookmark' title='Styling the MOSS horizontal navigation menu'>Styling the MOSS horizontal navigation menu</a></li>
<li><a href='http://davecavins.com/2009/02/adding-stuff-to-the-page-head-the-easy-way/' rel='bookmark' title='Adding references to the page head: the easy way'>Adding references to the page head: the easy way</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Many sites offer the ability for users to change the color and style of the site to fit their preference.  SharePoint has this feature to some extend through themes but changing themes is not a very simple process and requires browsing to several pages.</p>
<p>With JavaScript you can change the CSS file a page uses without requiring a page refresh.  I have used this technique many times on non-SharePoint sites but there are some special challenges implementing this in SharePoint.  For this solution there were several requirements.</p>
<ul>
<li>Users need to be able to switch themes and have the setting saved</li>
<li>No page refresh</li>
<li>Should be able to use both out of the box themes and custom themes</li>
</ul>
<p>So first I needed to get the CSS files and images for the themes I wanted to use.  When you assign a theme to a site all the files for the theme are copied to a folder named <strong>_themes</strong> in the root of the site.</p>
<div id="attachment_524" class="wp-caption alignnone" style="width: 143px"><img class="size-full wp-image-524" title="themesfolder" src="http://davecavins.com/wp-content/uploads/2010/06/themesfolder.jpg" alt="" width="133" height="92" /><p class="wp-caption-text">_themes folder</p></div>
<p>So what I did was assign each theme I wanted to use to the site one at a time.  With SharePoint designer I copied the files folders for each theme into a document library called <strong>Site Styles</strong>.  Each folder contains all the resources needed or the theme to work. <span id="more-522"></span></p>
<p>Here is what I ended up with</p>
<div id="attachment_523" class="wp-caption alignnone" style="width: 164px"><img class="size-full wp-image-523" title="themes" src="http://davecavins.com/wp-content/uploads/2010/06/themes.jpg" alt="" width="154" height="90" /><p class="wp-caption-text">Site Styles Library</p></div>
<p>If I wanted to create a custom theme I could just add another folder with my custom CSS and images.</p>
<p>This same technique can be used when developing your own custom theme, just copy one that is similar to what you want and use the alternate CSS link on the master page settings page to add it to the site.  Inside of the folder for each theme is a file named theme.css. Link to that file and SharePoint will apply the theme to the site.</p>
<div id="attachment_525" class="wp-caption alignnone" style="width: 384px"><img class="size-full wp-image-525" title="cssurl" src="http://davecavins.com/wp-content/uploads/2010/06/cssurl.jpg" alt="" width="374" height="112" /><p class="wp-caption-text">Alternate CSS URL</p></div>
<p>Now everything we have done so far is pretty basic and easy to do but we will pull all this together with some simple edits to the master page to complete the solution. In part 2 I’ll explain how we use JavaScript to switch styles and set a cookie to remember the users theme choice.</p>
<p>Related posts:<ol>
<li><a href='http://davecavins.com/2010/06/switch-styles-in-sharepoint-with-jquery/' rel='bookmark' title='Switch Themes Without a Page Refresh: Part 2'>Switch Themes Without a Page Refresh: Part 2</a></li>
<li><a href='http://davecavins.com/2009/07/styling-the-moss-horizontal-navigation-menu/' rel='bookmark' title='Styling the MOSS horizontal navigation menu'>Styling the MOSS horizontal navigation menu</a></li>
<li><a href='http://davecavins.com/2009/02/adding-stuff-to-the-page-head-the-easy-way/' rel='bookmark' title='Adding references to the page head: the easy way'>Adding references to the page head: the easy way</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://davecavins.com/2010/06/switch-themes-without-a-page-refresh-part-1/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Improving #SharePoint Forms – Watermarks</title>
		<link>http://davecavins.com/2010/05/improving-sharepoint-forms-%e2%80%93-watermarks/</link>
		<comments>http://davecavins.com/2010/05/improving-sharepoint-forms-%e2%80%93-watermarks/#comments</comments>
		<pubDate>Mon, 03 May 2010 18:58:59 +0000</pubDate>
		<dc:creator>davecavins</dc:creator>
				<category><![CDATA[General SharePoint]]></category>
		<category><![CDATA[better forms]]></category>
		<category><![CDATA[forms]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[SharePoint]]></category>

		<guid isPermaLink="false">http://davecavins.com/?p=509</guid>
		<description><![CDATA[So I found this cool jQuery plugin that does watermarks for form inputs. Using watermarks is a good way to help make SharePoint forms easier to use. To test the plugin I started with the new item form from same test list I used in my previous posts. Improving #SharePoint Forms – Hints Improving #SharePoint Forms [...]
Related posts:<ol>
<li><a href='http://davecavins.com/2010/01/improving-sharepoint-forms/' rel='bookmark' title='Improving #SharePoint Forms'>Improving #SharePoint Forms</a></li>
<li><a href='http://davecavins.com/2010/02/character-count-on-sharepoint-fields/' rel='bookmark' title='Improving #SharePoint Forms &#8211; Character Count'>Improving #SharePoint Forms &#8211; Character Count</a></li>
<li><a href='http://davecavins.com/2009/11/resizable-textarea-in-sharepoint/' rel='bookmark' title='Resizable textareas in SharePoint edit forms'>Resizable textareas in SharePoint edit forms</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>So I found this <a rel="no follow" href="http://plugins.jquery.com/project/TinyWatermark" target="_blank">cool jQuery plugin</a> that does watermarks for form inputs. Using watermarks is a good way to help make SharePoint forms easier to use. To test the plugin I started with the new item form from same test list I used in my previous posts.</p>
<ul>
<li><a href="http://davecavins.com/2010/02/improving-sharepoint-forms-hints/">Improving #SharePoint Forms – Hints</a></li>
<li><a href="http://davecavins.com/2010/02/character-count-on-sharepoint-fields/">Improving #SharePoint Forms – Character Count</a></li>
</ul>
<div id="attachment_515" class="wp-caption alignnone" style="width: 529px"><img class="size-full wp-image-515" title="watermarks" src="http://davecavins.com/wp-content/uploads/2010/05/watermarks.jpg" alt="" width="519" height="274" /><p class="wp-caption-text">Watermarks</p></div>
<h2>Prerequisites</h2>
<ul>
<li>jQuery Library referenced in the page</li>
<li>CEWP on the page</li>
</ul>
<p><span id="more-509"></span></p>
<h2>Setup</h2>
<p>First make sure you reference a copy of the plugin script. I added the link to the section of the page using the method explained in <a href="http://davecavins.com/2010/02/character-count-on-sharepoint-fields/">this post</a>.</p>
<pre class="brush: xml; title: ; notranslate">&lt;script type=&quot;text/javascript&quot; src=&quot;../../jquery.tinywatermark-2.0.0.js&quot;&gt;&lt;/script&gt;</pre>
<p>We also need some css to style the watermarks</p>
<pre class="brush: css; title: ; notranslate">
  &lt;style type=&quot;text/css&quot;&gt;
  .watermark {color:#999}
&lt;/style&gt;
</pre>
<p>The plugin works by finding all the inputs with a class of &#8220;watermarked&#8221; and using this title attribute as the watermark. So I used jQuery to select the inputs I wanted to watermark and <a href="http://api.jquery.com/addClass/" target="_blank">add the &#8220;watermarked&#8221; class</a> to them.</p>
<p>Here is the code I used.</p>
<pre class="brush: jscript; title: ; notranslate">
$(&quot;input[title='Author']&quot;).addClass('watermarked');
$(&quot;input[title='Title']&quot;).addClass('watermarked');
$(&quot;textarea[title='Body']&quot;).addClass('watermarked');
</pre>
<p>After the inputs have the right class all we need to do is call the plugin script like so</p>
<pre class="brush: jscript; title: ; notranslate">
$('.watermarked').each(function() {
  $(this).watermark('watermark', $(this).attr('title'));
});
</pre>
<p>Thats all. Enjoy.</p>
<p>Related posts:<ol>
<li><a href='http://davecavins.com/2010/01/improving-sharepoint-forms/' rel='bookmark' title='Improving #SharePoint Forms'>Improving #SharePoint Forms</a></li>
<li><a href='http://davecavins.com/2010/02/character-count-on-sharepoint-fields/' rel='bookmark' title='Improving #SharePoint Forms &#8211; Character Count'>Improving #SharePoint Forms &#8211; Character Count</a></li>
<li><a href='http://davecavins.com/2009/11/resizable-textarea-in-sharepoint/' rel='bookmark' title='Resizable textareas in SharePoint edit forms'>Resizable textareas in SharePoint edit forms</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://davecavins.com/2010/05/improving-sharepoint-forms-%e2%80%93-watermarks/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Switch List Displays with JQuery and CSS</title>
		<link>http://davecavins.com/2010/04/switch-list-displays-with-jquery-and-css/</link>
		<comments>http://davecavins.com/2010/04/switch-list-displays-with-jquery-and-css/#comments</comments>
		<pubDate>Wed, 21 Apr 2010 20:58:05 +0000</pubDate>
		<dc:creator>davecavins</dc:creator>
				<category><![CDATA[General SharePoint]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[design]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[SharePoint]]></category>

		<guid isPermaLink="false">http://davecavins.com/?p=483</guid>
		<description><![CDATA[Sometimes it is useful to allow users to quickly change how data is displayed. Changing the display can make is easier to see patterns or find a specific item you are looking for. With CSS and jQuery we can easily change the way content is displayed and arranged on the page.  I got the idea [...]
Related posts:<ol>
<li><a href='http://davecavins.com/2010/11/zoomable-photo-grid/' rel='bookmark' title='Zoomable Photo Grid'>Zoomable Photo Grid</a></li>
<li><a href='http://davecavins.com/2010/04/anything-slider-in-sharepoint-update/' rel='bookmark' title='Anything Slider in SharePoint &#8211; Update'>Anything Slider in SharePoint &#8211; Update</a></li>
<li><a href='http://davecavins.com/2010/08/a-better-annoucements-ticker/' rel='bookmark' title='A Better Annoucements Ticker'>A Better Annoucements Ticker</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Sometimes it is useful to allow users to quickly change how data is displayed. Changing the display can make is easier to see patterns or find a specific item you are looking for. With CSS and jQuery we can easily change the way content is displayed and arranged on the page.  I got the idea for this post from <a title="Link" href="http://designm.ag/tutorials/jquery-display-switch/ " target="_blank">here</a>  </p>
<div id="attachment_484" class="wp-caption aligncenter" style="width: 600px"><img class="size-full wp-image-484" title="viewswitch" src="http://davecavins.com/wp-content/uploads/2010/03/viewswitch.gif" alt="" width="590" height="450" /><p class="wp-caption-text">Switch views using CSS and jQuery</p></div>
<p> </p>
<p><a href="http://designm.ag/tutorials/jquery-display-switch/"><span id="more-483"></span><br />
</a>Basically by changing the class assigned to a div wrapping the content we are able to change the way things are laid out and hide what we don&#8217;t need.  Here how I set it up in SharePoint.  </p>
<ul>
<li>I started with a standard Image library and added some images of one of my bikes.  I filled in the title and description for each item.  <strong>You can use this same technique on other types of lists.</strong></li>
<li>Next I created a page and displayed the list in a dataview web part</li>
<li>I edited the XSL to show the items in an unordered list with a class of  &#8216;display&#8217;. Inside of each &lt;li&gt; I used various tags and classes to style the images and descriptions.
<pre class="brush: xml; title: ; notranslate">
&lt;li class=&quot;ms-vb&quot;&gt;
&lt;div class=&quot;content_block&quot;&gt;
	&lt;a href=&quot;{concat($FileURL,'/Forms/DispForm.aspx?ID=',@ID)}&quot;&gt;
	&lt;img align=&quot;left&quot; border=&quot;0&quot; src=&quot;{concat($FileURL,'/_t/',$FileNameNoEx,'_',@FileType,'.',@FileType)}&quot; alt=&quot;{@Title}&quot;/&gt;
	&lt;/a&gt;
	&lt;h2&gt;
		&lt;a href=&quot;{concat($FileURL,'/Forms/DispForm.aspx?ID=',@ID)}&quot;&gt;&lt;xsl:value-of select=&quot;@Title&quot; disable-output-escaping=&quot;yes&quot;/&gt;&lt;/a&gt;
	&lt;/h2&gt;
	&lt;p&gt;&lt;xsl:value-of select=&quot;@Description&quot; disable-output-escaping=&quot;yes&quot;/&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;/li&gt;
</pre>
</li>
<li>Before the opening &lt;ul&gt; tag I added the link to my CSS and jQuery files as well as some script to trigger the switch and the associated link.
<pre class="brush: jscript; title: ; notranslate">
&lt;link href=&quot;styles.css&quot; rel=&quot;stylesheet&quot; type=&quot;text/css&quot;/&gt;
&lt;script type=&quot;text/javascript&quot; src=&quot;http://code.jquery.com/jquery-latest.js&quot;&gt;&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
$(document).ready(function(){
	$(&quot;a.switch_thumb&quot;).toggle(function(){
	$(this).addClass(&quot;swap&quot;);
	$(&quot;ul.display&quot;).fadeOut(&quot;fast&quot;, function() {
		$(this).fadeIn(&quot;fast&quot;).addClass(&quot;thumb_view&quot;);
//  thumb_view is the class used for the alternate display style
		});	  },
		function () {
		 $(this).removeClass(&quot;swap&quot;);
		$(&quot;ul.display&quot;).fadeOut(&quot;fast&quot;, function() {
			$(this).fadeIn(&quot;fast&quot;).removeClass(&quot;thumb_view&quot;);
		}); }); });
&lt;/script&gt;
&lt;a href=&quot;#&quot; class=&quot;switch_thumb&quot;&gt;Switch Display&lt;/a&gt; /* link to trigger the switch */
</pre>
</li>
<li>Then I wrote some css to style the list differently based on the class of the &lt;ul&gt;. </li>
</ul>
<p>Below is the xsl and the CSS I used.</p>
<p><strong>XSL</strong> (includes the code above)</p>
<pre class="brush: xml; title: ; notranslate">
&lt;Xsl&gt;
&lt;xsl:stylesheet xmlns:x=&quot;http://www.w3.org/2001/XMLSchema&quot; xmlns:d=&quot;http://schemas.microsoft.com/sharepoint/dsp&quot; version=&quot;1.0&quot; exclude-result-prefixes=&quot;xsl msxsl ddwrt&quot; xmlns:ddwrt=&quot;http://schemas.microsoft.com/WebParts/v2/DataView/runtime&quot; xmlns:asp=&quot;http://schemas.microsoft.com/ASPNET/20&quot; xmlns:__designer=&quot;http://schemas.microsoft.com/WebParts/v2/DataView/designer&quot; xmlns:xsl=&quot;http://www.w3.org/1999/XSL/Transform&quot; xmlns:msxsl=&quot;urn:schemas-microsoft-com:xslt&quot; xmlns:SharePoint=&quot;Microsoft.SharePoint.WebControls&quot; xmlns:ddwrt2=&quot;urn:frontpage:internal&quot;&gt;
	&lt;xsl:output method=&quot;html&quot; indent=&quot;no&quot;/&gt;
	&lt;xsl:decimal-format NaN=&quot;&quot;/&gt;
		&lt;xsl:param name=&quot;dvt_apos&quot;&gt;'&lt;/xsl:param&gt;
		&lt;xsl:param name=&quot;url_PATH_INFO&quot; /&gt;
		&lt;xsl:param name=&quot;url_HTTP_HOST&quot; /&gt;
		&lt;xsl:variable name=&quot;dvt_1_automode&quot;&gt;0&lt;/xsl:variable&gt;
		&lt;xsl:template match=&quot;/&quot; xmlns:x=&quot;http://www.w3.org/2001/XMLSchema&quot; xmlns:d=&quot;http://schemas.microsoft.com/sharepoint/dsp&quot; xmlns:asp=&quot;http://schemas.microsoft.com/ASPNET/20&quot; xmlns:__designer=&quot;http://schemas.microsoft.com/WebParts/v2/DataView/designer&quot; xmlns:SharePoint=&quot;Microsoft.SharePoint.WebControls&quot;&gt;
		&lt;xsl:call-template name=&quot;dvt_1&quot;/&gt;
	&lt;/xsl:template&gt;
				&lt;xsl:template name=&quot;dvt_1&quot;&gt;
					&lt;xsl:variable name=&quot;dvt_StyleName&quot;&gt;BulTitl&lt;/xsl:variable&gt;
					&lt;xsl:variable name=&quot;Rows&quot; select=&quot;/dsQueryResponse/Rows/Row&quot; /&gt;
					&lt;link href=&quot;styles.css&quot; rel=&quot;stylesheet&quot; type=&quot;text/css&quot;/&gt;
&lt;script type=&quot;text/javascript&quot; src=&quot;http://code.jquery.com/jquery-latest.js&quot;&gt;&lt;/script&gt; &lt;script type=&quot;text/javascript&quot;&gt;
$(document).ready(function(){
	$(&quot;a.switch_thumb&quot;).toggle(function(){
	  $(this).addClass(&quot;swap&quot;);
	  $(&quot;ul.display&quot;).fadeOut(&quot;fast&quot;, function() {
	  	$(this).fadeIn(&quot;fast&quot;).addClass(&quot;thumb_view&quot;);
		 });
	  }, function () {
      $(this).removeClass(&quot;swap&quot;);
	  $(&quot;ul.display&quot;).fadeOut(&quot;fast&quot;, function() {
	  	$(this).fadeIn(&quot;fast&quot;).removeClass(&quot;thumb_view&quot;);
		});	}); });
&lt;/script&gt; &lt;a href=&quot;#&quot; class=&quot;switch_thumb&quot;&gt;Switch Display&lt;/a&gt;
	&lt;ul class=&quot;display&quot;&gt;
		&lt;xsl:call-template name=&quot;dvt_1.body&quot;&gt;
			&lt;xsl:with-param name=&quot;Rows&quot; select=&quot;$Rows&quot; /&gt;
		&lt;/xsl:call-template&gt;
	&lt;/ul&gt;
	&lt;/xsl:template&gt;
	&lt;xsl:template name=&quot;dvt_1.body&quot;&gt;
		&lt;xsl:param name=&quot;Rows&quot; /&gt;
	&lt;xsl:for-each select=&quot;$Rows&quot;&gt;
		&lt;xsl:call-template name=&quot;dvt_1.rowview&quot; /&gt;
	&lt;/xsl:for-each&gt;
	&lt;/xsl:template&gt;
	&lt;xsl:template name=&quot;dvt_1.rowview&quot;&gt;
		&lt;xsl:param name=&quot;FileNameString&quot; select=&quot;@NameOrTitle&quot;&gt;&lt;/xsl:param&gt;
		&lt;xsl:param name=&quot;FileNameLegnth&quot; select=&quot; string-length(@NameOrTitle) - 4&quot;&gt;&lt;/xsl:param&gt;
		&lt;xsl:param name=&quot;FileNameNoEx&quot; select=&quot; substring(@NameOrTitle,1,$FileNameLegnth)&quot;&gt;&lt;/xsl:param&gt;
		&lt;xsl:param name=&quot;FileURL&quot; select=&quot;concat('http://',$url_HTTP_HOST,'/',@FileDirRef)&quot;&gt;&lt;/xsl:param&gt;
	&lt;li class=&quot;ms-vb&quot;&gt;
		&lt;div class=&quot;content_block&quot;&gt;
			&lt;a href=&quot;{concat($FileURL,'/Forms/DispForm.aspx?ID=',@ID)}&quot;&gt;
				&lt;img align=&quot;left&quot; border=&quot;0&quot; src=&quot;{concat($FileURL,'/_t/',$FileNameNoEx,'_',@FileType,'.',@FileType)}&quot; alt=&quot;{@Title}&quot;/&gt;
			&lt;/a&gt;
			&lt;h2&gt;
				&lt;a href=&quot;{concat($FileURL,'/Forms/DispForm.aspx?ID=',@ID)}&quot;&gt;&lt;xsl:value-of select=&quot;@Title&quot; disable-output-escaping=&quot;yes&quot;/&gt;&lt;/a&gt;
			&lt;/h2&gt;
			&lt;p&gt;&lt;xsl:value-of select=&quot;@Description&quot; disable-output-escaping=&quot;yes&quot;/&gt;&lt;/p&gt;
			&lt;/div&gt;
		&lt;/li&gt;
		&lt;/xsl:template&gt;
&lt;/xsl:stylesheet&gt;&lt;/Xsl&gt;
</pre>
<p><strong>CSS</strong></p>
<pre class="brush: css; title: ; notranslate">
/* normal view styles */
ul.display li a {
    text-decoration: none;
}
ul.display li{
	background:#E3EFFF;
	margin:3px;
	border:1px solid #9FC2F1;
	height:130px;
	list-style:none;
}

ul.display li .content_block {
    padding: 5px;
	clear:both;
    margin:4px;
}
ul.display li .content_block h2 {
    margin: 0;
    padding: 2px;
    font-weight: normal;
    font-size: 1.4em;
}
ul.display li .content_block p {
    margin: 0;
    padding: 5px 5px 5px 145px;
    font-size: 1.2em;
}
ul.display li .content_block img{
    padding: 5px;
    border: 4px solid #336699;
    background: #fff;
    margin: 2 9px 2 2;
float: left;
}
/* thumbnail view styles */
ul.thumb_view li{ width: 200px; float:left; background:transparent; }
ul.thumb_view li h2 { display: inline; text-align:center; margin:2px; padding:2px }
ul.thumb_view li p{ display: none; }
ul.thumb_view li .content_block a img { margin: 5 0 10px; }
/* styles for the style switcher buttin */
a.switch_thumb {

	padding:5 5 5 25px;
	margin:10px;
	background:#D6E8FF url('/_layouts/images/itcat.gif') no-repeat 5px 7px;
	outline: none;
	border:1px solid #9FC2F1;
	font-size:.8em;
}
a:hover.switch_thumb {
	filter:alpha(opacity=75);
	opacity:.75;
	-ms-filter: &quot;progid:DXImageTransform.Microsoft.Alpha(Opacity=75)&quot;;
}
a.swap { background:url('/_layouts/images/itcontct.gif') no-repeat 5px 7px; }
</pre>
<p>If you want to use this same solution for a different type of list just create a dataview Web Part to display the items in the format you want and wrap everything in a container (div, ul, table) with a class. Also use tags (h2, p, span, div, etc.) to wrap the pieces of data you are displaying (this will make it easier to control with CSS). Change the CSS and JavaScript to work with you new container and XSL.  </p>
<p>Got questions? Post a comment.</p>
<p>Related posts:<ol>
<li><a href='http://davecavins.com/2010/11/zoomable-photo-grid/' rel='bookmark' title='Zoomable Photo Grid'>Zoomable Photo Grid</a></li>
<li><a href='http://davecavins.com/2010/04/anything-slider-in-sharepoint-update/' rel='bookmark' title='Anything Slider in SharePoint &#8211; Update'>Anything Slider in SharePoint &#8211; Update</a></li>
<li><a href='http://davecavins.com/2010/08/a-better-annoucements-ticker/' rel='bookmark' title='A Better Annoucements Ticker'>A Better Annoucements Ticker</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://davecavins.com/2010/04/switch-list-displays-with-jquery-and-css/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Improving #SharePoint Forms &#8211; Hints</title>
		<link>http://davecavins.com/2010/02/improving-sharepoint-forms-hints/</link>
		<comments>http://davecavins.com/2010/02/improving-sharepoint-forms-hints/#comments</comments>
		<pubDate>Mon, 22 Feb 2010 17:22:39 +0000</pubDate>
		<dc:creator>davecavins</dc:creator>
				<category><![CDATA[SharePoint Design]]></category>
		<category><![CDATA[better forms]]></category>
		<category><![CDATA[hints]]></category>
		<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[UI]]></category>

		<guid isPermaLink="false">http://davecavins.com/?p=442</guid>
		<description><![CDATA[When users are asked to enter information in a form sometimes it helps to give them a hint regarding what types of information should be entered.  Out of the box you can enter a description of each field that will be displayed.  If you want something more dynamic here is how to do it.  Add [...]
Related posts:<ol>
<li><a href='http://davecavins.com/2010/02/character-count-on-sharepoint-fields/' rel='bookmark' title='Improving #SharePoint Forms &#8211; Character Count'>Improving #SharePoint Forms &#8211; Character Count</a></li>
<li><a href='http://davecavins.com/2010/05/improving-sharepoint-forms-%e2%80%93-watermarks/' rel='bookmark' title='Improving #SharePoint Forms – Watermarks'>Improving #SharePoint Forms – Watermarks</a></li>
<li><a href='http://davecavins.com/2010/01/improving-sharepoint-forms/' rel='bookmark' title='Improving #SharePoint Forms'>Improving #SharePoint Forms</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>When users are asked to enter information in a form sometimes it helps to give them a hint regarding what types of information should be entered.  Out of the box you can enter a description of each field that will be displayed.  If you want something more dynamic here is how to do it. </p>
<ul>
<li>Add jQuery to the page using the method described <a href="http://davecavins.com/2010/02/character-count-on-sharepoint-fields/">in this post</a></li>
<li>Download the <a href="http://nicolae.namolovan.googlepages.com/jquery.inputHintBox.html" target="_blank">jQuery Hint Box plugin</a> and link it to the page. </li>
<li>Call the script and set the options for the position and html content of the hint. Here is an example:</li>
</ul>
<pre class="brush: jscript; title: ; notranslate">
&lt;script type=&quot;text/javascript&quot;&gt;
$(&quot;input[title='Author']&quot;).inputHintBox({
	className:'simple_box',
	html:'Who is the author of this quote?',
	incrementLeft:-25,
	incrementTop:-15
	});
&lt;/script&gt;
</pre>
<p>The above script simply selects  the field using its  title attribute then sets the css class for the element, its contents and position.</p>
<p>Here is the CSS I used for my example.</p>
<pre class="brush: css; title: ; notranslate">
.simple_box{
	border:1px solid gray; background:url('/_layouts/images/toolgrad.gif');
	font-size:xx-small; color:#444; padding:7px;
}
</pre>
<p>Here it is in action.</p>
<div id="attachment_443" class="wp-caption aligncenter" style="width: 508px"><a href="http://davecavins.com/wp-content/uploads/2010/02/hint2.jpg"><img class="size-full wp-image-443" title="hint2" src="http://davecavins.com/wp-content/uploads/2010/02/hint2.jpg" alt="" width="498" height="179" /></a><p class="wp-caption-text">hints</p></div>
<p>Related posts:<ol>
<li><a href='http://davecavins.com/2010/02/character-count-on-sharepoint-fields/' rel='bookmark' title='Improving #SharePoint Forms &#8211; Character Count'>Improving #SharePoint Forms &#8211; Character Count</a></li>
<li><a href='http://davecavins.com/2010/05/improving-sharepoint-forms-%e2%80%93-watermarks/' rel='bookmark' title='Improving #SharePoint Forms – Watermarks'>Improving #SharePoint Forms – Watermarks</a></li>
<li><a href='http://davecavins.com/2010/01/improving-sharepoint-forms/' rel='bookmark' title='Improving #SharePoint Forms'>Improving #SharePoint Forms</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://davecavins.com/2010/02/improving-sharepoint-forms-hints/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Improving #SharePoint Forms &#8211; Character Count</title>
		<link>http://davecavins.com/2010/02/character-count-on-sharepoint-fields/</link>
		<comments>http://davecavins.com/2010/02/character-count-on-sharepoint-fields/#comments</comments>
		<pubDate>Tue, 02 Feb 2010 16:21:10 +0000</pubDate>
		<dc:creator>davecavins</dc:creator>
				<category><![CDATA[General SharePoint]]></category>
		<category><![CDATA[better forms]]></category>
		<category><![CDATA[forms]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[UI]]></category>

		<guid isPermaLink="false">http://davecavins.com/?p=425</guid>
		<description><![CDATA[For the sake of demonstration I made a list called quotes. Each quote has a title, body and author field, as a requirement the body field should not have more than 200 characters. So to let users know when they are getting close to the character limit we will setup a character count script. For [...]
Related posts:<ol>
<li><a href='http://davecavins.com/2010/05/improving-sharepoint-forms-%e2%80%93-watermarks/' rel='bookmark' title='Improving #SharePoint Forms – Watermarks'>Improving #SharePoint Forms – Watermarks</a></li>
<li><a href='http://davecavins.com/2010/02/improving-sharepoint-forms-hints/' rel='bookmark' title='Improving #SharePoint Forms &#8211; Hints'>Improving #SharePoint Forms &#8211; Hints</a></li>
<li><a href='http://davecavins.com/2010/01/improving-sharepoint-forms/' rel='bookmark' title='Improving #SharePoint Forms'>Improving #SharePoint Forms</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>For the sake of demonstration I made a list called quotes. Each quote has a title, body and author field, as a requirement the body field should not have more than 200 characters. So to let users know when they are getting close to the character limit we will setup a character count script.</p>
<p>For this solution I will use <a href="http://cssglobe.com/post/7161/jquery-plugin-simplest-twitterlike-dynamic-character-count-for-textareas ">this jQuery script from CSS Globe</a>.</p>
<div id="attachment_422" class="wp-caption aligncenter" style="width: 597px"><a href="http://davecavins.com/wp-content/uploads/2010/01/form.jpg"><img class="size-full wp-image-422" title="form" src="http://davecavins.com/wp-content/uploads/2010/01/form.jpg" alt="" width="587" height="249" /></a><p class="wp-caption-text">The default form</p></div>
<p><span id="more-425"></span></p>
<h1>Setup</h1>
<p>So first off we need to add a link to the jQuery script and the plugin. You can do this using a content editor web part but I have noticed in some cases scripts need to be in the section of the page. The easiest way to add the scripts to the of the page is to use the following code.</p>
<pre class="brush: xml; title: ; notranslate">
&lt;asp:Content ContentPlaceHolderID=&quot;PlaceHolderAdditionalPageHead&quot; runat=&quot;server&quot;&gt;
&lt;!—scripts / css goes in here -- &gt;
&lt;script type=&quot;text/javascript&quot; src=&quot;http://ajax.googleapis.com/ajax/libs/jquery/1.3.1/jquery.min.js&quot;&gt;
  &lt;/script&gt;
  &lt;script type=&quot;text/javascript&quot; src=&quot;js/charCount.js&quot;&gt;&lt;/script&gt;
&lt;/asp:Content&gt;
</pre>
<p>So once you have all the scripts you need on the page we just need to attach the behavior to the form body form field. To do this we can add some JavaScript to the page in a Content Editor web part. We can use jQuery to select the element we want to target and then configure the plugin settings.</p>
<pre class="brush: jscript; title: ; notranslate">
&lt;script type=&quot;text/javascript&quot;&gt;

$(&quot;textarea[title='Body']&quot;).charCount({
    allowed: 200,	 //maximum number of characters allowed
    warning: 175,  // when to show the warning
    counterText: 'Characters left:'  //text before the character count
});
&lt;/script&gt;
</pre>
<p>For more configuration options and explanations of the plugin check out this page.<br />
I used the following CSS to style the appearance of the character count text.</p>
<pre class="brush: css; title: ; notranslate">
.counter{
	position:relative;
	right:14px;
	top:0;
	font-size:12px;
	font-weight:normal;
	color:#555;
	float:right;
	clear:both;
	display:block;
	text-align:right;
	background:#fff;
	width:150px;
	padding:3px;
	border:1px solid #888;
	border-top:0px;
	margin-top:-1px;
	}
.warning{color:#660000; font-weight:bold;}
.exceeded{color:#e00; font-weight:bold;}
</pre>
<h1>In Action</h1>
<div id="attachment_430" class="wp-caption aligncenter" style="width: 604px"><a href="http://davecavins.com/wp-content/uploads/2010/02/counter.jpg"><img class="size-full wp-image-430" title="counter" src="http://davecavins.com/wp-content/uploads/2010/02/counter.jpg" alt="" width="594" height="116" /></a><p class="wp-caption-text">In Action</p></div>
<div id="attachment_431" class="wp-caption aligncenter" style="width: 603px"><a href="http://davecavins.com/wp-content/uploads/2010/02/counter2.jpg"><img class="size-full wp-image-431" title="counter2" src="http://davecavins.com/wp-content/uploads/2010/02/counter2.jpg" alt="" width="593" height="117" /></a><p class="wp-caption-text">Too many characters</p></div>
<p>In the next part of this series we will add hints to the form fields and make some other improvements.</p>
<p>Related posts:<ol>
<li><a href='http://davecavins.com/2010/05/improving-sharepoint-forms-%e2%80%93-watermarks/' rel='bookmark' title='Improving #SharePoint Forms – Watermarks'>Improving #SharePoint Forms – Watermarks</a></li>
<li><a href='http://davecavins.com/2010/02/improving-sharepoint-forms-hints/' rel='bookmark' title='Improving #SharePoint Forms &#8211; Hints'>Improving #SharePoint Forms &#8211; Hints</a></li>
<li><a href='http://davecavins.com/2010/01/improving-sharepoint-forms/' rel='bookmark' title='Improving #SharePoint Forms'>Improving #SharePoint Forms</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://davecavins.com/2010/02/character-count-on-sharepoint-fields/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Improving #SharePoint Forms</title>
		<link>http://davecavins.com/2010/01/improving-sharepoint-forms/</link>
		<comments>http://davecavins.com/2010/01/improving-sharepoint-forms/#comments</comments>
		<pubDate>Tue, 26 Jan 2010 02:43:15 +0000</pubDate>
		<dc:creator>davecavins</dc:creator>
				<category><![CDATA[General SharePoint]]></category>
		<category><![CDATA[SharePoint Design]]></category>
		<category><![CDATA[better forms]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[forms]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[SharePoint]]></category>

		<guid isPermaLink="false">http://davecavins.com/?p=420</guid>
		<description><![CDATA[Over the next few weeks I will be writing a series of posts on how to improve the out of the box SharePoint forms by using simple CSS and jQuery solutions.  These solutions will help improve usability as well as enhance the look and feel.  Look for the first post later this week. As a [...]
Related posts:<ol>
<li><a href='http://davecavins.com/2010/05/improving-sharepoint-forms-%e2%80%93-watermarks/' rel='bookmark' title='Improving #SharePoint Forms – Watermarks'>Improving #SharePoint Forms – Watermarks</a></li>
<li><a href='http://davecavins.com/2010/02/character-count-on-sharepoint-fields/' rel='bookmark' title='Improving #SharePoint Forms &#8211; Character Count'>Improving #SharePoint Forms &#8211; Character Count</a></li>
<li><a href='http://davecavins.com/2010/02/improving-sharepoint-forms-hints/' rel='bookmark' title='Improving #SharePoint Forms &#8211; Hints'>Improving #SharePoint Forms &#8211; Hints</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Over the next few weeks I will be writing a series of posts on how to improve the out of the box SharePoint forms by using simple CSS and jQuery solutions.  These solutions will help improve usability as well as enhance the look and feel.  Look for the first post later this week.</p>
<p>As a point of reference this is what we will be starting with.</p>
<div id="attachment_422" class="wp-caption aligncenter" style="width: 593px"><a href="http://davecavins.com/wp-content/uploads/2010/01/form.jpg"><img class="size-full wp-image-422" title="form" src="http://davecavins.com/wp-content/uploads/2010/01/form.jpg" alt="" width="583" height="247" /></a><p class="wp-caption-text">Standard SharePoint Form</p></div>
<p>Stay tuned for more soon.</p>
<p>Related posts:<ol>
<li><a href='http://davecavins.com/2010/05/improving-sharepoint-forms-%e2%80%93-watermarks/' rel='bookmark' title='Improving #SharePoint Forms – Watermarks'>Improving #SharePoint Forms – Watermarks</a></li>
<li><a href='http://davecavins.com/2010/02/character-count-on-sharepoint-fields/' rel='bookmark' title='Improving #SharePoint Forms &#8211; Character Count'>Improving #SharePoint Forms &#8211; Character Count</a></li>
<li><a href='http://davecavins.com/2010/02/improving-sharepoint-forms-hints/' rel='bookmark' title='Improving #SharePoint Forms &#8211; Hints'>Improving #SharePoint Forms &#8211; Hints</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://davecavins.com/2010/01/improving-sharepoint-forms/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Hiding the user presence icon</title>
		<link>http://davecavins.com/2010/01/hiding-the-status-icon/</link>
		<comments>http://davecavins.com/2010/01/hiding-the-status-icon/#comments</comments>
		<pubDate>Wed, 06 Jan 2010 21:40:48 +0000</pubDate>
		<dc:creator>davecavins</dc:creator>
				<category><![CDATA[General SharePoint]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[icon]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[user]]></category>

		<guid isPermaLink="false">http://davecavins.com/?p=389</guid>
		<description><![CDATA[When you are using a data view web part to display information including a person field SharePoint always shows the status icon beside thier name. In some cases this is exactly what you want and can be very useful. But sometimes you just want to show a name and nothing else. With most fields you [...]
Related posts:<ol>
<li><a href='http://davecavins.com/2009/11/slideshow-with-captions/' rel='bookmark' title='Image Slideshow with captions'>Image Slideshow with captions</a></li>
<li><a href='http://davecavins.com/2010/01/improving-sharepoint-forms/' rel='bookmark' title='Improving #SharePoint Forms'>Improving #SharePoint Forms</a></li>
<li><a href='http://davecavins.com/2009/12/updating-the-people-picker/' rel='bookmark' title='Updating the #SharePoint People Picker'>Updating the #SharePoint People Picker</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>When you are using a data view web part to display information including a person field SharePoint always shows the status icon beside thier name.</p>
<div id="attachment_391" class="wp-caption aligncenter" style="width: 241px"><img class="size-full wp-image-391" title="status icon" src="http://davecavins.com/wp-content/uploads/2010/01/status-icon1.jpg" alt="status icon" width="231" height="28" /><p class="wp-caption-text">status icon</p></div>
<p>In some cases this is exactly what you want and can be very useful. But sometimes you just want to show a name and nothing else. With most fields you can just change the formatting options to change the display. If you choose to format the value as text SharePoint spits out this long html string.</p>
<pre class="brush: xml; title: ; notranslate">&lt;nobr&gt;&lt;span&gt;&lt;A HREF=&quot;/sites/site/_layouts/userdisp.aspx?ID=2&quot;&gt;Cavins, David R&lt;/A&gt;&lt;img border=&quot;0&quot; height=&quot;1&quot; width=&quot;3&quot; src=&quot;/_layouts/images/blank.gif&quot;/&gt;&lt;a href='javascript:' onclick='IMNImageOnClick();return false;' class='ms-imnlink'&gt;&lt;img name='imnmark' title='' border='0' height='12' width='12' src='/_layouts/images/blank.gif' alt='No presence information' sip='email@email.com' id='imn_8,type=sip'/&gt;&lt;/a&gt;&lt;/span&gt;&lt;/nobr&gt;
</pre>
<p><div id="attachment_399" class="wp-caption aligncenter" style="width: 234px"><a href="http://davecavins.com/wp-content/uploads/2010/01/format1.jpg"><img src="http://davecavins.com/wp-content/uploads/2010/01/format1.jpg" alt="" title="format" width="224" height="175" class="size-full wp-image-399" /></a><p class="wp-caption-text">Format as</p></div><br />
Each of the other formatting options also provides un-desirable results.<br />
Using some basic CSS we can get rid of the status icon and format the text so it does not look like a hyperlink.  First wrap the field value in an element with a class. I used a span with a class of “person”</p>
<pre class="brush: xml; title: ; notranslate">
&lt;span class=”person”&gt;
&lt;xsl:value-of select=&quot;@Author&quot; /&gt;
&lt;/span&gt;
</pre>
<p>Then just add this css to the page.</p>
<pre class="brush: css; title: ; notranslate">
.person nobr span a {
text-decoration:none;
color:black;
cursor:default;
}
</pre>
<p>If you want to take it a step further you can use jQuery to remove the ‘href’ attribute.  Using jQuery we can target the container with the link in it and then change the href value. </p>
<pre class="brush: jscript; title: ; notranslate">
$('span.person a').removeAttr('href');
</pre>
<p>Related posts:<ol>
<li><a href='http://davecavins.com/2009/11/slideshow-with-captions/' rel='bookmark' title='Image Slideshow with captions'>Image Slideshow with captions</a></li>
<li><a href='http://davecavins.com/2010/01/improving-sharepoint-forms/' rel='bookmark' title='Improving #SharePoint Forms'>Improving #SharePoint Forms</a></li>
<li><a href='http://davecavins.com/2009/12/updating-the-people-picker/' rel='bookmark' title='Updating the #SharePoint People Picker'>Updating the #SharePoint People Picker</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://davecavins.com/2010/01/hiding-the-status-icon/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

