<?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>techrageo.us &#187; Wordpress</title>
	<atom:link href="http://techrageo.us/taxonomy/categories/wordpress/feed/" rel="self" type="application/rss+xml" />
	<link>http://techrageo.us</link>
	<description>insight on technology</description>
	<lastBuildDate>Sat, 22 Oct 2011 12:18:09 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=</generator>
		<item>
		<title>techrageo.us Site Upgrade</title>
		<link>http://techrageo.us/2007/05/23/techrageous-site-upgrade/</link>
		<comments>http://techrageo.us/2007/05/23/techrageous-site-upgrade/#comments</comments>
		<pubDate>Wed, 23 May 2007 10:25:51 +0000</pubDate>
		<dc:creator>bill</dc:creator>
				<category><![CDATA[Site News]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://techrageo.us/2007/05/23/techrageous-site-upgrade/</guid>
		<description><![CDATA[techrageo.us has been upgraded to WordPress 2.2 and the look has been changed a bit with the switch to a slightly-customized CutLine theme. Though the WordPress upgrade went okay, it had to be done manually since techrageo.us was originally installed manually. If you notice oddities around here, please let us know in a comment. Thanks! [...]]]></description>
			<content:encoded><![CDATA[<p><img src="/images/siteupgradesm.jpg"/></p>
<p><a href="http://techrageo.us">techrageo.us</a> has been upgraded to WordPress 2.2 and the look has been changed a bit with the switch to a slightly-customized CutLine theme.</p>
<p>Though the WordPress upgrade went okay, it had to be done manually since techrageo.us was originally installed manually. If you notice oddities around here, please let us know in a comment. Thanks!</p>
<h3>Automation Is Good</h3>
<p>Use one-click installs wherever possible! It is not always feasible, but <a href="http://www.dreamhost.com/r.cgi?95477">Dreamhost</a>&#8216;s one-click install and upgrade processes, for example, are very convenient. In the case of this website, it was originally installed by hand, which left it out of the running for one-click upgrades.</p>
<p>Another benefit to using one-click installs, at least with Dreamhost, is that some additional plugins and wide array of themes are installed as well.</p>
]]></content:encoded>
			<wfw:commentRss>http://techrageo.us/2007/05/23/techrageous-site-upgrade/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP and WordPress SVG Basics</title>
		<link>http://techrageo.us/2007/04/07/php-and-wordpress-svg-basics/</link>
		<comments>http://techrageo.us/2007/04/07/php-and-wordpress-svg-basics/#comments</comments>
		<pubDate>Sun, 08 Apr 2007 01:54:58 +0000</pubDate>
		<dc:creator>bill</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[SVG]]></category>
		<category><![CDATA[Web design]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[XML]]></category>

		<guid isPermaLink="false">http://techrageo.us/2007/04/07/php-and-wordpress-svg-basics/</guid>
		<description><![CDATA[Scalable Vector Graphics, or SVG, is an XML standard for vector graphics (of course). That means that it contains descriptions of shapes, such as rectangles, lines, circles, and text, in an XML format. SVG provides a robust definition language for drawings. The drawing at the right was a sample SVG drawing included in Jasc&#8217;s WebDraw. [...]]]></description>
			<content:encoded><![CDATA[<p><img align="right" src="/wp-content/code/svgbutterfly.jpg"/>Scalable Vector Graphics, or SVG, is an XML standard for vector graphics (of course). That means that it contains descriptions of shapes, such as rectangles, lines, circles, and text, in an XML format.</p>
<p>SVG provides a robust definition language for drawings. The drawing at the right was a sample SVG drawing included in Jasc&#8217;s WebDraw. There are many other examples on the web of complex SVG drawings.</p>
<p>I&#8217;ve been playing around with SVG just a bit and thought I&#8217;d record the basics of getting simple shapes embedded in a page and how to do it with PHP and in WordPress.</p>
<p>Grant posted an article here a couple years ago on creating <a href="http://techrageo.us/2005/06/22/svg-graphs-with-php/">SVG Graphs With PHP</a>, so check that out too if you want a more complicated example.</p>
<h3>SVG in HTML</h3>
<p>The simplest way to get SVG vector drawings in an HTML file is to embed an .svg file. The HTML and SVG source will look something like the following</p>
<p><strong>HTML Code</strong><br />
<code><br />
&lt;html&gt;<br />
&lt;body&gt;<br />
Circle In A Square&lt;br/&gt;<br />
&lt;embed width="100" height="100" src="/wp-content/code/phpsvg1.svg"/&gt;<br />
&lt;/body&gt;<br />
&lt;/html&gt;<br />
</code></p>
<p><strong>SVG Code</strong><br />
<code><br />
&lt;?xml version="1.0"?&gt;<br />
&lt;svg width="100px" height="100px" viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg"&gt;<br />
	&lt;rect x="10" y="10" width="50" height="50"<br />
		fill="#777" stroke="red" stroke-width="3"  /&gt;<br />
	&lt;circle cx="16" cy="16" r="8" fill="black" stroke="yellow" stroke-width="3"/&gt;<br />
&lt;/svg&gt;<br />
</code></p>
<p><strong>Output</strong></p>
<p>Circle In A Square<br />
<embed width="100" height="100" src="/wp-content/code/phpsvg1.svg"/></p>
<h3>WordPress and SVG</h3>
<p>To include an SVG drawing in a WordPress post, simply create and upload an SVG file then put the HTML EMBED tag in your WordPress post.<br />
<code><br />
&lt;embed width="100" height="100" src="/wp-content/code/phpsvg1.svg"/&gt;<br />
</code></p>
<h3>Basic SVG Tags</h3>
<p>There are plenty of exhaustive SVG references on the web, so let&#8217;s look at just the tags used above.</p>
<div style="padding-left:10px">
<p><strong>svg</strong> &#8211; This tag indicates the beginning of an SVG drawing. The attibutes used above are width and height, both self-<br />
describing, viewBox which describes a clipping rectangle for the drawing, and xmlns which simply defines the default namespace for<br />
the XML tags used in the drawing.</p>
<p><strong>rect</strong> &#8211; Here we define the rectangle, with x and y being the upper-left corner, width and height again are obvious, fill<br />
is the rectangle&#8217;s color in hex digits, stroke is the color of the line used to draw the outside boundary of the rectangle, and<br />
stroke-width is the width of that line.</p>
<p><strong>circle</strong> &#8211; This defines the circle. cx and cy determine the center point of the circle, while r is the radius; fill,<br />
stroke, and stroke-width have the same meanings as was used for the rectangle.</p>
</div>
<h3>PHP SVG</h3>
<p>Of course, outputting SVG from PHP requires that you output the SVG source back to the browser. However, PHP output will normally be marked as being of <em>Content-Type: text/html</em>, so you have to do two things to send back SVG:
<ol>
<li>First, set the Content-Type header to <em>image/svg+xml</em></li>
<li>Second, make sure your php file does not contain any text outside the script tags.</li>
</ol>
<p>So, the following PHP generates the above SVG drawing.<br />
<code><br />
&lt;?php<br />
$svg = &lt;&lt;&lt;END<br />
&lt;?xml version="1.0" standalone="no"?&gt;<br />
&lt;svg width="100px" height="100px" viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg"&gt;<br />
	&lt;rect x="10" y="10" width="50" height="50"<br />
		fill="navy" stroke="red" stroke-width="3"  /&gt;<br />
	&lt;circle cx="16" cy="16" r="8" fill="black" stroke="yellow" stroke-width="3"/&gt;<br />
&lt;/svg&gt;<br />
END;<br />
header("Content-Type: image/svg+xml");<br />
echo $svg;<br />
?&gt;<br />
</code></p>
]]></content:encoded>
			<wfw:commentRss>http://techrageo.us/2007/04/07/php-and-wordpress-svg-basics/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>

