<?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>Rise of the PHX &#187; boring code</title>
	<atom:link href="http://riseofthephx.com/category/boring-code/feed/" rel="self" type="application/rss+xml" />
	<link>http://riseofthephx.com</link>
	<description>Web musings in the Valley of the Sun.</description>
	<lastBuildDate>Wed, 01 Jun 2011 15:21:20 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1</generator>
		<item>
		<title>Adding Vimeo/Youtube iframe embed to CKeditor</title>
		<link>http://riseofthephx.com/2010/10/13/adding-vimeoyoutube-iframe-embed-to-ckeditor/</link>
		<comments>http://riseofthephx.com/2010/10/13/adding-vimeoyoutube-iframe-embed-to-ckeditor/#comments</comments>
		<pubDate>Wed, 13 Oct 2010 17:21:37 +0000</pubDate>
		<dc:creator>Gregg</dc:creator>
				<category><![CDATA[boring code]]></category>
		<category><![CDATA[Design]]></category>

		<guid isPermaLink="false">http://riseofthephx.com/?p=153</guid>
		<description><![CDATA[I am in the middle of building a few apps that rely on a text editor and after much research I decided on using CKEditor, a beautiful, well supported WYSIWYG. Within our organization we use video hosted on Vimeo to stream our media as it is both an awesome and cost effective service. The rub [...]]]></description>
			<content:encoded><![CDATA[<p>I am in the middle of building a few apps that rely on a text editor and after much research I decided on using <a href="http://ckeditor.com/">CKEditor</a>, a beautiful, well supported WYSIWYG.</p>
<p>Within our organization we use video hosted on <a href="http://vimeo.com">Vimeo</a> to stream our media as it is both an awesome and cost effective service.</p>
<p>The rub is that the users of my apps would much rather have an easy way to embed their videos rather than embed using the available CKEditor embed function, as embed code can pretty scary to end users and using the new iframe embed method made video from Vimeo and Youtube available on iphone/ipad/etc.</p>
<p>So I reengineered the embed plugin to let an end user embed a Vimeo video to their content by only providing the Vimeo video&#8217;s id.  By adding the <strong>vimeo plugin</strong> to the CKEditor config, and including <strong>Vimeo</strong> in your toolbar definition you now have a shiny vimeo button:<br />
<img class="aligncenter size-full wp-image-154" title="Screen shot 2010-10-13 at 10.05.56 AM" src="http://riseofthephx.com/wp-content/uploads/2010/10/Screen-shot-2010-10-13-at-10.05.56-AM.png" alt="" width="180" height="33" /></p>
<p>By clicking on the Vimeo icon the user receives the following dialog box:<br />
<img class="aligncenter size-full wp-image-155" title="Screen shot 2010-10-13 at 10.06.20 AM" src="http://riseofthephx.com/wp-content/uploads/2010/10/Screen-shot-2010-10-13-at-10.06.20-AM.png" alt="" width="650" height="415" /></p>
<p>After entering the id and OK the video is embedded in the content.  Power users can then modify widths, and other settings.</p>
<p>Oh and as you may have noticed above I have done the same for &#8216;Youtube&#8217; as well.<br />
Just call on plugin youtube and use Youtube to get the shiny Youtube button and embed function.<br />
<img src="http://riseofthephx.com/wp-content/uploads/2010/10/Screen-shot-2010-10-13-at-10.06.32-AM.png" alt="" title="Screen shot 2010-10-13 at 10.06.32 AM" width="611" height="372" class="aligncenter size-full wp-image-156" /></p>
<p>They are a bit rough but at the moment they get the job done.  Feed back is very much appreciated.<br />
<a href='http://riseofthephx.com/wp-content/uploads/2010/10/vimeo.zip'>vimeo plugin (zip)</a> | <a href='http://riseofthephx.com/wp-content/uploads/2010/10/youtube.zip'>youtube plugin (zip)</a></p>
<p><strong>Update:</strong><br />
You may have to first click on the editor window for the embed to work.  as it needs to know where you want to place the video.  I will look into adding a focus so this is not necessary.</p>
<p>As a side note if you are using the plugin on an https domain you may want to update the vimeo URL to &#8220;https://secure/vimeo.com/&#8230;&#8221; and YouTube to &#8220;https://youtube.com/&#8230;&#8221; to avoid scary errors in IE and missing content in the editor.</p>
]]></content:encoded>
			<wfw:commentRss>http://riseofthephx.com/2010/10/13/adding-vimeoyoutube-iframe-embed-to-ckeditor/feed/</wfw:commentRss>
		<slash:comments>16</slash:comments>
		</item>
		<item>
		<title>Find pesky duplicates in mysql</title>
		<link>http://riseofthephx.com/2009/12/14/find-pesky-duplicates-in-mysql/</link>
		<comments>http://riseofthephx.com/2009/12/14/find-pesky-duplicates-in-mysql/#comments</comments>
		<pubDate>Mon, 14 Dec 2009 17:00:23 +0000</pubDate>
		<dc:creator>gturnbul</dc:creator>
				<category><![CDATA[boring code]]></category>

		<guid isPermaLink="false">http://riseofthephx.com/?p=129</guid>
		<description><![CDATA[Let&#8217;s say you had an app that had a ton of users and were suspicious that there were pesky duplicates. Here is a quick mysql select to help put your mind at ease. select username,count(*) as n from users group by username having n > 1; or search by first and last name: select concat(firstname,' [...]]]></description>
			<content:encoded><![CDATA[<p>Let&#8217;s say you had an app that had a ton of users and were suspicious that there were pesky duplicates.  Here is a quick mysql select to help put your mind at ease.</p>
<p><code><br />
select username,count(*) as n<br />
 from users<br />
group by username<br />
having  n > 1;<br />
</code></p>
<p>or search by first and last name:</p>
<p><code><br />
select concat(firstname,' ',lastname) as name, count(*) as n<br />
 from users<br />
group by name<br />
having  n > 1;<br />
</code></p>
]]></content:encoded>
			<wfw:commentRss>http://riseofthephx.com/2009/12/14/find-pesky-duplicates-in-mysql/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

