<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>ben tedder</title>
	
	<link>http://www.bentedder.com</link>
	<description>web consultant + designer</description>
	<lastBuildDate>Tue, 04 Jun 2013 15:08:00 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/bentedder" /><feedburner:info uri="bentedder" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><feedburner:emailServiceId>bentedder</feedburner:emailServiceId><feedburner:feedburnerHostname>http://feedburner.google.com</feedburner:feedburnerHostname><feedburner:feedFlare href="http://add.my.yahoo.com/rss?url=http%3A%2F%2Ffeeds.feedburner.com%2Fbentedder" src="http://us.i1.yimg.com/us.yimg.com/i/us/my/addtomyyahoo4.gif">Subscribe with My Yahoo!</feedburner:feedFlare><feedburner:feedFlare href="http://www.newsgator.com/ngs/subscriber/subext.aspx?url=http%3A%2F%2Ffeeds.feedburner.com%2Fbentedder" src="http://www.newsgator.com/images/ngsub1.gif">Subscribe with NewsGator</feedburner:feedFlare><feedburner:feedFlare href="http://feeds.my.aol.com/add.jsp?url=http%3A%2F%2Ffeeds.feedburner.com%2Fbentedder" src="http://o.aolcdn.com/favorites.my.aol.com/webmaster/ffclient/webroot/locale/en-US/images/myAOLButtonSmall.gif">Subscribe with My AOL</feedburner:feedFlare><feedburner:feedFlare href="http://www.bloglines.com/sub/http://feeds.feedburner.com/bentedder" src="http://www.bloglines.com/images/sub_modern11.gif">Subscribe with Bloglines</feedburner:feedFlare><feedburner:feedFlare href="http://www.netvibes.com/subscribe.php?url=http%3A%2F%2Ffeeds.feedburner.com%2Fbentedder" src="http://www.netvibes.com/img/add2netvibes.gif">Subscribe with Netvibes</feedburner:feedFlare><feedburner:feedFlare href="http://fusion.google.com/add?feedurl=http%3A%2F%2Ffeeds.feedburner.com%2Fbentedder" src="http://buttons.googlesyndication.com/fusion/add.gif">Subscribe with Google</feedburner:feedFlare><feedburner:feedFlare href="http://www.pageflakes.com/subscribe.aspx?url=http%3A%2F%2Ffeeds.feedburner.com%2Fbentedder" src="http://www.pageflakes.com/ImageFile.ashx?instanceId=Static_4&amp;fileName=ATP_blu_91x17.gif">Subscribe with Pageflakes</feedburner:feedFlare><feedburner:feedFlare href="http://www.plusmo.com/add?url=http%3A%2F%2Ffeeds.feedburner.com%2Fbentedder" src="http://plusmo.com/res/graphics/fbplusmo.gif">Subscribe with Plusmo</feedburner:feedFlare><feedburner:feedFlare href="http://www.thefreedictionary.com/_/hp/AddRSS.aspx?http%3A%2F%2Ffeeds.feedburner.com%2Fbentedder" src="http://img.tfd.com/hp/addToTheFreeDictionary.gif">Subscribe with The Free Dictionary</feedburner:feedFlare><feedburner:feedFlare href="http://www.bitty.com/manual/?contenttype=rssfeed&amp;contentvalue=http%3A%2F%2Ffeeds.feedburner.com%2Fbentedder" src="http://www.bitty.com/img/bittychicklet_91x17.gif">Subscribe with Bitty Browser</feedburner:feedFlare><feedburner:feedFlare href="http://www.live.com/?add=http%3A%2F%2Ffeeds.feedburner.com%2Fbentedder" src="http://tkfiles.storage.msn.com/x1piYkpqHC_35nIp1gLE68-wvzLZO8iXl_JMledmJQXP-XTBOLfmQv4zhj4MhcWEJh_GtoBIiAl1Mjh-ndp9k47If7hTaFno0mxW9_i3p_5qQw">Subscribe with Live.com</feedburner:feedFlare><feedburner:feedFlare href="http://mix.excite.eu/add?feedurl=http%3A%2F%2Ffeeds.feedburner.com%2Fbentedder" src="http://image.excite.co.uk/mix/addtomix.gif">Subscribe with Excite MIX</feedburner:feedFlare><feedburner:feedFlare href="http://www.webwag.com/wwgthis.php?url=http%3A%2F%2Ffeeds.feedburner.com%2Fbentedder" src="http://www.webwag.com/images/wwgthis.gif">Subscribe with Webwag</feedburner:feedFlare><feedburner:feedFlare href="http://www.podcastready.com/oneclick_bookmark.php?url=http%3A%2F%2Ffeeds.feedburner.com%2Fbentedder" src="http://www.podcastready.com/images/podcastready_button.gif">Subscribe with Podcast Ready</feedburner:feedFlare><feedburner:feedFlare href="http://www.wikio.com/subscribe?url=http%3A%2F%2Ffeeds.feedburner.com%2Fbentedder" src="http://www.wikio.com/shared/img/add2wikio.gif">Subscribe with Wikio</feedburner:feedFlare><feedburner:feedFlare href="http://www.dailyrotation.com/index.php?feed=http%3A%2F%2Ffeeds.feedburner.com%2Fbentedder" src="http://www.dailyrotation.com/rss-dr2.gif">Subscribe with Daily Rotation</feedburner:feedFlare><feedburner:browserFriendly>Thanks for subscribing to my feed!</feedburner:browserFriendly><item>
		<title>Capturing the value of event.target in IE</title>
		<link>http://feedproxy.google.com/~r/bentedder/~3/FZS1iJgLs_c/</link>
		<comments>http://www.bentedder.com/capturing-the-value-of-event-target-in-ie/#comments</comments>
		<pubDate>Tue, 04 Jun 2013 14:53:45 +0000</pubDate>
		<dc:creator>bentedder</dc:creator>
				<category><![CDATA[web development]]></category>
		<category><![CDATA[chrome]]></category>
		<category><![CDATA[IE]]></category>
		<category><![CDATA[javascript]]></category>

		<guid isPermaLink="false">http://www.bentedder.com/?p=2539</guid>
		<description><![CDATA[<p>I&#8217;m building a system where I&#8217;m attaching a function to an event trigger. Everything was working great (I typically develop in Chrome because of speed and the developer console). However, I hopped over to IE7 and IE8 (I use spoon.net&#8217;s app and highly recommend it), but the function wasn&#8217;t reading the event.target.value. Original (incorrect): New [...]</p><p>The post <a href="http://www.bentedder.com/capturing-the-value-of-event-target-in-ie/">Capturing the value of event.target in IE</a> appeared first on <a href="http://www.bentedder.com">ben tedder</a>.</p>]]></description>
				<content:encoded><![CDATA[<p>I&#8217;m building a system where I&#8217;m attaching a function to an event trigger. Everything was working great (I typically develop in Chrome because of speed and the developer console). However, I hopped over to IE7 and IE8 (I use <a title="Spoon" href="http://www.spoon.net">spoon.net&#8217;s app</a> and highly recommend it), but the function wasn&#8217;t reading the event.target.value.</p>
<p>Original (<strong>incorrect</strong>):</p>
<pre class="brush: jscript; title: ; notranslate">function dosomething(event) {
var x = event.target.value;
}</pre>
<p><br/><br/><br />
New (<strong>works in all browsers</strong>):</p>
<pre class="brush: jscript; title: ; notranslate">
function dosomething(event) {
var x = $(event.target).val();
}</pre>
<p>Good &#8216;ol jQuery!</p>
<p>The post <a href="http://www.bentedder.com/capturing-the-value-of-event-target-in-ie/">Capturing the value of event.target in IE</a> appeared first on <a href="http://www.bentedder.com">ben tedder</a>.</p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/bentedder?a=FZS1iJgLs_c:ShPlouv-9rg:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/bentedder?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/bentedder?a=FZS1iJgLs_c:ShPlouv-9rg:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/bentedder?i=FZS1iJgLs_c:ShPlouv-9rg:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/bentedder?a=FZS1iJgLs_c:ShPlouv-9rg:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/bentedder?i=FZS1iJgLs_c:ShPlouv-9rg:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/bentedder?a=FZS1iJgLs_c:ShPlouv-9rg:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/bentedder?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/bentedder?a=FZS1iJgLs_c:ShPlouv-9rg:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/bentedder?i=FZS1iJgLs_c:ShPlouv-9rg:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/bentedder/~4/FZS1iJgLs_c" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.bentedder.com/capturing-the-value-of-event-target-in-ie/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.bentedder.com/capturing-the-value-of-event-target-in-ie/</feedburner:origLink></item>
		<item>
		<title>Search custom post types in WordPress with Genesis</title>
		<link>http://feedproxy.google.com/~r/bentedder/~3/c4IuyB1bFUc/</link>
		<comments>http://www.bentedder.com/search-custom-post-types-in-wordpress-with-genesis/#comments</comments>
		<pubDate>Thu, 30 May 2013 21:24:23 +0000</pubDate>
		<dc:creator>bentedder</dc:creator>
				<category><![CDATA[wordpress]]></category>
		<category><![CDATA[genesis]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[search]]></category>

		<guid isPermaLink="false">http://www.bentedder.com/?p=2535</guid>
		<description><![CDATA[<p>I dug around for this a while today, and only ran across one helpful article. It was a couple years old, but still did the trick. I customized it a tiny bit (took away a few lines). Basically, by putting this code in your functions.php file, you can customize the WordPress search to only search [...]</p><p>The post <a href="http://www.bentedder.com/search-custom-post-types-in-wordpress-with-genesis/">Search custom post types in WordPress with Genesis</a> appeared first on <a href="http://www.bentedder.com">ben tedder</a>.</p>]]></description>
				<content:encoded><![CDATA[<p>I dug around for this a while today, and only ran across <a href="http://www.billerickson.net/wordpress-search-post-type/">one helpful article</a>. It was a couple years old, but still did the trick. I customized it a tiny bit (took away a few lines). Basically, by putting this code in your functions.php file, you can customize the WordPress search to only search the custom post type of your choosing. This is specific to the Genesis Framework, but I believe it can be customized to work for any theme. Hope you find it useful!</p>
<script src="https://gist.github.com/5681329.js"></script><noscript><pre><code class="language-php php">/* 
*  This is used to override the WordPress search to ONLY search for a
*  custom post type. I used it on a photographer's website (only wanted
*  users to search for photo post types).
* 
*  I put this snippet somewhere in functions.php
*/
function bt_customize_search($form, $search_text, $button_text) {
	$onfocus = &quot; onfocus=\&quot;if (this.value == '$search_text') {this.value = '';}\&quot;&quot;;
	$onblur = &quot; onblur=\&quot;if (this.value == '') {this.value = '$search_text';}\&quot;&quot;;
	$custom_form = '
		&lt;form method=&quot;get&quot; action=&quot;' . get_option('home') . '/&quot; &gt;
		&lt;input type=&quot;text&quot; value=&quot;'. $search_text .'&quot; name=&quot;s&quot;'. $onfocus . $onblur .' /&gt;
		&lt;input type=&quot;hidden&quot; name=&quot;post_type&quot; value=&quot;CUSTOM_POST_TYPE&quot; /&gt;
		&lt;input type=&quot;submit&quot; value=&quot;'. $button_text .'&quot; /&gt;
		&lt;/form&gt;
	';
	return $custom_form;
}
add_filter('genesis_search_form', 'bt_customize_search', 10, 3);</code></pre></noscript>
<p>The post <a href="http://www.bentedder.com/search-custom-post-types-in-wordpress-with-genesis/">Search custom post types in WordPress with Genesis</a> appeared first on <a href="http://www.bentedder.com">ben tedder</a>.</p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/bentedder?a=c4IuyB1bFUc:O2EqhueR2sk:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/bentedder?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/bentedder?a=c4IuyB1bFUc:O2EqhueR2sk:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/bentedder?i=c4IuyB1bFUc:O2EqhueR2sk:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/bentedder?a=c4IuyB1bFUc:O2EqhueR2sk:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/bentedder?i=c4IuyB1bFUc:O2EqhueR2sk:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/bentedder?a=c4IuyB1bFUc:O2EqhueR2sk:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/bentedder?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/bentedder?a=c4IuyB1bFUc:O2EqhueR2sk:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/bentedder?i=c4IuyB1bFUc:O2EqhueR2sk:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/bentedder/~4/c4IuyB1bFUc" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.bentedder.com/search-custom-post-types-in-wordpress-with-genesis/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.bentedder.com/search-custom-post-types-in-wordpress-with-genesis/</feedburner:origLink></item>
		<item>
		<title>Use the Vertical Scroll plugin with a shortcode</title>
		<link>http://feedproxy.google.com/~r/bentedder/~3/o4XiNgy_gT4/</link>
		<comments>http://www.bentedder.com/use-the-vertical-scroll-plugin-with-a-shortcode/#comments</comments>
		<pubDate>Wed, 24 Apr 2013 17:24:38 +0000</pubDate>
		<dc:creator>bentedder</dc:creator>
				<category><![CDATA[web development]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[chinese]]></category>
		<category><![CDATA[English]]></category>
		<category><![CDATA[multi-lingual]]></category>
		<category><![CDATA[plugin]]></category>

		<guid isPermaLink="false">http://www.bentedder.com/?p=2510</guid>
		<description><![CDATA[<p>This post comes again from a client request. They were using the Vertical Scroll plugin for WordPress. However, they needed this scrolling box to work on their multilingual site (Chinese &#38; English). But with this plugin, there&#8217;s no shortcode, or way to include it in a translatable page. So, I wrote a really quick plugin [...]</p><p>The post <a href="http://www.bentedder.com/use-the-vertical-scroll-plugin-with-a-shortcode/">Use the Vertical Scroll plugin with a shortcode</a> appeared first on <a href="http://www.bentedder.com">ben tedder</a>.</p>]]></description>
				<content:encoded><![CDATA[<p>This post comes again from a client request. They were using the <a href="http://wordpress.org/extend/plugins/vertical-scroll-recent-post/">Vertical Scroll</a> plugin for WordPress. However, they needed this scrolling box to work on their multilingual site (Chinese &amp; English). But with this plugin, there&#8217;s no shortcode, or way to include it in a translatable page. So, I wrote a really quick plugin enhancement. Check it out, hope you find it useful:</p>
<script src="https://gist.github.com/5453842.js"></script><noscript><pre><code class="language-php php">&lt;?php
/*
	Plugin Name: Vertical Scroll Shortcode
	URI: http://www.bentedder.com
	Description: Enhance the &quot;Vertical Scroll&quot; plugin with a shortcode to use in posts
	Version: 1.0
	Author: Ben Tedder
	Author URI: http://www.bentedder.com
	License: GPL2
*/

function bt_vertical_scroll() {
	ob_start();
	if (function_exists (vsrp)) {
		vsrp();
	}
	return ob_get_clean();	
}
add_shortcode('vertical_scroll', 'bt_vertical_scroll');

?&gt;
</code></pre></noscript>
<p>The post <a href="http://www.bentedder.com/use-the-vertical-scroll-plugin-with-a-shortcode/">Use the Vertical Scroll plugin with a shortcode</a> appeared first on <a href="http://www.bentedder.com">ben tedder</a>.</p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/bentedder?a=o4XiNgy_gT4:cYuFHHMPN8s:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/bentedder?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/bentedder?a=o4XiNgy_gT4:cYuFHHMPN8s:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/bentedder?i=o4XiNgy_gT4:cYuFHHMPN8s:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/bentedder?a=o4XiNgy_gT4:cYuFHHMPN8s:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/bentedder?i=o4XiNgy_gT4:cYuFHHMPN8s:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/bentedder?a=o4XiNgy_gT4:cYuFHHMPN8s:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/bentedder?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/bentedder?a=o4XiNgy_gT4:cYuFHHMPN8s:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/bentedder?i=o4XiNgy_gT4:cYuFHHMPN8s:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/bentedder/~4/o4XiNgy_gT4" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.bentedder.com/use-the-vertical-scroll-plugin-with-a-shortcode/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.bentedder.com/use-the-vertical-scroll-plugin-with-a-shortcode/</feedburner:origLink></item>
		<item>
		<title>GetListItems not showing all columns in SharePoint</title>
		<link>http://feedproxy.google.com/~r/bentedder/~3/cGhZ8xNLgrs/</link>
		<comments>http://www.bentedder.com/getlistitems-not-showing-all-columns-in-sharepoint/#comments</comments>
		<pubDate>Fri, 19 Apr 2013 21:08:37 +0000</pubDate>
		<dc:creator>bentedder</dc:creator>
				<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[GetListItems]]></category>
		<category><![CDATA[spservices]]></category>

		<guid isPermaLink="false">http://www.bentedder.com/?p=2508</guid>
		<description><![CDATA[<p>I struggled with this for a while today. I was using SPServices&#8217; GetListItems to pull data from SharePoint. I was using an external content type, and for the life of me could not figure out why the query was only pulling in some of my columns. The others just weren&#8217;t there. So I searched the [...]</p><p>The post <a href="http://www.bentedder.com/getlistitems-not-showing-all-columns-in-sharepoint/">GetListItems not showing all columns in SharePoint</a> appeared first on <a href="http://www.bentedder.com">ben tedder</a>.</p>]]></description>
				<content:encoded><![CDATA[<p>I struggled with this for a while today. I was using SPServices&#8217; GetListItems to pull data from SharePoint. I was using an external content type, and for the life of me could not figure out why the query was only pulling in some of my columns. The others just weren&#8217;t there. So I searched the web for a while, coming up with nothing that seemed to pertain to me. So I decided to look at my data. Turns out <strong>those columns didn&#8217;t have any data</strong>! So, in short, look at your data! I was using SPXmlToJson, as well as just the standard $.each() function to try to pull those columns; but with no data, nothing was coming back.</p>
<p>Bottom line: look at your data first!</p>
<p>The post <a href="http://www.bentedder.com/getlistitems-not-showing-all-columns-in-sharepoint/">GetListItems not showing all columns in SharePoint</a> appeared first on <a href="http://www.bentedder.com">ben tedder</a>.</p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/bentedder?a=cGhZ8xNLgrs:h9kX0Bl0XBo:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/bentedder?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/bentedder?a=cGhZ8xNLgrs:h9kX0Bl0XBo:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/bentedder?i=cGhZ8xNLgrs:h9kX0Bl0XBo:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/bentedder?a=cGhZ8xNLgrs:h9kX0Bl0XBo:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/bentedder?i=cGhZ8xNLgrs:h9kX0Bl0XBo:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/bentedder?a=cGhZ8xNLgrs:h9kX0Bl0XBo:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/bentedder?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/bentedder?a=cGhZ8xNLgrs:h9kX0Bl0XBo:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/bentedder?i=cGhZ8xNLgrs:h9kX0Bl0XBo:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/bentedder/~4/cGhZ8xNLgrs" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.bentedder.com/getlistitems-not-showing-all-columns-in-sharepoint/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://www.bentedder.com/getlistitems-not-showing-all-columns-in-sharepoint/</feedburner:origLink></item>
		<item>
		<title>Embed Tudou and Youku videos in WordPress</title>
		<link>http://feedproxy.google.com/~r/bentedder/~3/5Zg7Pc2DtTo/</link>
		<comments>http://www.bentedder.com/embed-tudou-and-youku-videos-in-wordpress/#comments</comments>
		<pubDate>Fri, 19 Apr 2013 13:00:10 +0000</pubDate>
		<dc:creator>bentedder</dc:creator>
				<category><![CDATA[wordpress]]></category>
		<category><![CDATA[tudou]]></category>
		<category><![CDATA[video]]></category>
		<category><![CDATA[youku]]></category>

		<guid isPermaLink="false">http://www.bentedder.com/?p=2499</guid>
		<description><![CDATA[<p>The challenge this morning was to create a way for a client to embed Tudou videos (Chinese equivalent of Youtube) on their WordPress site in a really easy way. There&#8217;s nothing really out there for this, so I decided to take 30 minutes and just write my own plugin. It&#8217;s really basic, but it does [...]</p><p>The post <a href="http://www.bentedder.com/embed-tudou-and-youku-videos-in-wordpress/">Embed Tudou and Youku videos in WordPress</a> appeared first on <a href="http://www.bentedder.com">ben tedder</a>.</p>]]></description>
				<content:encoded><![CDATA[<p>The challenge this morning was to create a way for a client to embed Tudou videos (Chinese equivalent of Youtube) on their WordPress site in a really easy way. There&#8217;s nothing really out there for this, so I decided to take 30 minutes and just write my own plugin. It&#8217;s really basic, but it does the job. While I was writing it, I figured I&#8217;d also include the ability to embed Youku videos as well. It uses iframes, but could easily be modified to use the embed code or whatever. So, download and enjoy! Or just copy the script here and put in your plugins folder!</p>
<h2>Usage:</h2>
<p>Find the ID of the video by looking in the URL of your video on Tudou or Youku. Then use that ID in the following shortcode on any post or page:</p>
<p>Tudou videos: [vid site="tudou" id="xxxxxx"]</p>
<p>Youku videos: [vid site="youku" id="xxxxxx"]</p>
<h2>Download</h2>
<p>Download the plugin here: <a href="http://cdn.bentedder.com/wp-content/uploads/2013/04/youku-tudou-embed.zip">youku-tudou-embed.zip</a></p>
<h2>Source Code</h2>
<p>Here&#8217;s the source code. Note: this is based on a <a href="wp.tutsplus.com/articles/tips-articles/quick-tip-your-own-video-shortcode" class="broken_link">tutorial</a> on tutsplus.</p>
<script src="https://gist.github.com/4bd43591062f5a330688.js"></script><noscript><pre><code class="language-php php">&lt;?php
/*
	Plugin Name: Youku and Tudou Video Embed
	URI: http://www.bentedder.com
	Description: A simple shortcode to embed Youku and Tudou videos in your website
	Version: 1.0
	Author: Ben Tedder
	Author URI: http://www.bentedder.com
	License: GPL2
*/

function vid_sc($atts, $content=null) {
	extract(
		shortcode_atts(array(
			'site' =&gt; 'tudou',
			'id' =&gt; '',
			'w' =&gt; '600',
			'h' =&gt; '400'
		), $atts)
	);
	if( $site == &quot;tudou&quot; ) {
		$src = 'http://www.tudou.com/v/' . $id . '/&amp;resourceId=0_04_02_99&amp;tid=0/v.swf';
	}
	else if( $site == &quot;youku&quot; ) {
		$src = 'http://player.youku.com/embed/' . $id;
	}
	if ( $id != '' ) {
		return '&lt;iframe src=&quot;' . $src . '&quot; width=&quot;' . $w . '&quot; height=&quot;' . $h .'&quot; class=&quot;vid-' . $site . '&quot;&gt;&lt;/iframe&gt;';
	}
}
add_shortcode('vid', 'vid_sc');

?&gt;
</code></pre></noscript>
<p>The post <a href="http://www.bentedder.com/embed-tudou-and-youku-videos-in-wordpress/">Embed Tudou and Youku videos in WordPress</a> appeared first on <a href="http://www.bentedder.com">ben tedder</a>.</p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/bentedder?a=5Zg7Pc2DtTo:rar49q-f-n4:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/bentedder?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/bentedder?a=5Zg7Pc2DtTo:rar49q-f-n4:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/bentedder?i=5Zg7Pc2DtTo:rar49q-f-n4:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/bentedder?a=5Zg7Pc2DtTo:rar49q-f-n4:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/bentedder?i=5Zg7Pc2DtTo:rar49q-f-n4:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/bentedder?a=5Zg7Pc2DtTo:rar49q-f-n4:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/bentedder?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/bentedder?a=5Zg7Pc2DtTo:rar49q-f-n4:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/bentedder?i=5Zg7Pc2DtTo:rar49q-f-n4:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/bentedder/~4/5Zg7Pc2DtTo" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.bentedder.com/embed-tudou-and-youku-videos-in-wordpress/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<feedburner:origLink>http://www.bentedder.com/embed-tudou-and-youku-videos-in-wordpress/</feedburner:origLink></item>
		<item>
		<title>Part 2: Sort a javascript array of dates from SharePoint</title>
		<link>http://feedproxy.google.com/~r/bentedder/~3/qVLRhaiqTeo/</link>
		<comments>http://www.bentedder.com/part-2-sort-a-javascript-array-of-dates-from-sharepoint/#comments</comments>
		<pubDate>Mon, 11 Mar 2013 15:01:52 +0000</pubDate>
		<dc:creator>bentedder</dc:creator>
				<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[date]]></category>
		<category><![CDATA[javascript]]></category>

		<guid isPermaLink="false">http://www.bentedder.com/?p=2473</guid>
		<description><![CDATA[<p>This is more of a follow-up to my post yesterday on how to convert dates from SharePoint to javascript. Today I&#8217;ll show you how to pull a list of dates from SharePoint (as well as other fields), push them into an array, and then sort that array by date. Problem: Pull a list of reservations [...]</p><p>The post <a href="http://www.bentedder.com/part-2-sort-a-javascript-array-of-dates-from-sharepoint/">Part 2: Sort a javascript array of dates from SharePoint</a> appeared first on <a href="http://www.bentedder.com">ben tedder</a>.</p>]]></description>
				<content:encoded><![CDATA[<p>This is more of a follow-up to my post yesterday on how to <a title="Convert a SharePoint date/time field to a javascript Date() object" href="http://www.bentedder.com/convert-a-sharepoint-datetime-field-to-a-javascript-date-object/">convert dates from SharePoint to javascript</a>. Today I&#8217;ll show you how to pull a list of dates from SharePoint (as well as other fields), push them into an array, and then sort that array by date.</p>
<p><strong>Problem:</strong> Pull a list of reservations from a SharePoint and order them chronologically. There are three fields, firstName, lastName, and startTime. We want to pull all three fields, and then output those fields into an unordered list. As an added trick, we have several reservation lists we need to pull from (Elementary School, Middle School, and High School). So all reservations need to be pulled, and <strong>then </strong>sorted chronologically.</p>
<p><strong>Solution 1:</strong> Just modify your CAML query to OrderBy the startTime field. Well, this works fine. But when pulling from multiple lists (using SPServices), the results will essentially be &#8220;grouped&#8221; by list.</p>
<p><strong>Solution 2:</strong> Push all results to a javascript array, then sort the array. The problem here is that SharePoint&#8217;s date/time field isn&#8217;t very javascript-y. So sorting won&#8217;t work.</p>
<p><strong>Solution 3:</strong> Use the convertSPDate() function mentioned in yesterday&#8217;s post on <a title="Convert a SharePoint date/time field to a javascript Date() object" href="http://www.bentedder.com/convert-a-sharepoint-datetime-field-to-a-javascript-date-object/">converting dates from SharePoint to javascript</a>, then follow solution 2!</p>
<p>Here&#8217;s the code (commented with explanations):</p>
<script src="https://gist.github.com/e1af9a6ce3cc191feb8f.js"></script><noscript><pre><code class="language-javascript javascript">var myListURL = &quot;https://mysharepointsite/&quot;
var allReservations = [];
var allLists = ['Elementary', 'Middle', 'High'];

// iterate through each list with SPServices, pulling all items
$.each(allLists, function(i){
  $().SPServices({
		operation: &quot;GetListItems&quot;,
		webURL: myListURL,
		async:false,
		listName: allLists[i],
		completefunc: function (xData, Status) {
			$(xData.responseXML).SPFilterNode(&quot;z:row&quot;).each(function(i){
				// each row is pushed into the allReservations array
				allReservations.push({ 
					startTime: $(this).attr(&quot;ows_startTime&quot;),
					firstName: $(this).attr(&quot;ows_firstName&quot;),
					lastName: $(this).attr(&quot;ows_lastName&quot;)
				});
			})
		}
	});
});

// add a new key to the associative array called jsDate (to sort by)
$.each(allReservations, function(i){
	// set jsDate to the converted SharePoint date, so javascript can use it
	allReservations[i].jsDate = convertSPDate(allReservations[i].startTime);
});

// a simple sort function that re-orders the array based on the jsDate
allReservations.sort(function (a, b) {	
	return a.jsDate - b.jsDate;
});

$.each(allReservations, function(i){
	$('#myList ul').append('&lt;li&gt;' + allReservations[i].firstName + ' ' + allReservations[i].lastName + ' - ' + allReservations[i].startTime + '&lt;/li&gt;');	
})


function convertSPDate(d) {
/*
*	A function to convert a standard SharePoint
*	date/time field (YYYY-MM-DD HH:MM:SS) to a
*	javascript Date() object
*
*	Ben Tedder (www.bentedder.com)
*/
    // split apart the date and time
	var xDate = d.split(&quot; &quot;)[0];
	var xTime = d.split(&quot; &quot;)[1];

    // split apart the hour, minute, &amp; second
	var xTimeParts = xTime.split(&quot;:&quot;);
	var xHour = xTimeParts[0];
	var xMin = xTimeParts[1];
	var xSec = xTimeParts[2];

    // split apart the year, month, &amp; day
	var xDateParts = xDate.split(&quot;-&quot;);
	var xYear = xDateParts[0];
	var xMonth = xDateParts[1];
	var xDay = xDateParts[2];
	
	var dDate = new Date(xYear, xMonth, xDay, xHour, xMin, xSec);
	return dDate;
}
</code></pre></noscript>
<p>The post <a href="http://www.bentedder.com/part-2-sort-a-javascript-array-of-dates-from-sharepoint/">Part 2: Sort a javascript array of dates from SharePoint</a> appeared first on <a href="http://www.bentedder.com">ben tedder</a>.</p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/bentedder?a=qVLRhaiqTeo:NREZ-CCGqRI:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/bentedder?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/bentedder?a=qVLRhaiqTeo:NREZ-CCGqRI:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/bentedder?i=qVLRhaiqTeo:NREZ-CCGqRI:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/bentedder?a=qVLRhaiqTeo:NREZ-CCGqRI:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/bentedder?i=qVLRhaiqTeo:NREZ-CCGqRI:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/bentedder?a=qVLRhaiqTeo:NREZ-CCGqRI:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/bentedder?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/bentedder?a=qVLRhaiqTeo:NREZ-CCGqRI:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/bentedder?i=qVLRhaiqTeo:NREZ-CCGqRI:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/bentedder/~4/qVLRhaiqTeo" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.bentedder.com/part-2-sort-a-javascript-array-of-dates-from-sharepoint/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.bentedder.com/part-2-sort-a-javascript-array-of-dates-from-sharepoint/</feedburner:origLink></item>
		<item>
		<title>Convert a SharePoint date/time field to a javascript Date() object</title>
		<link>http://feedproxy.google.com/~r/bentedder/~3/goAxAmq4A1c/</link>
		<comments>http://www.bentedder.com/convert-a-sharepoint-datetime-field-to-a-javascript-date-object/#comments</comments>
		<pubDate>Mon, 11 Mar 2013 14:39:03 +0000</pubDate>
		<dc:creator>bentedder</dc:creator>
				<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[date]]></category>
		<category><![CDATA[javascript]]></category>

		<guid isPermaLink="false">http://www.bentedder.com/?p=2464</guid>
		<description><![CDATA[<p>In a recent project I was looking for a way to sort an array of dates brought back from SharePoint. This worked fine in Chrome, but then I realized it didn&#8217;t work in any other browsers! So, by writing a few console.log() lines to test with Safari &#38; FireFox, I discovered that the date that [...]</p><p>The post <a href="http://www.bentedder.com/convert-a-sharepoint-datetime-field-to-a-javascript-date-object/">Convert a SharePoint date/time field to a javascript Date() object</a> appeared first on <a href="http://www.bentedder.com">ben tedder</a>.</p>]]></description>
				<content:encoded><![CDATA[<p>In a recent project I was looking for a way to sort an array of dates brought back from SharePoint. This worked fine in Chrome, but then I realized it didn&#8217;t work in any other browsers! So, by writing a few console.log() lines to test with Safari &amp; FireFox, I discovered that the date that SharePoint passes is seen to javascript as an &#8220;invalid date&#8221; to almost all browsers. So, here&#8217;s a small helper function that just converts what you get from SharePoint into a true javascript Date() object. Hope you find it helpful! I&#8217;ve also included it in my code section as a Gist, so grab just the function there if you&#8217;d like.</p>
<pre class="brush: jscript; title: ; notranslate">

function convertSPDate(d) {
/*
*	A function to convert a standard SharePoint
*	date/time field (YYYY-MM-DD HH:MM:SS) to a
*	javascript Date() object
*
*	Author: Ben Tedder (www.bentedder.com)
*/
    // split apart the date and time
	var xDate = d.split(&quot; &quot;)[0];
	var xTime = d.split(&quot; &quot;)[1];

    // split apart the hour, minute, &amp; second
	var xTimeParts = xTime.split(&quot;:&quot;);
	var xHour = xTimeParts[0];
	var xMin = xTimeParts[1];
	var xSec = xTimeParts[2];

    // split apart the year, month, &amp; day
	var xDateParts = xDate.split(&quot;-&quot;);
	var xYear = xDateParts[0];
	var xMonth = xDateParts[1];
	var xDay = xDateParts[2];

	var dDate = new Date(xYear, xMonth, xDay, xHour, xMin, xSec);
	return dDate;
}

	// create a couple of variables
	var startTime;
	var convertedStartTime;

	// a standard SPServices call
	$().SPServices({
		operation: &quot;GetListItems&quot;,
		webURL: myListURL,
		async:false,
		listName: myListName,
		CAMLRowLimit: 1,
		completefunc: function (xData, Status) {
			$(xData.responseXML).SPFilterNode(&quot;z:row&quot;).each(function(i){
				// set the value of startTime to standard SP date/time field
				startTime = $(this).attr(&quot;ows_startTime&quot;);
			})
		}
	});

	// set the convertedStartTime to a true javascript date
	convertedStartTime = convertSPDate(startTime);
</pre>
<p>The post <a href="http://www.bentedder.com/convert-a-sharepoint-datetime-field-to-a-javascript-date-object/">Convert a SharePoint date/time field to a javascript Date() object</a> appeared first on <a href="http://www.bentedder.com">ben tedder</a>.</p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/bentedder?a=goAxAmq4A1c:YsDw01_PUpU:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/bentedder?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/bentedder?a=goAxAmq4A1c:YsDw01_PUpU:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/bentedder?i=goAxAmq4A1c:YsDw01_PUpU:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/bentedder?a=goAxAmq4A1c:YsDw01_PUpU:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/bentedder?i=goAxAmq4A1c:YsDw01_PUpU:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/bentedder?a=goAxAmq4A1c:YsDw01_PUpU:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/bentedder?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/bentedder?a=goAxAmq4A1c:YsDw01_PUpU:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/bentedder?i=goAxAmq4A1c:YsDw01_PUpU:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/bentedder/~4/goAxAmq4A1c" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.bentedder.com/convert-a-sharepoint-datetime-field-to-a-javascript-date-object/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://www.bentedder.com/convert-a-sharepoint-datetime-field-to-a-javascript-date-object/</feedburner:origLink></item>
	</channel>
</rss><!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Page Caching using disk: enhanced
Content Delivery Network via cdn.bentedder.com

 Served from: www.bentedder.com @ 2013-06-19 05:18:28 by W3 Total Cache -->
