<?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>Ashevile Web Design and Computer Networking :: Applied Solutions Group</title>
	<atom:link href="http://www.appliedtns.com/blog/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.appliedtns.com/blog</link>
	<description>Just another WordPress weblog</description>
	<lastBuildDate>Wed, 28 Apr 2010 02:39:50 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Weird Font Issues and Strange Characters in Snow Leopard 10.6</title>
		<link>http://www.appliedtns.com/blog/2009/08/weird-font-issues-and-strange-characters-in-snow-leopard-106/</link>
		<comments>http://www.appliedtns.com/blog/2009/08/weird-font-issues-and-strange-characters-in-snow-leopard-106/#comments</comments>
		<pubDate>Mon, 31 Aug 2009 15:08:35 +0000</pubDate>
		<dc:creator>Tom</dc:creator>
				<category><![CDATA[Tech News]]></category>
		<category><![CDATA[crappy]]></category>
		<category><![CDATA[delete da font]]></category>
		<category><![CDATA[font problems]]></category>
		<category><![CDATA[fonts]]></category>
		<category><![CDATA[osx 10.6]]></category>
		<category><![CDATA[snow leopard]]></category>

		<guid isPermaLink="false">http://ashevillewebblog.com/?p=153</guid>
		<description><![CDATA[So you just upgraded to the new Snow Leopard and everything looks like crap and you can&#8217;t read it because all you have are boxes with A&#8217;s in them. Well rest easy, cause Apple actually solved this one for you and they let you know too but it just wasn&#8217;t a clear explanation.
When you started [...]]]></description>
			<content:encoded><![CDATA[<p>So you just upgraded to the new Snow Leopard and everything looks like crap and you can&#8217;t read it because all you have are boxes with A&#8217;s in them. Well rest easy, cause Apple actually solved this one for you and they let you know too but it just wasn&#8217;t a clear explanation.</p>
<p>When you started the computer it said that there was a font conflict and asked if it should ignore the conflict or move one of the files to the trash, well you should have moved it to the trash. Then just logged out and back in. That is it, empty the trash and you are completely done.</p>
<p>If you are having trouble with things like SIMBL and it&#8217;s plugins that is a different story, but as a hint: For now SIMBL stuff still works if you run the target application it in 32-Bit mode. Click the *.app file and then press Apple-I to bring up the info box where you can select 32-Bit only.</p>
<p>One last bit of advice is to ensure you upgrade programs like Little Snitch before you run your Snow Leopard Upgrade because it will not run without the upgrade and you will be left without a firewall until you upgrade, so might as well do it before and have it the whole time, or at least do it almost right away when you restart after the upgrade.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.appliedtns.com/blog/2009/08/weird-font-issues-and-strange-characters-in-snow-leopard-106/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>TEDx comes to Asheville</title>
		<link>http://www.appliedtns.com/blog/2009/08/tedx-comes-to-asheville/</link>
		<comments>http://www.appliedtns.com/blog/2009/08/tedx-comes-to-asheville/#comments</comments>
		<pubDate>Sun, 30 Aug 2009 14:48:52 +0000</pubDate>
		<dc:creator>Jose</dc:creator>
				<category><![CDATA[Tech News]]></category>
		<category><![CDATA[asheville]]></category>
		<category><![CDATA[ted]]></category>
		<category><![CDATA[tedx]]></category>
		<category><![CDATA[tedxasheville]]></category>
		<category><![CDATA[tedxavl]]></category>

		<guid isPermaLink="false">http://ashevillewebblog.com/?p=145</guid>
		<description><![CDATA[
In the spirit of ideas worth spreading, TEDx is a program of local, self-organized events that bring people together to share a TED-like experience. At a TEDx event, TEDTalks video and live speakers combine to spark deep discussion and connection in a small group. These local, self-organized events are branded TEDx, where x=independently organized TED [...]]]></description>
			<content:encoded><![CDATA[<blockquote>
<h5><em>In the spirit of ideas worth spreading, TEDx is a program of local, self-organized events that bring people together to share a TED-like experience. At a TEDx event, TEDTalks video and live speakers combine to spark deep discussion and connection in a small group. These local, self-organized events are branded TEDx, where x=independently organized TED event. The TED Conference provides general guidance for the TEDx program, but individual TEDx events are self-organized. </em></h5>
</blockquote>
<p>We are excited to be a part of Asheville&#8217;s very own independant TED event, <a href="http://tedxavl.com">TEDxAsheville</a>.  Tonight at 7pm, people will come from all over the region to listen to some of Asheville&#8217;s most influentional speakers and performers.  Tonight&#8217;s Line-up includes:</p>
<p><span style="color: #800000;"><strong>2009 TEDxAsheville Speaker Lineup:</strong></span></p>
<p style="padding-left: 30px;"><strong>Dee Eggers</strong><br />
UNC Asheville professor of environmental studies</p>
<p style="padding-left: 30px;"><strong>Drew  Jones</strong><br />
Climate scientist, the Sustainability Institute</p>
<p style="padding-left: 30px;"><strong>David McConville</strong><br />
Media artist, the Elumenati</p>
<p style="padding-left: 30px;"><strong>Caroline Yongue</strong><br />
Buddhist minister and director of Asheville’s Center for End-of-Life Transitions</p>
<p style="padding-left: 30px;"><strong>Robert Zimmerman</strong><br />
Coder, designer and illustrator</p>
<p><strong><br />
</strong>In addition to our speaker lineup, TEDxAsheville will feature several Asheville performers, intermission entertainment, non-profit tables, a parking lot full of demos, displays and performances PLUS a few special surprises.</p>
<p><a href="http://appliedtns.com">Applied Solutions Group</a> is proud to support <a href="http://tedxavl.com">TEDxAsheville</a>.</p>
<p><em>We have been seeking a light to shine on our local talent and TEDx has provided us with a light and platform. </em><em>-Jose Ibarra, Co-Founder TEDxAsheville</em></p>
<p>Follow the event at <a href="http://tedxavl.com">http://tedxavl.com </a></p>
<p>TEDxAsheville website design was donated by Jose Ibarra, development by Tom Constant, and hosting by Applied Solutions Group</p>
]]></content:encoded>
			<wfw:commentRss>http://www.appliedtns.com/blog/2009/08/tedx-comes-to-asheville/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Silverstripe CCK or Silverstripe for Drupal Users</title>
		<link>http://www.appliedtns.com/blog/2009/08/silverstripe-cck-or-silverstripe-for-drupal-users/</link>
		<comments>http://www.appliedtns.com/blog/2009/08/silverstripe-cck-or-silverstripe-for-drupal-users/#comments</comments>
		<pubDate>Mon, 03 Aug 2009 16:31:14 +0000</pubDate>
		<dc:creator>Tom</dc:creator>
				<category><![CDATA[Web Development]]></category>
		<category><![CDATA[C5]]></category>
		<category><![CDATA[CMS]]></category>
		<category><![CDATA[Conrete 5]]></category>
		<category><![CDATA[Controllers]]></category>
		<category><![CDATA[Drupal]]></category>
		<category><![CDATA[Extend Silverstripe]]></category>
		<category><![CDATA[Models]]></category>
		<category><![CDATA[MODx]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Silverstripe]]></category>

		<guid isPermaLink="false">http://ashevillewebblog.com/tom/2009/08/silverstripe-cck-or-silverstripe-for-drupal-users/</guid>
		<description><![CDATA[The first CMS I really got into that wasn&#8217;t some system I had built was Drupal. It is both a great and a terrible CMS to use, especially as my cherry poppin CMS. One thing that I liked about Drupal that makes the switch to other CMS a lot of work for me is the [...]]]></description>
			<content:encoded><![CDATA[<p>The first CMS I really got into that wasn&#8217;t some system I had built was <a title="Drupal" href="http://drupal.org" target="_blank">Drupal</a>. It is both a great and a terrible CMS to use, especially as my cherry poppin CMS. One thing that I liked about <a title="Drupal" href="http://drupal.org" target="_blank">Drupal</a> that makes the switch to other CMS a lot of work for me is the way <a title="Drupal" href="http://drupal.org" target="_blank">Drupal</a> uses Content Construction Kit (CCK) to allow you to create new &#8220;node&#8221; types and the forms that match. This seemed really easy to me where I could take a list much like this:</p>
<ul>
<li>Pages
<ul>
<li>Already Created at Install</li>
</ul>
</li>
<li>Sponsors
<ul>
<li>Sponsor Name</li>
<li>Sponsor URL</li>
<li>Sponsor Banner Image</li>
<li>Sponsor Priority</li>
</ul>
</li>
<li>Classes
<ul>
<li>Class Category</li>
<li>Class Name</li>
<li>Class Description</li>
<li>Class Instructor</li>
<li>Class Capacity</li>
<li>Class Slots Filled</li>
</ul>
</li>
</ul>
<p>and begin to turn this into my node types by just making a few adjustments to the list, really not even adjustments just classifications. Now here is that list after classifying them</p>
<ul>
<li>Pages
<ul>
<li>Already Created at Install</li>
</ul>
</li>
<li>Sponsors
<ul>
<li>Sponsor Name &#8211; Textfield &#8211; Limit 128</li>
<li>Sponsor URL &#8211; Textfield &#8211; Limit 128</li>
<li>Sponsor Banner Image &#8211; Textfield &#8211; Limit 64</li>
<li>Sponsor Priority &#8211; Dropdown &#8211; 0-10</li>
</ul>
</li>
<li>Classes
<ul>
<li>Class Name &#8211; Textfield &#8211; Limit 64</li>
<li>Class Description  &#8211; Textarea &#8211; 5&#215;20</li>
<li>Class Instructor  &#8211; Textfield &#8211; Limit 64</li>
<li>Class Capacity  &#8211; Integer &#8211; Limit 3</li>
<li>Class Slots Filled  &#8211; Integer &#8211; Limit 3</li>
</ul>
</li>
</ul>
<p>Now for <a title="Drupal" href="http://drupal.org" target="_blank">Drupal</a> we have a pretty nice little list to just create in CCK by naming them applying these limits to the fields. This is pretty easy and if you ask your client to classify a certain area of their site like sponsors many times they will give you a list must like the first one. Using CCK this is all easy and once you are done you have a nice form, automatically built, that will only ask the administrator for the information that is needed and will create the node for them, it is straight forward, looks like all the other <a title="Drupal" href="http://drupal.org" target="_blank">Drupal</a> admin forms and handles validation for you.</p>
<p>So when I try other CMSs like modX, Concrete5, Joomla, etc&#8230; I always wonder as soon I install it how i go about doing the same thing within their system. Well the truth is that most CMS have something similar to <a title="Drupal" href="http://drupal.org" target="_blank">Drupal</a>&#8217;s CCK and to tell the truth again it is usually hard to find documentation on it because every calls it something different. There are content types, page types, and many many more names for the same thing. I prefer the term page type, because i think that it universally makes sense.</p>
<p>Creating this same thing in <a title="Silverstripe" href="http://silverstripe.org" target="_blank">Silverstripe</a> is actually really simple, it makes sense, and to me it is better than <a title="Drupal" href="http://drupal.org" target="_blank">Drupal</a>&#8217;s system because it is more flexible and since you are building basically a model and controller for your page type that extends the base Page model and controller then you have all the functionality of the Page but can also extend it as far as you want.</p>
<p>So lets get started with this same process just using <a title="Silverstripe" href="http://silverstripe.org" target="_blank">Silverstripe</a>! Lets take our blank list and classify it for <a title="Silverstripe" href="http://silverstripe.org" target="_blank">Silverstripe</a>.</p>
<ul>
<li>Pages
<ul>
<li>Already Created at Install</li>
</ul>
</li>
<li>Sponsors
<ul>
<li>Sponsor Name &#8211; Textfield &#8211; Varchar(128)</li>
<li>Sponsor URL &#8211; Textfield &#8211; Varchar(128)</li>
<li>Sponsor Banner Image &#8211; File Upload</li>
<li>Sponsor Priority &#8211; Dropdown from 0-10 &#8211; Integer(2)</li>
</ul>
</li>
<li>Classes
<ul>
<li>Class Name &#8211; Textfield &#8211; Varchar(64)</li>
<li>Class Description  &#8211; Textarea &#8211; Text</li>
<li>Class Instructor  &#8211; Textfield &#8211; Varchar(64)</li>
<li>Class Capacity  &#8211; Textfield &#8211; Integer(3)</li>
<li>Class Slots Filled  &#8211; Textfield &#8211; Integer(3)</li>
</ul>
</li>
</ul>
<p>Notice that the classifications of these fields more closely models a database, this is because <a title="Silverstripe" href="http://silverstripe.org" target="_blank">Silverstripe</a> is smart and they know that you are going to build these extensions with Models, so they should model a data source more closely. Let Take our list and get started with creating our page types now!</p>
<p>Lets start by creating a new file for our site. Open up the installation of <a title="Silverstripe" href="http://silverstripe.org" target="_blank">Silverstripe</a> and open up the folder mysite/code Next we want to create a file to extend the Page Model and Controller. Following Silverstipe conventions we will append the word &#8220;page&#8221; at the end of the file name, since we are extending Page. Lets do Classes as our example for simplicity. So lets add a file to our mysite/code folder and name it ClassPage.php With <a title="Silverstripe" href="http://silverstripe.org" target="_blank">Silverstripe</a> extending things is a lot like working with an MVC framework such as CakePHP or Code Igniter so we chose to name that ClassPage.php after the singular version of what our Model will represent. If we had been doing the Sponsors instead we would of named it SponsorPage.php</p>
<p>Now that we have our file, lets open it and start editing our code! Once we open the file we are going to want to let the system know what we have by declaring our Model class first. So lets do the following:</p>

<div class="wp_syntax"><div class="code"><pre class="php php" style="font-family:monospace;">		<span style="color:#DADEFB; font-weight:bold;">class</span> ClassPage <span style="color:#DADEFB; font-weight:bold;">extends</span> Page
		<span style="color:#AA66FF; font-weight:bold;">&#123;</span>
			<span style="color:#FFFFFF; font-weight:bold;">static</span> <span style="color:#AADDFF; font-weight:bold;">$db</span> = <span style="color:#FFFFFF; font-weight:bold;">array</span><span style="color:#AA66FF; font-weight:bold;">&#40;</span><span style="color:#AA66FF; font-weight:bold;">&#41;</span>;
&nbsp;
			<span style="color:#DADEFB; font-weight:bold;">function</span> getCMSFields<span style="color:#AA66FF; font-weight:bold;">&#40;</span><span style="color:#AA66FF; font-weight:bold;">&#41;</span>
			<span style="color:#AA66FF; font-weight:bold;">&#123;</span>
				<span style="color:#9FBFFE; font-weight:bold;">return</span> <span style="color:#AADDFF; font-weight:bold;">$fields</span>;
			<span style="color:#AA66FF; font-weight:bold;">&#125;</span>
		<span style="color:#AA66FF; font-weight:bold;">&#125;</span></pre></div></div>

<p>Basically we have just declared our Model and told the system the name. Next we need to add more code to this declaration and make it actually add our database fields and connect them to this model. We also need to write the getCMSFields function, as it is a <a title="Silverstripe" href="http://silverstripe.org" target="_blank">Silverstripe</a> standard that will be called for your Model once someone creates a new instance of this page type. So lets get that out of the way and create our class variable db, another <a title="Silverstripe" href="http://silverstripe.org" target="_blank">Silverstripe</a> standard. This will ensure that when someone runs a db update that our fields will be installed into the DB. So lets change that previous code to this:</p>

<div class="wp_syntax"><div class="code"><pre class="php php" style="font-family:monospace;">		<span style="color:#DADEFB; font-weight:bold;">class</span> ClassPage <span style="color:#DADEFB; font-weight:bold;">extends</span> Page
		<span style="color:#AA66FF; font-weight:bold;">&#123;</span>
			<span style="color:#FFFFFF; font-weight:bold;">static</span> <span style="color:#AADDFF; font-weight:bold;">$db</span> = <span style="color:#FFFFFF; font-weight:bold;">array</span><span style="color:#AA66FF; font-weight:bold;">&#40;</span>
				<span style="color:#A8FF60;">'ClassInstructor'</span> =<span style="color:#DDEEBB; font-weight:bold;">&amp;</span>gt; Varchar<span style="color:#AA66FF; font-weight:bold;">&#40;</span><span style="color:#006666;">64</span><span style="color:#AA66FF; font-weight:bold;">&#41;</span>,
				<span style="color:#A8FF60;">'ClassCapacity'</span> =<span style="color:#DDEEBB; font-weight:bold;">&amp;</span>gt; Int<span style="color:#AA66FF; font-weight:bold;">&#40;</span><span style="color:#006666;">3</span><span style="color:#AA66FF; font-weight:bold;">&#41;</span>,
				<span style="color:#A8FF60;">'ClassSlotsFilled'</span> =<span style="color:#DDEEBB; font-weight:bold;">&amp;</span>gt; Int<span style="color:#AA66FF; font-weight:bold;">&#40;</span><span style="color:#006666;">3</span><span style="color:#AA66FF; font-weight:bold;">&#41;</span>
			<span style="color:#AA66FF; font-weight:bold;">&#41;</span>;
&nbsp;
			<span style="color:#DADEFB; font-weight:bold;">function</span> getCMSFields<span style="color:#AA66FF; font-weight:bold;">&#40;</span><span style="color:#AA66FF; font-weight:bold;">&#41;</span>
			<span style="color:#AA66FF; font-weight:bold;">&#123;</span>
				<span style="color:#AADDFF; font-weight:bold;">$fields</span> = parent::<span style="">getCMSFields</span><span style="color:#AA66FF; font-weight:bold;">&#40;</span><span style="color:#AA66FF; font-weight:bold;">&#41;</span>;
				<span style="color:#AADDFF; font-weight:bold;">$fields</span>-<span style="color:#DDEEBB; font-weight:bold;">&amp;</span>gt;addFieldToTab<span style="color:#AA66FF; font-weight:bold;">&#40;</span><span style="color:#A8FF60;">'Root.Content.ClassInfo'</span>, <span style="color:#DADEFB; font-weight:bold;">new</span> TextField<span style="color:#AA66FF; font-weight:bold;">&#40;</span><span style="color:#A8FF60;">'ClassInstructor'</span><span style="color:#AA66FF; font-weight:bold;">&#41;</span><span style="color:#AA66FF; font-weight:bold;">&#41;</span>;
				<span style="color:#AADDFF; font-weight:bold;">$fields</span>-<span style="color:#DDEEBB; font-weight:bold;">&amp;</span>gt;addFieldToTab<span style="color:#AA66FF; font-weight:bold;">&#40;</span><span style="color:#A8FF60;">'Root.Content.ClassInfo'</span>, <span style="color:#DADEFB; font-weight:bold;">new</span> TextField<span style="color:#AA66FF; font-weight:bold;">&#40;</span><span style="color:#A8FF60;">'ClassCapacity'</span><span style="color:#AA66FF; font-weight:bold;">&#41;</span><span style="color:#AA66FF; font-weight:bold;">&#41;</span>;
				<span style="color:#AADDFF; font-weight:bold;">$fields</span>-<span style="color:#DDEEBB; font-weight:bold;">&amp;</span>gt;addFieldToTab<span style="color:#AA66FF; font-weight:bold;">&#40;</span><span style="color:#A8FF60;">'Root.Content.ClassInfo'</span>, <span style="color:#DADEFB; font-weight:bold;">new</span> TextField<span style="color:#AA66FF; font-weight:bold;">&#40;</span><span style="color:#A8FF60;">'ClassSlotsFilled'</span><span style="color:#AA66FF; font-weight:bold;">&#41;</span><span style="color:#AA66FF; font-weight:bold;">&#41;</span>;
				<span style="color:#9FBFFE; font-weight:bold;">return</span> <span style="color:#AADDFF; font-weight:bold;">$fields</span>;
			<span style="color:#AA66FF; font-weight:bold;">&#125;</span>
		<span style="color:#AA66FF; font-weight:bold;">&#125;</span></pre></div></div>

<p>Notice i left out the Title and Description fields, i feel that since they are kind of standard that leaving them out is ok to do, makes it easier to read and they are standard so they will be some kind of common tie among the different content types. So now we have our Content Type created, we only need to do one more thing to have a basic working extension here and that is to define the controller. This part might be confusing to people coming from other MVC frameworks as they are included in the same file, I didn&#8217;t like it at first but it really is ok and you will get used to it. Notice that in the getCMSFields() function that we are adding &#8220;Root.Content.ClassInfo&#8221; That is basically the tab at the top of the admin interface to let you know it is separate from the main content tab. So at the bottom of the model start a new class and leave it empty, since we are not needing to customize the existing Page_Controller.</p>

<div class="wp_syntax"><div class="code"><pre class="php php" style="font-family:monospace;">	<span style="color:#DADEFB; font-weight:bold;">class</span> ClassPage_Controller <span style="color:#DADEFB; font-weight:bold;">extends</span> Page_Controller
	<span style="color:#AA66FF; font-weight:bold;">&#123;</span>
	<span style="color:#AA66FF; font-weight:bold;">&#125;</span></pre></div></div>

<p>So our entire file should look like this:</p>

<div class="wp_syntax"><div class="code"><pre class="php php" style="font-family:monospace;">	<span style="color:#DADEFB; font-weight:bold;">class</span> ClassPage <span style="color:#DADEFB; font-weight:bold;">extends</span> Page
	<span style="color:#AA66FF; font-weight:bold;">&#123;</span>
		<span style="color:#FFFFFF; font-weight:bold;">static</span> <span style="color:#AADDFF; font-weight:bold;">$db</span> = <span style="color:#FFFFFF; font-weight:bold;">array</span><span style="color:#AA66FF; font-weight:bold;">&#40;</span>
			<span style="color:#A8FF60;">'ClassInstructor'</span> =<span style="color:#DDEEBB; font-weight:bold;">&amp;</span>gt; Varchar<span style="color:#AA66FF; font-weight:bold;">&#40;</span><span style="color:#006666;">64</span><span style="color:#AA66FF; font-weight:bold;">&#41;</span>,
			<span style="color:#A8FF60;">'ClassCapacity'</span> =<span style="color:#DDEEBB; font-weight:bold;">&amp;</span>gt; Int<span style="color:#AA66FF; font-weight:bold;">&#40;</span><span style="color:#006666;">3</span><span style="color:#AA66FF; font-weight:bold;">&#41;</span>,
			<span style="color:#A8FF60;">'ClassSlotsFilled'</span> =<span style="color:#DDEEBB; font-weight:bold;">&amp;</span>gt; Int<span style="color:#AA66FF; font-weight:bold;">&#40;</span><span style="color:#006666;">3</span><span style="color:#AA66FF; font-weight:bold;">&#41;</span>
		<span style="color:#AA66FF; font-weight:bold;">&#41;</span>;
&nbsp;
		<span style="color:#DADEFB; font-weight:bold;">function</span> getCMSFields<span style="color:#AA66FF; font-weight:bold;">&#40;</span><span style="color:#AA66FF; font-weight:bold;">&#41;</span>
		<span style="color:#AA66FF; font-weight:bold;">&#123;</span>
			<span style="color:#AADDFF; font-weight:bold;">$fields</span> = parent::<span style="">getCMSFields</span><span style="color:#AA66FF; font-weight:bold;">&#40;</span><span style="color:#AA66FF; font-weight:bold;">&#41;</span>;
			<span style="color:#AADDFF; font-weight:bold;">$fields</span>-<span style="color:#DDEEBB; font-weight:bold;">&amp;</span>gt;addFieldToTab<span style="color:#AA66FF; font-weight:bold;">&#40;</span><span style="color:#A8FF60;">'Root.Content.ClassInfo'</span>, <span style="color:#DADEFB; font-weight:bold;">new</span> TextField<span style="color:#AA66FF; font-weight:bold;">&#40;</span><span style="color:#A8FF60;">'ClassInstructor'</span><span style="color:#AA66FF; font-weight:bold;">&#41;</span><span style="color:#AA66FF; font-weight:bold;">&#41;</span>;
			<span style="color:#AADDFF; font-weight:bold;">$fields</span>-<span style="color:#DDEEBB; font-weight:bold;">&amp;</span>gt;addFieldToTab<span style="color:#AA66FF; font-weight:bold;">&#40;</span><span style="color:#A8FF60;">'Root.Content.ClassInfo'</span>, <span style="color:#DADEFB; font-weight:bold;">new</span> TextField<span style="color:#AA66FF; font-weight:bold;">&#40;</span><span style="color:#A8FF60;">'ClassCapacity'</span><span style="color:#AA66FF; font-weight:bold;">&#41;</span><span style="color:#AA66FF; font-weight:bold;">&#41;</span>;
			<span style="color:#AADDFF; font-weight:bold;">$fields</span>-<span style="color:#DDEEBB; font-weight:bold;">&amp;</span>gt;addFieldToTab<span style="color:#AA66FF; font-weight:bold;">&#40;</span><span style="color:#A8FF60;">'Root.Content.ClassInfo'</span>, <span style="color:#DADEFB; font-weight:bold;">new</span> TextField<span style="color:#AA66FF; font-weight:bold;">&#40;</span><span style="color:#A8FF60;">'ClassSlotsFilled'</span><span style="color:#AA66FF; font-weight:bold;">&#41;</span><span style="color:#AA66FF; font-weight:bold;">&#41;</span>;
			<span style="color:#9FBFFE; font-weight:bold;">return</span> <span style="color:#AADDFF; font-weight:bold;">$fields</span>;
		<span style="color:#AA66FF; font-weight:bold;">&#125;</span>
	<span style="color:#AA66FF; font-weight:bold;">&#125;</span>
&nbsp;
	<span style="color:#DADEFB; font-weight:bold;">class</span> ClassPage_Controller <span style="color:#DADEFB; font-weight:bold;">extends</span> Page_Controller
	<span style="color:#AA66FF; font-weight:bold;">&#123;</span>
	<span style="color:#AA66FF; font-weight:bold;">&#125;</span></pre></div></div>

<p>Now we can test it out, the first thing we need to do is go to our site and login to the admin areas. Then in a new tab append the following to the end of the URL /dev. Once you open that page you will see some text and the DB will be updated. Now we can go to our admin area and use our new page type!</p>
<p>There is still more to do but mainly in the TPL files and making sure that your info displays correctly or at least has a default for people to override in their own themes. We will save the theming for next time, it is nice and straight forward too but try this out and see what you think. If there are errors in any of this code let me know, I was mainly doing this as a reference so I didn&#8217;t build and run this but it should work just fine.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.appliedtns.com/blog/2009/08/silverstripe-cck-or-silverstripe-for-drupal-users/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Gmail Mobile on the Motorola i776 for Boost Mobile</title>
		<link>http://www.appliedtns.com/blog/2009/07/gmail-mobile-on-the-motorola-i776-for-boost-mobile/</link>
		<comments>http://www.appliedtns.com/blog/2009/07/gmail-mobile-on-the-motorola-i776-for-boost-mobile/#comments</comments>
		<pubDate>Sun, 05 Jul 2009 18:22:56 +0000</pubDate>
		<dc:creator>Tony G.</dc:creator>
				<category><![CDATA[Cell Phones]]></category>
		<category><![CDATA[Email]]></category>
		<category><![CDATA[boost mobile]]></category>
		<category><![CDATA[gmail]]></category>
		<category><![CDATA[i776]]></category>
		<category><![CDATA[iden]]></category>
		<category><![CDATA[motorola]]></category>

		<guid isPermaLink="false">http://ashevillewebblog.com/?p=134</guid>
		<description><![CDATA[Boost Mobile users with the Motorola i776 get a &#8216;phone not suported&#8217; error when trying to install the Gmail Mobile app. Here&#8217;s a workaround to get you set up with Gmail Mobile 1.5.
Download and save this zip file: gm15.zip
Follow the instructions at this website.
After you get it installed and running, setup one of your hotkeys [...]]]></description>
			<content:encoded><![CDATA[<p>Boost Mobile users with the Motorola i776 get a &#8216;phone not suported&#8217; error when trying to install the Gmail Mobile app. Here&#8217;s a workaround to get you set up with Gmail Mobile 1.5.</p>
<p>Download and save this zip file: <a href="http://ashevillewebblog.com/wp-content/uploads/2009/07/gm15.zip">gm15.zip</a><br />
Follow the instructions at <a title="iden Content Uploader" href="http://144.230.114.35/adp1/FUN/index.jsp" target="_blank">this website</a>.</p>
<p>After you get it installed and running, setup one of your hotkeys to point to Gmail by going to Settings/Personalize. This way you don&#8217;t have to run it from the Java Apps screen. This package may also work on some of the other Motorola iden phones&#8230;if so post a comment!</p>
<p><em>There is also Gmail Mobile 2.0, and though it will install on the i776, it will not run.<br />
Download link for Gmail 2.0 jar: <a href="http://http://gmail.com/app/v2.0.6/L1/gmail-g.jar" target="_blank">http://gmail.com/app/v2.0.6/L1/gmail-g.jar</a></em></p>
]]></content:encoded>
			<wfw:commentRss>http://www.appliedtns.com/blog/2009/07/gmail-mobile-on-the-motorola-i776-for-boost-mobile/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Parsing out links from the Twitter API Response with Regular Expressions</title>
		<link>http://www.appliedtns.com/blog/2009/04/parsing-out-links-from-the-twitter-api-response-with-regular-expressions/</link>
		<comments>http://www.appliedtns.com/blog/2009/04/parsing-out-links-from-the-twitter-api-response-with-regular-expressions/#comments</comments>
		<pubDate>Thu, 30 Apr 2009 15:47:15 +0000</pubDate>
		<dc:creator>Tom</dc:creator>
				<category><![CDATA[Web Design]]></category>
		<category><![CDATA[api]]></category>
		<category><![CDATA[regexp]]></category>
		<category><![CDATA[regular expressions]]></category>
		<category><![CDATA[twitter]]></category>

		<guid isPermaLink="false">http://ashevillewebblog.com/?p=131</guid>
		<description><![CDATA[Recently while building AVLTweetup.com we decided that instead of just displaying the tweets as plain text and making people copy and paste links or hashtags into their address bar that we would just make them automatically link for them. It isn&#8217;t much work for us to do that and it saves people who use the [...]]]></description>
			<content:encoded><![CDATA[<p>Recently while building <a href="http://avltweetup.com" title="Asheville Tweetup">AVLTweetup.com</a> we decided that instead of just displaying the tweets as plain text and making people copy and paste links or hashtags into their address bar that we would just make them automatically link for them. It isn&#8217;t much work for us to do that and it saves people who use the site some time. This is pretty easily done using some regular expressions and replacing the pattern with a string we specify. Since Twitter has a well define format all we need to do is look for a few things and switch em out. Here is how we are handling each Tweet as we parse our tree of tweets.</p>

<div class="wp_syntax"><div class="code"><pre class="php php" style="font-family:monospace;">	<span style="color:#AADDFF; font-weight:bold;">$formatted_text</span> = <span style="color:#FFFFFF; font-weight:bold;">preg_replace</span><span style="color:#AA66FF; font-weight:bold;">&#40;</span><span style="color:#A8FF60;">'/(<span style="color:#0000FF;">\b</span>(www<span style="color:#0000FF;">\.</span>|http<span style="color:#0000FF;">\:</span><span style="color:#0000FF;">\/</span><span style="color:#0000FF;">\/</span>)<span style="color:#0000FF;">\S</span>+<span style="color:#0000FF;">\b</span>)/'</span>, <span style="color:#A8FF60;">&quot;&lt;a target='_blank' href='$1'&gt;$1&lt;/a&gt;&quot;</span>, <span style="color:#AADDFF; font-weight:bold;">$tweet</span>-<span style="color:#DDEEBB; font-weight:bold;">&amp;</span>gt;text<span style="color:#AA66FF; font-weight:bold;">&#41;</span>;
	<span style="color:#AADDFF; font-weight:bold;">$formatted_text</span> = <span style="color:#FFFFFF; font-weight:bold;">preg_replace</span><span style="color:#AA66FF; font-weight:bold;">&#40;</span><span style="color:#A8FF60;">'/<span style="color:#0000FF;">\#</span>(<span style="color:#0000FF;">\w</span>+)/'</span>, <span style="color:#A8FF60;">&quot;&lt;a target='_blank' href='http://search.twitter.com/search?q=$1'&gt;#$1&lt;/a&gt;&quot;</span>, <span style="color:#AADDFF; font-weight:bold;">$formatted_text</span><span style="color:#AA66FF; font-weight:bold;">&#41;</span>;
	<span style="color:#AADDFF; font-weight:bold;">$formatted_text</span> = <span style="color:#FFFFFF; font-weight:bold;">preg_replace</span><span style="color:#AA66FF; font-weight:bold;">&#40;</span><span style="color:#A8FF60;">'/<span style="color:#0000FF;">\@</span>(<span style="color:#0000FF;">\w</span>+)/'</span>, <span style="color:#A8FF60;">&quot;&lt;a target='_blank' href='http://twitter.com/$1'&gt;@$1&lt;/a&gt;&quot;</span>, <span style="color:#AADDFF; font-weight:bold;">$formatted_text</span><span style="color:#AA66FF; font-weight:bold;">&#41;</span>;</pre></div></div>

<p>So this will first replace any links with an actual anchor tag and then we are going to convert all our hash tags to links to searches and all our user tags to links to their page.</p>
<p>Now we have the formatted text from the raw text the Twitter Search API gives us. All we have to do is display it how we want in our layout. Also while printing out the content i made sure to enclose our text in a specified class so it would be easy to find it for the next little bit of code that will go and fetch any twitpics and display them when a user mouses over the url. I will do a full write up on that in the future so that I can walk through the whole process since it will involve css combined with js and some php.</p>
<p>A short post but it has been a while since a fresh post so starting off a bit slow!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.appliedtns.com/blog/2009/04/parsing-out-links-from-the-twitter-api-response-with-regular-expressions/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Flourish, the Newest Addition to Your Toolbox</title>
		<link>http://www.appliedtns.com/blog/2009/03/flourish-the-newest-addition-to-your-toolbox/</link>
		<comments>http://www.appliedtns.com/blog/2009/03/flourish-the-newest-addition-to-your-toolbox/#comments</comments>
		<pubDate>Wed, 04 Mar 2009 02:44:23 +0000</pubDate>
		<dc:creator>Tom</dc:creator>
				<category><![CDATA[Productivity Tools]]></category>
		<category><![CDATA[Web Design]]></category>
		<category><![CDATA[anti-framework]]></category>
		<category><![CDATA[developers toolbox]]></category>
		<category><![CDATA[developers toolkit]]></category>
		<category><![CDATA[Flourish]]></category>
		<category><![CDATA[php developers toolbox]]></category>
		<category><![CDATA[php libraries]]></category>
		<category><![CDATA[toolbox]]></category>

		<guid isPermaLink="false">http://ashevillewebblog.com/tom/2009/03/flourish-the-newest-addition-to-your-toolbox/</guid>
		<description><![CDATA[Developer&#8217;s Toolbox
If you are like me you have what I like to call &#8220;A Development Toolbox.&#8221; It is basically a collection of tools that I will choose from when developing a site for a customer. In my toolbox I have a couple of frameworks I like, MVC of course, a CMS option, three to four [...]]]></description>
			<content:encoded><![CDATA[<h2>Developer&#8217;s Toolbox</h2>
<p>If you are like me you have what I like to call &#8220;A Development Toolbox.&#8221; It is basically a collection of tools that I will choose from when developing a site for a customer. In my toolbox I have a couple of frameworks I like, MVC of course, a CMS option, three to four carts I can choose from depending on the size of the clients business and their requirements, and the trusty JQuery. The thing that has been bothering me for a while is that I have a hole in my toolbox.</p>
<h2>Toolbox Problems</h2>
<p>The whole purpose of this toolbox is to increase my development speed, decrease my overhead, and get the client&#8217;s site turned out as quickly, securely, and functional as possible. So if I need a simple three or five page static site I don&#8217;t need the server overhead of any of my current tools. I only need some static XHTML and CSS, maybe some simple JS for looks. So that is well and good, I keep a tar file that I can unpack and have a good base layout and file structure so I can start working.</p>
<p>Where I get slowed down is when it comes to maybe needing to do a little database work, or to handle some form errors in a quick, friendly way. I have built classes in the past to handle these things, to help me work faster but I always go back and redo and redo to try to make it work more efficiently. So I end up spending a lot of time on trying to make my code better when I use them. So what is the point in all this long, drawn out intro? I am trying to set up why <a href="http://flourishlib.com" title="Flourish Lib">Flourish</a> might be the next big tool to add to your toolbox.</p>
<h2>What is <a href="http://flourishlib.com" title="Flourish Lib">Flourish</a>?</h2>
<p><a href="http://flourishlib.com" title="Flourish Lib">Flourish</a> is a PHP Library, make sure to read that right, it is not a framework. It is a collection of classes that can help you build projects without having to start from scratch. I know that you are probably thinking, &#8220;that sounds a lot like a framework!&#8221; Well you are right it does &#8220;sound&#8221; a lot like a framework but it isn&#8217;t. The difference is that there are no set ways of having to organize your files first of all and most importantly you are not required to include <a href="http://flourishlib.com" title="Flourish Lib">Flourish</a> if you don&#8217;t need it on that page. So maybe you don&#8217;t have any use for <a href="http://flourishlib.com" title="Flourish Lib">Flourish</a> on your Home Page, About Page, or FAQ Page but you do need it on the Contact page then that is ok. You can just use it there.</p>
<p>I think what I will be using it for will be not only to just help out on pages where I want to use the libraries but also to handle a lot of my layouts. The layout system is almost exactly what I use normally but this will help me to keep it standardized since it works very similar to how I usually work but it keeps me using the same system instead of changing code around as I might have an urge to sometimes do.</p>
<h2>Notes on <a href="http://flourishlib.com" title="Flourish Lib">Flourish</a></h2>
<p><a href="http://flourishlib.com" title="Flourish Lib">Flourish</a> seems to be new, but that is a good thing sometimes. I have written before that when picking a framework that you need to find established frameworks with good communities. Well with a library like this I think that coming in soon is a great idea. Here is why. If something is not easy to figure out you can get into the code and figure it out whereas a framework often time has so much overhead code that it is hard to read class docs and get to the skinny. Another reason is that I think <a href="http://flourishlib.com" title="Flourish Lib">Flourish</a> has a good opportunity to have a great online community eventually. Once there are some awesome people using it who like to help others there will be a chance of an IRC channel or a active forum and lots of blog posts to help you out a long the path.</p>
<p>So from someone that really likes MVC, and pretty much has spent all their real dev time using it, why would I suggest this over the framework. You can do these same things with a framework and on a mostly static site you can get away easy by using <a href="http://cakephp.org" title="CakePHP">CakePHP</a> with their pages controller that comes with the stock distro. The speed wouldn&#8217;t suffer very much if any and you would be saving the same amount of time. Using a Drupal you can set up the same site and do what you need super duper fast and be ready to launch and if the client ever wants admin control you can just add it in by giving them a role and a password. So what is the point in using something lighter, less supported, and not as popular?</p>
<h2>Change</h2>
<p>I think that some kind of change is coming, I think that people are finally starting to realize that they don&#8217;t have to go with the trends, MVC while it has it&#8217;s obvious strengths is not always necessary and using it where it is not benefiting you and the client is just being a fan boy. I hate to be so harsh but I guarantee that if you ask even the developers of <a href="http://flourishlib.com" title="Flourish Lib">Flourish</a> they will tell you that MVC has it&#8217;s place and that they use it when they need it and don&#8217;t when they have better options. Some people choose one particular tool and use it for everything but that means that they have made the wrong choice at least a small percentage of the time. For instance if you are a person who only uses Wordpress and don&#8217;t have the option of using anything else you will have seriously crippled yourself when it comes time to do some E-Commerce. It can be done, but it won&#8217;t be done as well as if you used <a href="http://prestashop.com/" title="Prestashop">Prestashop</a>, <a href="http://magento.org" title="Magento">Magento</a>, etc&#8230; Back to my starting point though, these are all tools, sure you can get screws out of a piece of wood with a hammer but why not just use the screwdriver, or in the case of <a href="http://flourishlib.com" title="Flourish Lib">Flourish</a>, the Black and Decker Super Duper Power Handheld Screwdriver.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.appliedtns.com/blog/2009/03/flourish-the-newest-addition-to-your-toolbox/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Safari 4 Beta CSS Hacks</title>
		<link>http://www.appliedtns.com/blog/2009/02/safari-4-beta-css-hacks/</link>
		<comments>http://www.appliedtns.com/blog/2009/02/safari-4-beta-css-hacks/#comments</comments>
		<pubDate>Wed, 25 Feb 2009 14:34:53 +0000</pubDate>
		<dc:creator>Tom</dc:creator>
				<category><![CDATA[Web Design]]></category>
		<category><![CDATA[safari 3]]></category>
		<category><![CDATA[safari 4]]></category>
		<category><![CDATA[safari hacks]]></category>
		<category><![CDATA[stokely hack]]></category>

		<guid isPermaLink="false">http://ashevillewebblog.com/?p=124</guid>
		<description><![CDATA[It is innevitable that sooner or later you will have some display issue in Safari that you just can&#8217;t seem to fix without weirding out the other browsers. This, for me, is not very common at all but it does occasionally happen so previously with Safari 3 the way I commonly used to target Safari [...]]]></description>
			<content:encoded><![CDATA[<p>It is innevitable that sooner or later you will have some display issue in Safari that you just can&#8217;t seem to fix without weirding out the other browsers. This, for me, is not very common at all but it does occasionally happen so previously with Safari 3 the way I commonly used to target Safari only was to do this.</p>

<div class="wp_syntax"><div class="code"><pre class="css css" style="font-family:monospace;">	<span style="color: #808080; font-style: italic;">/*\*/</span>
	html<span style="color: #00AA00;">*</span>div<span style="color: #6666ff;">.focusdiv</span> div<span style="color: #cc00cc;">#tcontent</span> div.subdiv<span style="color: #00AA00;">&#123;</span>
		<span style="color: #FFFFFF; font-weight: bold;">position</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">relative</span>;
		<span style="color: #FFFFFF; font-weight: bold;">left</span><span style="color: #00AA00;">:</span> <span style="color: #933;">-3px</span>;
	<span style="color: #00AA00;">&#125;</span>
	<span style="color: #808080; font-style: italic;">/**/</span></pre></div></div>

<p>Well in the newest Safari release, version 4, this doesn&#8217;t work anymore. So what if we need to target something now? Well luckily enough there is still a way to target Safari only and as an added bonus it actually looks a lot nicer than the current method.</p>

<div class="wp_syntax"><div class="code"><pre class="css css" style="font-family:monospace;">  <span style="color: #a1a100;">@media screen and (-webkit-min-device-pixel-ratio:0) {</span>
    div<span style="color: #6666ff;">.focusdiv</span>  <span style="color: #00AA00;">&#123;</span>
		<span style="color: #FFFFFF; font-weight: bold;">width</span><span style="color: #00AA00;">:</span> <span style="color: #933;">400px</span>;
	<span style="color: #00AA00;">&#125;</span>
    div<span style="color: #6666ff;">.focusdiv</span> div<span style="color: #cc00cc;">#tcontent</span> div<span style="color: #6666ff;">.subdiv</span> <span style="color: #00AA00;">&#123;</span>
		<span style="color: #FFFFFF; font-weight: bold;">position</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">relative</span>;
		<span style="color: #FFFFFF; font-weight: bold;">left</span><span style="color: #00AA00;">:</span> <span style="color: #933;">-3px</span>;
	<span style="color: #00AA00;">&#125;</span>
  <span style="color: #00AA00;">&#125;</span></pre></div></div>

<p>That is pretty much it, to provide credit to the authors, the first method was called the Stokely Hack and the second method is from <a title="http://themechanism.com/blog/2008/01/08/safari-css-hack-redux/" href="http://themechanism.com/blog/2008/01/08/safari-css-hack-redux/" target="_blank">this site</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.appliedtns.com/blog/2009/02/safari-4-beta-css-hacks/feed/</wfw:commentRss>
		<slash:comments>14</slash:comments>
		</item>
		<item>
		<title>FFMpeg and Converting Entire Folders of Files &#8211; Added Bonus Renaming All the Files you Converted</title>
		<link>http://www.appliedtns.com/blog/2009/02/ffmpeg-and-converting-entire-folders-of-files-added-bonus-renaming-all-the-files-you-converted/</link>
		<comments>http://www.appliedtns.com/blog/2009/02/ffmpeg-and-converting-entire-folders-of-files-added-bonus-renaming-all-the-files-you-converted/#comments</comments>
		<pubDate>Fri, 20 Feb 2009 14:58:33 +0000</pubDate>
		<dc:creator>Tom</dc:creator>
				<category><![CDATA[Productivity Tools]]></category>
		<category><![CDATA[Web Design]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[batch convert]]></category>
		<category><![CDATA[converting files]]></category>
		<category><![CDATA[ffmpeg]]></category>
		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://ashevillewebblog.com/tom/2009/02/ffmpeg-and-converting-entire-folders-of-files-added-bonus-renaming-all-the-files-you-converted/</guid>
		<description><![CDATA[Using FFMPEG to convert a whole folder of videos is actually a lot easier than you would think. Lets take a look at a really basic bash script to do so.

	#!/bin/bash
&#160;
	DIR=/Users/tom/Desktop/Video
&#160;
	for i in `find $DIR -type f`; do
	  ffmpeg  -i $i $i.mpg
	done

Thats it, just make sure to change the DIR variable to where [...]]]></description>
			<content:encoded><![CDATA[<p>Using FFMPEG to convert a whole folder of videos is actually a lot easier than you would think. Lets take a look at a really basic bash script to do so.</p>

<div class="wp_syntax"><div class="code"><pre class="bash bash" style="font-family:monospace;">	<span style="">#!/bin/bash</span>
&nbsp;
	<span style="color:#6666ff; font-weight:bold;">DIR</span>=<span style="color:#006600; font-weight:bold;">/</span>Users<span style="color:#006600; font-weight:bold;">/</span>tom<span style="color:#006600; font-weight:bold;">/</span>Desktop<span style="color:#006600; font-weight:bold;">/</span>Video
&nbsp;
	<span style="color:#9966CC; font-weight:bold;">for</span> i <span style="color:#9966CC; font-weight:bold;">in</span> <span style="color:#006600; font-weight:bold;">`</span><span style="color:#0000FF; font-weight:bold;">find</span> <span style="color:#0066ff; font-weight:bold;">$DIR</span> <span style="">-type</span> f<span style="color:#006600; font-weight:bold;">`</span>; <span style="color:#9966CC; font-weight:bold;">do</span>
	  <span style="color:#0000FF; font-weight:bold;">ffmpeg</span>  <span style="">-i</span> <span style="color:#0066ff; font-weight:bold;">$i</span> <span style="color:#0066ff; font-weight:bold;">$i</span>.mpg
	<span style="color:#9966CC; font-weight:bold;">done</span></pre></div></div>

<p>Thats it, just make sure to change the DIR variable to where you are working at, this could be made to take user input easily also or to just work in the current directory but that is up to you as to how you use it and change it. Here is a small change you can make that will make this script infinitely more useful.</p>

<div class="wp_syntax"><div class="code"><pre class="bash bash" style="font-family:monospace;">	<span style="">#!/bin/bash</span>
&nbsp;
	<span style="color:#6666ff; font-weight:bold;">DIR</span>=<span style="color:#006600; font-weight:bold;">/</span>Users<span style="color:#006600; font-weight:bold;">/</span>tom<span style="color:#006600; font-weight:bold;">/</span>Desktop<span style="color:#006600; font-weight:bold;">/</span>Video
&nbsp;
	<span style="color:#9966CC; font-weight:bold;">for</span> i <span style="color:#9966CC; font-weight:bold;">in</span> <span style="color:#006600; font-weight:bold;">`</span><span style="color:#0000FF; font-weight:bold;">find</span> <span style="color:#0066ff; font-weight:bold;">$DIR</span> <span style="">-type</span> f<span style="color:#006600; font-weight:bold;">`</span>; <span style="color:#9966CC; font-weight:bold;">do</span>
	  <span style="color:#0000FF; font-weight:bold;">ffmpeg</span>  <span style="">-i</span> <span style="color:#0066ff; font-weight:bold;">$i</span> <span style="color:#0066ff; font-weight:bold;">$i</span>.mpg
	  <span style="color:#0000FF; font-weight:bold;">ffmpeg</span>  <span style="">-itsoffset</span> <span style="">-4</span>  <span style="">-i</span> <span style="color:#0066ff; font-weight:bold;">$i</span> <span style="">-vcodec</span> mjpeg <span style="">-vframes</span> <span style="color:#006666;">1</span> <span style="">-an</span> <span style="">-f</span> rawvideo <span style="">-s</span> 200x200 <span style="color:#0066ff; font-weight:bold;">$i</span>.jpg
	<span style="color:#9966CC; font-weight:bold;">done</span></pre></div></div>

<p>Adding the next <code>ffmpeg</code> line makes you a nice thumbnail for your video that is 200&#215;200, again you can modify to your needs easily.</p>
<p>Well now we have our files converted but since we didn&#8217;t work any magic in the bash script to convert them we have some ugly file names. For instance you may have before had the file <code>video.avi</code> and you converted it to an <code>mpg</code> so now we have <code>video.avi.mpg</code>. That won&#8217;t do so lets look at a really simple ruby script to parse the directory and rename our files how we want.</p>

<div class="wp_syntax"><div class="code"><pre class="ruby ruby" style="font-family:monospace;">	<span style="color:#008000; font-style:italic;">#!/usr/bin/env ruby</span>
&nbsp;
	<span style="color:#9966CC; font-weight:bold;">def</span> get_input
	  <span style="color:#CC0066; font-weight:bold;">system</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#996600;">'clear'</span><span style="color:#006600; font-weight:bold;">&#41;</span>
	  <span style="color:#CC0066; font-weight:bold;">puts</span> <span style="color:#996600;">&quot;What directory will I be working in? ( <span style="color:#000099;">\e</span>[32mMust be absolute path<span style="color:#000099;">\e</span>[0m )&quot;</span>
	  directory = <span style="color:#CC0066; font-weight:bold;">gets</span>
	  directory.<span style="color:#CC0066; font-weight:bold;">chomp!</span>
	<span style="color:#9966CC; font-weight:bold;">end</span>
&nbsp;
	<span style="color:#9966CC; font-weight:bold;">def</span> parse_directory<span style="color:#006600; font-weight:bold;">&#40;</span>directory<span style="color:#006600; font-weight:bold;">&#41;</span>
	  basedir = directory
	  file_stack = <span style="color:#CC0066; font-weight:bold;">Array</span>.<span style="color:#9900CC;">new</span>
	  <span style="color:#CC00FF; font-weight:bold;">Dir</span>.<span style="color:#9900CC;">new</span><span style="color:#006600; font-weight:bold;">&#40;</span>basedir<span style="color:#006600; font-weight:bold;">&#41;</span>.<span style="color:#9900CC;">entries</span>.<span style="color:#9900CC;">each</span> <span style="color:#9966CC; font-weight:bold;">do</span> |file|
	    <span style="color:#9966CC; font-weight:bold;">unless</span> <span style="color:#CC00FF; font-weight:bold;">File</span>.<span style="color:#9900CC;">directory</span>?<span style="color:#006600; font-weight:bold;">&#40;</span>file<span style="color:#006600; font-weight:bold;">&#41;</span>
	      file_stack.<span style="color:#9900CC;">push</span> file
	    <span style="color:#9966CC; font-weight:bold;">end</span>
	  <span style="color:#9966CC; font-weight:bold;">end</span>
	  <span style="color:#0000FF; font-weight:bold;">return</span> file_stack
	<span style="color:#9966CC; font-weight:bold;">end</span>
&nbsp;
	<span style="color:#9966CC; font-weight:bold;">def</span> bulk_rename<span style="color:#006600; font-weight:bold;">&#40;</span>file_stack<span style="color:#006600; font-weight:bold;">&#41;</span>
	  file_stack.<span style="color:#9900CC;">each</span> <span style="color:#9966CC; font-weight:bold;">do</span> |file|
	    command = <span style="color:#996600;">&quot;mv #{file} &quot;</span>
	    file.<span style="color:#CC0066; font-weight:bold;">gsub!</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#996600;">'.avi.mpg'</span>,<span style="color:#996600;">'.mpg'</span><span style="color:#006600; font-weight:bold;">&#41;</span>
	    command <span style="color:#006600; font-weight:bold;">&amp;</span>lt;<span style="color:#006600; font-weight:bold;">&amp;</span>lt; file
	    <span style="color:#CC0066; font-weight:bold;">system</span> command
	    <span style="color:#CC0066; font-weight:bold;">print</span> <span style="color:#996600;">'.'</span>
	  <span style="color:#9966CC; font-weight:bold;">end</span>
	  <span style="color:#CC0066; font-weight:bold;">print</span> <span style="color:#996600;">&quot;<span style="color:#000099;">\n</span>&quot;</span>
	<span style="color:#9966CC; font-weight:bold;">end</span>
&nbsp;
	file_stack = parse_directory<span style="color:#006600; font-weight:bold;">&#40;</span>get_input<span style="color:#006600; font-weight:bold;">&#41;</span>
&nbsp;
	<span style="color:#CC0066; font-weight:bold;">puts</span> <span style="color:#996600;">&quot;I found <span style="color:#000099;">\e</span>[34m#{file_stack.nitems}<span style="color:#000099;">\e</span>[0m files&quot;</span>
&nbsp;
	bulk_rename<span style="color:#006600; font-weight:bold;">&#40;</span>file_stack<span style="color:#006600; font-weight:bold;">&#41;</span>
&nbsp;
	<span style="color:#CC0066; font-weight:bold;">puts</span> <span style="color:#996600;">&quot;Looks like I am done please type <span style="color:#000099;">\e</span>[31mls -l<span style="color:#000099;">\e</span>[0m to make sure I didn't mess up!<span style="color:#000099;">\n</span>&quot;</span></pre></div></div>

<p>This script is actually much shorter than it looks but it handles some basic user input so you can run this and let it know what directory to work in. I use this same script alot to rename a directory of files to other extentions or what ever. The line that has <code>file.gsub!('.avi.mpg','.mpg')</code> can be changes to any <code>'Pattern', 'Replacement'</code> that you need. This script is not perfect by any means so use that at your own risk.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.appliedtns.com/blog/2009/02/ffmpeg-and-converting-entire-folders-of-files-added-bonus-renaming-all-the-files-you-converted/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>North Carolina Twestival : Asheville iPledge</title>
		<link>http://www.appliedtns.com/blog/2009/02/north-carolina-twestival-asheville-ipledge/</link>
		<comments>http://www.appliedtns.com/blog/2009/02/north-carolina-twestival-asheville-ipledge/#comments</comments>
		<pubDate>Wed, 11 Feb 2009 06:44:13 +0000</pubDate>
		<dc:creator>Jose</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[asheville twestival ipledge]]></category>
		<category><![CDATA[avltwestival]]></category>
		<category><![CDATA[ipledge video]]></category>
		<category><![CDATA[nctwestival]]></category>
		<category><![CDATA[twestival]]></category>

		<guid isPermaLink="false">http://ashevillewebblog.com/?p=118</guid>
		<description><![CDATA[
Asheville Twestival : iPledge : Charity Water from Asheville Twestival on Vimeo.
Charity:Water
http://nctwestival.com
On February 5th we decided to take the pledge and bring the Asheville Twitter Community together to pledge support for our very own Twestival. The iPledge project was born, then on February 7th we had people pledge $5 to Charity:Water to be in our [...]]]></description>
			<content:encoded><![CDATA[<p><object width="400" height="300" data="http://vimeo.com/moogaloop.swf?clip_id=3169156&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1" type="application/x-shockwave-flash"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://vimeo.com/moogaloop.swf?clip_id=3169156&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1" /></object><br />
<a href="http://vimeo.com/3169156">Asheville Twestival : iPledge : Charity Water</a> from <a href="http://vimeo.com/avltwestival">Asheville Twestival</a> on <a href="http://vimeo.com">Vimeo</a>.</p>
<p>Charity:Water</p>
<p>http://nctwestival.com</p>
<p>On February 5th we decided to take the pledge and bring the Asheville Twitter Community together to pledge support for our very own Twestival. The iPledge project was born, then on February 7th we had people pledge $5 to Charity:Water to be in our video.</p>
<p>In one weeks time Asheville has organized a Twestival. Venue Sponsor www.windowsonthepark.com, Beer Sponsor www.bruisinales.com, and Event Sponsors www.appliedtns.com and www.ninemile.com &#8211; we have also raised almost $1500 in cash for charity water, $2500 in auction items &#8230;. please spread/share this video.</p>
<p>Video Production: bournemedia.com orbitingstudio.com<br />
Music Courtesy of SteveJamesson.com</p>
<p>Please join our iPledge Project and take the pledge to bring clean water to the world.</p>
<p>In one week Asheville became one, for one cause, for one day. What will you do?</p>
<p>Please post your response and the city you are in, and please spread the word.</p>
<p>http://nctwestival.com</p>
]]></content:encoded>
			<wfw:commentRss>http://www.appliedtns.com/blog/2009/02/north-carolina-twestival-asheville-ipledge/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Asheville Twestival: iPledge Video</title>
		<link>http://www.appliedtns.com/blog/2009/02/asheville-twestival-ipledge-video/</link>
		<comments>http://www.appliedtns.com/blog/2009/02/asheville-twestival-ipledge-video/#comments</comments>
		<pubDate>Sat, 07 Feb 2009 04:27:22 +0000</pubDate>
		<dc:creator>Tom</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[asheville]]></category>
		<category><![CDATA[charity:water]]></category>
		<category><![CDATA[twestival]]></category>
		<category><![CDATA[twitter]]></category>

		<guid isPermaLink="false">http://ashevillewebblog.com/?p=115</guid>
		<description><![CDATA[We will be shooting an “iPledge” video tomorrow at Pritchard Park in Downtown Asheville. Come join us and be part of our video. The shoot is going to be very short, you simply hold a sign and say “iPledge”.
Bring your friends and family and join in on the fun.
Please come out and show your support [...]]]></description>
			<content:encoded><![CDATA[<p>We will be shooting an “iPledge” video tomorrow at Pritchard Park in Downtown Asheville. Come join us and be part of our video. The shoot is going to be very short, you simply hold a sign and say “iPledge”.</p>
<p>Bring your friends and family and join in on the fun.</p>
<p>Please come out and show your support this Saturday!<br />
Pritchard Park 11:30am and 3:00pm</p>
<p>We will also be accepting items for our silent auction taking place on Thursday, February 12. at Windows on the Park.</p>
<p>    Available Sponsorships:</p>
<p>    Platinum Sponsors: $200.00<br />
    Your company will appear on our website, displayed during the twestival event, and we will do our best to get you in on all the press, blogs, and any other exposure possible!</p>
<p>    Supporting Sponsors: (Food/Beer/Event Cost):$50 donation<br />
    You will be listed as supporter sponsor on our website and will tweet and blog about your support/donation.</p>
<p>    iPledge: $5<br />
    You get to be in our own Viral Video Project, which will be seen by 100’s, 1000’s, maybe even millions</p>
<p>    BLOGGERS: $0<br />
    Simply mention our twestival on your blog, send us the perma-link and we will gratefully add you to our BlogRoll</p>
<p>    We understand that $$ maybe tight and you may not be able to donate any $$. You do not need to give $$ to support the cause, we still need your help spreading the word and finding creative ways to bring attention to the cause.</p>
<p>Thank you for supporting Asheville’s very own Twestival.</p>
<p>Have a question, email us at avltwestival at gmail.com or leave a comment</p>
]]></content:encoded>
			<wfw:commentRss>http://www.appliedtns.com/blog/2009/02/asheville-twestival-ipledge-video/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
