<?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>Faith Family Jesus</title>
	<atom:link href="http://faithfamilyjesus.com/blog/?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://faithfamilyjesus.com/blog</link>
	<description>Developers Blog</description>
	<lastBuildDate>Mon, 05 Oct 2009 09:11:11 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Youtube Profile to Website Tutorial in 12 easy steps</title>
		<link>http://faithfamilyjesus.com/blog/?p=3</link>
		<comments>http://faithfamilyjesus.com/blog/?p=3#comments</comments>
		<pubDate>Sun, 04 Oct 2009 05:58:41 +0000</pubDate>
		<dc:creator>Cliff</dc:creator>
				<category><![CDATA[Website Tutorials]]></category>
		<category><![CDATA[youtube profile on website]]></category>

		<guid isPermaLink="false">http://faithfamilyjesus.com/blog/?p=3</guid>
		<description><![CDATA[Put your youtube profile on your website with 12 easy steps and only 4 copy paste operations.]]></description>
			<content:encoded><![CDATA[<p>I just got the youtube profile loader working on <a title="Faith Family Jesus" href="http://faithfamilyjesus.com" target="_self">Faith Family Jesus</a> and I would like to share with you how you can do it very easily with just 4 paste operations.  I hope to have the youtube interface working for all of the churches on the faith family jesus site in the next few weeks.  I should have the Twitter, and Google Calendar API&#8217;s working soon also with tutorials so please subscribe!</p>
<p>If you want to put your youtube videos on your own website it&#8217;s pretty easy, but you are gonna need a few things.</p>
<p>1.  web hosting with php 5</p>
<p>2. Download Zend framework with Gdata module <a href="http://framework.zend.com/download/gdata">http://framework.zend.com/download/gdata</a> I used version 1.9.3PL1</p>
<p>3. Unzip and upload to your server keeping the folder named ZendGdata-1.9.3PL1</p>
<p>4. Get a developer key <a href="http://code.google.com/apis/youtube/dashboard/gwt">http://code.google.com/apis/youtube/dashboard/gwt</a></p>
<p>5.  goto the folder at ZendGdata-1.9.3PL1/demos/Zend/Gdata/YouTubeVideoApp and create a new php file called testyoutube.php</p>
<p>copy and paste the following into the file</p>
<p>&lt;?php session_start();<br />
set_include_path(&#8217;.&#8217; . PATH_SEPARATOR . dirname(__FILE__) . &#8216;/ZendGdata-1.9.3PL1/library&#8217;);<br />
require_once &#8216;Zend/Loader.php&#8217;;<br />
$_SESSION['developerKey'] = &#8216;PASTE YOUR KEY HERE&#8217;;<br />
function uploadStatus($status, $code = null, $videoId = null)<br />
{<br />
switch ($status) {<br />
case $status &lt; 400:<br />
echo  &#8216;Success ! Entry created (id: &#8216;. $videoId .<br />
&#8216;) &lt;a href=&#8221;#&#8221; onclick=&#8221; ytVideoApp.checkUploadDetails(\&#8221;.<br />
$videoId .&#8217;\'); &#8220;&gt;(check details)&lt;/a&gt;&#8217;;<br />
break;<br />
default:<br />
echo &#8216;There seems to have been an error: &#8216;. $code .<br />
&#8216;&lt;a href=&#8221;#&#8221; onclick=&#8221; ytVideoApp.checkUploadDetails(\&#8221;.<br />
$videoId . &#8216;\&#8217;); &#8220;&gt;(check details)&lt;/a&gt;&#8217;;<br />
}<br />
}</p>
<p>?&gt;<br />
&lt;!DOCTYPE html PUBLIC &#8220;-//W3C//DTD XHTML 1.0 Transitional//EN&#8221;<br />
&#8220;<a href="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd</a>&#8220;&gt;<br />
&lt;html xmlns=&#8221;<a href="http://www.w3.org/1999/xhtml">http://www.w3.org/1999/xhtml</a>&#8220;&gt;<br />
&lt;head&gt;<br />
&lt;title&gt;Youtube Test&lt;/title&gt;<br />
&lt;meta http-equiv=&#8221;Content-Type&#8221; content=&#8221;text/html; charset=utf-8&#8243; /&gt;<br />
&lt;link href=&#8221;video_app.css&#8221; type=&#8221;text/css&#8221; rel=&#8221;stylesheet&#8221; /&gt;<br />
&lt;script src=&#8221;video_app.js&#8221; type=&#8221;text/javascript&#8221;&gt;&lt;/script&gt;<br />
&lt;/head&gt;<br />
&lt;body&gt;<br />
&lt;div id=&#8221;searchBox&#8221;&gt;<br />
&lt;script&gt;guy = ytVideoApp.listVideos(&#8217;search_username&#8217;, &#8216;aboutbiblevideos&#8217;, 1);&lt;/script&gt;<br />
&lt;/div&gt;<br />
&lt;div id=&#8221;searchResultsListColumn&#8221;&gt;<br />
&lt;div id=&#8221;searchResultsVideoList&#8221;&gt;&lt;/div&gt;<br />
&lt;div id=&#8221;searchResultsNavigation&#8221;&gt;<br />
&lt;form id=&#8221;navigationForm&#8221; action=&#8221;javascript:void();&#8221;&gt;<br />
&lt;input type=&#8221;button&#8221; id=&#8221;previousPageButton&#8221; onclick=&#8221;ytVideoApp.listVideos(ytVideoApp.previousQueryType, ytVideoApp.previousSearchTerm, ytVideoApp.previousPage);&#8221; value=&#8221;Back&#8221; style=&#8221;display: none;&#8221; /&gt;<br />
&lt;input type=&#8221;button&#8221; id=&#8221;nextPageButton&#8221; onclick=&#8221;ytVideoApp.listVideos(ytVideoApp.previousQueryType, ytVideoApp.previousSearchTerm, ytVideoApp.nextPage);&#8221; value=&#8221;Next&#8221; style=&#8221;display: none;&#8221; /&gt;<br />
&lt;/form&gt;<br />
&lt;/div&gt;<br />
&lt;/div&gt;<br />
&lt;div id=&#8221;searchResultsVideoColumn&#8221;&gt;<br />
&lt;div id=&#8221;videoPlayer&#8221;&gt;<br />
&lt;script&gt;<br />
ytVideoApp.presentVideo(&#8217;oWHHrRs_0gw&#8217;);<br />
// copy and paste the v param to the end or until the &amp;<br />
// ie  <a href="http://www.youtube.com/watch?v=oWHHrRs_0gw">http://www.youtube.com/watch?v=oWHHrRs_0gw</a><br />
&lt;/script&gt;<br />
&lt;/div&gt;<br />
&lt;/div&gt;<br />
&lt;/body&gt;<br />
&lt;/html&gt;</p>
<p>6.  on line 3 above paste your key over PASTE YOUR KEY HERE,  at the bottom of the file where it says</p>
<p>ytVideoApp.presentVideo(&#8217;oWHHrRs_0gw&#8217;);</p>
<p>paste your default video id, instead of oWHHrRs_ogw which is About Bible Videos series The Book of Revelation chapter 1.  You can find the id on the URL of your youtube video, it will be the v=something paramater of the URL</p>
<p>7.  save the file and upload the file along with all of the other files in the YouTubeVideoApp folder to the main folder on your website (make sure you can see the folder ZendGdata-1.9.3PL1 when you upload the files)</p>
<p>8.  open the page on your favorite web-browser to make sure it works correctly</p>
<p>9.  For most youtube profile&#8217;s you would be done right now, but many good videos use URL sources for their video descriptions.  To fix long URLS without using TinyURL or another service and still keep long strings of text from running over into other div columns, open the file operations.php in the YouTubeVideoApp folder</p>
<p>10.  goto line 686 where it says (if you don&#8217;t have an editor with line numbers, copy, paste, and search for the line below)</p>
<p>$videoTags = $entry-&gt;getVideoTags();</p>
<p>and paste the following immediately after the line above<br />
// long url fixer<br />
$newvidguy = &#8221;;<br />
$vidlenguy = strlen($videoDescription);<br />
$newvidcnt = 0;<br />
$spacecnt =0;<br />
while($newvidcnt &lt; $vidlenguy)<br />
{<br />
$bytex=substr($videoDescription,$newvidcnt,1);<br />
if($bytex!= &#8216; &#8216;)<br />
{<br />
}<br />
else<br />
{<br />
$spacecnt = 0;<br />
}<br />
if($spacecnt &gt; 50)<br />
{<br />
$newvidguy = $newvidguy . chr(13)&#8217;;<br />
$spacecnt=0;<br />
}<br />
$newvidguy = $newvidguy . $bytex;<br />
++$spacecnt;<br />
++$newvidcnt;<br />
}<br />
$videoDescription = $newvidguy;</p>
<p>11.  Goto line 846 where it says (if you don&#8217;t have an editor with line numbers, copy, paste and search for the line below)</p>
<p>$description = htmlspecialchars($entry-&gt;getVideoDescription());</p>
<p>and paste in the following immediately after the above line</p>
<p>// long url fixer<br />
$newvidguy = &#8221;;<br />
$vidlenguy = strlen($description);<br />
$newvidcnt = 0;<br />
$spacecnt =0;<br />
while($newvidcnt &lt; $vidlenguy)<br />
{<br />
$bytex=substr($description,$newvidcnt,1);<br />
if($bytex != &#8216; &#8216;)<br />
{<br />
}<br />
else<br />
{<br />
$spacecnt = 0;<br />
}<br />
if($spacecnt &gt; 50) // make a space after 50 chars in a row<br />
{<br />
$newvidguy = $newvidguy . chr(13);<br />
$spacecnt = 0;</p>
<p>}<br />
$newvidguy = $newvidguy . $bytex;<br />
++$spacecnt;<br />
++$newvidcnt;<br />
}<br />
$description = $newvidguy;<br />
12.  save and upload the operations.php file and you are done!</p>
<p>So in just 12 easy steps you can integrate this powerful functionality into your site</p>
<p>Thanks for reading!</p>
<p>Cliff &#8211; Faith Family Jesus</p>
]]></content:encoded>
			<wfw:commentRss>http://faithfamilyjesus.com/blog/?feed=rss2&amp;p=3</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
	</channel>
</rss>
