<?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>Web Development by Joe Sak &#187; Custom Development</title>
	<atom:link href="http://www.joesak.com/category/custom-development/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.joesak.com</link>
	<description>Rails, HTML5, CSS3, jQuery - Thoughts, Advice &#38; Work</description>
	<lastBuildDate>Tue, 27 Jul 2010 14:10:14 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Online Photo Gallery, Payment &amp; Order Fulfillment: Ruby on Rails Tutorial</title>
		<link>http://www.joesak.com/2009/09/18/online-photo-gallery-payment-order-fulfillment-ruby-on-rails-tutorial/</link>
		<comments>http://www.joesak.com/2009/09/18/online-photo-gallery-payment-order-fulfillment-ruby-on-rails-tutorial/#comments</comments>
		<pubDate>Fri, 18 Sep 2009 16:51:04 +0000</pubDate>
		<dc:creator>Joe Sak</dc:creator>
				<category><![CDATA[Custom Development]]></category>
		<category><![CDATA[Improving Code]]></category>
		<category><![CDATA[Photography]]></category>
		<category><![CDATA[Portfolio]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Projects]]></category>
		<category><![CDATA[Ruby on Rails]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[Websites]]></category>
		<category><![CDATA[ecommerce]]></category>
		<category><![CDATA[photos]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://www.joesak.com/?p=255</guid>
		<description><![CDATA[This post is a follow-up to the post on my personal blog, titled &#8220;Ruby on Rails Photo Gallery &#38; Shopping Cart with RESTful Authentication&#8221; In that article, I merely showed off what I&#8217;d done with Ruby on Rails, but I didn&#8217;t show anyone how. Well, I&#8217;ve gotten some comments from people asking me to show [...]]]></description>
			<content:encoded><![CDATA[<p>This post is a follow-up to the post on <a title="Joe Sak's Web Development Blog" href="http://www.joesak.com">my personal blog</a>, titled &#8220;<a title="Ruby on Rails Photo Gallery &amp; Shopping Cart with RESTful Authentication" href="http://www.joesak.com/2009/05/31/ruby-on-rails-photo-gallery-shopping-cart-restful-authentication/">Ruby on Rails Photo Gallery &amp; Shopping Cart with RESTful Authentication</a>&#8221; In that article, I merely showed off what I&#8217;d done with Ruby on Rails, but I didn&#8217;t show anyone how. Well, I&#8217;ve gotten some comments from people asking me to show them how to build it.</p>
<p>That&#8217;s what this post is for.</p>
<p>So on to the nitty gritty details.</p>
<p>Start with the RESTful Authentication Tutorial:</p>
<p><script src="http://gist.github.com/189148.js"></script> <a></a> Follow the README to install, but <a title="Fix #1 to RESTful Authentication Install" href="http://railsforum.com/viewtopic.php?pid=96632#p96632">READ THIS FIRST</a> to fix the ExceptionLogger error  Then <a href="http://railsforum.com/viewtopic.php?pid=99223#p99223">follow these instructions</a> to fix the OpenID plugin error  Make sure you get your <a href="http://recaptcha.net/whyrecaptcha.html">recaptcha keys</a> for the config.yml, otherwise failed login attempts will bust your application.  Fill out the config &amp; database.yml files accordingly, run your database create &amp; migrate rakes, fire up the server and make sure it looks good. Cool? Let&#8217;s move on:  <strong>Define the objects</strong> Let&#8217;s begin by pointing out what, exactly, we&#8217;ll be building this application around: <strong>Galleries </strong>of <strong>Photos </strong>that <strong>Customers</strong> can order with a private <strong>Account</strong> provided to them by an <strong>Admin</strong> who can manage the galleries and review the <strong>Orders</strong>, which are also available to their respective customers.  I will go through how to set up the following models like so:</p>
<ul>
<li>Galleries
<ul>
<li>has_many :photos</li>
<li>belongs_to :customer</li>
<li>title</li>
<li>acts_as_urlnameable (pretty URLs)</li>
</ul>
</li>
<li>Photos
<ul>
<li>belongs_to :gallery</li>
<li>paperclip attachment: image</li>
</ul>
</li>
<li>Customers
<ul>
<li>username, password, full name</li>
</ul>
</li>
<li>Orders
<ul>
<li>has_many :line_items</li>
<li>belongs_to :customer</li>
</ul>
</li>
<li>Line Items
<ul>
<li>belongs_to <img src='http://www.joesak.com/wp-includes/images/smilies/icon_surprised.gif' alt=':o' class='wp-smiley' /> rder</li>
<li>quantity, size, price</li>
</ul>
</li>
</ul>
<p>So let&#8217;s build the Galleries first:  <script src="http://gist.github.com/189161.js"></script></p>
<p>Then edit the Gallery model:</p>
<p><script src="http://gist.github.com/189149.js"></script> That&#8217;ll be fine for now. Let&#8217;s add the Photos model with paperclip image attached:  <script src="http://gist.github.com/189151.js"></script></p>
<p>Now edit the Photo model as such:</p>
<p><script src="http://gist.github.com/189152.js"></script> You should read all about <a href="http://thoughtbot.com/projects/paperclip">the paperclip gem</a> if you need more info on this model. Basically, we&#8217;re telling it to allow image attachments to the Photo model.  Customers can be the RESTful Authentication Tutorial User model, just need to add a couple things here:  <script src="http://gist.github.com/189153.js"></script></p>
<p>Let&#8217;s worry about Orders and Line Items later. We&#8217;ll have to add a cart, too. I&#8217;ll cover it, but it is all derived from <a href="http://www.pragprog.com/titles/rails3/agile-web-development-with-rails">Agile Web Development with Ruby on Rails Third Edition</a></p>
<p>Run your rake db:migrate and confirm all is well. Delete the Galleries layout file so it uses the application layout.</p>
<p>Let&#8217;s go see http://localhost:3000/galleries and play around. Add a gallery and then go to edit it. This is where we&#8217;ll add SWFUpload. <a href="http://jimneath.org/2008/05/15/swfupload-paperclip-and-ruby-on-rails/">Follow Jim Neath&#8217;s advice for this</a>.</p>
<p>You&#8217;ll want a photos controller:</p>
<p><script src="http://gist.github.com/189155.js"></script> The create method I use is:  <script src="http://gist.github.com/189156.js"></script></p>
<p>I had no luck getting Jim Neath&#8217;s session fix working, so I put skip_before_filter :verify_authenticity_token in the Photos Controller. Bad? Yea, probably. I haven&#8217;t found a better way yet.</p>
<p>Add this code to app/views/galleries/edit.html.erb:</p>
<p><script src="http://gist.github.com/189157.js"></script> Which leads you to add the following partial: app/views/photos/_image.html.erb  <script src="http://gist.github.com/189159.js"></script></p>
<p>We&#8217;ll worry about the destroy link later, let&#8217;s integrate swfupload. <a href="http://code.google.com/p/swfupload/">Download the latest copy of SWFUpload</a>. Copy flash/swfupload.swf to public/flash (make directory first). Copy swfupload.js &amp; upload.js (in Jim Neath&#8217;s demo app) to public/javascripts. Copy Jim Neath&#8217;s swfupload.css file to public/stylesheets. Copy Jim Neath&#8217;s images/icons folder to public/images.</p>
<p>Add this code to app/views/galleries/edit.html.erb:</p>
<p><script src="http://gist.github.com/189160.js"></script></p>
<p>Yep, a lot is going on there. Reload your galleries/edit page and see if it&#8217;s still working <img src='http://www.joesak.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Ok, so this gets you to a functioning online photo gallery. Up next will be adding user accounts, a shopping cart, ordering options, customers &amp; paypal integration. Stay tuned!</p>
<p>For now, please find the <a href="http://github.com/joemsak/proofs_package">source</a> here: <a href="http://github.com/joemsak/proofs_package">http://github.com/joemsak/proofs_package</a></p>
<p>And for help on your project, visit us at <a href="http://www.simplifyadvance.com">http://www.simplifyadvance.com</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.joesak.com/2009/09/18/online-photo-gallery-payment-order-fulfillment-ruby-on-rails-tutorial/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>My First Real-World Rails Project, Part II</title>
		<link>http://www.joesak.com/2008/11/20/my-first-real-world-rails-project-part-ii/</link>
		<comments>http://www.joesak.com/2008/11/20/my-first-real-world-rails-project-part-ii/#comments</comments>
		<pubDate>Thu, 20 Nov 2008 17:16:56 +0000</pubDate>
		<dc:creator>Joe Sak</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Custom Development]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Projects]]></category>
		<category><![CDATA[Ruby on Rails]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[Websites]]></category>

		<guid isPermaLink="false">http://www.joesak.com/?p=171</guid>
		<description><![CDATA[Continuing my series on my first real-world rails project, I&#8217;ve made some great advancements. Using attachment_fu, following Mike Clark&#8217;s Tutorial for Uploading / Resizing images in Ruby on Rails, and Rmagick with ImageMagick, I was able to add Categories functionality with featured images. I also used lightbox and Coda Slider for Admin &#38; Home presentations, [...]]]></description>
			<content:encoded><![CDATA[<p>Continuing <a href="http://www.joesak.com/2008/11/10/real-world-rails-project-part-15/">my series on my first real-world rails project</a>, I&#8217;ve made some great advancements.</p>
<p>Using <a href="http://svn.techno-weenie.net/projects/plugins/attachment_fu/">attachment_fu</a>, following <a href="http://clarkware.com/cgi/blosxom/2007/02/24">Mike Clark&#8217;s Tutorial for Uploading / Resizing images in Ruby on Rail</a>s, and <a href="http://rmagick.rubyforge.org/">Rmagick</a> with <a href="http://www.imagemagick.org/script/index.php">ImageMagick</a>, I was able to add Categories functionality with featured images.</p>
<p>I also used <a href="http://www.lokeshdhakar.com/projects/lightbox2/">lightbox</a> and <a href="http://www.ndoherty.com/demos/coda-slider/1.1.1/">Coda Slider</a> for Admin &amp; Home presentations, respectively.</p>
<p>Enjoy!</p>
<p><a href="http://screencast.com/t/Jli6m3lzL">http://screencast.com/t/Jli6m3lzL</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.joesak.com/2008/11/20/my-first-real-world-rails-project-part-ii/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>CFD Smile Goes Live!</title>
		<link>http://www.joesak.com/2007/11/12/cfd-smile-goes-live/</link>
		<comments>http://www.joesak.com/2007/11/12/cfd-smile-goes-live/#comments</comments>
		<pubDate>Tue, 13 Nov 2007 03:08:43 +0000</pubDate>
		<dc:creator>Joe Sak</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Clients]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[Custom Development]]></category>
		<category><![CDATA[Design]]></category>
		<category><![CDATA[Portfolio]]></category>
		<category><![CDATA[Portfolio - Freelance]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Projects]]></category>
		<category><![CDATA[SEO]]></category>
		<category><![CDATA[Semantic XHTML]]></category>
		<category><![CDATA[Skinning]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[Websites]]></category>
		<category><![CDATA[Work Stuff]]></category>
		<category><![CDATA[XHTML]]></category>

		<guid isPermaLink="false">http://www.joesak.com/cfd-smile-goes-live/</guid>
		<description><![CDATA[Well, my first side project has finally gone live! After months of hard work, I now unveil www.cfdsmile.com to you. We wanted to bring out the services right up front for best emphasis, and lots of heavy stock photo usage for high impact. We also worked with a professional web content writer to make the [...]]]></description>
			<content:encoded><![CDATA[<p>Well, my first side project has finally gone live! After months of hard work, I now unveil <a href="http://www.cfdsmile.com/">www.cfdsmile.com</a> to you. We wanted to bring out the services right up front for best emphasis, and lots of heavy stock photo usage for high impact.</p>
<p>We also worked with a professional web content writer to make the content more effective and search-engine optimized. This, coupled with semantic HTML, CSS, and google web master tools, will help this site rank high in keywords for Texas Dental Services.</p>
<p>So, please visit the site if you get a chance, and enjoy!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.joesak.com/2007/11/12/cfd-smile-goes-live/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Modifying DotNetNuke Search and Improving the Results</title>
		<link>http://www.joesak.com/2007/07/14/modifying-dotnetnuke-search-and-improving-the-results/</link>
		<comments>http://www.joesak.com/2007/07/14/modifying-dotnetnuke-search-and-improving-the-results/#comments</comments>
		<pubDate>Sat, 14 Jul 2007 12:41:38 +0000</pubDate>
		<dc:creator>Joe Sak</dc:creator>
				<category><![CDATA[Artemis Solutions Group]]></category>
		<category><![CDATA[Custom Development]]></category>
		<category><![CDATA[DotNetNuke]]></category>
		<category><![CDATA[Improving Code]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[SEO]]></category>
		<category><![CDATA[Search Engines]]></category>
		<category><![CDATA[Search Modules]]></category>
		<category><![CDATA[Search Results]]></category>
		<category><![CDATA[Stored Procedure Improvement]]></category>
		<category><![CDATA[Usability]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[Websites]]></category>
		<category><![CDATA[Work Stuff]]></category>

		<guid isPermaLink="false">http://www.joesak.com/modifying-dotnetnuke-search-and-improving-the-results/</guid>
		<description><![CDATA[Recently, I modified the Stored Procedure named &#8220;GetSearchResults&#8221; to improve the results pages in DotNetNuke web sites. Here is my explanation from the DNN forums. OK &#8212; here is where the actual change is: &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211; AND (sw.Word like &#8216;%&#8217; + @Word + &#8216;%&#8217;) AND (t.IsDeleted = 0) AND (t.DisableLink = 0) AND (m.IsDeleted = 0) [...]]]></description>
			<content:encoded><![CDATA[<p>Recently, I modified the Stored Procedure named &#8220;GetSearchResults&#8221; to improve the results pages in DotNetNuke web sites. Here is my explanation from the DNN forums.</p>
<p><span id="more-44"></span></p>
<p>OK &#8212; here is where the actual change is:</p>
<p> &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;</p>
<p><strong>  AND (sw.Word like &#8216;%&#8217; + @Word + &#8216;%&#8217;)</strong></p>
<p>    AND (t.IsDeleted = 0)</p>
<p><strong>    AND (t.DisableLink = 0)</strong></p>
<p>    AND (m.IsDeleted = 0)</p>
<p>    AND (t.PortalID = @PortalID)</p>
<p><strong>    OR (m.ModuleTitle like &#8216;%&#8217; + @Word + &#8216;%&#8217;)</strong></p>
<p>&#8212;&#8212;&#8212;&#8211;</p>
<p>The bolded lines are the changes</p>
<p>First line is how the search term is matched. Instead of exact, it does a like. We found that a lot of clients would complain that searching &#8220;map&#8221;, for instance, would not return pages which had the word &#8220;maps&#8221; on them. Or &#8220;auto&#8221; won&#8217;t give you &#8220;automobile&#8221;.</p>
<p>Second is the disablelink line. We had the problem of hidden pages showing up in results  but realized sometimes we WANT hidden pages to show up, but sometimes we hide pages because they&#8217;re not ready to be published. So I decided that if I &#8220;disable&#8221; the page then I definitely don&#8217;t want it to come up in the results, but I might want to keep it for later (we aren&#8217;t much for deleting pages around here)</p>
<p>Third is the OR m.ModuleTitle like &#8216;%&#8217; + @Word + &#8216;%&#8217; part &#8212; now this is kind of a subjective one. I have a web site right now for a client that sells insurance. Home insurance, life insurance, and car insurance. When I searched &#8220;car&#8221; I didn&#8217;t get the car insurance page at all, even though the page was titled car insurance and the module was titled car insurance&#8230; The content copy used the word &#8220;automobile&#8221; because this particular client is very traditional and was picky about that wording. So I added the &#8220;OR&#8221; line because if we put the search term in the title, it&#8217;s most likely relevant. We know module titles are what show up as the links on the SRP and so we make sure those titles are always relevant and helpful for the user.</p>
<p>BUT &#8212; we would like to see page name or page title as an option in the settings for how the text displays. we couldn&#8217;t figure out how to modify the core to do that.</p>
<p>OK that is all i hope this has been informational</p>
]]></content:encoded>
			<wfw:commentRss>http://www.joesak.com/2007/07/14/modifying-dotnetnuke-search-and-improving-the-results/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk
Page Caching using disk (enhanced)
Database Caching 10/16 queries in 0.006 seconds using disk

Served from: www.joesak.com @ 2010-09-09 21:24:37 -->