<?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>Brendan Nee &#187; wordpress</title>
	<atom:link href="http://bnee.com/tag/wordpress/feed/" rel="self" type="application/rss+xml" />
	<link>http://bnee.com</link>
	<description>Brendan Nee Online</description>
	<lastBuildDate>Tue, 09 Mar 2010 01:11:26 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
<atom:link rel="hub" href="http://pubsubhubbub.appspot.com"/><atom:link rel="hub" href="http://superfeedr.com/hubbub"/>		<item>
		<title>New site design</title>
		<link>http://bnee.com/2009/01/new-site-design/</link>
		<comments>http://bnee.com/2009/01/new-site-design/#comments</comments>
		<pubDate>Sat, 17 Jan 2009 12:03:35 +0000</pubDate>
		<dc:creator>Brendan Nee</dc:creator>
				<category><![CDATA[Life]]></category>
		<category><![CDATA[bnee.com]]></category>
		<category><![CDATA[facebook]]></category>
		<category><![CDATA[htaccess]]></category>
		<category><![CDATA[web design]]></category>
		<category><![CDATA[wordpress]]></category>

	<!-- AutoMeta Start -->
	<category></category>
	<!-- AutoMeta End -->
	
		<guid isPermaLink="false">http://bnee.com/?p=210</guid>
		<description><![CDATA[<a href=http://bnee.com/2009/01/new-site-design/><img src=http://bnee.com/wp-content/uploads/2006/07/bneecom-2007-2008-300x265.jpg class=imgtfe hspace=5 align=left width=150  border=0></a>]]></description>
			<content:encoded><![CDATA[<p><div id="attachment_202" class="wp-caption alignright" style="width: 310px"><a href="http://bnee.com/wp-content/uploads/2006/07/bneecom-2007-2008.jpg" rel="lightbox[210]"><img src="http://bnee.com/wp-content/uploads/2006/07/bneecom-2007-2008-300x265.jpg" alt="Remember this?" title="Remember this?" width="300" height="265" class="size-medium wp-image-202" /></a><p class="wp-caption-text">Remember this?</p></div>It was about time to clean up the crusty wordpress template powering bnee.com.  It was one of the first templates for wordpress I created, and it has powered this website since 2006.</p>
<p>I&#8217;ve kept track of all of the revisions of my website since 1997, you can see the whole progression on my <a href="http://bnee.com/old-websites/">old stuff page</a>.</p>
<p>This new site features fewer images and more emphasis on links to the various web services I use, like <a href="http://www.facebook.com/people/Brendan-Nee/1215551">facebook</a>, <a href="http://www.twitter.com/brendannee/">twitter</a> and <a href="http://www.goodreads.com/user/show/56779">goodreads</a>.  It also features the posts from the <a href="http://blnktag.com/blog/">Blnktag blog</a>, which is where I&#8217;ll be writing updates related to cities, planning, transportation and my business.</p>
<p>I also took this opportunity to remove the &#8220;www&#8221; from my sites URL.  It makes everything shorter, and is <a href="http://snippets.dzone.com/posts/show/2264">very easy to do using htaccess</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://bnee.com/2009/01/new-site-design/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>List pages in wordpress into a PHP Array</title>
		<link>http://bnee.com/2008/04/list-pages-in-wordpress-into-a-php-array/</link>
		<comments>http://bnee.com/2008/04/list-pages-in-wordpress-into-a-php-array/#comments</comments>
		<pubDate>Thu, 10 Apr 2008 10:04:18 +0000</pubDate>
		<dc:creator>Brendan Nee</dc:creator>
				<category><![CDATA[tech]]></category>
		<category><![CDATA[array]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[wordpress]]></category>

	<!-- AutoMeta Start -->
	<category>wpdb</category>
	<category>wp_list_pages</category>
	<category>parent</category>
	<category>pageposts</category>
	<category>array</category>
	<category>pages</category>
	<category>function</category>
	<category>posts</category>
	<!-- AutoMeta End -->
	
		<guid isPermaLink="false">http://www.bnee.com/?p=161</guid>
		<description><![CDATA[]]></description>
			<content:encoded><![CDATA[<p><strong>Update:</strong> Thanks to Joost in the comments for suggesting the use of <a href="http://codex.wordpress.org/Function_Reference/get_pages">get_pages()</a> to accomplish the same thing as what I posted below.  He posted the example:</p>
<pre><textarea style="border:1px solid #999;word-wrap:break-word;width:500px;height:100px;">
$pages = get_pages(‘child_of’ => [[THE PARENT ID]], ’sort_order’ => ‘ASC’);
foreach ($pages as $page) {
  // Do your thang
}
</textarea></pre>
<p>This seems much better than what I had previously used, but for reference, my old post is below:</p>
<p>I spent some time figuring out how to get the <a href="http://codex.wordpress.org/wp_list_pages">wordpress wp_list_pages function</a> to return the results as a PHP array of URLs and page names.  There wasn&#8217;t an obvious way to do this and searching google did not yield anything particularly useful.  The wp_list_pages function has an &#8220;echo&#8221; parameter which when set to 0 returns a list of links as a string.  That won&#8217;t help much if you want it as an array with links and page names.</p>
<p>I ended up writing a short script that will query wordpress for the name and URL of all of the subpages of a specified page.  This could be used to make a function that formatted a list of pages a particular way (like making the list wrap into two or more columns).  Its nothing fancy, but perhaps it can help other wordpressers who are looking for something similar.</p>
<blockquote><p>
&lt;?php<br />
$querystr = &#8220;SELECT $wpdb->posts.* FROM $wpdb->posts WHERE $wpdb->posts.post_status = &#8216;publish&#8217; AND $wpdb->posts.post_type = &#8216;page&#8217; AND $wpdb->posts.post_parent = [[Parent Page ID]] ORDER BY $wpdb->posts.post_title ASC&#8221;;</p>
<p>$pageposts = $wpdb->get_results($querystr, OBJECT);</p>
<p>if ($pageposts):<br />
	foreach ($pageposts as $post):<br />
	setup_postdata($post);<br />
		// Add your own logic or formatting here<br />
		?><br />
		&lt;a href=&#8221;&lt;?php the_permalink() ?>&#8221; title=&#8221;Permanent Link to &lt;?php the_title(); ?>&#8221;>&lt;?php the_title(); ?>&lt;/a><br />
	&lt;?php endforeach;<br />
	else :<br />
		echo &#8216;Not Found&#8217;;<br />
endif;<br />
?>
</p></blockquote>
<p>Where [[Parent Page ID]] is the id number of the parent page you would like to get children from.  If you want all pages included, don&#8217;t include this parameter.</p>
]]></content:encoded>
			<wfw:commentRss>http://bnee.com/2008/04/list-pages-in-wordpress-into-a-php-array/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>World Trip 2008</title>
		<link>http://bnee.com/2008/03/world-trip-2008/</link>
		<comments>http://bnee.com/2008/03/world-trip-2008/#comments</comments>
		<pubDate>Thu, 06 Mar 2008 13:02:21 +0000</pubDate>
		<dc:creator>Brendan Nee</dc:creator>
				<category><![CDATA[travel]]></category>
		<category><![CDATA[lisa]]></category>
		<category><![CDATA[wordpress]]></category>

	<!-- AutoMeta Start -->
	<category>mostexcellentjourney</category>
	<category>blog</category>
	<category>world</category>
	<category>girlfriend</category>
	<category>trip</category>
	<category>notes</category>
	<category>feed</category>
	<category>lisa</category>
	<!-- AutoMeta End -->
	
		<guid isPermaLink="false">http://www.bnee.com/2008/03/world-trip-2008/</guid>
		<description><![CDATA[<a href=http://bnee.com/2008/03/world-trip-2008/><img src=http://farm4.static.flickr.com/3058/2305132372_da42736c7d_m.jpg class=imgtfe hspace=5 align=left width=150  border=0></a>]]></description>
			<content:encoded><![CDATA[<p><a href="http://mostexcellentjourney.com"><img src="http://farm4.static.flickr.com/3058/2305132372_da42736c7d_m.jpg" alt="Rio" align="right" /></a><br />
I&#8217;m currently on a 5 month trip around the world with my girlfriend Lisa.  I&#8217;ve finally found enough time to update this blog to point to my trip blog <a href="http://mostexcellentjourney.com">mostexcellentjourney.com</a>.  Its got a map of where we&#8217;ve been, notes from each place we&#8217;ve visited and photos.  You can also get the <a href="http://feeds.feedburner.com/mostexcellentjourney">RSS feed</a> or get on our <a href="http://www.feedburner.com/fb/a/emailverifySubmit?feedId=1653936&#038;loc=en_US">email list</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://bnee.com/2008/03/world-trip-2008/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Automatic wordpress backups to Amazon S3</title>
		<link>http://bnee.com/2007/10/automatic-wordpress-backups-to-amazon-s3/</link>
		<comments>http://bnee.com/2007/10/automatic-wordpress-backups-to-amazon-s3/#comments</comments>
		<pubDate>Thu, 25 Oct 2007 07:30:58 +0000</pubDate>
		<dc:creator>Brendan Nee</dc:creator>
				<category><![CDATA[tech]]></category>
		<category><![CDATA[backup]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[s3]]></category>
		<category><![CDATA[wordpress]]></category>

	<!-- AutoMeta Start -->
	<category>wordpress</category>
	<category>backups</category>
	<category>files</category>
	<category>database</category>
	<category>nightly</category>
	<category>themes</category>
	<category>perform</category>
	<category>plugins</category>
	<!-- AutoMeta End -->
	
		<guid isPermaLink="false">http://www.bnee.com/2007/10/automatic-wordpress-backups-to-amazon-s3/</guid>
		<description><![CDATA[]]></description>
			<content:encoded><![CDATA[<p>I use wordpress for many sites, and its really important for me to be able to automatically perform nightly backups of not just the database, but all files including uploads, themes, plugins and the basic wordpress files.  I need the ability to revert any file back to a previous version.</p>
<p>I found a <a href="http://paulstamatiou.com/2007/07/29/how-to-bulletproof-server-backups-with-amazon-s3/">variety</a> of <a href="http://elliottback.com/wp/archives/2007/08/05/easy-database-backup-with-amazon-s3/">solutions</a> to backing up files using S3, but none that exactly met my needs, so I decided to post my work here.</p>
<p>Note that these instructions assume your web server is Unix, Linux or Mac OS X based.  It also assumes you have a basic understanding of FTP, SSH, firefox extensions and compressed files.</p>
<p><strong>1. Get the s3-bash code library</strong></p>
<p>The s3 BASH library is a collection of scripts that can get, put or delete files from Amazon s3.  You can grab them from <a href="http://code.google.com/p/s3-bash/">Google Code</a>.</p>
<p><strong>2. Unpack and upload these scripts to your server.</strong><br />
They should probably live outside of your webroot.  Depending on how your server is set up you might put them in:</p>
<blockquote><p>/home/USER/s3</p></blockquote>
<p>Where USER is your username.</p>
<p><strong>3. Give s3-put the proper permissions</strong><br />
We need to be able to execute s3-put so chmod it to 744.</p>
<blockquote><p>chmod 744 /home/USER/s3/s3-put</p></blockquote>
<p><strong>4. Sign up for an Amazon S3 Account</strong><br />
You&#8217;ll need an Amazon S3 account, so <a href="http://amazon.com/s3">sign up</a> and then get your access key ID and secret access key on the AWS access identifiers page.</p>
<p><strong>5. Put your secret access key in a text file and upload it to the server</strong><br />
You could call it s3.key and put it in the same folder you uploaded the s3-bash scripts to. Chmod it to 640.</p>
<blockquote><p>chmod 640 /home/USER/s3/s3.key</p></blockquote>
<p><strong>6. Create a folder for the backups</strong><br />
Make a folder on your webserver for backups, perhaps:</p>
<blockquote><p>/home/USER/backups</p></blockquote>
<p>Where USER is your username.</p>
<p><strong>7. Create a bucket on Amazon S3 for your backups</strong><br />
The easiest way I found to do this is to use the firefox extension <a href="http://www.rjonna.com/ext/s3fox.php">S3 Firefox Organizer</a>.  Add the extension, restart firefox and then in Firefox go to &#8220;Tools&#8221; > &#8220;S3 Organizer&#8221;.  Click &#8220;Manage Accounts&#8221; and enter your access key ID and secret access key and then login.  Create a bucket (directory) for your backups.  I created a one called bnee.</p>
<p><strong>8. Write the backup script</strong><br />
This is the tricky part.  Here is the script I came up with. The [[Double Bracketed]] items are places where you&#8217;ll have to enter information specific to your account (see below).</p>
<blockquote><p>#!/bin/bash<br />
USER=[[USER]]<br />
mysqldump &#8211;add-drop-table -u [[DBUSER]] -p[[DBPASSWORD]] -A >/home/$USER/backups/mysql.sql<br />
rm /home/$USER/backups/backup.tgz<br />
tar -czvf /home/$USER/backups/backup.tgz [[PATHTOWEBROOT]] /home/$USER/backups/mysql.sql<br />
NOW=$(date +_%b_%d_%y)<br />
/home/$USER/s3/s3-put -k [[S3ACCESSKEYID]] -s /home/$USER/s3/s3.key -T /home/$USER/backups/backup.tgz -v /[[S3BUCKET]]/backup$NOW.tgz</p></blockquote>
<p><strong>[[USER]]</strong> &#8211; Because the username of my web server is used a lot in the paths, this is a variable<br />
<strong>[[DBUSER]]</strong> &#8211; The username of the mysql database.  You can get this from the wp-config.php file of your wordpress installation.<br />
<strong>[[DBPASSWORD]]</strong> &#8211; The password for your mysql database. You can get this from the wp-config.php file of your wordpress installation.<br />
<strong>[[PATHTOWEBROOT]]</strong> &#8211; The path to the webroot.  Its likely something like /home/USER/public_html<br />
<strong>[[S3ACCESSKEYID]]</strong> &#8211; The access key ID for Amazon S3 (see step 3).<br />
<strong>[[S3BUCKET]]</strong> &#8211; The name of the bucket (directory) you created in step 6.</p>
<p>You might have to change the various paths depending on the way your web server is set up and the folder names you chose in previous steps.</p>
<p>Paste all of this into a text file and name it something like backup.sh.  Upload it to your web server, outside of the webroot.</p>
<blockquote><p>/home/USER/backup.sh</p></blockquote>
<p><strong>9. Test the script</strong><br />
Verify that the script is working by running it.</p>
<blockquote><p>sh /home/USER/backup.sh</p></blockquote>
<p>If everything is working ok, you&#8217;ll see a lot of output as each file of your website is added to the compressed backup and then uploaded to Amazon S3.  It may take a minute or so to run, but when it is done you can verify that the script worked by using the S3 Firefox plugin to check that the file ended up where you expected it to.</p>
<p><strong>10. Automate it</strong><br />
Add a cron job to run it every night</p>
<blockquote><p>0 0 * * * sh /home/USER/backup.sh</p></blockquote>
<p>If everything is configured correctly, this should perform a full backup nightly at midnight.</p>
<p>Note for subversion users:  if you&#8217;d like to exclude all of the .svn folders and files from your backup, just use
<pre>--exclude=".svn"</pre>
<p> before the [[PATHTOWEBROOT]] in step 8 above.</p>
]]></content:encoded>
			<wfw:commentRss>http://bnee.com/2007/10/automatic-wordpress-backups-to-amazon-s3/feed/</wfw:commentRss>
		<slash:comments>20</slash:comments>
		</item>
		<item>
		<title>Integration = good</title>
		<link>http://bnee.com/2007/09/integration-good/</link>
		<comments>http://bnee.com/2007/09/integration-good/#comments</comments>
		<pubDate>Sun, 23 Sep 2007 10:45:35 +0000</pubDate>
		<dc:creator>Brendan Nee</dc:creator>
				<category><![CDATA[tech]]></category>
		<category><![CDATA[facebook]]></category>
		<category><![CDATA[plugins]]></category>
		<category><![CDATA[twitter]]></category>
		<category><![CDATA[wordpress]]></category>

	<!-- AutoMeta Start -->
	<category>wordbook</category>
	<category>wordpress</category>
	<category>posts</category>
	<category>plugin</category>
	<category>blog</category>
	<category>facebook</category>
	<category>automatically</category>
	<category>post</category>
	<!-- AutoMeta End -->
	
		<guid isPermaLink="false">http://www.bnee.com/2007/09/integration-good/</guid>
		<description><![CDATA[]]></description>
			<content:encoded><![CDATA[<p>I just got the <a href="http://wordpress.org/extend/plugins/wordbook/">wordbook plugin</a> for wordpress.  It should post my blog posts from bnee.com automatically to facebook.  This combines two of my online presences.  I also got the <a href="http://www.velvet.id.au/twitter-wordpress-sidebar-widget/">Twitter Widget</a> for wordpress which shows my most recent twits on this blog.  Facebook also recieves my most recent twits and posts them into my facebook feed.  I can also email photos directly from my phone to facebook.  </p>
<p>I&#8217;d like to be able to show my facebook photos on my blog and have my facebook status posted to twitter.  I also use <a href="http://www.dodgeball.com/">dodgeball</a> a fair amount to let people know where I am at.  I&#8217;m not sure this would be useful to post anywhere else, but it would be cool if I could do so.  Overall, it looks like more things are getting integrated, which is a good thing.  <a href="http://www.techcrunch.com/2007/09/21/google-to-out-open-facebook-on-november-5/">Techcunch is suggesting</a> that google will help facilitate this integration by opening up a lot of their services via API starting Nov 5. I think that will be interesting.</p>
]]></content:encoded>
			<wfw:commentRss>http://bnee.com/2007/09/integration-good/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>My New Orleans planning website</title>
		<link>http://bnee.com/2006/10/nolaplans/</link>
		<comments>http://bnee.com/2006/10/nolaplans/#comments</comments>
		<pubDate>Tue, 17 Oct 2006 06:13:48 +0000</pubDate>
		<dc:creator>Brendan Nee</dc:creator>
				<category><![CDATA[New Orleans]]></category>
		<category><![CDATA[planning]]></category>
		<category><![CDATA[wordpress]]></category>

	<!-- AutoMeta Start -->
	<category>nolaplans</category>
	<category>plans</category>
	<category>final</category>
	<category>scattered</category>
	<category>comment</category>
	<category>conducting</category>
	<category>commentary</category>
	<category>surprisingly</category>
	<!-- AutoMeta End -->
	
		<guid isPermaLink="false">http://www.bnee.com/2006/10/nolaplans/</guid>
		<description><![CDATA[]]></description>
			<content:encoded><![CDATA[<p>Jed and I have found, through attending meetings and conducting interviews, that most people, not surprisingly, are confused by the four planning processes which have occurred or are currently underway in New Orleans since hurricane Katrina.Â  Also, most people don&#8217;t know where they can go to get the final versions of the completed plans, and they are scattered among four websites.Â  As we&#8217;ve been researching the planning in New Orleans full time, we have a good grasp on the planning and felt compelled to create <a target="_blank" href="http://www.nolaplans.com">nolaplans.com</a>, a site with links to final plans, our commentary on how they were constructed and the ability to comment on them.</p>
<p><a target="_blank" href="http://www.nolaplans.com">http://www.nolaplans.comÂ </a></p>
]]></content:encoded>
			<wfw:commentRss>http://bnee.com/2006/10/nolaplans/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
