<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-4267134159343646405</id><updated>2011-05-03T07:03:16.123-04:00</updated><title type='text'>Two cents on the road to millions</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://joshnankin.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4267134159343646405/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://joshnankin.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Josh</name><uri>http://www.blogger.com/profile/02557649030271131863</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>4</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-4267134159343646405.post-1980500450793320132</id><published>2011-02-23T18:06:00.011-05:00</published><updated>2011-02-24T19:25:31.976-05:00</updated><title type='text'>FAQs with Jquery</title><content type='html'>Step 1.&lt;br /&gt;&lt;br /&gt;Create a page with FAQs formatted in the following manner:&lt;br /&gt;&lt;br /&gt;&lt;pre style="font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; color: #000000; background-color: #eee;font-size: 12px;border: 1px dashed #999999;line-height: 14px;padding: 5px; overflow: auto; width: 100%"&gt;&lt;code&gt;  &amp;lt;div class="faq"&amp;gt;&lt;br /&gt;&amp;lt;div class="question"&amp;gt;Question here&amp;lt;/div&amp;gt;&lt;br /&gt;&amp;lt;div class="answer"&amp;gt;Answer here&amp;lt;/div&amp;gt;&lt;br /&gt;&amp;lt;/div&amp;gt;&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;Add an ordered list at the top of the page with id="questions":&lt;br /&gt;&lt;br /&gt;&lt;pre style="font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; color: #000000; background-color: #eee;font-size: 12px;border: 1px dashed #999999;line-height: 14px;padding: 5px; overflow: auto; width: 100%"&gt;&lt;code&gt;&lt;br /&gt;     &amp;lt;ol id="questions"&amp;gt;&lt;br /&gt;     &amp;lt;/ol&amp;gt;&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Then, add this javascript to your page (with jQuery already loaded, of course):&lt;br /&gt;&lt;pre style="font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; color: #000000; background-color: #eee;font-size: 12px;border: 1px dashed #999999;line-height: 14px;padding: 5px; overflow: auto; width: 100%"&gt;&lt;code&gt;&amp;lt;script type="text/javascript"&amp;gt;&lt;br /&gt;  $().ready(function(){&lt;br /&gt;      $('.faq').each(function(index, value){&lt;br /&gt;          $('#questions').append($("&amp;lt;li&amp;gt;").append($("&amp;lt;a&amp;gt;").attr('href', '#faq' + index).text($(value).find('.question').text())));&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;          $(value).find('.question').text((index + 1) + '. ' + $(value).find('.question').text());&lt;br /&gt;          $(value).find('.answer').after(&lt;br /&gt;              $("&amp;lt;a href='#' class='top'&amp;gt;Top&amp;lt;/a&amp;gt;")&lt;br /&gt;          );&lt;br /&gt;          $(value).before($("&amp;lt;a name='faq" + index + "'&amp;gt;&amp;lt;/a&amp;gt;"));&lt;br /&gt;      });&lt;br /&gt;  });&lt;br /&gt;&amp;lt;/script&amp;gt;&lt;/code&gt;&lt;/pre&gt;And here's some CSS to make it look pretty:&lt;div&gt;&lt;div&gt;&lt;pre style="font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; color: #000000; background-color: #eee;font-size: 12px;border: 1px dashed #999999;line-height: 14px;padding: 5px; overflow: auto; width: 100%"&gt;&lt;code&gt;&amp;lt;style&amp;gt;&lt;/div&gt;&lt;div&gt;    ol#questions {&lt;/div&gt;&lt;div&gt;        margin-left: 40px;&lt;/div&gt;&lt;div&gt;        margin-bottom: 80px;&lt;/div&gt;&lt;div&gt;    }&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;    ol#questions li {&lt;/div&gt;&lt;div&gt;        font-size: 16px;&lt;/div&gt;&lt;div&gt;        line-height: 200%;&lt;/div&gt;&lt;div&gt;    }&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;    div.faq {&lt;/div&gt;&lt;div&gt;        border-bottom: 1px solid #CCCCCC;&lt;/div&gt;&lt;div&gt;        margin: 20px;&lt;/div&gt;&lt;div&gt;        padding-bottom: 10px;&lt;/div&gt;&lt;div&gt;        font-size: 16px;&lt;/div&gt;&lt;div&gt;    }&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;    div.question {&lt;/div&gt;&lt;div&gt;        font-weight: bold;&lt;/div&gt;&lt;div&gt;        color: #078CF9;&lt;/div&gt;&lt;div&gt;        margin-bottom: 5px;&lt;/div&gt;&lt;div&gt;    }&lt;/div&gt;&lt;div&gt;    div.answer {&lt;/div&gt;&lt;div&gt;        margin-bottom: 5px;&lt;/div&gt;&lt;div&gt;    }&lt;/div&gt;&lt;div&gt;&amp;lt;/style&amp;gt;&lt;/div&gt;&lt;div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4267134159343646405-1980500450793320132?l=joshnankin.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://joshnankin.blogspot.com/feeds/1980500450793320132/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4267134159343646405&amp;postID=1980500450793320132' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4267134159343646405/posts/default/1980500450793320132'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4267134159343646405/posts/default/1980500450793320132'/><link rel='alternate' type='text/html' href='http://joshnankin.blogspot.com/2011/02/faqs-with-jquery.html' title='FAQs with Jquery'/><author><name>Josh</name><uri>http://www.blogger.com/profile/02557649030271131863</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4267134159343646405.post-4552373273869137108</id><published>2009-03-11T14:10:00.000-04:00</published><updated>2009-03-11T14:22:41.682-04:00</updated><title type='text'>Getting PDT into Symfony mode</title><content type='html'>Here's how to setup Eclipse PDT to ease Symfony development.&lt;br /&gt;&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Download an all in one PDT distro from &lt;a href="http://www.eclipse.org/pdt/downloads/"&gt;http://www.eclipse.org/pdt/downloads/&lt;/a&gt;&lt;/li&gt;&lt;li&gt;Install RSE so you can develop directly on a remote server or sync your current project.  (update site:&lt;a href="http://download.eclipse.org/dsdp/tm/updates/3.0/"&gt; http://download.eclipse.org/dsdp/tm/updates/3.0/&lt;/a&gt;, search for "Remote" when installing to make sure you get all aspects of the plugin.  Make sure you select the RSE core!) &lt;/li&gt;&lt;li&gt;Install Terminal  so you can SSH to a remote server and execute Symfony commands.  (Update site is the same as for RSE.)&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Install SQLExplorer to talk directly to your database from Eclipse  (update site: &lt;a href="http://eclipsesql.sourceforge.net/"&gt;http://eclipsesql.sourceforge.net/&lt;/a&gt;)&lt;/li&gt;&lt;li&gt;Follow the directions at (&lt;a href="http://trac.symfony-project.org/wiki/SymfonyAndPDT"&gt;http://trac.symfony-project.org/wiki/SymfonyAndPDT&lt;/a&gt;) to install the YAML editor and get code completion working.  This will only work if you are developing a project on your machine.  If you're developing directly on a server using RSE, this method will not work.&lt;/li&gt;&lt;li&gt;Add the symfony code completion templates at (&lt;a href="http://www.symfony-framework.com/2008/06/03/speed-symfony-developing-with-eclipse-snippets-templates/"&gt;http://www.symfony-framework.com/2008/06/03/speed-symfony-developing-with-eclipse-snippets-templates/&lt;/a&gt;) to at least get some snippet help when developing remotely.&lt;br /&gt;&lt;/li&gt;&lt;/ol&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4267134159343646405-4552373273869137108?l=joshnankin.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://joshnankin.blogspot.com/feeds/4552373273869137108/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4267134159343646405&amp;postID=4552373273869137108' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4267134159343646405/posts/default/4552373273869137108'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4267134159343646405/posts/default/4552373273869137108'/><link rel='alternate' type='text/html' href='http://joshnankin.blogspot.com/2009/03/getting-pdt-into-symfony-mode.html' title='Getting PDT into Symfony mode'/><author><name>Josh</name><uri>http://www.blogger.com/profile/02557649030271131863</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4267134159343646405.post-4619764519252057436</id><published>2009-03-11T13:43:00.000-04:00</published><updated>2009-03-11T14:10:10.437-04:00</updated><title type='text'>Upgrading sfFlickrGalleryPlugin</title><content type='html'>Well, I figure it's probably time for another post, and perhaps a real one this time!&lt;br /&gt;&lt;br /&gt;Recently I got into Symfony and wanted to install a photo gallery type plugin in one of my projects.  I took a look at sfFlickrGalleryPlugin which is compatible with Symfony 0.1.1 but my project is in crispy new 1.2.4.  I upgraded the plugin manually for now, and I decided it would be a good idea to make a post on how this is done.  (It was not exactly trivial.)&lt;br /&gt;&lt;br /&gt;Here's what it'll take for you to get the plugin to work in 1.2.4:&lt;br /&gt;&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Install the plugin in your project and follow the rest of the directions in the plugin README.&lt;/li&gt;&lt;li&gt;Modify Request.php in the included Phlickr library by changing the submitHttpPost function to look as follows:&lt;br /&gt;&lt;br /&gt;&lt;div class="code"&gt;&lt;br /&gt;  static function submitHttpPost($url, $postParams = null, $timeout = self::TIMEOUT_TOTAL)&lt;br /&gt;  {&lt;br /&gt;      $ch = curl_init();&lt;br /&gt;&lt;br /&gt;      // set up the request&lt;br /&gt;      curl_setopt($ch, CURLOPT_URL, $url);&lt;br /&gt;      // make sure we submit this as a post&lt;br /&gt;      curl_setopt($ch, CURLOPT_POST, true);&lt;br /&gt;      if (isset($postParams)) {&lt;br /&gt;          curl_setopt($ch, CURLOPT_POSTFIELDS, $postParams);&lt;br /&gt;      }&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;        else curl_setopt($ch, CURLOPT_POSTFIELDS, '');&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;(solution found at &lt;a href="http://www.milk-hub.net/blog/2008/08/26/curl_error_26#comments-77"&gt;http://www.milk-hub.net/blog/2008/08/26/curl_error_26#comments-77&lt;/a&gt;)&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;Modify Photo.php also in the Phlickr library to include:&lt;br /&gt;&lt;br /&gt;  public function getFarm(){&lt;br /&gt;      if (!isset($this-&gt;_cachedXml['farm'])) {&lt;br /&gt;          $this-&gt;load();&lt;br /&gt;      }&lt;br /&gt;      return (integer) $this-&gt;_cachedXml['farm'];&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Modify line 547 in Photo.php's buildImgUrl so that it looks as follows:&lt;br /&gt;&lt;br /&gt;$url = sprintf("http://&lt;span style="font-weight: bold;"&gt;farm%d&lt;/span&gt;.static.flickr.com/%d/&lt;span style="font-weight: bold;"&gt;%s&lt;/span&gt;_%s%s.%s",&lt;br /&gt;      &lt;span style="font-weight: bold;"&gt;$this-&gt;getFarm()&lt;/span&gt;, $this-&gt;getServer(), $this-&gt;getId(), $this-&gt;getSecret(), $sizeStr, $type);&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;(Discovered here: &lt;a href="http://forum.symfony-project.org/index.php/m/53102/"&gt;http://forum.symfony-project.org/index.php/m/53102/&lt;/a&gt;)&lt;br /&gt;You need to use %s instead of %d because Flickr has exceeded integer bounds or photo ids. (&lt;a href="http://andrewsblog.org/2007/12/30/use-bigint-for-flickr-photo-ids/"&gt;http://andrewsblog.org/2007/12/30/use-bigint-for-flickr-photo-ids/&lt;/a&gt;)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Change all references to $this-&gt;setFlash in the plugin's modules to be $this-&gt;getUser()-&gt;setFlash&lt;/li&gt;&lt;/ol&gt;&lt;br /&gt;That's it!  You should be good to go!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4267134159343646405-4619764519252057436?l=joshnankin.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://joshnankin.blogspot.com/feeds/4619764519252057436/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4267134159343646405&amp;postID=4619764519252057436' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4267134159343646405/posts/default/4619764519252057436'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4267134159343646405/posts/default/4619764519252057436'/><link rel='alternate' type='text/html' href='http://joshnankin.blogspot.com/2009/03/upgrading-sfflickrgalleryplugin.html' title='Upgrading sfFlickrGalleryPlugin'/><author><name>Josh</name><uri>http://www.blogger.com/profile/02557649030271131863</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4267134159343646405.post-6801175622765206666</id><published>2008-08-03T22:36:00.000-04:00</published><updated>2008-08-03T22:37:30.126-04:00</updated><title type='text'>My first post</title><content type='html'>This is my first post on my site.  I'm testing it to see how it will look with the CSS and XHTML.  Let me know what you think.  Testing, testing, 123.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4267134159343646405-6801175622765206666?l=joshnankin.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://joshnankin.blogspot.com/feeds/6801175622765206666/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4267134159343646405&amp;postID=6801175622765206666' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4267134159343646405/posts/default/6801175622765206666'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4267134159343646405/posts/default/6801175622765206666'/><link rel='alternate' type='text/html' href='http://joshnankin.blogspot.com/2008/08/my-first-post.html' title='My first post'/><author><name>Josh</name><uri>http://www.blogger.com/profile/02557649030271131863</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>4</thr:total></entry></feed>
