<?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>For Your Lungs Only &#187; wordpress plugins</title>
	<atom:link href="http://www.foryourlungsonly.net/category/wordpress-plugins/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.foryourlungsonly.net</link>
	<description>Everything you wanted to know about web development, espresso, typography, nicotine, user interface design, whiskey, javascript, php, cascading style sheets, css hacks, beer, prototype, jquery, mysql, usability and accessiblity (but were afraid to ask)</description>
	<lastBuildDate>Mon, 14 Jun 2010 22:08:30 +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>PHP, Javascript and WordPress English to Spanish Language Translation Samples</title>
		<link>http://www.foryourlungsonly.net/2010/04/24/php-javascript-and-wordpress-english-to-spanish-language-translation-samples/</link>
		<comments>http://www.foryourlungsonly.net/2010/04/24/php-javascript-and-wordpress-english-to-spanish-language-translation-samples/#comments</comments>
		<pubDate>Sun, 25 Apr 2010 03:13:16 +0000</pubDate>
		<dc:creator>Jonathan Harriot</dc:creator>
				<category><![CDATA[featured]]></category>
		<category><![CDATA[gnu gpl]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[wordpress plugins]]></category>
		<category><![CDATA[work]]></category>

		<guid isPermaLink="false">http://www.foryourlungsonly.net/?p=117</guid>
		<description><![CDATA[First off, download the gTranslate PHP class and read about it. Now let&#8217;s start to play with it. Let&#8217;s start off simple: &#60;?php require("GTranslate.php"); try { $gt = new Gtranslate; echo "Translating [Hello World] from English to German =&#62; ".$gt-&#62;english_to_german("hello world")."&#60;br/&#62;"; echo "Translating [Ciao mondo] Italian to English =&#62; ".$gt-&#62;it_to_en("Ciao mondo")."&#60;br/&#62;"; } catch (GTranslateException $ge) [...]]]></description>
			<content:encoded><![CDATA[<p>First off, <a href="http://gtranslate-api-php.googlecode.com/files/gtranslate-api-php-0.7.5.zip">download the gTranslate PHP class</a> and <a href="http://code.google.com/p/gtranslate-api-php/">read about it</a>. Now let&#8217;s start to play with it.</p>
<p>Let&#8217;s start off simple:<span id="more-117"></span></p>
<pre><em>&lt;?php
require("GTranslate.php");
try {
	$gt = new Gtranslate;
	echo "Translating [Hello World] from English to German =&gt; ".$gt-&gt;english_to_german("hello world")."&lt;br/&gt;";
	echo "Translating [Ciao mondo] Italian to English =&gt; ".$gt-&gt;it_to_en("Ciao mondo")."&lt;br/&gt;";
} catch (GTranslateException $ge)  {
	echo $ge-&gt;getMessage();
}
?&gt;</em></pre>
<p><strong>Create a Function to Detect Language:</strong><br />
First Example for Ben&#8217;s Translator Plugin (Using a Session Variable):</p>
<pre><em>&lt;?php
function translateThis ($myText) {
	$pageURL = 'http';
	if ($_SERVER["HTTPS"] == "on") {$pageURL .= "s";}
		$pageURL .= "://";
	if ($_SERVER["SERVER_PORT"] != "80") {
		$pageURL .= $_SERVER["SERVER_NAME"].":".$_SERVER["SERVER_PORT"].$_SERVER["REQUEST_URI"];
	} else {
		$pageURL .= $_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"];
	}
	//return $pageURL;
	$myVal = substr($pageURL, 0, 28);
	if ($myVal == "http://welovecakephp.com/es/") {
		$_SESSION['pLang'] = "ES";
	} else {
		$_SESSION['pLang'] = "EN";
	}
	if ($_SESSION['pLang'] == "ES") {
		require("GTranslate.php");
		/*
			these variable can be used in conjunction with JS dynamic content to make translated content easier
			ie: change image folders/forms/etc basically things that WordPress plugins might screw up
		*/
		$myLang = "es";
		$myLangDir = "/es";
		try {
			$gt = new Gtranslate;
			$gt-&gt;setRequestType('curl');
			echo $gt-&gt;en_to_es($myText);
		} catch (GTranslateException $ge) {
			echo $ge-&gt;getMessage();
		}
	} else {
		$myLang = "en";
		$myLangDir = "";
	}
}
?&gt;</em></pre>
<p><em>Second example (Using a Cookie):</em></p>
<pre><em>&lt;?php if ($_COOKIE['pLang'] != "English") { $_SESSION['pLang'] = "ES"; } else { $_SESSION['pLang'] = "EN"; }?&gt;</em></pre>
<p><strong>Sample Usage</strong></p>
<pre><em>&lt;?php
	$myVar = "This is a test of language translation, not word by word but instead this translates the intended meaning";
	translateThis($myVar);
?&gt;</em></pre>
<p>Of course you can change settings within this to suit your translation needs and this is a single use setup but it suited the purpose for which I needed it. I hope this helps you out, cheers!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.foryourlungsonly.net/2010/04/24/php-javascript-and-wordpress-english-to-spanish-language-translation-samples/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WordPress Google Sitemap Generator Plugin mktime() Error Resolved</title>
		<link>http://www.foryourlungsonly.net/2009/07/24/wordpress-google-sitemap-generator-plugin-mktime-error-resolved/</link>
		<comments>http://www.foryourlungsonly.net/2009/07/24/wordpress-google-sitemap-generator-plugin-mktime-error-resolved/#comments</comments>
		<pubDate>Fri, 24 Jul 2009 17:00:29 +0000</pubDate>
		<dc:creator>Jonathan Harriot</dc:creator>
				<category><![CDATA[gnu gpl]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[wordpress plugins]]></category>

		<guid isPermaLink="false">http://www.foryourlungsonly.net/?p=102</guid>
		<description><![CDATA[If you use the Google Sitemap Generator Plugin for WordPress and receive the following error using WordPress 2.8+ you are not alone: Warning: mktime() expects parameter 1 to be long, string given in/wp-content/plugins/google-sitemap-generator/sitemap-core.php on line 2438 A solution for this was posted in the WordPress forums and is posted below: Find and edit the plugin [...]]]></description>
			<content:encoded><![CDATA[<p>If you use the <a title="Google Sitemap Generator Plugin for WordPress" href="http://www.arnebrachhold.de/redir/sitemap-home/">Google Sitemap Generator Plugin for WordPress</a> and receive the following error using <a href="http://wordpress.org">WordPress</a> 2.8+ you are not alone:</p>
<blockquote><p>Warning: mktime() expects parameter 1 to be long, string given in/wp-content/plugins/google-sitemap-generator/sitemap-core.php on line 2438</p></blockquote>
<p><a href="http://wordpress.org/support/topic/281175#post-1112393">A solution for this</a> was posted in the WordPress forums and is posted below:</p>
<ol>
<li>Find and edit the plugin file sitemap-core.php then go to line number 2438</li>
<li>Comment out the old line:
<ul>
<li>
<blockquote><p>//return mktime($hour, $min, $sec, $month, $day, $year);</p></blockquote>
</li>
</ul>
</li>
<li>Then paste this on the next line:
<ul>
<li>
<blockquote><p>return mktime(doubleval( $hour), $min, $sec, $month, $day, doubleval($year));</p></blockquote>
</li>
</ul>
</li>
<li>So the two lines should look like this:
<ul>
<li>
<blockquote><p>//return mktime($hour, $min, $sec, $month, $day, $year);<br />
return mktime(doubleval( $hour), $min, $sec, $month, $day, doubleval($year));</p></blockquote>
</li>
</ul>
</li>
<li>Save the file and attempt to rebuild sitemap once more and this time it should work like a charm!</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://www.foryourlungsonly.net/2009/07/24/wordpress-google-sitemap-generator-plugin-mktime-error-resolved/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Flickr + PHP + XML + Flash = Fun</title>
		<link>http://www.foryourlungsonly.net/2008/11/12/flickr-php-xml-flash-fun/</link>
		<comments>http://www.foryourlungsonly.net/2008/11/12/flickr-php-xml-flash-fun/#comments</comments>
		<pubDate>Thu, 13 Nov 2008 00:51:42 +0000</pubDate>
		<dc:creator>Jonathan Harriot</dc:creator>
				<category><![CDATA[actionscript]]></category>
		<category><![CDATA[gnu gpl]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[wordpress plugins]]></category>

		<guid isPermaLink="false">http://www.foryourlungsonly.net/?p=46</guid>
		<description><![CDATA[PHPFlickr is a really neat little package that makes implementation of Flickr&#8217;s API quick and painless. I tried various techniques to create a slideshow for a client with LyteBox to enlarge the images but I slowly grew tired of the animation and the functionality that almost no one for this specific project would use. So [...]]]></description>
			<content:encoded><![CDATA[<p>PHPFlickr is a really neat little package that makes implementation of Flickr&#8217;s API quick and painless. I tried various techniques to create a slideshow for a client with LyteBox to enlarge the images but I slowly grew tired of the animation and the functionality that almost no one for this specific project would use. So I grabbed a small SWF slideshow from my toolbox and went to work creating a simple script to grab the photos and output the image URI I needed without creating bulky code. Here is what I came up with to make this easier for myself:<span id="more-46"></span></p>
<pre><code>&lt;?
photosets_getPhotos($photoset_id, NULL, NULL, 15, 1);

	// create a random interval for the timer between 6 and 10 seconds
	$randomnumber= rand(6,10);

	// create an array to output as xml
	$xml_output = "\n";
	foreach ((array)$photos['photo'] as $photo) {
		$xml_output .= "<img alt="" />buildPhotoURL($photo, "medium") . "\" ";
		$xml_output .= "/&gt;\n";
		$i++;
	}
	$xml_output .= "\n";
	echo $xml_output;

	// you're done!
?&gt;</code></pre>
<p>Simple and straight forward.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.foryourlungsonly.net/2008/11/12/flickr-php-xml-flash-fun/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>slightestBox (lightbox/litebox replacement)</title>
		<link>http://www.foryourlungsonly.net/2007/06/02/slightestbox-lightboxlitebox-replacement/</link>
		<comments>http://www.foryourlungsonly.net/2007/06/02/slightestbox-lightboxlitebox-replacement/#comments</comments>
		<pubDate>Sun, 03 Jun 2007 03:31:36 +0000</pubDate>
		<dc:creator>Jonathan Harriot</dc:creator>
				<category><![CDATA[css]]></category>
		<category><![CDATA[i came as a rant]]></category>
		<category><![CDATA[wordpress plugins]]></category>

		<guid isPermaLink="false">http://www.foryourlungsonly.net/2007/06/02/slightestbox-lightboxlitebox-replacement/</guid>
		<description><![CDATA[Sometimes I like to share artwork or photos with the readers of my site but I loathe manual entry of classes or relevance tags. So I modified the php script from Slimbox by Hardi P. This will automatically add rel=&#8221;imagebox[set]&#8220; on image links. Now powered by jQuery (instead of moo.fx). Why would you use jQuery [...]]]></description>
			<content:encoded><![CDATA[<p><strike>Sometimes I like to share artwork or photos with the readers of my site but I loathe manual entry of classes or relevance tags. So I modified the php script from Slimbox by Hardi P. This will automatically add <em>rel=&#8221;imagebox[set]&#8220;</em> on image links. Now powered by <a href="http://jquery.com">jQuery</a> (instead of moo.fx).</strike></p>
<p><strike><strong><em>Why would you use jQuery instead of (insert name of your favorite script library)?</em></strong><br />
I prefer jQuery to most other script libraries as it can be used for everything you&#8217;d need. It may be a bit heavier (20k compressed) but the cross browser support is fantastic. Plus if 20k in javascript is too heavy for your site, you should probably revise your page assets (images, flash, inline scripting, etc). Enough ranting here are some examples of this plugin in action.</strike></p>
<h3><strike>Text link examples:</strike></h3>
<p><strike>Alex and her purposely blurred roommate | Oh many a night we play around the halls of Goathill Tavern | Lindsey at Goathill</strike></p>
<h3><strike>Image link examples:</strike></h3>
<p><strike><img src="/img/070602-simpled_thumb.png" /></strike></p>
<h3><strike>Release Notes and Download</strike></h3>
<p><strike>As this was made in one afternoon and made for fun the image set is for any image links on the page (I will fix this later) In the download package just drag and drop the folder into your wordpress plugins folder and that should take care of it.</strike></p>
<p><strike>download without jQuery included<br />
download with jQuery included</strike></p>
<p><strike><strong>If you use it please credit me somewhere and/or leave a comment here! Please don&#8217;t directly link to my script!</strong></strike></p>
<p><strong>UPDATE: further development has ceased on this project as since its inception there have been great advances by other developers offering a standalone and WordPress plugin that works fantastically! Check out <a href="http://www.dolem.com/lytebox/">Lytebox (standalone)</a> or <a href="http://grupenet.com/2007/08/03/wp-lytebox/">WP-Lytebox (WordPress Plugin for version 1.5+)</a></strong></p>
]]></content:encoded>
			<wfw:commentRss>http://www.foryourlungsonly.net/2007/06/02/slightestbox-lightboxlitebox-replacement/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Hello Dolly is really annoying</title>
		<link>http://www.foryourlungsonly.net/2007/05/27/hello-dolly-is-really-annoying/</link>
		<comments>http://www.foryourlungsonly.net/2007/05/27/hello-dolly-is-really-annoying/#comments</comments>
		<pubDate>Sun, 27 May 2007 17:55:36 +0000</pubDate>
		<dc:creator>Jonathan Harriot</dc:creator>
				<category><![CDATA[wordpress plugins]]></category>

		<guid isPermaLink="false">http://www.foryourlungsonly.net/words/2007/05/27/hello-dolly-is-really-annoying/</guid>
		<description><![CDATA[So I made up one using the very same php with different lyrics. Mine uses lyrics from Refused, Thrice, Stooges, Against Me!, Ramones, Alkaline Trio, Buzzcocks, Misfits, Jane&#8217;s Addiction, Bad Religion, Ignite, Jawbreaker, Bad Brains, Minor Threat, Black Flag and more. Check it out and tell me what you think! In a week or so [...]]]></description>
			<content:encoded><![CDATA[<p>So I made up one using the very same php with different lyrics. Mine uses lyrics from Refused, Thrice, Stooges, Against Me!, Ramones, Alkaline Trio, Buzzcocks, Misfits, Jane&#8217;s Addiction, Bad Religion, Ignite, Jawbreaker, Bad Brains, Minor Threat, Black Flag and more. Check it out and tell me what you think!</p>
<p>In a week or so I will be releasing more WordPress plugins: side admin toolbar, automatic lightbox incorporation via jQuery, etc)</p>
<p><a href="http://www.foryourlungsonly.net/experiments/fuckTheRats.phps">download f**k the rats &#8211; a useless wordpress plugin to assassinate hello dolly</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.foryourlungsonly.net/2007/05/27/hello-dolly-is-really-annoying/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

<!-- Dynamic Page Served (once) in 0.298 seconds -->
