<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
<title>Snipplr - iridium</title>
<link>http://snipplr.com/users/iridium</link>
<description>Recent snippets posted on Snipplr.com</description>
<language>en-us</language>
<pubDate>Tue, 21 May 2013 06:57:19 GMT</pubDate>
<item>
<title>(jQuery) iPad/iPhone Orientation Body Class</title>
<link>http://snipplr.com/view/61898/ipadiphone-orientation-body-class/</link>
<description><![CDATA[ <p>This function will detect the orientation (portrait/landscape) of an iOS device and set the body class to either portrait or landscape, as well as providing a global variable for use elsewhere in your JS.

If you require multiple classes on your body tag, simply alter the code to use jQuery's addClass() and removeClass() functions.</p> ]]></description>
<pubDate>Thu, 15 Dec 2011 03:33:05 GMT</pubDate>
<guid>http://snipplr.com/view/61898/ipadiphone-orientation-body-class/</guid>
</item>
<item>
<title>(PHP) Calculate Paypal Fee</title>
<link>http://snipplr.com/view/44373/calculate-paypal-fee/</link>
<description><![CDATA[ <p>This calculates the Paypal transaction fee for a supplied amount, and adds it to the final amount. We used this to charge the Paypal fee back to the user as a booking fee on ticket sales for an event.

The function will spit out an array containing:
*The Sub Total amount supplied as sub_total
*The Paypal Fee applied as paypal_fee
*The Grand Total, which is the two above added together, as grand_total

You have the option of rounding the fee up to the nearest whole number, or charging the user the exact transaction fee, just supply a second parameter in the function call as true.

The Paypal rates are set as variables inside the function itself, it's up to you to check what they are for your country and set them accordingly.</p> ]]></description>
<pubDate>Thu, 18 Nov 2010 23:11:30 GMT</pubDate>
<guid>http://snipplr.com/view/44373/calculate-paypal-fee/</guid>
</item>
<item>
<title>(PHP) Year List Select Box</title>
<link>http://snipplr.com/view/14466/year-list-select-box/</link>
<description><![CDATA[ <p>Generates an options list of years for a select box, going from current year backwards through the number of years specified in the first variable.

Useful for birthday fields on signup forms.

eg. 2009, 2008, 2007, 2006 ... 1912, 1911, 1910, 1909

EDITED: Now includes option to set the initially selected value to a set number of years ago. Useful if your form is targetted at a certain age group. Will default to current year if set to '0'.</p> ]]></description>
<pubDate>Mon, 27 Apr 2009 05:15:51 GMT</pubDate>
<guid>http://snipplr.com/view/14466/year-list-select-box/</guid>
</item>
<item>
<title>(PHP) Get Apache Version</title>
<link>http://snipplr.com/view/10881/get-apache-version/</link>
<description><![CDATA[ <p>Return just the Apache version number of your server, and operating system, from $_SERVER['SERVER_SOFTWARE']

Example: 

print ('Apache Version: ' . apacheversion());

will return something along the lines of...

"Apache Version: 2.2.10 (Unix)"</p> ]]></description>
<pubDate>Sat, 03 Jan 2009 16:57:42 GMT</pubDate>
<guid>http://snipplr.com/view/10881/get-apache-version/</guid>
</item>
<item>
<title>(PHP) Single MySQL Result</title>
<link>http://snipplr.com/view/10880/single-mysql-result/</link>
<description><![CDATA[ <p>Simple but useful function for getting a single piece of data from a database and placing it straight into a variable.

Example:
$variable = one_result("SELECT columnOne FROM table WHERE columnTwo=whatever");

This would insert the value of columnOne where columnTwo is 'whatever' into $variable</p> ]]></description>
<pubDate>Sat, 03 Jan 2009 16:42:08 GMT</pubDate>
<guid>http://snipplr.com/view/10880/single-mysql-result/</guid>
</item>
</channel>
</rss>