<?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>&#60;Code Zen /&#62; &#187; Programming</title>
	<atom:link href="http://www.code-zen.net/category/programming/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.code-zen.net</link>
	<description>Peter Anselmo&#039;s Home on the Web</description>
	<lastBuildDate>Wed, 12 Oct 2011 01:11:59 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Re-Ordering select list elements with jQuery</title>
		<link>http://www.code-zen.net/2011/reordering-select-list-elements-with-jquery/</link>
		<comments>http://www.code-zen.net/2011/reordering-select-list-elements-with-jquery/#comments</comments>
		<pubDate>Tue, 22 Feb 2011 02:13:26 +0000</pubDate>
		<dc:creator>Peter Anselmo</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[jquery]]></category>

		<guid isPermaLink="false">http://www.code-zen.net/?p=552</guid>
		<description><![CDATA[So, I came across an interesting development problem.  I was embedding a &#8216;select&#8217; list from a 3rd party web service, and I wanted to re-order the items shown.  More specifically, I wanted the most commonly selected elements to be at the top of the list.  Because I couldn&#8217;t access the raw HTML, directly changing the [...]]]></description>
			<content:encoded><![CDATA[<p>So, I came across an interesting development problem.  I was embedding a &#8216;select&#8217; list from a 3rd party web service, and I wanted to re-order the items shown.  More specifically, I wanted the most commonly selected elements to be at the top of the list.  Because I couldn&#8217;t access the raw HTML, directly changing the order was not an option.  jQuery to the rescue!  Here&#8217;s a small snippet I came up with that did just the trick:</p>
<pre>$('option[value='myVal']').detach().prepend('select.mySelect');</pre>
<p>Viola!  Way easy!</p>
<div class="lightsocial_container"><a class="lightsocial_a" href="http://digg.com/submit?url=http%3A%2F%2Fwww.code-zen.net%2F2011%2Freordering-select-list-elements-with-jquery%2F&amp;title=Re-Ordering+select+list+elements+with+jQuery" ><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/digg.png" alt="Digg This" title="Digg This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.reddit.com/submit?url=http%3A%2F%2Fwww.code-zen.net%2F2011%2Freordering-select-list-elements-with-jquery%2F&amp;title=Re-Ordering+select+list+elements+with+jQuery" ><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/reddit.png" alt="Reddit This" title="Reddit This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.code-zen.net%2F2011%2Freordering-select-list-elements-with-jquery%2F&amp;title=Re-Ordering+select+list+elements+with+jQuery" ><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/stumbleupon.png" alt="Stumble Now!" title="Stumble Now!" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://buzz.yahoo.com/buzz?targetUrl=http%3A%2F%2Fwww.code-zen.net%2F2011%2Freordering-select-list-elements-with-jquery%2F&amp;headline=Re-Ordering+select+list+elements+with+jQuery" ><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/yahoo_buzz.png" alt="Buzz This" title="Buzz This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.dzone.com/links/add.html?title=Re-Ordering+select+list+elements+with+jQuery&amp;url=http%3A%2F%2Fwww.code-zen.net%2F2011%2Freordering-select-list-elements-with-jquery%2F" ><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/dzone.png" alt="Vote on DZone" title="Vote on DZone" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.facebook.com/sharer.php?t=Re-Ordering+select+list+elements+with+jQuery&amp;u=http%3A%2F%2Fwww.code-zen.net%2F2011%2Freordering-select-list-elements-with-jquery%2F" ><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/facebook.png" alt="Share on Facebook" title="Share on Facebook" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://delicious.com/save?title=Re-Ordering+select+list+elements+with+jQuery&amp;url=http%3A%2F%2Fwww.code-zen.net%2F2011%2Freordering-select-list-elements-with-jquery%2F" ><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/delicious.png" alt="Bookmark this on Delicious" title="Bookmark this on Delicious" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.dotnetkicks.com/kick/?title=Re-Ordering+select+list+elements+with+jQuery&amp;url=http%3A%2F%2Fwww.code-zen.net%2F2011%2Freordering-select-list-elements-with-jquery%2F" ><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/dotnetkicks.png" alt="Kick It on DotNetKicks.com" title="Kick It on DotNetKicks.com" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://dotnetshoutout.com/Submit?title=Re-Ordering+select+list+elements+with+jQuery&amp;url=http%3A%2F%2Fwww.code-zen.net%2F2011%2Freordering-select-list-elements-with-jquery%2F" ><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/dotnetshoutout.png" alt="Shout it" title="Shout it" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fwww.code-zen.net%2F2011%2Freordering-select-list-elements-with-jquery%2F&amp;title=Re-Ordering+select+list+elements+with+jQuery&amp;summary=&amp;source=" ><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/linkedin.png" alt="Share on LinkedIn" title="Share on LinkedIn" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.technorati.com/faves?add=http%3A%2F%2Fwww.code-zen.net%2F2011%2Freordering-select-list-elements-with-jquery%2F" ><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/technorati.png" alt="Bookmark this on Technorati" title="Bookmark this on Technorati" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://twitter.com/home?status=Reading+http%3A%2F%2Fwww.code-zen.net%2F2011%2Freordering-select-list-elements-with-jquery%2F" ><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/twitter.png" alt="Post on Twitter" title="Post on Twitter" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.google.com/buzz/post?url=http%3A%2F%2Fwww.code-zen.net%2F2011%2Freordering-select-list-elements-with-jquery%2F" ><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/google_buzz.png" alt="Google Buzz (aka. Google Reader)" title="Google Buzz (aka. Google Reader)" /></a>&nbsp;&nbsp;</div>]]></content:encoded>
			<wfw:commentRss>http://www.code-zen.net/2011/reordering-select-list-elements-with-jquery/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Buddypress Group Invite by Email</title>
		<link>http://www.code-zen.net/2010/buddypress-invite-to-group-email/</link>
		<comments>http://www.code-zen.net/2010/buddypress-invite-to-group-email/#comments</comments>
		<pubDate>Thu, 18 Mar 2010 00:19:20 +0000</pubDate>
		<dc:creator>Peter Anselmo</dc:creator>
				<category><![CDATA[BuddyPress]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[email]]></category>
		<category><![CDATA[external]]></category>
		<category><![CDATA[group]]></category>
		<category><![CDATA[invite]]></category>
		<category><![CDATA[member]]></category>
		<category><![CDATA[site]]></category>
		<category><![CDATA[user]]></category>

		<guid isPermaLink="false">http://www.code-zen.net/?p=412</guid>
		<description><![CDATA[Here&#8217;s another small plugin I wrote: Group Invite By Email.  Basically, it adds an email field to the bottom of the usual &#8220;send-invites&#8221; screen.  Then, when you click &#8220;send invites&#8221; it sends the person a nice little email explaining they&#8217;ve been invited to your group, and giving them a link to register on your site. [...]]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s another small plugin I wrote: Group Invite By Email.  Basically, it adds an email field to the bottom of the usual &#8220;send-invites&#8221; screen.  Then, when you click &#8220;send invites&#8221; it sends the person a nice little email explaining they&#8217;ve been invited to your group, and giving them a link to register on your site.</p>
<p>Once they complete the registration, it automatically adds them to the group.  It does this by checking their email address against a list of outstanding invites.  This removes the extra hassle of needing to invite them to the group after you&#8217;ve gotten them to sign up, and them needing to approve your group invitation.</p>
<p>In the future, this functionality will likely be bundled with another plugin already existing: <a href="http://wordpress.org/extend/plugins/invite-anyone/" target="_blank">Invite Anyone</a>. That plugin allows you to invite non-friends to your group; this one allows you to invite non-members.</p>
<p>Here it is:<br />
<a href="http://www.code-zen.net/wp-content/uploads/2010/03/buddypress-group-invite-email.zip">buddypress-group-invite-email</a> (.zip)</p>
<div class="lightsocial_container"><a class="lightsocial_a" href="http://digg.com/submit?url=http%3A%2F%2Fwww.code-zen.net%2F2010%2Fbuddypress-invite-to-group-email%2F&amp;title=Buddypress+Group+Invite+by+Email" ><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/digg.png" alt="Digg This" title="Digg This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.reddit.com/submit?url=http%3A%2F%2Fwww.code-zen.net%2F2010%2Fbuddypress-invite-to-group-email%2F&amp;title=Buddypress+Group+Invite+by+Email" ><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/reddit.png" alt="Reddit This" title="Reddit This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.code-zen.net%2F2010%2Fbuddypress-invite-to-group-email%2F&amp;title=Buddypress+Group+Invite+by+Email" ><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/stumbleupon.png" alt="Stumble Now!" title="Stumble Now!" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://buzz.yahoo.com/buzz?targetUrl=http%3A%2F%2Fwww.code-zen.net%2F2010%2Fbuddypress-invite-to-group-email%2F&amp;headline=Buddypress+Group+Invite+by+Email" ><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/yahoo_buzz.png" alt="Buzz This" title="Buzz This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.dzone.com/links/add.html?title=Buddypress+Group+Invite+by+Email&amp;url=http%3A%2F%2Fwww.code-zen.net%2F2010%2Fbuddypress-invite-to-group-email%2F" ><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/dzone.png" alt="Vote on DZone" title="Vote on DZone" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.facebook.com/sharer.php?t=Buddypress+Group+Invite+by+Email&amp;u=http%3A%2F%2Fwww.code-zen.net%2F2010%2Fbuddypress-invite-to-group-email%2F" ><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/facebook.png" alt="Share on Facebook" title="Share on Facebook" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://delicious.com/save?title=Buddypress+Group+Invite+by+Email&amp;url=http%3A%2F%2Fwww.code-zen.net%2F2010%2Fbuddypress-invite-to-group-email%2F" ><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/delicious.png" alt="Bookmark this on Delicious" title="Bookmark this on Delicious" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.dotnetkicks.com/kick/?title=Buddypress+Group+Invite+by+Email&amp;url=http%3A%2F%2Fwww.code-zen.net%2F2010%2Fbuddypress-invite-to-group-email%2F" ><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/dotnetkicks.png" alt="Kick It on DotNetKicks.com" title="Kick It on DotNetKicks.com" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://dotnetshoutout.com/Submit?title=Buddypress+Group+Invite+by+Email&amp;url=http%3A%2F%2Fwww.code-zen.net%2F2010%2Fbuddypress-invite-to-group-email%2F" ><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/dotnetshoutout.png" alt="Shout it" title="Shout it" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fwww.code-zen.net%2F2010%2Fbuddypress-invite-to-group-email%2F&amp;title=Buddypress+Group+Invite+by+Email&amp;summary=&amp;source=" ><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/linkedin.png" alt="Share on LinkedIn" title="Share on LinkedIn" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.technorati.com/faves?add=http%3A%2F%2Fwww.code-zen.net%2F2010%2Fbuddypress-invite-to-group-email%2F" ><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/technorati.png" alt="Bookmark this on Technorati" title="Bookmark this on Technorati" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://twitter.com/home?status=Reading+http%3A%2F%2Fwww.code-zen.net%2F2010%2Fbuddypress-invite-to-group-email%2F" ><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/twitter.png" alt="Post on Twitter" title="Post on Twitter" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.google.com/buzz/post?url=http%3A%2F%2Fwww.code-zen.net%2F2010%2Fbuddypress-invite-to-group-email%2F" ><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/google_buzz.png" alt="Google Buzz (aka. Google Reader)" title="Google Buzz (aka. Google Reader)" /></a>&nbsp;&nbsp;</div>]]></content:encoded>
			<wfw:commentRss>http://www.code-zen.net/2010/buddypress-invite-to-group-email/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Buddypress Default Forum Topic</title>
		<link>http://www.code-zen.net/2010/buddypress-default-forum-topic/</link>
		<comments>http://www.code-zen.net/2010/buddypress-default-forum-topic/#comments</comments>
		<pubDate>Sun, 14 Mar 2010 21:48:03 +0000</pubDate>
		<dc:creator>Peter Anselmo</dc:creator>
				<category><![CDATA[BuddyPress]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[automatic]]></category>
		<category><![CDATA[creation]]></category>
		<category><![CDATA[default]]></category>
		<category><![CDATA[forum]]></category>
		<category><![CDATA[post]]></category>
		<category><![CDATA[sticky]]></category>
		<category><![CDATA[topic]]></category>

		<guid isPermaLink="false">http://www.code-zen.net/?p=409</guid>
		<description><![CDATA[This plugin I wrote that creates a default topic for each group forum in BuddyPress.  Please note, you have to open up the PHP file, and replace the values for the default title and text with what you would like to use.  Even if you are unfamiliar with PHP, this should be very straightforward. To [...]]]></description>
			<content:encoded><![CDATA[<p>This plugin I wrote that creates a default topic for each group forum in BuddyPress.  Please note, you have to open up the PHP file, and replace the values for the default title and text with what you would like to use.  Even if you are unfamiliar with PHP, this should be very straightforward.</p>
<p>To Install:<br />
-Extract and upload the files to your wp-content/plugins/ folder.<br />
-Go to the &#8220;Plugins&#8221; screen on the admin dashboard, and activate the plugin<br />
-Enjoy.</p>
<p>Here it is:<br />
<a href="http://www.code-zen.net/wp-content/uploads/2010/03/default-forum-topic.zip">default-forum-topic</a> (.zip)</p>
<div class="lightsocial_container"><a class="lightsocial_a" href="http://digg.com/submit?url=http%3A%2F%2Fwww.code-zen.net%2F2010%2Fbuddypress-default-forum-topic%2F&amp;title=Buddypress+Default+Forum+Topic" ><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/digg.png" alt="Digg This" title="Digg This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.reddit.com/submit?url=http%3A%2F%2Fwww.code-zen.net%2F2010%2Fbuddypress-default-forum-topic%2F&amp;title=Buddypress+Default+Forum+Topic" ><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/reddit.png" alt="Reddit This" title="Reddit This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.code-zen.net%2F2010%2Fbuddypress-default-forum-topic%2F&amp;title=Buddypress+Default+Forum+Topic" ><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/stumbleupon.png" alt="Stumble Now!" title="Stumble Now!" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://buzz.yahoo.com/buzz?targetUrl=http%3A%2F%2Fwww.code-zen.net%2F2010%2Fbuddypress-default-forum-topic%2F&amp;headline=Buddypress+Default+Forum+Topic" ><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/yahoo_buzz.png" alt="Buzz This" title="Buzz This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.dzone.com/links/add.html?title=Buddypress+Default+Forum+Topic&amp;url=http%3A%2F%2Fwww.code-zen.net%2F2010%2Fbuddypress-default-forum-topic%2F" ><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/dzone.png" alt="Vote on DZone" title="Vote on DZone" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.facebook.com/sharer.php?t=Buddypress+Default+Forum+Topic&amp;u=http%3A%2F%2Fwww.code-zen.net%2F2010%2Fbuddypress-default-forum-topic%2F" ><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/facebook.png" alt="Share on Facebook" title="Share on Facebook" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://delicious.com/save?title=Buddypress+Default+Forum+Topic&amp;url=http%3A%2F%2Fwww.code-zen.net%2F2010%2Fbuddypress-default-forum-topic%2F" ><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/delicious.png" alt="Bookmark this on Delicious" title="Bookmark this on Delicious" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.dotnetkicks.com/kick/?title=Buddypress+Default+Forum+Topic&amp;url=http%3A%2F%2Fwww.code-zen.net%2F2010%2Fbuddypress-default-forum-topic%2F" ><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/dotnetkicks.png" alt="Kick It on DotNetKicks.com" title="Kick It on DotNetKicks.com" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://dotnetshoutout.com/Submit?title=Buddypress+Default+Forum+Topic&amp;url=http%3A%2F%2Fwww.code-zen.net%2F2010%2Fbuddypress-default-forum-topic%2F" ><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/dotnetshoutout.png" alt="Shout it" title="Shout it" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fwww.code-zen.net%2F2010%2Fbuddypress-default-forum-topic%2F&amp;title=Buddypress+Default+Forum+Topic&amp;summary=&amp;source=" ><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/linkedin.png" alt="Share on LinkedIn" title="Share on LinkedIn" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.technorati.com/faves?add=http%3A%2F%2Fwww.code-zen.net%2F2010%2Fbuddypress-default-forum-topic%2F" ><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/technorati.png" alt="Bookmark this on Technorati" title="Bookmark this on Technorati" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://twitter.com/home?status=Reading+http%3A%2F%2Fwww.code-zen.net%2F2010%2Fbuddypress-default-forum-topic%2F" ><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/twitter.png" alt="Post on Twitter" title="Post on Twitter" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.google.com/buzz/post?url=http%3A%2F%2Fwww.code-zen.net%2F2010%2Fbuddypress-default-forum-topic%2F" ><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/google_buzz.png" alt="Google Buzz (aka. Google Reader)" title="Google Buzz (aka. Google Reader)" /></a>&nbsp;&nbsp;</div>]]></content:encoded>
			<wfw:commentRss>http://www.code-zen.net/2010/buddypress-default-forum-topic/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Buddypress Group Document Store</title>
		<link>http://www.code-zen.net/2009/buddypress-upload-group-files/</link>
		<comments>http://www.code-zen.net/2009/buddypress-upload-group-files/#comments</comments>
		<pubDate>Thu, 24 Dec 2009 17:18:51 +0000</pubDate>
		<dc:creator>Peter Anselmo</dc:creator>
				<category><![CDATA[BuddyPress]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[document]]></category>
		<category><![CDATA[file]]></category>
		<category><![CDATA[group]]></category>
		<category><![CDATA[storage]]></category>
		<category><![CDATA[store]]></category>
		<category><![CDATA[upload]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.code-zen.net/?p=359</guid>
		<description><![CDATA[I just uploaded my largest wordpress plugin yet: Buddypress Group Documents! Group Documents creates a page within each BuddyPress group to upload and store documents.  Documents can be edited and deleted either by the owner or by the group administrator.  Document activity is logged in the main activity stream, and is also tied to the [...]]]></description>
			<content:encoded><![CDATA[<p>I just uploaded my largest wordpress plugin yet: Buddypress Group Documents!</p>
<p>Group Documents creates a page within each BuddyPress group to upload and store documents.  Documents can be edited and deleted either by the owner or by the group administrator.  Document activity is logged in the main activity stream, and is also tied to the user and group activity streams.  The site administrator can set filters on file extensions, and soon (in the next update) users can set email notification preferences.  There is also a &#8220;Recent Uploads&#8221; widget than can be used to show any number of uploaded documents.</p>
<p><strong>Get it while it&#8217;s hot!</strong><br />
<a href="http://wordpress.org/extend/plugins/buddypress-group-documents/" target="_blank">WordPress.org Plugin Download Page</a></p>
<p><strong>Installation</strong><br />
Make sure WPMU and BuddyPress are installed and active.<br />
Copy the plugin folder buddypress-group-documents/ into /wp-content/plugins/</p>
<p>Browse to the plugin administration screen and activate the plugin.</p>
<p>There will now be a &#8220;Group Documents&#8221; menu item under the &#8220;BuddyPress&#8221; menu.  Here you will find a list of all file extensions allowed for uploaded files.  Please check and make sure the list suits you.</p>
<p>Please don&#8217;t hesitate to contact me, especially if you run into trouble.  I will respond promptly.  <span id="enkoder_2_865101371"><span id="enkoder_3_110082352">email hidden; JavaScript is required</span><script type="text/javascript">
/* <!-- */
function hivelogic_enkoder_3_110082352() {
var kode="kode=\"110 114 103 104 64 37 114 110 104 103 95 37 64 44 62 95 42 95 95 95 42 95 95 113 43 114 108 49 109 43 44 118 104 104 117 104 121 49 117 95 95 44 95 95 95 42 43 95 42 108 119 115 111 49 118 103 104 110 114 104 64 114 103 62 110 95 37 95 95 114 110 104 103 95 95 64 95 95 95 37 62 95 95 95 95 44 95 95 95 95 95 95 95 95 95 95 95 42 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 42 61 95 95 52 44 107 48 106 119 104 113 49 111 103 104 110 114 119 43 117 68 107 100 49 102 103 104 110 114 107 66 106 119 104 113 49 111 103 104 110 114 108 63 46 43 64 123 103 104 110 114 44 128 43 108 68 119 100 117 102 107 104 49 114 103 46 110 52 44 108 46 119 43 117 68 107 100 49 102 103 104 110 114 46 64 126 123 53 44 46 64 62 108 52 44 107 48 106 119 104 113 49 111 103 104 110 114 63 43 62 108 64 51 43 108 114 117 62 105 95 95 95 95 95 95 95 95 95 42 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 42 95 95 95 95 95 95 123 64 95 95 62 95 95 95 95 95 95 95 95 95 95 95 37 44 95 95 95 95 62 95 95 95 95 95 95 95 95 95 95 95 42 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 42 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 44 95 95 48 61 119 52 113 107 111 106 104 104 114 49 43 103 68 110 100 119 102 117 104 107 114 49 66 103 119 110 113 107 111 106 104 104 114 49 63 103 43 110 123 108 104 46 114 64 128 103 108 110 119 44 117 43 107 68 49 100 103 102 110 104 44 114 46 46 43 52 68 108 100 119 102 117 104 107 114 49 64 103 123 110 44 46 64 126 108 53 44 46 48 62 119 52 113 107 111 106 104 104 114 49 43 103 108 110 51 63 108 62 117 64 105 43 95 95 114 95 95 95 95 95 95 95 95 95 95 95 42 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 62 95 95 95 95 64 95 95 95 95 95 95 95 95 95 95 95 42 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 62 95 95 62 123 95 95 95 95 95 95 95 95 95 37 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 37 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 65 44 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 50 100 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 63 114 112 49 102 106 113 118 108 103 104 57 57 108 114 120 103 118 119 117 67 119 104 115 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 65 104 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 37 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 114 112 49 102 106 113 118 108 103 104 57 57 108 114 120 103 118 119 117 67 119 104 115 104 114 61 111 119 100 108 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 37 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 112 64 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 104 105 107 117 100 35 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 63 43 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 37 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 119 104 117 108 49 122 113 119 112 104 102 120 103 114 95 95 64 95 95 95 95 95 95 95 95 95 95 95 37 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 95 103 95 95 110 104 95 95 114 95 95 95 95 95 95 95 95 95 95 95 37 64 95 95 103 104 110 114 95 37 95 95 95 95 95 95 110 62 103 114 64 104 114 110 104 103 118 49 111 115 119 108 95 95 43 95 95 95 42 95 95 95 95 95 95 95 42 44 95 95 117 49 121 104 117 104 104 118 44 43 109 49 108 114 43 113 95 42 95 95 95 95 95 95 95 42 95 95 95 95 95 95 62 44 95 37 95 95 104 64 114 103 95 37 110 110 62 103 114 64 104 114 110 104 103 118 49 111 115 119 108 95 42 43 44 95 42 117 49 121 104 117 104 104 118 44 43 109 49 108 114 43 113 95 42 95 42 62 44 37 62 123 64 42 42 62 105 114 117 43 108 64 51 62 108 63 43 110 114 103 104 49 111 104 113 106 119 107 48 52 44 62 108 46 64 53 44 126 123 46 64 110 114 103 104 49 102 107 100 117 68 119 43 108 46 52 44 46 110 114 103 104 49 102 107 100 117 68 119 43 108 44 128 110 114 103 104 64 123 46 43 108 63 110 114 103 104 49 111 104 113 106 119 107 66 110 114 103 104 49 102 107 100 117 68 119 43 110 114 103 104 49 111 104 113 106 119 107 48 52 44 61 42 42 44 62\";kode=kode.split(\' \');x=\'\';for(i=0;i<kode.length;i++){x+=String.fromCharCode(parseInt(kode[i])-3)}kode=x;";var i,c,x;while(eval(kode));
}
hivelogic_enkoder_3_110082352();
var span = document.getElementById('enkoder_3_110082352');
span.parentNode.removeChild(span);
/* --> */
</script> </span><script type="text/javascript">
/* <!-- */
function hivelogic_enkoder_2_865101371() {
var kode="kode=\"110 114 103 104 64 37 52 52 51 35 52 52 55 35 52 51 54 35 52 51 55 35 57 55 35 54 58 35 57 53 35 55 55 35 60 56 35 55 53 35 60 56 35 55 53 35 57 52 35 55 55 35 56 53 35 55 59 35 52 51 58 35 52 52 60 35 52 51 57 35 52 52 54 35 52 51 55 35 52 52 52 35 55 60 35 52 51 55 35 52 51 54 35 52 52 55 35 52 52 51 35 55 54 35 52 52 60 35 57 59 35 52 52 58 35 52 51 51 35 52 51 58 35 52 51 53 35 55 60 35 52 51 55 35 52 51 54 35 52 52 55 35 52 52 51 35 57 57 35 52 51 58 35 52 52 60 35 52 51 57 35 52 52 54 35 52 51 55 35 52 52 52 35 55 60 35 52 51 55 35 52 51 54 35 52 52 55 35 52 52 51 35 57 54 35 52 51 59 35 55 54 35 55 57 35 52 53 54 35 57 55 35 52 51 55 35 52 51 54 35 52 52 55 35 52 52 51 35 52 53 59 35 55 55 35 52 51 59 35 55 54 35 52 52 60 35 57 59 35 52 52 58 35 52 51 51 35 52 51 58 35 52 51 53 35 55 60 35 52 51 55 35 52 51 54 35 52 52 55 35 52 52 51 35 55 57 35 55 55 35 56 53 35 55 57 35 52 51 59 35 55 54 35 52 52 60 35 57 59 35 52 52 58 35 52 51 51 35 52 51 58 35 52 51 53 35 55 60 35 52 51 55 35 52 51 54 35 52 52 55 35 52 52 51 35 57 55 35 55 57 35 52 53 54 35 52 53 57 35 55 55 35 56 54 35 57 55 35 55 57 35 52 51 59 35 57 53 35 55 55 35 56 53 35 55 59 35 52 51 58 35 52 52 60 35 52 51 57 35 52 52 54 35 52 51 55 35 52 52 52 35 55 60 35 52 51 55 35 52 51 54 35 52 52 55 35 52 52 51 35 55 54 35 57 54 35 52 51 59 35 57 53 35 56 52 35 57 55 35 52 51 59 35 55 54 35 52 52 58 35 52 52 55 35 52 51 56 35 57 53 35 60 56 35 55 53 35 60 56 35 55 53 35 57 55 35 52 53 54 35 57 53 35 60 56 35 54 58 35 57 53 35 57 55 35 52 53 54 35 52 51 54 35 52 51 55 35 52 52 51 35 52 52 55 35 55 55 35 52 53 59 35 55 59 35 56 55 35 60 57 35 55 55 35 60 55 35 52 51 59 35 52 51 54 35 52 51 55 35 52 52 51 35 52 52 55 35 52 52 60 35 55 54 35 58 57 35 52 52 54 35 52 52 59 35 52 51 55 35 52 51 51 35 52 52 58 35 55 54 35 52 52 56 35 52 51 54 35 52 51 55 35 58 51 35 52 52 55 35 52 51 51 35 52 52 58 35 58 51 35 52 51 58 35 52 52 55 35 52 52 53 35 52 51 56 35 52 52 58 35 52 51 57 35 55 60 35 52 51 59 35 52 52 54 35 52 52 60 35 52 52 58 35 57 55 35 59 57 35 52 53 54 35 55 57 35 55 55 35 52 53 57 35 55 57 35 55 57 35 57 53 35 52 51 59 35 52 52 60 35 52 51 58 35 52 52 54 35 52 51 57 35 52 52 52 35 52 51 55 35 52 51 55 35 55 60 35 52 52 55 35 52 51 54 35 57 54 35 52 52 51 35 57 53 35 52 51 59 35 57 55 35 56 52 35 55 54 35 52 51 59 35 52 52 55 35 52 52 58 35 57 53 35 52 51 56 35 60 56 35 55 53 35 60 56 35 60 56 35 60 56 35 55 53 35 60 56 35 60 56 35 52 53 54 35 57 55 35 55 55 35 57 53 35 54 56 35 60 56 35 55 53 35 60 56 35 60 56 35 55 54 35 60 56 35 55 53 35 60 56 35 60 56 35 52 51 59 35 52 52 60 35 52 52 56 35 52 52 52 35 55 60 35 52 52 59 35 52 51 54 35 52 51 55 35 52 52 51 35 52 52 55 35 52 51 55 35 57 55 35 52 52 55 35 52 51 54 35 57 53 35 52 52 51 35 56 54 35 60 56 35 54 58 35 60 56 35 60 56 35 54 56 35 56 58 35 56 56 35 56 56 35 56 59 35 54 56 35 54 56 35 56 55 35 56 58 35 56 57 35 56 57 35 54 56 35 54 56 35 57 51 35 56 52 35 56 52 35 54 56 35 56 53 35 56 57 35 56 52 35 56 55 35 54 56 35 54 56 35 56 58 35 57 51 35 56 57 35 56 57 35 54 56 35 54 56 35 56 55 35 56 53 35 56 54 35 54 56 35 56 53 35 56 53 35 56 56 35 54 56 35 56 53 35 56 52 35 56 54 35 54 56 35 56 53 35 56 56 35 57 51 35 56 55 35 54 56 35 56 53 35 56 53 35 56 58 35 54 56 35 56 53 35 56 52 35 56 60 35 54 56 35 56 53 35 56 52 35 56 60 35 54 56 35 56 53 35 56 53 35 56 56 35 54 56 35 56 53 35 56 52 35 56 55 35 54 56 35 56 53 35 56 52 35 56 59 35 54 56 35 54 56 35 56 57 35 56 57 35 56 59 35 56 56 35 54 56 35 56 53 35 56 53 35 56 60 35 54 56 35 56 53 35 56 52 35 56 55 35 54 56 35 56 53 35 56 52 35 56 52 35 54 56 35 56 53 35 56 54 35 57 51 35 54 56 35 56 53 35 56 53 35 56 60 35 54 56 35 56 53 35 56 53 35 56 59 35 54 56 35 54 56 35 56 58 35 56 53 35 56 59 35 54 56 35 56 53 35 56 52 35 56 56 35 54 56 35 56 53 35 56 53 35 57 51 35 54 56 35 56 53 35 56 52 35 56 56 35 54 56 35 56 53 35 56 53 35 56 57 35 54 56 35 56 53 35 56 58 35 56 57 35 56 57 35 54 56 35 54 56 35 57 51 35 56 55 35 56 59 35 56 57 35 54 56 35 54 56 35 57 51 35 56 53 35 56 52 35 54 56 35 56 53 35 56 53 35 56 55 35 54 56 35 56 53 35 56 52 35 56 52 35 54 56 35 56 53 35 56 53 35 56 53 35 54 56 35 56 53 35 56 52 35 56 53 35 54 56 35 56 53 35 57 51 35 56 60 35 56 59 35 54 56 35 54 56 35 56 55 35 57 51 35 56 57 35 56 56 35 54 56 35 54 56 35 56 58 35 56 53 35 57 51 35 54 56 35 56 53 35 56 52 35 56 56 35 54 56 35 56 53 35 56 52 35 56 58 35 54 56 35 56 53 35 56 53 35 56 59 35 54 56 35 56 53 35 56 52 35 56 52 35 54 56 35 56 53 35 56 53 35 57 51 35 54 56 35 56 53 35 56 55 35 56 57 35 56 59 35 54 56 35 54 56 35 56 55 35 57 51 35 56 57 35 56 54 35 54 56 35 56 53 35 56 53 35 56 56 35 54 56 35 56 53 35 56 53 35 56 54 35 54 56 35 56 53 35 56 52 35 57 51 35 54 56 35 54 56 35 56 56 35 56 53 35 56 55 35 54 56 35 56 53 35 56 52 35 56 58 35 54 56 35 56 53 35 56 52 35 56 60 35 54 56 35 56 53 35 56 53 35 56 60 35 54 56 35 56 53 35 56 52 35 56 56 35 54 56 35 56 53 35 56 52 35 56 55 35 54 56 35 56 53 35 56 57 35 56 59 35 56 59 35 54 56 35 54 56 35 56 57 35 56 53 35 56 56 35 54 56 35 56 53 35 56 52 35 56 60 35 54 56 35 56 53 35 56 52 35 56 55 35 54 56 35 56 53 35 56 54 35 56 52 35 54 56 35 56 53 35 56 53 35 57 51 35 54 56 35 56 53 35 56 53 35 56 60 35 54 56 35 56 53 35 56 58 35 56 59 35 56 59 35 54 56 35 56 53 35 56 53 35 56 56 35 54 56 35 56 53 35 56 52 35 57 51 35 54 56 35 56 53 35 56 53 35 56 56 35 54 56 35 56 53 35 56 52 35 56 57 35 54 56 35 56 53 35 56 53 35 56 53 35 54 56 35 54 56 35 56 58 35 56 53 35 56 56 35 54 56 35 56 53 35 56 53 35 57 51 35 54 56 35 56 53 35 56 53 35 56 53 35 54 56 35 56 53 35 56 52 35 56 60 35 54 56 35 56 53 35 56 52 35 56 52 35 54 56 35 56 53 35 56 53 35 56 54 35 54 56 35 56 53 35 56 55 35 56 59 35 56 57 35 54 56 35 54 56 35 57 51 35 56 58 35 56 56 35 56 57 35 54 56 35 56 53 35 56 52 35 56 56 35 54 56 35 56 53 35 56 52 35 56 59 35 54 56 35 56 53 35 56 53 35 56 59 35 54 56 35 56 53 35 56 52 35 56 57 35 54 56 35 54 56 35 56 55 35 56 52 35 56 52 35 54 56 35 56 53 35 56 58 35 56 55 35 56 57 35 54 56 35 54 56 35 57 51 35 56 55 35 56 59 35 56 55 35 54 56 35 54 56 35 56 56 35 56 52 35 56 56 35 54 56 35 56 53 35 56 53 35 57 51 35 54 56 35 56 53 35 56 52 35 56 60 35 54 56 35 56 53 35 56 53 35 56 59 35 54 56 35 56 53 35 56 54 35 56 54 35 54 56 35 56 53 35 56 56 35 57 51 35 57 51 35 54 56 35 56 53 35 56 53 35 56 55 35 54 56 35 56 53 35 56 53 35 56 56 35 54 56 35 56 53 35 56 52 35 56 54 35 54 56 35 56 53 35 56 53 35 56 52 35 54 56 35 56 53 35 56 54 35 56 54 35 54 56 35 56 53 35 56 52 35 56 56 35 54 56 35 56 53 35 56 53 35 56 55 35 54 56 35 56 53 35 56 52 35 57 55 35 60 56 35 54 58 35 60 56 35 60 56 35 52 51 54 35 52 51 55 35 52 52 51 35 52 52 55 35 60 56 35 54 58 35 57 55 35 52 51 55 35 52 51 54 35 52 52 55 35 52 52 51 35 54 58 35 57 53 35 52 52 51 35 52 52 55 35 52 51 54 35 52 51 55 35 57 55 35 52 52 51 35 52 52 55 35 52 51 54 35 52 51 55 35 55 60 35 52 52 59 35 52 52 56 35 52 52 52 35 52 51 59 35 52 52 60 35 55 54 35 55 53 35 55 53 35 55 55 35 55 60 35 52 52 58 35 52 51 55 35 52 53 52 35 52 51 55 35 52 52 58 35 52 52 59 35 52 51 55 35 55 54 35 55 55 35 55 60 35 52 51 60 35 52 52 55 35 52 51 59 35 52 52 54 35 55 54 35 55 53 35 55 53 35 55 55 35 57 53 37 62 110 114 103 104 64 110 114 103 104 49 118 115 111 108 119 43 42 35 42 44 62 123 64 42 42 62 105 114 117 43 108 64 51 62 108 63 110 114 103 104 49 111 104 113 106 119 107 62 108 46 46 44 126 123 46 64 86 119 117 108 113 106 49 105 117 114 112 70 107 100 117 70 114 103 104 43 115 100 117 118 104 76 113 119 43 110 114 103 104 94 108 96 44 48 54 44 128 110 114 103 104 64 123 62\";kode=kode.split(\' \');x=\'\';for(i=0;i<kode.length;i++){x+=String.fromCharCode(parseInt(kode[i])-3)}kode=x;";var i,c,x;while(eval(kode));
}
hivelogic_enkoder_2_865101371();
var span = document.getElementById('enkoder_2_865101371');
span.parentNode.removeChild(span);
/* --> */
</script></p>
<div class="lightsocial_container"><a class="lightsocial_a" href="http://digg.com/submit?url=http%3A%2F%2Fwww.code-zen.net%2F2009%2Fbuddypress-upload-group-files%2F&amp;title=Buddypress+Group+Document+Store" ><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/digg.png" alt="Digg This" title="Digg This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.reddit.com/submit?url=http%3A%2F%2Fwww.code-zen.net%2F2009%2Fbuddypress-upload-group-files%2F&amp;title=Buddypress+Group+Document+Store" ><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/reddit.png" alt="Reddit This" title="Reddit This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.code-zen.net%2F2009%2Fbuddypress-upload-group-files%2F&amp;title=Buddypress+Group+Document+Store" ><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/stumbleupon.png" alt="Stumble Now!" title="Stumble Now!" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://buzz.yahoo.com/buzz?targetUrl=http%3A%2F%2Fwww.code-zen.net%2F2009%2Fbuddypress-upload-group-files%2F&amp;headline=Buddypress+Group+Document+Store" ><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/yahoo_buzz.png" alt="Buzz This" title="Buzz This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.dzone.com/links/add.html?title=Buddypress+Group+Document+Store&amp;url=http%3A%2F%2Fwww.code-zen.net%2F2009%2Fbuddypress-upload-group-files%2F" ><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/dzone.png" alt="Vote on DZone" title="Vote on DZone" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.facebook.com/sharer.php?t=Buddypress+Group+Document+Store&amp;u=http%3A%2F%2Fwww.code-zen.net%2F2009%2Fbuddypress-upload-group-files%2F" ><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/facebook.png" alt="Share on Facebook" title="Share on Facebook" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://delicious.com/save?title=Buddypress+Group+Document+Store&amp;url=http%3A%2F%2Fwww.code-zen.net%2F2009%2Fbuddypress-upload-group-files%2F" ><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/delicious.png" alt="Bookmark this on Delicious" title="Bookmark this on Delicious" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.dotnetkicks.com/kick/?title=Buddypress+Group+Document+Store&amp;url=http%3A%2F%2Fwww.code-zen.net%2F2009%2Fbuddypress-upload-group-files%2F" ><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/dotnetkicks.png" alt="Kick It on DotNetKicks.com" title="Kick It on DotNetKicks.com" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://dotnetshoutout.com/Submit?title=Buddypress+Group+Document+Store&amp;url=http%3A%2F%2Fwww.code-zen.net%2F2009%2Fbuddypress-upload-group-files%2F" ><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/dotnetshoutout.png" alt="Shout it" title="Shout it" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fwww.code-zen.net%2F2009%2Fbuddypress-upload-group-files%2F&amp;title=Buddypress+Group+Document+Store&amp;summary=&amp;source=" ><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/linkedin.png" alt="Share on LinkedIn" title="Share on LinkedIn" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.technorati.com/faves?add=http%3A%2F%2Fwww.code-zen.net%2F2009%2Fbuddypress-upload-group-files%2F" ><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/technorati.png" alt="Bookmark this on Technorati" title="Bookmark this on Technorati" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://twitter.com/home?status=Reading+http%3A%2F%2Fwww.code-zen.net%2F2009%2Fbuddypress-upload-group-files%2F" ><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/twitter.png" alt="Post on Twitter" title="Post on Twitter" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.google.com/buzz/post?url=http%3A%2F%2Fwww.code-zen.net%2F2009%2Fbuddypress-upload-group-files%2F" ><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/google_buzz.png" alt="Google Buzz (aka. Google Reader)" title="Google Buzz (aka. Google Reader)" /></a>&nbsp;&nbsp;</div>]]></content:encoded>
			<wfw:commentRss>http://www.code-zen.net/2009/buddypress-upload-group-files/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Buddypress jQuery is not defined error</title>
		<link>http://www.code-zen.net/2009/buddypress-jquery-not-defined/</link>
		<comments>http://www.code-zen.net/2009/buddypress-jquery-not-defined/#comments</comments>
		<pubDate>Thu, 17 Dec 2009 06:58:18 +0000</pubDate>
		<dc:creator>Peter Anselmo</dc:creator>
				<category><![CDATA[BuddyPress]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.code-zen.net/?p=354</guid>
		<description><![CDATA[While developing a Buddypress plugin, I was running into a problem where none of my Javascript was working. Instead, Firebug was telling me: &#8220;jQuery is not defined&#8221;.  This was quite frustrating, as I could verify that the jQuery file was indeed, being loaded.  While a few other people received the same error for different reasons [...]]]></description>
			<content:encoded><![CDATA[<p>While developing a Buddypress plugin, I was running into a problem where none of my Javascript was working. Instead, Firebug was telling me: &#8220;jQuery is not defined&#8221;.  This was quite frustrating, as I could verify that the jQuery file was indeed, being loaded.  While a few other people received the same error for different reasons (corrupt files, etc.) I did not quickly find the solution for my problem.  Here it is:</p>
<p><strong>Problem:</strong> <strong>Buddypress calls your plugin&#8217;s JS files BEFORE jQuery files</strong>.<br />
This applies when you use the function wp_enqueue_script() &#8211; as you should.</p>
<p><strong>Solution: Tell wp_enqueue_script your file depends on jQuery</strong>.<br />
It turns out, wp_enqueue_script() takes a few optional parameters &#8211; the third being an array of other js files yours is dependent on.</p>
<p>Here&#8217;s how the call looks after the change:<br />
wp_enqueue_script(&#8216;my-js-file&#8217;,'my-file-path.js&#8217;,array(&#8216;jquery&#8217;));</p>
<p>Viola!  Your js file is now loaded after jQuery and you&#8217;re good to go.</p>
<div class="lightsocial_container"><a class="lightsocial_a" href="http://digg.com/submit?url=http%3A%2F%2Fwww.code-zen.net%2F2009%2Fbuddypress-jquery-not-defined%2F&amp;title=Buddypress+jQuery+is+not+defined+error" ><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/digg.png" alt="Digg This" title="Digg This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.reddit.com/submit?url=http%3A%2F%2Fwww.code-zen.net%2F2009%2Fbuddypress-jquery-not-defined%2F&amp;title=Buddypress+jQuery+is+not+defined+error" ><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/reddit.png" alt="Reddit This" title="Reddit This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.code-zen.net%2F2009%2Fbuddypress-jquery-not-defined%2F&amp;title=Buddypress+jQuery+is+not+defined+error" ><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/stumbleupon.png" alt="Stumble Now!" title="Stumble Now!" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://buzz.yahoo.com/buzz?targetUrl=http%3A%2F%2Fwww.code-zen.net%2F2009%2Fbuddypress-jquery-not-defined%2F&amp;headline=Buddypress+jQuery+is+not+defined+error" ><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/yahoo_buzz.png" alt="Buzz This" title="Buzz This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.dzone.com/links/add.html?title=Buddypress+jQuery+is+not+defined+error&amp;url=http%3A%2F%2Fwww.code-zen.net%2F2009%2Fbuddypress-jquery-not-defined%2F" ><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/dzone.png" alt="Vote on DZone" title="Vote on DZone" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.facebook.com/sharer.php?t=Buddypress+jQuery+is+not+defined+error&amp;u=http%3A%2F%2Fwww.code-zen.net%2F2009%2Fbuddypress-jquery-not-defined%2F" ><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/facebook.png" alt="Share on Facebook" title="Share on Facebook" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://delicious.com/save?title=Buddypress+jQuery+is+not+defined+error&amp;url=http%3A%2F%2Fwww.code-zen.net%2F2009%2Fbuddypress-jquery-not-defined%2F" ><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/delicious.png" alt="Bookmark this on Delicious" title="Bookmark this on Delicious" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.dotnetkicks.com/kick/?title=Buddypress+jQuery+is+not+defined+error&amp;url=http%3A%2F%2Fwww.code-zen.net%2F2009%2Fbuddypress-jquery-not-defined%2F" ><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/dotnetkicks.png" alt="Kick It on DotNetKicks.com" title="Kick It on DotNetKicks.com" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://dotnetshoutout.com/Submit?title=Buddypress+jQuery+is+not+defined+error&amp;url=http%3A%2F%2Fwww.code-zen.net%2F2009%2Fbuddypress-jquery-not-defined%2F" ><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/dotnetshoutout.png" alt="Shout it" title="Shout it" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fwww.code-zen.net%2F2009%2Fbuddypress-jquery-not-defined%2F&amp;title=Buddypress+jQuery+is+not+defined+error&amp;summary=&amp;source=" ><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/linkedin.png" alt="Share on LinkedIn" title="Share on LinkedIn" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.technorati.com/faves?add=http%3A%2F%2Fwww.code-zen.net%2F2009%2Fbuddypress-jquery-not-defined%2F" ><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/technorati.png" alt="Bookmark this on Technorati" title="Bookmark this on Technorati" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://twitter.com/home?status=Reading+http%3A%2F%2Fwww.code-zen.net%2F2009%2Fbuddypress-jquery-not-defined%2F" ><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/twitter.png" alt="Post on Twitter" title="Post on Twitter" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.google.com/buzz/post?url=http%3A%2F%2Fwww.code-zen.net%2F2009%2Fbuddypress-jquery-not-defined%2F" ><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/google_buzz.png" alt="Google Buzz (aka. Google Reader)" title="Google Buzz (aka. Google Reader)" /></a>&nbsp;&nbsp;</div>]]></content:encoded>
			<wfw:commentRss>http://www.code-zen.net/2009/buddypress-jquery-not-defined/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Using Custom Profile Field Data in Buddypress Templates</title>
		<link>http://www.code-zen.net/2009/using-custom-profile-field-data-in-buddypress-templates/</link>
		<comments>http://www.code-zen.net/2009/using-custom-profile-field-data-in-buddypress-templates/#comments</comments>
		<pubDate>Wed, 18 Nov 2009 22:48:14 +0000</pubDate>
		<dc:creator>Peter Anselmo</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[BuddyPress]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[plugins]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.code-zen.net/?p=325</guid>
		<description><![CDATA[I ran into what I thought would be fairly common need for Buddypress theme development, the ability to pull data from a custom user profile field and display it. After searching a bit, I could only find way to pull either random fields, or all of the fields together. So after digging around in the [...]]]></description>
			<content:encoded><![CDATA[<p>I ran into what I thought would be fairly common need for Buddypress theme development, the ability to pull data from a custom user profile field and display it.  After searching a bit, I could only find way to pull either random fields, or all of the fields together.  So after digging around in the core files, I found the pieces to put together my own function for the task.</p>
<p>1. <strong>Create the file &#8220;bp-custom.php&#8221;</strong> and place it directly in the plugins folder.  Note, do not place it in the &#8220;buddypress&#8221; folder, otherwise it will be overwritten when upgrading.  If the file exists, simply append to it rather than creating a new one.</p>
<p>2. <strong>Paste the following function</strong> in:</p>
<pre>function bp_the_site_member_profile_data($field_name = '', $echo = 1) {
  if( !$field_name ) {
    return false;
  }
  global $site_members_template;
  if( function_exists( 'xprofile_get_field_data' ) ) {
    $data = xprofile_get_field_data( $field_name,
                                     $site_members_template-&gt;member-&gt;id);
    if( $echo ) {
      echo "<span class="single-field-data">$data</span>";
      return true;
    } else {
      return $data;
    }
  }
}</pre>
<p>3. You can now <strong>use the function &#8216;bp_the_site_member_profile_data(&#8216;MyField&#8217;)</strong> in your templates (of course, substituting &#8216;MyField&#8217; with the one you&#8217;d like to use).  Note, this must be place inside a &#8216;Members Loop&#8217; so that the $site_members_template variable is populated.  Odds are, you&#8217;re inserting this near other profile data already in the loop, so there should be no problems.</p>
<p>UPDATE:<br />
As of BuddyPress 1.2, this functionality has been included.  While in the members loop, you can use the included function: &#8216;bp_member_profile_data( &#8216;field=the field name&#8217; )&#8217; to much the same effect.</p>
<div class="lightsocial_container"><a class="lightsocial_a" href="http://digg.com/submit?url=http%3A%2F%2Fwww.code-zen.net%2F2009%2Fusing-custom-profile-field-data-in-buddypress-templates%2F&amp;title=Using+Custom+Profile+Field+Data+in+Buddypress+Templates" ><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/digg.png" alt="Digg This" title="Digg This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.reddit.com/submit?url=http%3A%2F%2Fwww.code-zen.net%2F2009%2Fusing-custom-profile-field-data-in-buddypress-templates%2F&amp;title=Using+Custom+Profile+Field+Data+in+Buddypress+Templates" ><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/reddit.png" alt="Reddit This" title="Reddit This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.code-zen.net%2F2009%2Fusing-custom-profile-field-data-in-buddypress-templates%2F&amp;title=Using+Custom+Profile+Field+Data+in+Buddypress+Templates" ><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/stumbleupon.png" alt="Stumble Now!" title="Stumble Now!" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://buzz.yahoo.com/buzz?targetUrl=http%3A%2F%2Fwww.code-zen.net%2F2009%2Fusing-custom-profile-field-data-in-buddypress-templates%2F&amp;headline=Using+Custom+Profile+Field+Data+in+Buddypress+Templates" ><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/yahoo_buzz.png" alt="Buzz This" title="Buzz This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.dzone.com/links/add.html?title=Using+Custom+Profile+Field+Data+in+Buddypress+Templates&amp;url=http%3A%2F%2Fwww.code-zen.net%2F2009%2Fusing-custom-profile-field-data-in-buddypress-templates%2F" ><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/dzone.png" alt="Vote on DZone" title="Vote on DZone" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.facebook.com/sharer.php?t=Using+Custom+Profile+Field+Data+in+Buddypress+Templates&amp;u=http%3A%2F%2Fwww.code-zen.net%2F2009%2Fusing-custom-profile-field-data-in-buddypress-templates%2F" ><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/facebook.png" alt="Share on Facebook" title="Share on Facebook" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://delicious.com/save?title=Using+Custom+Profile+Field+Data+in+Buddypress+Templates&amp;url=http%3A%2F%2Fwww.code-zen.net%2F2009%2Fusing-custom-profile-field-data-in-buddypress-templates%2F" ><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/delicious.png" alt="Bookmark this on Delicious" title="Bookmark this on Delicious" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.dotnetkicks.com/kick/?title=Using+Custom+Profile+Field+Data+in+Buddypress+Templates&amp;url=http%3A%2F%2Fwww.code-zen.net%2F2009%2Fusing-custom-profile-field-data-in-buddypress-templates%2F" ><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/dotnetkicks.png" alt="Kick It on DotNetKicks.com" title="Kick It on DotNetKicks.com" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://dotnetshoutout.com/Submit?title=Using+Custom+Profile+Field+Data+in+Buddypress+Templates&amp;url=http%3A%2F%2Fwww.code-zen.net%2F2009%2Fusing-custom-profile-field-data-in-buddypress-templates%2F" ><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/dotnetshoutout.png" alt="Shout it" title="Shout it" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fwww.code-zen.net%2F2009%2Fusing-custom-profile-field-data-in-buddypress-templates%2F&amp;title=Using+Custom+Profile+Field+Data+in+Buddypress+Templates&amp;summary=&amp;source=" ><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/linkedin.png" alt="Share on LinkedIn" title="Share on LinkedIn" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.technorati.com/faves?add=http%3A%2F%2Fwww.code-zen.net%2F2009%2Fusing-custom-profile-field-data-in-buddypress-templates%2F" ><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/technorati.png" alt="Bookmark this on Technorati" title="Bookmark this on Technorati" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://twitter.com/home?status=Reading+http%3A%2F%2Fwww.code-zen.net%2F2009%2Fusing-custom-profile-field-data-in-buddypress-templates%2F" ><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/twitter.png" alt="Post on Twitter" title="Post on Twitter" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.google.com/buzz/post?url=http%3A%2F%2Fwww.code-zen.net%2F2009%2Fusing-custom-profile-field-data-in-buddypress-templates%2F" ><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/google_buzz.png" alt="Google Buzz (aka. Google Reader)" title="Google Buzz (aka. Google Reader)" /></a>&nbsp;&nbsp;</div>]]></content:encoded>
			<wfw:commentRss>http://www.code-zen.net/2009/using-custom-profile-field-data-in-buddypress-templates/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Emma Email Signup WordPress Plugin</title>
		<link>http://www.code-zen.net/2009/emma-email-signup-wordpress-plugin/</link>
		<comments>http://www.code-zen.net/2009/emma-email-signup-wordpress-plugin/#comments</comments>
		<pubDate>Tue, 02 Jun 2009 16:03:51 +0000</pubDate>
		<dc:creator>Peter Anselmo</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[email]]></category>
		<category><![CDATA[emma]]></category>
		<category><![CDATA[gpl]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[signup]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://code-zen.net/?p=262</guid>
		<description><![CDATA[I&#8217;m now a card-carrying member of the open source community, WordPress is distributing a plugin I wrote!  It&#8217;s called Emma Email Signup, and it will add an email signup field on your wordpress site, and sync it to your myemma.com email marketing account.  You can find it here.  Note, it&#8217;s somewhat of a niche plugin, [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m now a card-carrying member of the open source community, WordPress is distributing a plugin I wrote!  It&#8217;s called Emma Email Signup, and it will add an email signup field on your wordpress site, and sync it to your <a href="http://www.myemma.com" target="_blank">myemma.com</a> email marketing account.  You can find it <a href="http://wordpress.org/extend/plugins/emma-email-signup/" target="_blank">here</a>.  Note, it&#8217;s somewhat of a niche plugin, you must already be an emma customer for it to have any value.  Check it out, and let me know what you think!</p>
<div class="lightsocial_container"><a class="lightsocial_a" href="http://digg.com/submit?url=http%3A%2F%2Fwww.code-zen.net%2F2009%2Femma-email-signup-wordpress-plugin%2F&amp;title=Emma+Email+Signup+Wordpress+Plugin" ><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/digg.png" alt="Digg This" title="Digg This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.reddit.com/submit?url=http%3A%2F%2Fwww.code-zen.net%2F2009%2Femma-email-signup-wordpress-plugin%2F&amp;title=Emma+Email+Signup+Wordpress+Plugin" ><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/reddit.png" alt="Reddit This" title="Reddit This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.code-zen.net%2F2009%2Femma-email-signup-wordpress-plugin%2F&amp;title=Emma+Email+Signup+Wordpress+Plugin" ><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/stumbleupon.png" alt="Stumble Now!" title="Stumble Now!" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://buzz.yahoo.com/buzz?targetUrl=http%3A%2F%2Fwww.code-zen.net%2F2009%2Femma-email-signup-wordpress-plugin%2F&amp;headline=Emma+Email+Signup+Wordpress+Plugin" ><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/yahoo_buzz.png" alt="Buzz This" title="Buzz This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.dzone.com/links/add.html?title=Emma+Email+Signup+Wordpress+Plugin&amp;url=http%3A%2F%2Fwww.code-zen.net%2F2009%2Femma-email-signup-wordpress-plugin%2F" ><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/dzone.png" alt="Vote on DZone" title="Vote on DZone" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.facebook.com/sharer.php?t=Emma+Email+Signup+Wordpress+Plugin&amp;u=http%3A%2F%2Fwww.code-zen.net%2F2009%2Femma-email-signup-wordpress-plugin%2F" ><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/facebook.png" alt="Share on Facebook" title="Share on Facebook" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://delicious.com/save?title=Emma+Email+Signup+Wordpress+Plugin&amp;url=http%3A%2F%2Fwww.code-zen.net%2F2009%2Femma-email-signup-wordpress-plugin%2F" ><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/delicious.png" alt="Bookmark this on Delicious" title="Bookmark this on Delicious" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.dotnetkicks.com/kick/?title=Emma+Email+Signup+Wordpress+Plugin&amp;url=http%3A%2F%2Fwww.code-zen.net%2F2009%2Femma-email-signup-wordpress-plugin%2F" ><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/dotnetkicks.png" alt="Kick It on DotNetKicks.com" title="Kick It on DotNetKicks.com" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://dotnetshoutout.com/Submit?title=Emma+Email+Signup+Wordpress+Plugin&amp;url=http%3A%2F%2Fwww.code-zen.net%2F2009%2Femma-email-signup-wordpress-plugin%2F" ><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/dotnetshoutout.png" alt="Shout it" title="Shout it" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fwww.code-zen.net%2F2009%2Femma-email-signup-wordpress-plugin%2F&amp;title=Emma+Email+Signup+Wordpress+Plugin&amp;summary=&amp;source=" ><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/linkedin.png" alt="Share on LinkedIn" title="Share on LinkedIn" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.technorati.com/faves?add=http%3A%2F%2Fwww.code-zen.net%2F2009%2Femma-email-signup-wordpress-plugin%2F" ><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/technorati.png" alt="Bookmark this on Technorati" title="Bookmark this on Technorati" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://twitter.com/home?status=Reading+http%3A%2F%2Fwww.code-zen.net%2F2009%2Femma-email-signup-wordpress-plugin%2F" ><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/twitter.png" alt="Post on Twitter" title="Post on Twitter" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.google.com/buzz/post?url=http%3A%2F%2Fwww.code-zen.net%2F2009%2Femma-email-signup-wordpress-plugin%2F" ><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/google_buzz.png" alt="Google Buzz (aka. Google Reader)" title="Google Buzz (aka. Google Reader)" /></a>&nbsp;&nbsp;</div>]]></content:encoded>
			<wfw:commentRss>http://www.code-zen.net/2009/emma-email-signup-wordpress-plugin/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Dynamic Display of the Alphabet with PHP</title>
		<link>http://www.code-zen.net/2008/dynamic-display-of-the-alphabet-with-php/</link>
		<comments>http://www.code-zen.net/2008/dynamic-display-of-the-alphabet-with-php/#comments</comments>
		<pubDate>Tue, 23 Dec 2008 21:14:07 +0000</pubDate>
		<dc:creator>Peter Anselmo</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[ascii]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://code-zen.net/?p=138</guid>
		<description><![CDATA[Here&#8217;s a neat trick I recently used: Say you want to the display the alphabet on your web page.  The most likely scenario being for paging links to organize a directory of people or businesses. PHP has a chr() function, which displays the ASCII character for any given integer. Rather than looping through an array [...]]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s a neat trick I recently used: Say you want to the display the alphabet on your web page.  The most likely scenario being for paging links to organize a directory of people or businesses. PHP has a chr() function, which displays the ASCII character for any given integer.</p>
<p>Rather than looping through an array with 26 values, or worse yet, typing out 26 lines of code, just loop through the display code 26 times.</p>
<pre>&lt;?php
for ($i=65; $i&lt;=90; $i++) {
 echo chr($i);
}
?&gt;</pre>
<p>For those not familiar with ASCII mappings, values 65-90 represent the uppercase letters A-Z.  Alternately, you could use the values 97-122 for lowercase a-z.  If you wanted to mix the two (say to display uppercase, but use lowercase in the link) just use the strtoupper() or strtolower() functions inside the loop.  Here&#8217;s a more applicable sample:</p>
<pre>&lt;?php
for ($i=97; $i&lt;=122; $i++) {
 $x = chr($i);
 echo '&lt;a href="memberlist.php?alpha=' . $x . '&gt;' . strtoupper($x) . '&lt;/a&gt;';
}
?&gt;

You can see an example of both <a href="http://code-zen.net/sandbox/alphabet.php" target="_blank">applied here</a>.</pre>
<div class="lightsocial_container"><a class="lightsocial_a" href="http://digg.com/submit?url=http%3A%2F%2Fwww.code-zen.net%2F2008%2Fdynamic-display-of-the-alphabet-with-php%2F&amp;title=Dynamic+Display+of+the+Alphabet+with+PHP" ><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/digg.png" alt="Digg This" title="Digg This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.reddit.com/submit?url=http%3A%2F%2Fwww.code-zen.net%2F2008%2Fdynamic-display-of-the-alphabet-with-php%2F&amp;title=Dynamic+Display+of+the+Alphabet+with+PHP" ><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/reddit.png" alt="Reddit This" title="Reddit This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.code-zen.net%2F2008%2Fdynamic-display-of-the-alphabet-with-php%2F&amp;title=Dynamic+Display+of+the+Alphabet+with+PHP" ><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/stumbleupon.png" alt="Stumble Now!" title="Stumble Now!" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://buzz.yahoo.com/buzz?targetUrl=http%3A%2F%2Fwww.code-zen.net%2F2008%2Fdynamic-display-of-the-alphabet-with-php%2F&amp;headline=Dynamic+Display+of+the+Alphabet+with+PHP" ><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/yahoo_buzz.png" alt="Buzz This" title="Buzz This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.dzone.com/links/add.html?title=Dynamic+Display+of+the+Alphabet+with+PHP&amp;url=http%3A%2F%2Fwww.code-zen.net%2F2008%2Fdynamic-display-of-the-alphabet-with-php%2F" ><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/dzone.png" alt="Vote on DZone" title="Vote on DZone" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.facebook.com/sharer.php?t=Dynamic+Display+of+the+Alphabet+with+PHP&amp;u=http%3A%2F%2Fwww.code-zen.net%2F2008%2Fdynamic-display-of-the-alphabet-with-php%2F" ><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/facebook.png" alt="Share on Facebook" title="Share on Facebook" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://delicious.com/save?title=Dynamic+Display+of+the+Alphabet+with+PHP&amp;url=http%3A%2F%2Fwww.code-zen.net%2F2008%2Fdynamic-display-of-the-alphabet-with-php%2F" ><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/delicious.png" alt="Bookmark this on Delicious" title="Bookmark this on Delicious" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.dotnetkicks.com/kick/?title=Dynamic+Display+of+the+Alphabet+with+PHP&amp;url=http%3A%2F%2Fwww.code-zen.net%2F2008%2Fdynamic-display-of-the-alphabet-with-php%2F" ><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/dotnetkicks.png" alt="Kick It on DotNetKicks.com" title="Kick It on DotNetKicks.com" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://dotnetshoutout.com/Submit?title=Dynamic+Display+of+the+Alphabet+with+PHP&amp;url=http%3A%2F%2Fwww.code-zen.net%2F2008%2Fdynamic-display-of-the-alphabet-with-php%2F" ><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/dotnetshoutout.png" alt="Shout it" title="Shout it" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fwww.code-zen.net%2F2008%2Fdynamic-display-of-the-alphabet-with-php%2F&amp;title=Dynamic+Display+of+the+Alphabet+with+PHP&amp;summary=&amp;source=" ><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/linkedin.png" alt="Share on LinkedIn" title="Share on LinkedIn" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.technorati.com/faves?add=http%3A%2F%2Fwww.code-zen.net%2F2008%2Fdynamic-display-of-the-alphabet-with-php%2F" ><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/technorati.png" alt="Bookmark this on Technorati" title="Bookmark this on Technorati" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://twitter.com/home?status=Reading+http%3A%2F%2Fwww.code-zen.net%2F2008%2Fdynamic-display-of-the-alphabet-with-php%2F" ><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/twitter.png" alt="Post on Twitter" title="Post on Twitter" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.google.com/buzz/post?url=http%3A%2F%2Fwww.code-zen.net%2F2008%2Fdynamic-display-of-the-alphabet-with-php%2F" ><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/google_buzz.png" alt="Google Buzz (aka. Google Reader)" title="Google Buzz (aka. Google Reader)" /></a>&nbsp;&nbsp;</div>]]></content:encoded>
			<wfw:commentRss>http://www.code-zen.net/2008/dynamic-display-of-the-alphabet-with-php/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Coding Music</title>
		<link>http://www.code-zen.net/2008/coding-music/</link>
		<comments>http://www.code-zen.net/2008/coding-music/#comments</comments>
		<pubDate>Thu, 11 Dec 2008 05:11:19 +0000</pubDate>
		<dc:creator>Peter Anselmo</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[delerium]]></category>
		<category><![CDATA[music]]></category>
		<category><![CDATA[shpongle]]></category>
		<category><![CDATA[trance]]></category>
		<category><![CDATA[zen]]></category>

		<guid isPermaLink="false">http://code-zen.net/?p=155</guid>
		<description><![CDATA[Music is a big part of programming.  Nothing gets me zen faster than immersion in a good back beat.  As such, I&#8217;d like to pass on a few genres and artists that I think stand out as being conducive to cranking out code. Trance: By far, I spend the most time listening to Eric Jordan.  [...]]]></description>
			<content:encoded><![CDATA[<p>Music is a big part of programming.  Nothing gets me zen faster than immersion in a good back beat.  As such, I&#8217;d like to pass on a few genres and artists that I think stand out as being conducive to cranking out code.</p>
<p><strong>Trance:</strong></p>
<div id="attachment_152" class="wp-caption alignleft" style="width: 130px"><a href="http://www.neverrain.com"><img class="size-thumbnail wp-image-152" title="engage_august2008web" src="http://code-zen.net/wp-content/uploads/2008/12/engage_august2008web-150x150.jpg" alt="Eric Jordan" width="120" height="120" /></a><p class="wp-caption-text">Eric Jordan</p></div>
<p>By far, I spend the most time listening to Eric Jordan.  His trance mixes are stunning.  They are always creative, drawing from his vast knowlege of obscure, but impressive tracks.  He is a master at creating a mood, evoking emotion, and pulling the listener in.  Every month he posts a new mix on his website: <a href="http://www.neverrain.com" target="_blank">neverrain.com</a>, available for free to download.  His mixes tend to have more subtle melodies, and less vocals, so I find them extra conducive to zoning out and programming complex algorithms.</p>
<div style="visibility:hidden;clear:both;">asd</div>
<p><strong style="clear:left;">Vocal Trance:</strong></p>
<div id="attachment_156" class="wp-caption alignleft" style="width: 120px"><a href="http://www.generationtrance.com" target="_blank"><img class="size-thumbnail wp-image-156" title="dg_gt" src="http://code-zen.net/wp-content/uploads/2008/12/dg_gt.gif" alt="DJ GT" width="110" height="60" /></a><p class="wp-caption-text">DJ GT</p></div>
<p>DJ GT takes a similar approach, creating hour long mixes and posting them for free on his website, <a title="Generation Trance" href="http://www.generationtrance.com" target="_blank">generationtrance.com</a>. He is equally talented, although his track lists tend to be slightly more mainstream.  All of the songs he uses contain lyrics, which makes the mixes a little more structured and digestable for those not as used to electronic music.  I&#8217;ll throw one of his many tracks in the queue when I want something more upbeat to tap my feet to.</p>
<div style="visibility:hidden;clear:both;">asd</div>
<p><strong style="clear:left;">Psycadelic Trance:</strong></p>
<div id="attachment_161" class="wp-caption alignleft" style="width: 130px"><a href="http://www.amazon.com/Shpongle/e/B000APNMTG/ref=ntt_mus_dp_pel"><img class="size-thumbnail wp-image-161" title="shpongle" src="http://code-zen.net/wp-content/uploads/2008/12/shpongle-150x150.jpg" alt="Shpongle" width="120" height="120" /></a><p class="wp-caption-text">Shpongle</p></div>
<p>Shpongle is group out of the UK that defies description.  Generally, I&#8217;d label it Psy Trance, but you&#8217;ll find heavy influences of world beat, classical, opera, jazz, ska, punk, dub, and half a dozen other genres.  It all adds up to 100% awesome.  Lyrics in their music are not arranged into verses to tell a story, but rather sampled to become part of the ambience and reinforce the mood.  My only wish is that they had more than three albums.</p>
<div style="visibility:hidden;clear:both;">asd</div>
<p><strong style="clear:left;">Dub:</strong></p>
<div id="attachment_163" class="wp-caption alignleft" style="width: 130px"><a href="http://www.amazon.com/O.T.T./e/B001LHNZ1M/ref=ntt_mus_dp_pel"><img class="size-thumbnail wp-image-163" title="ott" src="http://code-zen.net/wp-content/uploads/2008/12/ott-150x150.jpg" alt="O.T.T." width="120" height="120" /></a><p class="wp-caption-text">OTT</p></div>
<p>If I had to describe Dub to someone who hadn&#8217;t heard it, I&#8217;d label it the offspring of Reggae and Trance.  It&#8217;s characterized by a slower tempo than most electronica, with a heavier bassline and more emphasis on the ambience of the music.  Ott&#8217;s first album <a href="http://www.amazon.com/Blumenkraft-OTT/dp/B00008XUSP" target="_blank">Blumenkraft</a> stands out as my favorite mix of any artist mentioned here.  It&#8217;s simply the most powerful weapon against the drone of office background noise I&#8217;ve found.  I save it for when I need to write that recursive function I&#8217;ve been putting off all week.</p>
<div style="visibility:hidden;clear:both;">asd</div>
<p><strong style="clear:left;">Industrial:</strong></p>
<div id="attachment_166" class="wp-caption alignleft" style="width: 130px"><a href="http://www.amazon.com/Civilization-Front-Line-Assembly/dp/B00015HVL0"><img class="size-thumbnail wp-image-166" title="fla" src="http://code-zen.net/wp-content/uploads/2008/12/fla-150x150.jpg" alt="Front Line Assembly" width="120" height="120" /></a><p class="wp-caption-text">Front Line Assembly</p></div>
<p>Two of my favorite artists are Bill Leeb and Rhys Fulber.  They&#8217;ve been making electronic music for two decades, and they&#8217;ve made some of the best.  They&#8217;ve gone under several different names, the most popular being <a href="http://www.amazon.com/Delerium/e/B000APYL9G" target="_blank">Delerium</a> and <a href="http://www.amazon.com/Front-Line-Assembly/e/B000APVP72" target="_blank">Front Line Assembly</a>.  Delerium, like Shpongle, defies description and has gone through several distinct transitions through the years.  I own and love the entire collection, but the music I find best to program to however, are their oldest albums, found <a href="http://www.amazon.com/Archives-Vol-1-Delerium/dp/B00005OAG9" target="_blank">here</a> and <a href="http://www.amazon.com/Archives-Vol-2-Delerium/dp/B00005OAGA" target="_blank">here</a>.  Each of those are a two CD set that compiles all the their earliest releases which are (sadly) no longer available.  The music is very experimental, and it laid the groundwork for the industrial genre.</p>
<div class="mceTemp">Well, that concludes the tour of my favorite programming music.  I hope you enjoyed the trip; be careful opening the overhead bins, as items may have shifted in flight.  I&#8217;m always open for recommendataion, so if you hear a good tune that makes you stop and close your eyes to listen, let me know.</div>
<div class="lightsocial_container"><a class="lightsocial_a" href="http://digg.com/submit?url=http%3A%2F%2Fwww.code-zen.net%2F2008%2Fcoding-music%2F&amp;title=Coding+Music" ><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/digg.png" alt="Digg This" title="Digg This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.reddit.com/submit?url=http%3A%2F%2Fwww.code-zen.net%2F2008%2Fcoding-music%2F&amp;title=Coding+Music" ><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/reddit.png" alt="Reddit This" title="Reddit This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.code-zen.net%2F2008%2Fcoding-music%2F&amp;title=Coding+Music" ><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/stumbleupon.png" alt="Stumble Now!" title="Stumble Now!" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://buzz.yahoo.com/buzz?targetUrl=http%3A%2F%2Fwww.code-zen.net%2F2008%2Fcoding-music%2F&amp;headline=Coding+Music" ><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/yahoo_buzz.png" alt="Buzz This" title="Buzz This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.dzone.com/links/add.html?title=Coding+Music&amp;url=http%3A%2F%2Fwww.code-zen.net%2F2008%2Fcoding-music%2F" ><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/dzone.png" alt="Vote on DZone" title="Vote on DZone" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.facebook.com/sharer.php?t=Coding+Music&amp;u=http%3A%2F%2Fwww.code-zen.net%2F2008%2Fcoding-music%2F" ><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/facebook.png" alt="Share on Facebook" title="Share on Facebook" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://delicious.com/save?title=Coding+Music&amp;url=http%3A%2F%2Fwww.code-zen.net%2F2008%2Fcoding-music%2F" ><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/delicious.png" alt="Bookmark this on Delicious" title="Bookmark this on Delicious" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.dotnetkicks.com/kick/?title=Coding+Music&amp;url=http%3A%2F%2Fwww.code-zen.net%2F2008%2Fcoding-music%2F" ><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/dotnetkicks.png" alt="Kick It on DotNetKicks.com" title="Kick It on DotNetKicks.com" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://dotnetshoutout.com/Submit?title=Coding+Music&amp;url=http%3A%2F%2Fwww.code-zen.net%2F2008%2Fcoding-music%2F" ><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/dotnetshoutout.png" alt="Shout it" title="Shout it" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fwww.code-zen.net%2F2008%2Fcoding-music%2F&amp;title=Coding+Music&amp;summary=&amp;source=" ><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/linkedin.png" alt="Share on LinkedIn" title="Share on LinkedIn" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.technorati.com/faves?add=http%3A%2F%2Fwww.code-zen.net%2F2008%2Fcoding-music%2F" ><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/technorati.png" alt="Bookmark this on Technorati" title="Bookmark this on Technorati" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://twitter.com/home?status=Reading+http%3A%2F%2Fwww.code-zen.net%2F2008%2Fcoding-music%2F" ><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/twitter.png" alt="Post on Twitter" title="Post on Twitter" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.google.com/buzz/post?url=http%3A%2F%2Fwww.code-zen.net%2F2008%2Fcoding-music%2F" ><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/google_buzz.png" alt="Google Buzz (aka. Google Reader)" title="Google Buzz (aka. Google Reader)" /></a>&nbsp;&nbsp;</div>]]></content:encoded>
			<wfw:commentRss>http://www.code-zen.net/2008/coding-music/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP Month View Calendar</title>
		<link>http://www.code-zen.net/2008/php-month-view-calendar/</link>
		<comments>http://www.code-zen.net/2008/php-month-view-calendar/#comments</comments>
		<pubDate>Thu, 04 Dec 2008 00:54:21 +0000</pubDate>
		<dc:creator>Peter Anselmo</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://code-zen.net/?p=77</guid>
		<description><![CDATA[I recently had to develop a month view Calendar for a website I&#8217;m building.  While such a thing is very common, it presents a number of twists: You can&#8217;t start it on the first of the month &#8211; The first will likely fall mid-week To find the acutual first day of the week, you need [...]]]></description>
			<content:encoded><![CDATA[<p>I recently had to develop a month view Calendar for a website I&#8217;m building.  While such a thing is very common, it presents a number of twists:</p>
<ul>
<li>You can&#8217;t start it on the first of the month &#8211; The first will likely fall mid-week</li>
<li>To find the acutual first day of the week, you need to know how many days are in the previous month and count backwards</li>
<li>You cannot assume 4 weeks per month -most have 5 or 6</li>
<li>you will need to use the correct number of days in the month, and then add on the correct number of days of the next month to finish the week</li>
</ul>
<p>After playing with a few algorithms, I decided to represent the month with a 2-dimensional array, one index for each week, and another for each day.  Then, you can put the actual string date in each value, or perhaps an array with that day&#8217;s events.  Without further ado:</p>
<pre>&lt;?php
//CreateMonthView -
//Takes one parameter: a unix timestamp anywhere in the month
function CreateMonthView( $now ) {

    //get numberic day of month (01-31)
    $dayOfMonth = strftime('%d', $now);
    //subtract as approptriate to get to start of month
    $monthStart = $now - (86400 * ($dayOfMonth -1));

    //get numeric day of week (0-6)
    $dayOfWeek = strftime('%w', $monthStart);

    //subtract appropriate number of days to get to the start of the week
    //this will usually be the last part of the previous month
    $calMonthStart = $monthStart - (86400 * $dayOfWeek );

    //initialize variables for while loop
    $thisWeekStart = $calMonthStart;
    $week = 1;
    $monthArray = array();

    //last day of month - text condition for while loop
    $lastDayOfMonth = mktime(23, 59, 59,
                             date("m", $now),
                             date("t", $now),
                             date("Y", $now));

    //foreach week, create a new array to hold the days
    while( $thisWeekStart &lt;= $lastDayOfMonth ) {
        $monthArray[$week] = array();

        //iterate through week - adding each day as a value
        for( $i=0; $i&lt;7; $i++) {
            //get timestamp for each day
            $dayOfWeek = $thisWeekStart + 86400 * $i;
            //convert to a and ISO date - seconds are too precise
            $date = date('Y-m-d',$dayOfWeek);

            //each day will be the value in the array
            $monthArray[$week][] = $date;
        }

        //increment sentinal variable and week counter
        $thisWeekStart = $dayOfWeek + 86400;
        $week++;
    }

    return $monthArray;
}
?&gt;</pre>
<p>Now you may be saying to yourself &#8220;okay, that&#8217;s all fine and good, but it doesn&#8217;t do anything on it&#8217;s own&#8221;, and you&#8217;d be right, it&#8217;s just a function.  To make something happen, you simply need to call it, and display the result.  Here is another snippet that does just that:</p>
<pre>&lt;?php
$month = CreateMonthView( mktime() ); //create the current month

echo '&lt;table&gt;';
foreach( $month as $week ) {
    echo '&lt;tr&gt;';

    foreach ($week as $day ) {
        if( $day == date('Y-m-d') ){
            //apply selector to distinguish today's date
            echo '&lt;td class="today"&gt;';
        } else {
            echo '&lt;td&gt;';
        }
        //reduce the complete ISO date down to the day and display it
        echo substr($day, 8, 2);
        echo '&lt;/td&gt;';
    }
    echo "&lt;/tr&gt;\n";
}
echo '&lt;/table&gt;';
?&gt;</pre>
<p>Viola!  You can certainly copy and paste this code as is, but it&#8217;s not very visually exciting. <a href="http://code-zen.net/sandbox/calendar.php" target="_blank">Here&#8217;s an example</a>. It could definitely use some styling &#8211; but I&#8217;ll leave that up to you.</p>
<div class="lightsocial_container"><a class="lightsocial_a" href="http://digg.com/submit?url=http%3A%2F%2Fwww.code-zen.net%2F2008%2Fphp-month-view-calendar%2F&amp;title=PHP+Month+View+Calendar" ><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/digg.png" alt="Digg This" title="Digg This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.reddit.com/submit?url=http%3A%2F%2Fwww.code-zen.net%2F2008%2Fphp-month-view-calendar%2F&amp;title=PHP+Month+View+Calendar" ><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/reddit.png" alt="Reddit This" title="Reddit This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.code-zen.net%2F2008%2Fphp-month-view-calendar%2F&amp;title=PHP+Month+View+Calendar" ><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/stumbleupon.png" alt="Stumble Now!" title="Stumble Now!" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://buzz.yahoo.com/buzz?targetUrl=http%3A%2F%2Fwww.code-zen.net%2F2008%2Fphp-month-view-calendar%2F&amp;headline=PHP+Month+View+Calendar" ><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/yahoo_buzz.png" alt="Buzz This" title="Buzz This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.dzone.com/links/add.html?title=PHP+Month+View+Calendar&amp;url=http%3A%2F%2Fwww.code-zen.net%2F2008%2Fphp-month-view-calendar%2F" ><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/dzone.png" alt="Vote on DZone" title="Vote on DZone" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.facebook.com/sharer.php?t=PHP+Month+View+Calendar&amp;u=http%3A%2F%2Fwww.code-zen.net%2F2008%2Fphp-month-view-calendar%2F" ><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/facebook.png" alt="Share on Facebook" title="Share on Facebook" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://delicious.com/save?title=PHP+Month+View+Calendar&amp;url=http%3A%2F%2Fwww.code-zen.net%2F2008%2Fphp-month-view-calendar%2F" ><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/delicious.png" alt="Bookmark this on Delicious" title="Bookmark this on Delicious" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.dotnetkicks.com/kick/?title=PHP+Month+View+Calendar&amp;url=http%3A%2F%2Fwww.code-zen.net%2F2008%2Fphp-month-view-calendar%2F" ><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/dotnetkicks.png" alt="Kick It on DotNetKicks.com" title="Kick It on DotNetKicks.com" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://dotnetshoutout.com/Submit?title=PHP+Month+View+Calendar&amp;url=http%3A%2F%2Fwww.code-zen.net%2F2008%2Fphp-month-view-calendar%2F" ><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/dotnetshoutout.png" alt="Shout it" title="Shout it" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fwww.code-zen.net%2F2008%2Fphp-month-view-calendar%2F&amp;title=PHP+Month+View+Calendar&amp;summary=&amp;source=" ><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/linkedin.png" alt="Share on LinkedIn" title="Share on LinkedIn" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.technorati.com/faves?add=http%3A%2F%2Fwww.code-zen.net%2F2008%2Fphp-month-view-calendar%2F" ><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/technorati.png" alt="Bookmark this on Technorati" title="Bookmark this on Technorati" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://twitter.com/home?status=Reading+http%3A%2F%2Fwww.code-zen.net%2F2008%2Fphp-month-view-calendar%2F" ><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/twitter.png" alt="Post on Twitter" title="Post on Twitter" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.google.com/buzz/post?url=http%3A%2F%2Fwww.code-zen.net%2F2008%2Fphp-month-view-calendar%2F" ><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/google_buzz.png" alt="Google Buzz (aka. Google Reader)" title="Google Buzz (aka. Google Reader)" /></a>&nbsp;&nbsp;</div>]]></content:encoded>
			<wfw:commentRss>http://www.code-zen.net/2008/php-month-view-calendar/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

