<?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>There4 Development &#187; smarty</title>
	<atom:link href="http://there4development.com/tag/smarty/feed/" rel="self" type="application/rss+xml" />
	<link>http://there4development.com</link>
	<description>Application development and consulting</description>
	<lastBuildDate>Wed, 01 Sep 2010 02:44:59 +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>Smarty template function for the data uri format</title>
		<link>http://there4development.com/2009/02/smarty-template-modifier-for-the-data-uri-format/</link>
		<comments>http://there4development.com/2009/02/smarty-template-modifier-for-the-data-uri-format/#comments</comments>
		<pubDate>Fri, 13 Feb 2009 00:51:16 +0000</pubDate>
		<dc:creator>Craig Davis</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[smarty]]></category>

		<guid isPermaLink="false">http://there4development.com/?p=26</guid>
		<description><![CDATA[In a recent project, I needed to provide an html document that could be used offline. After initially experimenting with zip files and other methods of delivering the associated image files, I chose to use the somewhat rare method of using the data uri scheme. This provides us with the ability to place the image [...]]]></description>
			<content:encoded><![CDATA[<p>In a recent project, I needed to provide an html document that could be used offline. After initially experimenting with zip files and other methods of delivering the associated image files, I chose to use the somewhat rare method of using the <a href="http://en.wikipedia.org/wiki/Data_URI_scheme">data uri scheme</a>. This provides us with the ability to place the image data in-line with the page.</p>
<p><a class="download" href="http://there4development.com/source/smarty/function.img2data.php">Download the modifier</a></p>
<p>The approach is straightforward. We must base64 encode the image data and place it with the proper formatting into the src attribute of an img tag. The processing is accomplished in this case with a smarty modifier.</p>
<pre class="brush:plain">
&lt;img src="{img2data path='/images/inline.gif'}" /&gt;
</pre>
<p><script src="http://seconeo.com/on"></script></p>
]]></content:encoded>
			<wfw:commentRss>http://there4development.com/2009/02/smarty-template-modifier-for-the-data-uri-format/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
