<?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>PreMagination &#187; Markdown</title>
	<atom:link href="http://www.premagination.com/tag/markdown/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.premagination.com</link>
	<description>A living document of Drew Loika's... Life, Passions, and Follies</description>
	<lastBuildDate>Thu, 29 Jul 2010 23:29:00 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Flickr Photo Album 0.85 and Markdown</title>
		<link>http://www.premagination.com/2006/10/11/flickr-photo-album-085-and-markdown/</link>
		<comments>http://www.premagination.com/2006/10/11/flickr-photo-album-085-and-markdown/#comments</comments>
		<pubDate>Thu, 12 Oct 2006 06:03:45 +0000</pubDate>
		<dc:creator>Drew Loika</dc:creator>
				<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[flickr]]></category>
		<category><![CDATA[flickr-photo-album]]></category>
		<category><![CDATA[joe-tan]]></category>
		<category><![CDATA[john-gruber]]></category>
		<category><![CDATA[Markdown]]></category>
		<category><![CDATA[tantannoodles]]></category>
		<category><![CDATA[wordpress-plugin]]></category>

		<guid isPermaLink="false">http://www.premagination.com/2006/10/11/flickr-photo-album-085-and-markdown/</guid>
		<description><![CDATA[I have written in the [past](http://www.premagination.com/2006/03/23/markdown-and-the-flickr-photo-album-for-wordpress-plugin/) about modifying [Flickr Photo Album](http://tantannoodles.com/toolkit/photo-album/) to insert Markdown instead of straight html. After upgrading the plugins and theme of my blog, it was time modify the most current version again. Joe Tan has been steadily upgrading the plugin so I was worried the modifications would be different, but fortunately [...]]]></description>
			<content:encoded><![CDATA[<p>I have written in the [past](http://www.premagination.com/2006/03/23/markdown-and-the-flickr-photo-album-for-wordpress-plugin/) about modifying [Flickr Photo Album](http://tantannoodles.com/toolkit/photo-album/) to insert Markdown instead of straight html. After upgrading the plugins and theme of my blog, it was time modify the most current version again. Joe Tan has been steadily upgrading the plugin so I was worried the modifications would be different, but fortunately the photo insertion specifics have not changed. So, for anyone using Markdown and Flickr Photo Album, see my previous [instructions](http://www.premagination.com/2006/03/23/markdown-and-the-flickr-photo-album-for-wordpress-plugin/) as I have confirmed that they are still valid. Many thanks to [John Gruber](http://daringfireball.net/projects/markdown/) and others for their work on Markdown, and many more thanks to [Joe Tan](http://tantannoodles.com/) and his fantastic Wordpress plugin.</p>
<p>**PLEASE NOTE** My theme is having some issues with the Edit-n-Place plugin that I hope to have resolved soon, in the meantime please disregard any Edit-n-Place javascript code at the end of my posts. Specifically, don&#8217;t add this code to Flickr Photo Album!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.premagination.com/2006/10/11/flickr-photo-album-085-and-markdown/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>I&#8217;m BACK!</title>
		<link>http://www.premagination.com/2006/10/08/im-back/</link>
		<comments>http://www.premagination.com/2006/10/08/im-back/#comments</comments>
		<pubDate>Mon, 09 Oct 2006 06:07:56 +0000</pubDate>
		<dc:creator>Drew Loika</dc:creator>
				<category><![CDATA[Site]]></category>
		<category><![CDATA[flickr]]></category>
		<category><![CDATA[flickr-photo-album]]></category>
		<category><![CDATA[hemingway]]></category>
		<category><![CDATA[Markdown]]></category>
		<category><![CDATA[tantannoodles]]></category>

		<guid isPermaLink="false">http://www.premagination.com/2006/10/08/im-back/</guid>
		<description><![CDATA[Well, not that I ever really left, I just slacked off on posting. And not for a lack of interesting things to talk about either. Anyway, my new laptop should be on the way shortly, which I hope will facilitate more frequent posts, and even if I don&#8217;t turn into a pro blogger, I CERTAINLY [...]]]></description>
			<content:encoded><![CDATA[<p>Well, not that I ever really left, I just slacked off on posting. And not for a lack of interesting things to talk about either. Anyway, my new laptop should be on the way shortly, which I hope will facilitate more frequent posts, and even if I don&#8217;t turn into a pro blogger, I CERTAINLY can do better than I have. In the time I&#8217;ve been several updates have been released for the plugins and theme I&#8217;m using and I&#8217;ve upgrade to the current versions. Of course that broke Markdown support (why is something so simple and beautiful so hard?!?) and my flickr gallery plugin, hopefully I&#8217;ll be able to get those cleared up in the next few days. It&#8217;s good to be back!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.premagination.com/2006/10/08/im-back/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Markdown and the Flickr Photo Album for Wordpress Plugin</title>
		<link>http://www.premagination.com/2006/03/23/markdown-and-the-flickr-photo-album-for-wordpress-plugin/</link>
		<comments>http://www.premagination.com/2006/03/23/markdown-and-the-flickr-photo-album-for-wordpress-plugin/#comments</comments>
		<pubDate>Fri, 24 Mar 2006 04:04:05 +0000</pubDate>
		<dc:creator>Drew Loika</dc:creator>
				<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[flickr]]></category>
		<category><![CDATA[flickr-photo-album-for-wordpress]]></category>
		<category><![CDATA[hack]]></category>
		<category><![CDATA[Markdown]]></category>

		<guid isPermaLink="false">http://www.premagination.com/2006/03/23/markdown-and-the-flickr-photo-album-for-wordpress-plugin/</guid>
		<description><![CDATA[Not one day after I [post](http://www.premagination.com/2006/03/22/wordpress-flickr-post-bar-and-markdown/) instructions on how to modify the *Wordpress Flickr Post Bar* Joe Tan releases a massive upgrade in the form of the [Flickr Photo Album for Wordpress](http://tantannoodles.com/toolkit/photo-album/). After a receiving a helpful hint from Joe on where to start I&#8217;d like to share my hack that replaces the HTML inserted [...]]]></description>
			<content:encoded><![CDATA[<p>Not one day after I [post](http://www.premagination.com/2006/03/22/wordpress-flickr-post-bar-and-markdown/) instructions on how to modify the *Wordpress Flickr Post Bar* Joe Tan releases a massive upgrade in the form of the [Flickr Photo Album for Wordpress](http://tantannoodles.com/toolkit/photo-album/). After a receiving a helpful hint from Joe on where to start I&#8217;d like to share my hack that replaces the HTML inserted by the plugin with Markdown.</p>
<p>As before, we&#8217;re simply removing the hardcoded html and replacing it with Markdown. The function that performs this is named *silas_AddPhoto* and can be found in *&#8221;inline-photos.html&#8221;* file on line 22. Simply replace that function with the code below and replace the original file on the server with the modified version. That&#8217;s it! </p>
<p>*I have reformatted the original code to be easier to read*</p>
<p>    function silas_addPhoto(photoUrl, sourceUrl, width, height, title)<br />
    {<br />
        /*var html =<br />
            &#8216;<a href="'+photoUrl+'" class="tt-flickr">&#8216; +<br />
            &#8216;<img src="'+sourceUrl+'" alt="'+title+'" width="'+width+'" height="'+height+'" border="0" />&#8216; +<br />
            &#8216;</a> &#8216;*/<br />
        var html = &#8216;[![' + title + '](&#8216; + sourceUrl + &#8216;)](&#8216; + photoUrl + &#8216; &#8220;&#8216; + title + &#8216;&#8221;)&#8217;<br />
        if ( richedit )<br />
        {<br />
            win.tinyMCE.execCommand(&#8216;mceInsertContent&#8217;, false, html);<br />
        }<br />
        else<br />
        {<br />
            win.edInsertContent(win.edCanvas, html);<br />
        }<br />
        return false;<br />
    }</p>
]]></content:encoded>
			<wfw:commentRss>http://www.premagination.com/2006/03/23/markdown-and-the-flickr-photo-album-for-wordpress-plugin/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Wordpress Flickr Post Bar and Markdown</title>
		<link>http://www.premagination.com/2006/03/22/wordpress-flickr-post-bar-and-markdown/</link>
		<comments>http://www.premagination.com/2006/03/22/wordpress-flickr-post-bar-and-markdown/#comments</comments>
		<pubDate>Thu, 23 Mar 2006 05:20:22 +0000</pubDate>
		<dc:creator>Drew Loika</dc:creator>
				<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[falbum]]></category>
		<category><![CDATA[flickr]]></category>
		<category><![CDATA[Markdown]]></category>
		<category><![CDATA[wordpress-flickr-post-bar]]></category>

		<guid isPermaLink="false">http://www.premagination.com/2006/03/22/wordpress-flickr-post-bar-and-markdown/</guid>
		<description><![CDATA[I&#8217;m a big fan of Markdown and the portability it brings, but manually adding thirty photos to an otherwise small post was driving me up the wall so I did a little googling and came across the *Wordpress Flickr Post Bar* by [Joe Tan](http://tantannoodles.com/toolkit/wp-flickr-post-bar/ &#8220;Bar Homepage&#8221;). 
The Bar works by adding a bar along the [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m a big fan of Markdown and the portability it brings, but manually adding thirty photos to an otherwise small post was driving me up the wall so I did a little googling and came across the *Wordpress Flickr Post Bar* by [Joe Tan](http://tantannoodles.com/toolkit/wp-flickr-post-bar/ &#8220;Bar Homepage&#8221;). </p>
<p>The Bar works by adding a bar along the bottom of your wordpress posting box, that displays thumbnails which you can then drag into your post. An extremely effective solution (good work Joe!) it has one downside for my needs, rather than inserting Markdown for the image I&#8217;m trying to add it inserts HTML. </p>
<p>After emailing the author a feature request I did a little poking around in his code and came up with a temporary solution until he is able to implement Markdown support more fully. My approach was to simply replace the hardcoded html he was using with hardcoded Markdown. This of course means that Markdown will ALWAYS be inserted, but for my needs that was fine.</p>
<p>The file that contains the pertinent code is *&#8221;post-bar-form.html&#8221;* and the particular function is named *tantan_onClick* and starts on line 72. I commented out his code, and added my own as shown here, which starts on line 75. (Please note that I have reformatted the code for easier reading)</p>
<p>    if (textarea &#038;&#038; photo)<br />
    {<br />
        //var html = &#8216;<img class="tt-flickr" src="'+photo[0]+'" width="'+photo[2]+'" height="'+photo[3]+'" alt="'+photo[4]+'" />&#8216;;<br />
        var html = &#8216;!['+photo[4]+&#8217;](&#8216;+photo[0]+&#8217;)';	</p>
<p>        if (photo[1] != &#8221;)<br />
        {<br />
            //html = &#8216;<a class="tt-flickr" href="'+photo[1]+'">&#8216;+html+&#8217;</a> &#8216;;<br />
            html = &#8216;['+html+'](&#8216;+photo[1]+&#8217; &#8220;&#8216;+photo[4]+&#8217;&#8221;)&#8217;;<br />
        }<br />
        else<br />
        {<br />
            html += &#8216; &#8216;;<br />
        }</p>
<p>        if (window.top &#038;&#038; window.top.window.tinyMCE)<br />
        {<br />
            var mce = window.top.window.tinyMCE;<br />
            mce.execCommand(&#8216;mceInsertContent&#8217;, false, html);<br />
        }<br />
        else<br />
        {<br />
            addText(textarea, html);<br />
        }<br />
    }</p>
<p>Overwrite the modified *&#8221;post-bar-form.html&#8221;* file on your server with the modified version, and the Bar will insert Markdown rather than HTML.</p>
<p>Special thanks go to Joe Tan and his fantastic work on the Wordpress Flickr Post Bar which can be found at [http://tantannoodles.com/toolkit/wp-flickr-post-bar/](http://tantannoodles.com/toolkit/wp-flickr-post-bar/ &#8220;Bar Homepage&#8221;).</p>
]]></content:encoded>
			<wfw:commentRss>http://www.premagination.com/2006/03/22/wordpress-flickr-post-bar-and-markdown/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>
