<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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/" version="2.0">

<channel>
	<title>nSurface</title>
	
	<link>http://www.neutralsurface.com</link>
	<description>Just another WordPress weblog</description>
	<lastBuildDate>Wed, 20 Jul 2011 21:24:37 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/neutralsurface" /><feedburner:info xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" uri="neutralsurface" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item>
		<title>preload and import a csv file into your rails 3 database</title>
		<link>http://www.neutralsurface.com/archives/319</link>
		<comments>http://www.neutralsurface.com/archives/319#comments</comments>
		<pubDate>Wed, 20 Jul 2011 21:24:37 +0000</pubDate>
		<dc:creator>joseph</dc:creator>
				<category><![CDATA[script]]></category>

		<guid isPermaLink="false">http://www.neutralsurface.com/?p=319</guid>
		<description><![CDATA[For a project I&#8217;m working on, there&#8217;s existing data that has to be in the database. The data exists in an excel spreadsheet which I then export as a CSV file. I then create the rake file lib/tasks/bootstrap.rake and place the following in it: namespace :bootstrap do desc &#34;populate database with data from data1.csv&#34; task [...]]]></description>
			<content:encoded><![CDATA[<p>For a project I&#8217;m working on, there&#8217;s existing data that has to be in the database. The data exists in an excel spreadsheet which I then export as a CSV file. I then create the rake file  <b>lib/tasks/bootstrap.rake</b> and place the following in it:</p>
<pre class="brush: ruby;">
namespace :bootstrap do
      desc &quot;populate database with data from data1.csv&quot;
      task :default_data1 =&gt; :environment do
        lines = File.new('public/data/data1.csv').readlines
        header = lines.shift.strip
        keys = header.split(',')
        lines.each do |line|
          params = {}
          values = line.strip.split(',')
          keys.each_with_index do |key,i|
            params[key] = values[i]
          end
          Post.create(params)
        end
      end

      desc &quot;populate database with data from data2.csv&quot;
      task :default_data_2 =&gt; :environment do
        lines = File.new('public/data/data2.csv').readlines
        header = lines.shift.strip
        keys = header.split(',')
        lines.each do |line|
          params = {}
          values = line.strip.split(',')
          keys.each_with_index do |key,i|
            params[key] = values[i]
          end
          Post.create(params)
        end
      end

      desc &quot;Run all bootstrapping tasks&quot;
      task :all =&gt; [:default_data_1, :default_data_2]
    end
</pre>
<p>I&#8217;m uploading two CSV files that I&#8217;ve moved to <b>public/data/</b>. The data looks something like this:<br />
[csv]<br />
title,content,author<br />
foo,lorem ipsum,john doe<br />
bar,ipsum lorem,jane doe<br />
[/csv]</p>
<p>and as long as the first line in the csv matches the fields in your model, they&#8217;ll slip right in.  </p>
<p>finally, run <b>rake bootstrap:all</b> to make the magic happen!</p>
<p>credits: this code is a mashup of these two little code snippits: <a href="http://erikonrails.snowedin.net/?p=212">one</a> <a href="http://stackoverflow.com/questions/62201/how-and-whether-to-populate-rails-application-with-initial-data">two</a></p>
<img src="http://feeds.feedburner.com/~r/neutralsurface/~4/lRGrbw34hbE" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.neutralsurface.com/archives/319/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Custom login CSS style</title>
		<link>http://www.neutralsurface.com/archives/314</link>
		<comments>http://www.neutralsurface.com/archives/314#comments</comments>
		<pubDate>Tue, 21 Jun 2011 01:44:24 +0000</pubDate>
		<dc:creator>joseph</dc:creator>
				<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.neutralsurface.com/?p=314</guid>
		<description><![CDATA[The WordPress login screen is pretty bland and sometimes you just want something different. Or maybe you just don&#8217;t want to remind your users that you&#8217;re using WordPress all the time. Add this to your functions.php file: /* custom login style */ function custom_login() { echo '&#60;link rel=&#34;stylesheet&#34; type=&#34;text/css&#34; href=&#34;'.get_bloginfo('template_directory').'/assets/css/custom-login.css&#34; /&#62;'; } add_action('login_head', 'custom_login'); this [...]]]></description>
			<content:encoded><![CDATA[<p>The WordPress login screen is pretty bland and sometimes you just want something different. Or maybe you just don&#8217;t want to remind your users that you&#8217;re using WordPress all the time. Add this to your functions.php file:</p>
<pre class="brush: php;">

/* custom login style */
function custom_login() {
echo '&lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;'.get_bloginfo('template_directory').'/assets/css/custom-login.css&quot; /&gt;';
}
add_action('login_head', 'custom_login');
</pre>
<p>this will add your own stylesheet to the login page. In this case, my stylesheet lives in &#8216;mytheme/assets/css/custom-login-css&#8217;. Then create a CSS file and change it as you see fit. My latest looks like this:</p>
<pre class="brush: css;">

/* Custom Login Styles */

html {background:url(../images/default_large.png)}    /* Page background. Can't use the body tag for this! */
h1 a {    /* Title image (The &quot;WordPress Logo&quot;). Remember to update the height and width your image's dimensions */
background:url(images/default_large.png.none) 0 0 no-repeat;
width:415px;
height:70px;
}

body.login {border-top-color:#dff4fc;}    /* Top bar background color */
.login p#backtoblog a:link, .login p#backtoblog a:visited {color:#17272d;}    /* Link effects in top bar */
.login p#backtoblog a:hover, .login p#backtoblog a:active {color:#17272d;text-decoration:underline;}    /* Rollover link effects in top bar */

form {
 border-radius:0;
 box-shadow:none;
}

div.updated, .login .message, .message{
 background-color:yellow;
 border-radius:0;
}
</pre>
<img src="http://feeds.feedburner.com/~r/neutralsurface/~4/pKV7m_EqfQ4" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.neutralsurface.com/archives/314/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Redirect to the WordPress homepage after login</title>
		<link>http://www.neutralsurface.com/archives/310</link>
		<comments>http://www.neutralsurface.com/archives/310#comments</comments>
		<pubDate>Tue, 21 Jun 2011 01:38:05 +0000</pubDate>
		<dc:creator>joseph</dc:creator>
				<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.neutralsurface.com/?p=310</guid>
		<description><![CDATA[Normally after you log into your wordpress site you are directed to the admin dashboard. WordPress assumes that if you log in, that you must want to edit the site somehow. This is probably true in most cases. But in the recent past I&#8217;ve been making more and more themes that are private and/or collaborative [...]]]></description>
			<content:encoded><![CDATA[<p>Normally after you log into your wordpress site you are directed to the admin dashboard. WordPress assumes that if you log in, that you must want to edit the site somehow. This is probably true in most cases. But in the recent past I&#8217;ve been making more and more themes that are private and/or collaborative serving a wide range of people from the computer savvy to near Luddites. Something I heard a lot goes something like: &#8216;when I log in I get forwarded to some other website and I don&#8217;t know how to get back!&#8217;. What is this &#8216;other website&#8217;? It turns out it&#8217;s the admin dashboard, and it freaks a lot of people out apparently (and can potentially set your computer on fire according to claims). Anyway, there are a lot of reasons you might want to forward your users on to something other than the admin page when they log in, like if you have a private blog and your family has the password to it and they have no reason to see the dashboard (since they don&#8217;t even have permissions to create/edit content anyway). Paste this into your functions.php file:</p>
<pre class="brush: php;">

/* login redirect to index page */
function redirect_to_front_page() {
 global $redirect_to;
 if (!isset($_GET['redirect_to'])) {
 $redirect_to = get_option('siteurl');
 }
}
add_action('login_form', 'redirect_to_front_page');
</pre>
<p>This function will redirect to the home url by default, but with minimal modification you can redirect anywhere you see fit.</p>
<img src="http://feeds.feedburner.com/~r/neutralsurface/~4/SNSrY_cSCgM" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.neutralsurface.com/archives/310/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Remove that stupid WordPress admin bar</title>
		<link>http://www.neutralsurface.com/archives/306</link>
		<comments>http://www.neutralsurface.com/archives/306#comments</comments>
		<pubDate>Tue, 21 Jun 2011 01:27:09 +0000</pubDate>
		<dc:creator>joseph</dc:creator>
				<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.neutralsurface.com/?p=306</guid>
		<description><![CDATA[Introduced with WordPress 3.0 (I think?), a little admin bar automatically appears at the top of your wordpress website whenever you&#8217;re logged it. While it may be useful for someone, it&#8217;s actually pretty annoying and really unsightly in most cases (it can also mess up your site if you have absolute or fixed position items [...]]]></description>
			<content:encoded><![CDATA[<p>Introduced with WordPress 3.0 (I think?), a little admin bar automatically appears at the top of your wordpress website whenever you&#8217;re logged it. While it may be useful for someone, it&#8217;s actually pretty annoying and really unsightly in most cases (it can also mess up your site if you have absolute or fixed position items in your theme). There are plugins to remove it, but I prefer to keep everything I can in my functions.php file to increase theme portability and stability. Paste this into your functions file:</p>
<pre class="brush: php;">

//remove admin bar
add_action( 'admin_print_scripts-profile.php', 'hide_admin_bar_prefs' );
function hide_admin_bar_prefs() {
 echo '&lt;style type=&quot;text/css&quot;&gt;.show-admin-bar { display: none; }&lt;/style&gt;';
}
add_filter( 'show_admin_bar', '__return_false' );
</pre>
<p>forget you ever saw that bar</p>
<img src="http://feeds.feedburner.com/~r/neutralsurface/~4/WNBtUHu_ZS0" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.neutralsurface.com/archives/306/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WordPress Custom Metaboxes</title>
		<link>http://www.neutralsurface.com/archives/301</link>
		<comments>http://www.neutralsurface.com/archives/301#comments</comments>
		<pubDate>Tue, 21 Jun 2011 01:19:15 +0000</pubDate>
		<dc:creator>joseph</dc:creator>
				<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.neutralsurface.com/?p=301</guid>
		<description><![CDATA[Recently for a theme I was building I found myself in need of some custom metaboxes to be filled with data by the users. The default &#8220;custom fields&#8221; box can work, but it can also be confusing to people who don&#8217;t really know what their doing. It&#8217;s also a lot easier to tell someone to [...]]]></description>
			<content:encoded><![CDATA[<p>Recently for a theme I was building I found myself in need of some custom metaboxes to be filled with data by the users. The default &#8220;custom fields&#8221; box can work, but it can also be confusing to people who don&#8217;t really know what their doing. It&#8217;s also a lot easier to tell someone to &#8220;check the &#8220;proofread&#8221; checkbox&#8221; instead of telling them to select  &#8220;proofread&#8221; item from the &#8220;name&#8221; column and then type &#8220;true&#8221; into the corresponding &#8220;value&#8221; text area. There are a lot of reasons why you might do this, not the least of which is that it makes things cleaner on the back end.</p>
<p>Anyway, I came across a really great, and fairly lightweight function at <a href="http://wefunction.com/2009/10/revisited-creating-custom-write-panels-in-wordpress/" target="_blank">wefunction.com </a>that makes it really simple to add new metaboxes. It&#8217;s really great too because it stores all of the data as a serialized array which can cut down on mysql retrieval costs if you&#8217;re needing to pull down a lot of these at once. But, the function he gives doesn&#8217;t work if you need a checkbox (which I needed). So I&#8217;ve made a simple, but important modification to allow for more flexible input. This is the full code that you would put into your functions.php file:</p>
<pre class="brush: php;">

&lt;?php

$key = &quot;GSD&quot;; //table prefix do not change once set
$meta_boxes = array(
 &quot;callnumber&quot; =&gt; array(
 &quot;name&quot; =&gt; &quot;callnumber&quot;,
 &quot;title&quot; =&gt; &quot;Call Number&quot;,
 &quot;description&quot; =&gt; &quot;enter in the unique library call number for this record&quot;,
 &quot;type&quot; =&gt; &quot;text&quot;
 ),
 &quot;curated&quot; =&gt; array(
 &quot;name&quot; =&gt; &quot;curated&quot;,
 &quot;title&quot; =&gt; &quot;Curated&quot;,
 &quot;description&quot; =&gt; &quot;Is this post curated?&quot;,
 &quot;type&quot; =&gt; &quot;checkbox&quot;
 )
);

function create_meta_box() {
 global $key;

 if( function_exists( 'add_meta_box' ) ) {
 add_meta_box( 'new-meta-boxes', ucfirst( $key ) . ' Custom Options', 'display_meta_box', 'post', 'normal', 'high' );
 }
}

function display_meta_box() {
 global $post, $meta_boxes, $key;
?&gt;

 &lt;div&gt;

 &lt;?php
 wp_nonce_field( plugin_basename( __FILE__ ), $key . '_wpnonce', false, true );

 foreach($meta_boxes as $meta_box) {
 $data = get_post_meta($post-&gt;ID, $key, true);
 ?&gt;

 &lt;div&gt;
 &lt;label for=&quot;&lt;?php echo $meta_box[ 'name' ]; ?&gt;&quot;&gt;&lt;?php echo $meta_box[ 'title' ]; ?&gt;&lt;/label&gt;

 &lt;?php if( $meta_box[ 'type' ]  == &quot;text&quot;): ?&gt;
 &lt;input type=&quot;type&quot; name=&quot;&lt;?php echo $meta_box[ 'name' ]; ?&gt;&quot; value=&quot;&lt;?php echo htmlspecialchars( $data[ $meta_box[ 'name' ] ] ); ?&gt;&quot; /&gt;
 &lt;?php elseif($meta_box[ 'type' ]  == &quot;checkbox&quot;) : ?&gt;
 &lt;input type=&quot;checkbox&quot; name=&quot;&lt;?php echo $meta_box[ 'name' ]; ?&gt;&quot; &lt;?php if( $data[ $meta_box[ 'name' ] ] ) echo &quot;checked='checked'&quot;; ?&gt; value=&quot;true&quot;/&gt;
 &lt;?php endif; ?&gt;

 &lt;p&gt;&lt;?php echo $meta_box[ 'description' ]; ?&gt;&lt;/p&gt;
 &lt;/div&gt;

 &lt;?php } ?&gt;

 &lt;/div&gt;
&lt;?php
}

function save_meta_box( $post_id ) {
 global $post, $meta_boxes, $key;

 foreach( $meta_boxes as $meta_box ) {
 $data[ $meta_box[ 'name' ] ] = $_POST[ $meta_box[ 'name' ] ];
 }

 if ( !wp_verify_nonce( $_POST[ $key . '_wpnonce' ], plugin_basename(__FILE__) ) )
 return $post_id;

 if ( !current_user_can( 'edit_post', $post_id ))
 return $post_id;

 update_post_meta( $post_id, $key, $data );
}

add_action( 'admin_menu', 'create_meta_box' );
add_action( 'save_post', 'save_meta_box' );

?&gt;
</pre>
<p>In most ways it&#8217;s identical to the code that I found, but I added a bit of logic to slightly change the html that the script writes for the different input types. I added one element called &#8216;type&#8217; to the array that you pass into the function :</p>
<pre class="brush: php;">

$meta_boxes = array(
 &quot;callnumber&quot; =&gt; array(
 &quot;name&quot; =&gt; &quot;callnumber&quot;,
 &quot;title&quot; =&gt; &quot;Call Number&quot;,
 &quot;description&quot; =&gt; &quot;enter in the unique library call number for this record&quot;,
 &quot;type&quot; =&gt; &quot;text&quot;
 ),
 &quot;curated&quot; =&gt; array(
 &quot;name&quot; =&gt; &quot;curated&quot;,
 &quot;title&quot; =&gt; &quot;Curated&quot;,
 &quot;description&quot; =&gt; &quot;Is this post curated?&quot;,
 &quot;type&quot; =&gt; &quot;checkbox&quot; //this is the addition and should correspond to standard html form language
 )
);
</pre>
<p>then I added a simple if statement that looks at the value of this &#8216;type&#8217; value and decides how to print the html and post the data:</p>
<pre class="brush: php;">

&lt;?php if( $meta_box[ 'type' ]  == &quot;text&quot;): ?&gt;
 &lt;input type=&quot;type&quot; name=&quot;&lt;?php echo $meta_box[ 'name' ]; ?&gt;&quot; value=&quot;&lt;?php echo htmlspecialchars( $data[ $meta_box[ 'name' ] ] ); ?&gt;&quot; /&gt;
 &lt;?php elseif($meta_box[ 'type' ]  == &quot;checkbox&quot;) : ?&gt;
 &lt;input type=&quot;checkbox&quot; name=&quot;&lt;?php echo $meta_box[ 'name' ]; ?&gt;&quot; &lt;?php if( $data[ $meta_box[ 'name' ] ] ) echo &quot;checked='checked'&quot;; ?&gt; value=&quot;true&quot;/&gt;
 &lt;?php endif; ?&gt;
</pre>
<p>Right now it only recognizes input types of &#8216;text&#8217; and &#8216;checkbox&#8217; but following this same logic you could just add other elseif statements and one line of html and make any type of form input work.</p>
<p>It&#8217;s a really elegant solution that was already pretty flexible and expandable (it&#8217;s not hard to add any number of metaboxes now!), and now it&#8217;s just a little bit more versatile.</p>
<p>note: The metadata is stored in a single table entry which makes retrieving a lot of data very simple and fast. However for this same reason, you cannot sort a query from metadata stored with this method. If you need to sort also, <a href="http://wefunction.com/2008/10/tutorial-creating-custom-write-panels-in-wordpress/" target="_blank">take a look at the earlier entry on metaboxes</a>.</p>
<img src="http://feeds.feedburner.com/~r/neutralsurface/~4/-7lTNN6QlqM" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.neutralsurface.com/archives/301/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>What’s your Water Footprint?</title>
		<link>http://www.neutralsurface.com/archives/297</link>
		<comments>http://www.neutralsurface.com/archives/297#comments</comments>
		<pubDate>Fri, 01 Apr 2011 01:47:19 +0000</pubDate>
		<dc:creator>joseph</dc:creator>
				<category><![CDATA[digital media]]></category>
		<category><![CDATA[internet]]></category>
		<category><![CDATA[visualization]]></category>

		<guid isPermaLink="false">http://www.neutralsurface.com/?p=297</guid>
		<description><![CDATA[Recently, a good friend of mine and I entered a visualization competition at visualizing.org in an effort to do something non-thesis related and potentially awesome. The prompt was to visualize worldwide urban water data. We thought on it for a couple weeks, and over the course of three evenings we produced the visualization that we [...]]]></description>
			<content:encoded><![CDATA[<p>Recently, a good friend of mine and I entered a visualization competition at<a href="http://www.visualizing.org"> visualizing.org</a> in an effort to do something non-thesis related and potentially <em>awesome</em>. <a href="http://www.visualizing.org/contests/world-water-day-visualization-challenge">The prompt</a> was to visualize worldwide urban water data. We thought on it for a couple weeks, and over the course of three evenings we produced the visualization that we call &#8220;What&#8217;s your Water Footprint?&#8221; and submitted it to visualizing. A week later it was announced that <a href="http://www.visualizing.org/stories/visualizing-world-water-day-challenge" target="_blank">we had won</a>! Not too shabby. <a href="http://josephbergen.com/viz/water/" target="_blank">Take a look for yourself</a> and play around with it.</p>
<p>Anyway, thanks to the people at visualizing.org and everyone who has helped spread the word via twitter/blogs/word of mouth. It&#8217;s been a one of a kind experience for Nickie and I.</p>
<img src="http://feeds.feedburner.com/~r/neutralsurface/~4/NdxCIXnZeJQ" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.neutralsurface.com/archives/297/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Protecting content in custom themes</title>
		<link>http://www.neutralsurface.com/archives/290</link>
		<comments>http://www.neutralsurface.com/archives/290#comments</comments>
		<pubDate>Fri, 04 Feb 2011 17:55:59 +0000</pubDate>
		<dc:creator>joseph</dc:creator>
				<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.neutralsurface.com/?p=290</guid>
		<description><![CDATA[If you password protect an individual post or page in your wordpress blog, wordpress makes sure that anything returned by the_content() stays hidden from prying eyes. But what if your theme makes use of other functions that might show something else that you want to remain secure (think attachments, metaboxes, etc)? We&#8217;ll it&#8217;s not in [...]]]></description>
			<content:encoded><![CDATA[<p>If you password protect an individual post or page in your wordpress blog, wordpress makes sure that anything returned by the_content() stays hidden from prying eyes. But what if your theme makes use of other functions that might show something else that you want to remain secure (think attachments, metaboxes, etc)? We&#8217;ll it&#8217;s not in the wordpress <a href="http://codex.wordpress.org/Conditional_Tags" target="_blank">conditionals</a> page, but it does exist:</p>
<pre class="brush: php;">if(!post_password_required()){
//your protected stuff
}</pre>
<p>anything inside that if statement should only show up if your user logs into that post.</p>
<img src="http://feeds.feedburner.com/~r/neutralsurface/~4/WEGfj48WFik" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.neutralsurface.com/archives/290/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Music 2010</title>
		<link>http://www.neutralsurface.com/archives/269</link>
		<comments>http://www.neutralsurface.com/archives/269#comments</comments>
		<pubDate>Wed, 29 Dec 2010 21:07:57 +0000</pubDate>
		<dc:creator>joseph</dc:creator>
				<category><![CDATA[music]]></category>

		<guid isPermaLink="false">http://www.neutralsurface.com/?p=269</guid>
		<description><![CDATA[Most Played Albums Deerhunter – Halcyon Digest Handsome Furs – Face Control Arcade Fire – The Suburbs Working for a Nuclear Free City – Businessmen &#38; Ghosts Kid Cudi –Man on the Moon: The End of Day Yeasayer – Odd Blood Edward Sharpe &#38; the Magnetic Zeros – From Below Sleigh Bells – Treats Wolf [...]]]></description>
			<content:encoded><![CDATA[<p>Most Played Albums</p>
<ol>
<li>Deerhunter – Halcyon Digest</li>
<li>Handsome Furs – Face Control</li>
<li>Arcade Fire – The Suburbs</li>
<li>Working for a Nuclear Free City – Businessmen &amp; Ghosts</li>
<li>Kid Cudi –Man on the Moon: The End of Day</li>
<li>Yeasayer – Odd Blood</li>
<li>Edward Sharpe &amp; the Magnetic Zeros – From Below</li>
<li>Sleigh Bells – Treats</li>
<li>Wolf Parade – Expo 86</li>
<li>The Morning Benders – Big Echo</li>
</ol>
<p>Most Played Artist</p>
<ol>
<li>Deerhunter</li>
<li>Yeasayer</li>
<li>Handsome Furs</li>
<li>Kid Cudi</li>
<li>Arcade Fire</li>
<li>Wolf Parade</li>
<li>Working for A Nuclear Free City</li>
<li>Edward Sharpe &amp; the Magnetic Zeros</li>
<li>The Smashing Pumpkins</li>
<li>Sleigh Bells</li>
</ol>
<p>Most Played Tracks</p>
<ol>
<li>Edward Sharpe &amp; the Magnetic Zeros – Home</li>
<li>Edward Sharpe &amp; the Magnetic Zeros – 40 Day Dream</li>
<li>Yeasayer &#8211; Ambling Alp</li>
<li>Yeasayer – Tightrope</li>
<li>Deerhunter – Revival</li>
<li>Deerhunter – Sailing</li>
<li>Deerhunter – Memory Boy</li>
<li>The Morning Benders – Excuses</li>
<li>Yeasayer – Madder Red</li>
<li>Yeasayer – O.N.E.</li>
</ol>
<img src="http://feeds.feedburner.com/~r/neutralsurface/~4/cgQ_xfQNRU8" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.neutralsurface.com/archives/269/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>resources for beginning wordpressers</title>
		<link>http://www.neutralsurface.com/archives/262</link>
		<comments>http://www.neutralsurface.com/archives/262#comments</comments>
		<pubDate>Wed, 17 Nov 2010 23:21:23 +0000</pubDate>
		<dc:creator>joseph</dc:creator>
				<category><![CDATA[gsd]]></category>
		<category><![CDATA[internet]]></category>

		<guid isPermaLink="false">http://www.neutralsurface.com/?p=262</guid>
		<description><![CDATA[registrars/domains http://www.godaddy.com/default.aspx http://www.dreamhost.com/ searching domains http://www.icann.org/en/registries/listing.html http://www.whois.net/ downloads software www.wordpress.org http://www.mozilla.com/en-US/firefox/firefox.html http://getfirebug.com/ template http://www.plaintxt.org/ localhost/db software http://www.mamp.info/en/index.html http://www.wampserver.com/en/ text editors http://macromates.com/ http://www.barebones.com/products/textwrangler/ http://notepad-plus-plus.org/ Reference documentation http://php.net/download-docs.php http://codex.wordpress.org/Main_Page tutorials http://www.w3schools.com/css/ http://www.w3schools.com/html/default.asp]]></description>
			<content:encoded><![CDATA[<p>registrars/domains</p>
<ul>
<li><a href="http://www.godaddy.com/default.aspx">http://www.godaddy.com/default.aspx</a></li>
<li><a href="http://www.dreamhost.com/">http://www.dreamhost.com/</a></li>
</ul>
<p>searching domains</p>
<ul>
<li><a href="http://www.icann.org/en/registries/listing.html ">http://www.icann.org/en/registries/listing.html</a></li>
<li><a href="http://www.whois.net/  ">http://www.whois.net/</a></li>
</ul>
<p>downloads</p>
<p>software</p>
<ul>
<li><a href="www.wordpress.org ">www.wordpress.org</a></li>
<li><a href="http://www.mozilla.com/en-US/firefox/firefox.html  ">http://www.mozilla.com/en-US/firefox/firefox.html</a></li>
<li><a href="http://getfirebug.com/  ">http://getfirebug.com/</a></li>
</ul>
<p>template</p>
<ul>
<li><a href="http://www.plaintxt.org/  ">http://www.plaintxt.org/</a></li>
</ul>
<p>localhost/db software</p>
<ul>
<li><a href="http://www.mamp.info/en/index.html ">http://www.mamp.info/en/index.html</a></li>
<li><a href="http://www.wampserver.com/en/  ">http://www.wampserver.com/en/</a></li>
</ul>
<p>text editors</p>
<ul>
<li><a href="http://macromates.com/ ">http://macromates.com/</a></li>
<li><a href="http://www.barebones.com/products/textwrangler/ ">http://www.barebones.com/products/textwrangler/</a></li>
<li><a href="http://notepad-plus-plus.org/  ">http://notepad-plus-plus.org/</a></li>
</ul>
<p>Reference</p>
<p>documentation</p>
<ul>
<li><a href="http://php.net/download-docs.php ">http://php.net/download-docs.php</a></li>
<li><a href="http://codex.wordpress.org/Main_Page  ">http://codex.wordpress.org/Main_Page</a></li>
</ul>
<p>tutorials</p>
<ul>
<li><a href="http://www.w3schools.com/css/ ">http://www.w3schools.com/css/</a></li>
<li><a href="http://www.w3schools.com/html/default.asp">http://www.w3schools.com/html/default.asp</a></li>
</ul>
<img src="http://feeds.feedburner.com/~r/neutralsurface/~4/j5xcoY228E8" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.neutralsurface.com/archives/262/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>conditional custom post type template</title>
		<link>http://www.neutralsurface.com/archives/253</link>
		<comments>http://www.neutralsurface.com/archives/253#comments</comments>
		<pubDate>Fri, 05 Nov 2010 08:33:16 +0000</pubDate>
		<dc:creator>joseph</dc:creator>
				<category><![CDATA[tutorial]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[custom taxonomies]]></category>
		<category><![CDATA[customposttype]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[templates]]></category>

		<guid isPermaLink="false">http://www.neutralsurface.com/?p=253</guid>
		<description><![CDATA[I&#8217;ve always thought I should post some of my WordPress hacks so I can keep them in one place. Maybe they&#8217;ll be of use to someone else too. Anyway, a client of mine wants to be able to post bios of the people associated with the organization. No problem. I define a custom post type [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve always thought I should post some of my WordPress hacks so I can keep them in one place. Maybe they&#8217;ll be of use to someone else too.</p>
<p>Anyway, a client of mine wants to be able to post bios of the people associated with the organization. No problem. I define a custom post type &#8220;People&#8221; that allows the client to add &#8220;people&#8221; pages with bios, headshots, etc. The problem is that they want three different types of people to show up on different pages. In this case they want a page for team members, one for advisors, and one for sponsors. I could separate post types for each group, but that seems redundant if they&#8217;re going to all contain the same types of information anyway. Also, if I need to update the post type then I&#8217;d have to make that edit at least three times in three different places. Not good. So instead, I create a custom taxonomy (category) for the &#8220;People&#8221; named &#8220;Relationship&#8221; that allows the user to easily assign a person to a group or groups just as they would choose a category.</p>
<p>Now in order to display the people posts I define a page template &#8220;People Page.&#8221; To make it smart I first want to get the current page&#8217;s slug. There are other ways of doing this, but this one is not dependent on the permalink structure.</p>
<pre class="brush: php;">
$post_obj = $wp_query-&gt;get_queried_object();
$post_ID = $post_obj-&gt;ID;
$post_title = $post_obj-&gt;post_title;
$post_slug = $post_obj-&gt;post_name
</pre>
<p>then I call WP_Query and pass $post_slug into the arguments. When working with custom post types and taxonomies, you must remember to change the name of the category and post type in the arguments!</p>
<pre class="brush: php;">
$loop = new WP_Query( array('relationship' =&gt; $post_slug, 'orderby' =&gt; 'menu_order', 'order' =&gt; 'asc', 'post_type' =&gt; 'people', 'posts_per_page' =&gt; 10 ) );?&gt;
</pre>
<p>From here you can jump into the loop and do whatever you need your posts to do.</p>
<p>All that&#8217;s left was for me to assign the page&#8217;s templates to my &#8220;People Page Template&#8221; and each page is styled the same, using the same post type, but populated by the correct people</p>
<p>One Caveat: The category(taxonomy) slug MUST be identical to the corresponding page slug! If they are different, it will NOT work!</p>
<pre class="brush: php;">&lt;?php
/*
Template Name: People Page
*/
?&gt;
&lt;!--
look to see what kind of person is being identified by the page slug

!!!THE PAGE SLUG MUST BE IDENTICAL TO THE CATEGORY(RELATIONSHIP) SLUG TO WORK!!!!

Then pass the category slug into the wp_query as a condition

this makes it possible to have as many &quot;people&quot; categories as needed without having to make more identical templates that need to be updated in parallel.
--&gt;

&lt;?php
$post_obj = $wp_query-&gt;get_queried_object();
$post_ID = $post_obj-&gt;ID;
$post_title = $post_obj-&gt;post_title;
$post_slug = $post_obj-&gt;post_name;

$loop = new WP_Query( array('relationship' =&gt; $post_slug, 'orderby' =&gt; 'menu_order', 'order' =&gt; 'asc', 'post_type' =&gt; 'people', 'posts_per_page' =&gt; 10 ) );
?&gt;

&lt;!--enter the loop--&gt;
&lt;?php while ( $loop-&gt;have_posts() ) : $loop-&gt;the_post(); ?&gt;
&lt;!--perform the same operations for each category--&gt;
&lt;?php endwhile; ?&gt;
</pre>
<img src="http://feeds.feedburner.com/~r/neutralsurface/~4/Tq2yCD_BpsU" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.neutralsurface.com/archives/253/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

