<?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>MaisonBisson.com &#187; information architecture</title>
	<atom:link href="http://maisonbisson.com/blog/post/tag/information-architecture/feed/" rel="self" type="application/rss+xml" />
	<link>http://maisonbisson.com</link>
	<description>A bunch of stuff I would have emailed you about.</description>
	<lastBuildDate>Sat, 14 Nov 2009 20:14:03 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>WordPress Hacks: Nested Paths For WPMU Blogs</title>
		<link>http://maisonbisson.com/blog/post/14052/wordpress-hacks-nested-paths-for-wpmu-blogs/</link>
		<comments>http://maisonbisson.com/blog/post/14052/wordpress-hacks-nested-paths-for-wpmu-blogs/#comments</comments>
		<pubDate>Tue, 15 Sep 2009 16:23:10 +0000</pubDate>
		<dc:creator>Casey Bisson</dc:creator>
				<category><![CDATA[Libraries & Networked Information]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[cms]]></category>
		<category><![CDATA[hack]]></category>
		<category><![CDATA[hacks]]></category>
		<category><![CDATA[information architecture]]></category>
		<category><![CDATA[url path]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[WordPress MU]]></category>
		<category><![CDATA[wpmu]]></category>

		<guid isPermaLink="false">http://maisonbisson.com/?p=14052</guid>
		<description><![CDATA[
Situation: you&#8217;ve got WordPress Multi-User setup to host one or more domains in sub-directory mode (as in site.org/blogname), but you want a deeper directory structure than WPMU allows&#8230;something like the following examples, perhaps:

site.org/blogname1
site.org/departments/blogname2
site.org/departments/blogname3
site.org/services/blogname3

The association between blog IDs and sub-directory paths is determined in wpmu-settings.php, but the code there knows nothing about nested paths. So a [...]]]></description>
			<content:encoded><![CDATA[<abbr class="unapi-id" title="maisonbisson-14052"><!-- &nbsp; --></abbr>
<p><strong><span style="font-weight: normal"><div class="contents innerindex"><h3>Contents</h3><ol><li><a href="http://maisonbisson.com/blog/post/14052/wordpress-hacks-nested-paths-for-wpmu-blogs/#14052_hack-the-path-mappin_1">Hack The Path Mapping</a><ol><li><a href="http://maisonbisson.com/blog/post/14052/wordpress-hacks-nested-paths-for-wpmu-blogs/#14052_optimization-note_1">Optimization note</a></li></ol></li><li><a href="http://maisonbisson.com/blog/post/14052/wordpress-hacks-nested-paths-for-wpmu-blogs/#14052_setting-up-new-blogs_1">Setting Up New Blogs</a></li><li><a href="http://maisonbisson.com/blog/post/14052/wordpress-hacks-nested-paths-for-wpmu-blogs/#14052_hack-the-htaccess_1">Hack The .htaccess</a></li></ol></div></span>Situation:</strong> you&#8217;ve got WordPress Multi-User setup to <a href="http://maisonbisson.com/blog/post/14028/wordpress-hacks-managing-multiple-sub-domains/">host one or more domains</a> in sub-directory mode (as in <code>site.org/blogname</code>), but you want a deeper directory structure than WPMU allows&#8230;something like the following examples, perhaps:</p>
<ul>
<li><code>site.org/blogname1</code></li>
<li><code>site.org/departments/blogname2</code></li>
<li><code>site.org/departments/blogname3</code></li>
<li><code>site.org/services/blogname3</code></li>
</ul>
<p>The association between blog IDs and sub-directory paths is determined in <a href="http://trac.mu.wordpress.org/browser/tags/2.8.4a/wpmu-settings.php"><code>wpmu-settings.php</code></a>, but the code there knows nothing about nested paths. So a person planning to use WordPress MU as a CMS must either flatten his/her information architecture, or do some hacking.<br />
<span id="more-14052"></span><br />
<strong>Challenge: hacking WordPress MU to support arbitrary directory paths for each blog<br />
</strong></p>
<p>As with my <a href="http://maisonbisson.com/blog/post/14028/wordpress-hacks-managing-multiple-sub-domains/">multi-domain hack</a>, the following assumes that you’re using the <code>vhost=no</code> setting, that you have access to and know how to manipulate your MySQL, that you have control over your DNS and know how to use it, and that you know how to configure Apache or similar. You’d also be smart to turn off any object caching you may have running, at least until we’re done doing direct database manipulation. The following also assumes that your <code>wp-config.php</code> sets the <code>DOMAIN_CURRENT_SITE</code> and <code>PATH_CURRENT_SITE</code> constants &#8212; if you&#8217;ve done a fresh install recently, it probably does, or you can <a href="http://maisonbisson.com/blog/post/14028/wordpress-hacks-managing-multiple-sub-domains/#14028_reconfigure-wp-confi_1">check my domain mapping hack</a>.</p>
<h3 id="14052_hack-the-path-mappin_1">Hack The Path Mapping</h3>
<p>Right at the top of <a href="http://trac.mu.wordpress.org/browser/tags/2.8.4a/wpmu-settings.php#L28"><code>wpmu-settings.php</code></a> you can see how it strips all but the base of the URL path, but rather than mod that file, we can take advantage of an obscure MU hack: <code>sunrise.php</code>, which gets executed after some important WordPress components like the database class get loaded and before <a href="http://trac.mu.wordpress.org/browser/tags/2.8.4a/wpmu-settings.php"><code>wpmu-settings.php</code></a>. </p>
<p>To use <code>sunrise.php</code>, create a PHP file at <code>/wp-content/sunrise.php</code> and set <code>define('SUNRISE', TRUE);</code> in your <code>wp-config.php</code>.</p>
<p>Here&#8217;s the <code>sunrise.php</code> code I&#8217;m using:</p>
<pre class="brush: php;">if( defined( 'DOMAIN_CURRENT_SITE' ) &amp;&amp; defined( 'PATH_CURRENT_SITE' ) ) {
	$current_site-&gt;id = (defined( 'SITE_ID_CURRENT_SITE' ) ? constant('SITE_ID_CURRENT_SITE') : 1);
	$current_site-&gt;domain = $domain = DOMAIN_CURRENT_SITE;
	$current_site-&gt;path  = $path = PATH_CURRENT_SITE;
	if( defined( 'BLOGID_CURRENT_SITE' ) )
		$current_site-&gt;blog_id = BLOGID_CURRENT_SITE;

	$url = parse_url( $_SERVER['REQUEST_URI'], PHP_URL_PATH );

	$patharray = (array) explode( '/', trim( $url, '/' ));
	$blogsearch = '';
	if( count( $patharray )){
		foreach( $patharray as $pathpart ){
			$pathsearch .= '/'. $pathpart;
			$blogsearch .= $wpdb-&gt;prepare(&quot; OR (domain = %s AND path = %s) &quot;, $domain, $pathsearch .'/' );
		}
	}

	$current_blog = $wpdb-&gt;get_row( $wpdb-&gt;prepare(&quot;SELECT *, LENGTH( path ) as pathlen FROM $wpdb-&gt;blogs WHERE domain = %s AND path = '/'&quot;, $domain, $path) . $blogsearch .'ORDER BY pathlen DESC LIMIT 1');

	$blog_id = $current_blog-&gt;blog_id;
	$public  = $current_blog-&gt;public;
	$site_id = $current_blog-&gt;site_id;
	$current_site = sl_get_current_site_name( $current_site );
}

function sl_get_current_site_name( $current_site ) {
	global $wpdb;
	$current_site-&gt;site_name = wp_cache_get( $current_site-&gt;id . ':current_site_name', &quot;site-options&quot; );
	if ( !$current_site-&gt;site_name ) {
		$current_site-&gt;site_name = $wpdb-&gt;get_var( $wpdb-&gt;prepare( &quot;SELECT meta_value FROM $wpdb-&gt;sitemeta WHERE site_id = %d AND meta_key = 'site_name'&quot;, $current_site-&gt;id ) );
		if( $current_site-&gt;site_name == null )
			$current_site-&gt;site_name = ucfirst( $current_site-&gt;domain );
		wp_cache_set( $current_site-&gt;id . ':current_site_name', $current_site-&gt;site_name, 'site-options');
	}
	return $current_site;
}</pre>
<p>The first few lines of the code do pretty much the same as the start of the <a href="http://trac.mu.wordpress.org/browser/tags/2.8.4a/wpmu-settings.php#L44"><code>wpmu_current_site()</code></a> function in <code>wpmu-settings.php</code>, but starting with line 8 it takes a big departure.</p>
<p>That&#8217;s where it splits the requested URL path like <code>/path/to/blog/and/stuff/</code> into pieces and constructs an SQL query against the <code>wp_blogs</code> table to identify the correct blog to serve the request. The following example shows how:</p>
<pre class="brush: sql;">SELECT *, LENGTH( path ) as pathlen
	 FROM wp_blogs
	 WHERE domain = 'domain.org' AND path = '/'&quot;
	  	 OR (domain = 'domain.org' AND path = '/path/')
	 	 OR (domain = 'domain.org' AND path = '/path/to/')
	 	 OR (domain = 'domain.org' AND path = '/path/to/blog/')
	 	 OR (domain = 'domain.org' AND path = '/path/to/blog/and/')
	 	 OR (domain = 'domain.org' AND path = '/path/to/blog/and/stuff/')
	 ORDER BY pathlen DESC
	 LIMIT 1</pre>
<h4 id="14052_optimization-note_1">Optimization note</h4>
<p>Setting a maximum depth (and <code>array_slice( $patharray, 0, $maxdepth )</code>) would allow the query to be cached up to that depth. Otherwise, the query must be executed for every page load. The <code>$maxdepth</code> could either be set arbitrarily, or could be determined automatically based on the maximum path length of registered blogs.</p>
<h3 id="14052_setting-up-new-blogs_1">Setting Up New Blogs</h3>
<p>Once you&#8217;ve hacked the path mapping (and tested that it didn&#8217;t break your current site), you can add a new blog at a nested path.</p>
<div id="attachment_14063" class="wp-caption aligncenter" style="width: 553px"><a href="http://maisonbisson.com/files/2009/09/Screen-shot-2009-09-12-at-10.37.24-AM.png"><img src="http://maisonbisson.com/files/2009/09/Screen-shot-2009-09-12-at-10.37.24-AM.png" alt="Create a new blog in the MU blog admin." width="543" height="235" class="size-full wp-image-14063" /></a><p class="wp-caption-text">Create a new blog in the MU blog admin.</p></div>
<p>Unfortunately, MU strips the slashes from the URL path you just tried to set.</p>
<div id="attachment_14064" class="wp-caption aligncenter" style="width: 499px"><a href="http://maisonbisson.com/files/2009/09/Screen-shot-2009-09-12-at-10.39.02-AM.png"><img src="http://maisonbisson.com/files/2009/09/Screen-shot-2009-09-12-at-10.39.02-AM.png" alt="The new blog you just tried to create, but with a very different path." width="489" height="125" class="size-full wp-image-14064" /></a><p class="wp-caption-text">The new blog you just tried to create, but with a very different path.</p></div>
<p>Fortunately, you can set the path correctly in the MU blog editor, and it won&#8217;t break the path when you save there.</p>
<div id="attachment_14065" class="wp-caption aligncenter" style="width: 497px"><a href="http://maisonbisson.com/files/2009/09/Screen-shot-2009-09-12-at-10.39.42-AM.png"><img src="http://maisonbisson.com/files/2009/09/Screen-shot-2009-09-12-at-10.39.42-AM.png" alt="Set the blog path in the MU blog editor, MU won&#39;t break it when you save it this time." width="487" height="123" class="size-full wp-image-14065" /></a><p class="wp-caption-text">Set the blog path in the MU blog editor, MU won't break it when you save it this time.</p></div>
<p>Once you create the new blog, try to load it in your browser. You&#8217;ll quickly notice the stylesheet is missing, though the blog works and functions properly.</p>
<h3 id="14052_hack-the-htaccess_1">Hack The .htaccess</h3>
<p>WPMU uses the following <code>.htaccess</code> rewrite rule to properly direct requests for files on the real filesystem:</p>
<pre class="brush: plain;">RewriteRule  ^([_0-9a-zA-Z-]+/)?(wp-.*) $2 [L]</pre>
<p>Obviously, that rule won&#8217;t work for deep paths, so I&#8217;ve replaced it with this rule:</p>
<pre class="brush: plain;">RewriteRule  ^(.+)?/(wp-.*) /$2 [L]</pre>
<p>And with that, you should be done.</p>
]]></content:encoded>
			<wfw:commentRss>http://maisonbisson.com/blog/post/14052/wordpress-hacks-nested-paths-for-wpmu-blogs/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Edward Tufte On The iPhone&#8217;s UI Design</title>
		<link>http://maisonbisson.com/blog/post/12727/edward-tufte-on-the-iphones-ui-design/</link>
		<comments>http://maisonbisson.com/blog/post/12727/edward-tufte-on-the-iphones-ui-design/#comments</comments>
		<pubDate>Tue, 14 Oct 2008 16:20:52 +0000</pubDate>
		<dc:creator>Casey Bisson</dc:creator>
				<category><![CDATA[Dispatches]]></category>
		<category><![CDATA[design]]></category>
		<category><![CDATA[edward tufte]]></category>
		<category><![CDATA[information architecture]]></category>
		<category><![CDATA[information design]]></category>
		<category><![CDATA[user experience]]></category>

		<guid isPermaLink="false">http://maisonbisson.com/?p=12727</guid>
		<description><![CDATA[

Edward &#8220;to clarify add detail&#8221; Tufte, who criticizes the PowerPointing of America, earlier this year posted a video on the iPhone&#8217;s UI design. He loves the photo viewer (except the grid-lines between images are too big), he loves the web browser (except the navigation bar takes up too much space), he calls the weather app an [...]]]></description>
			<content:encoded><![CDATA[<abbr class="unapi-id" title="maisonbisson-12727"><!-- &nbsp; --></abbr>
<p><a href="http://www.flickr.com/photos/maisonbisson/2942495138/" title="Edward Tufte's iPhone UI Critique by misterbisson, on Flickr"><img src="http://farm4.static.flickr.com/3058/2942495138_dc7b531072.jpg" width="500" height="318" alt="Edward Tufte's iPhone UI Critique" /></a></p>
<p>Edward &#8220;to clarify add detail&#8221; Tufte, who <a href="http://maisonbisson.com/blog/post/10787/powerpoint/">criticizes the PowerPointing of America</a>, earlier this year <a href="http://www.edwardtufte.com/bboard/q-and-a-fetch-msg?msg_id=00036T&amp;topic_id=1">posted a video on the iPhone&#8217;s UI desig</a><a href="http://s3.amazonaws.com/edwardtufte.com/iPhone_Resolution-desktop.m4v">n</a>. He loves the photo viewer (except the grid-lines between images are too big), he loves the web browser (except the navigation bar takes up too much space), he calls the weather app an elegant way to demo your iPhone to friends (but says it&#8217;s devoid of information), and calls the stock market app cartoonish.</p>
<p>The biggest takeaway, however? &#8220;The metaphor for the interface is the information.&#8221; And on that point, he says the iPhone got it mostly right. There are definitely some examples to learn from.</p>
]]></content:encoded>
			<wfw:commentRss>http://maisonbisson.com/blog/post/12727/edward-tufte-on-the-iphones-ui-design/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Not Just Hip</title>
		<link>http://maisonbisson.com/blog/post/11958/not-just-hip/</link>
		<comments>http://maisonbisson.com/blog/post/11958/not-just-hip/#comments</comments>
		<pubDate>Tue, 16 Oct 2007 11:15:27 +0000</pubDate>
		<dc:creator>Casey Bisson</dc:creator>
				<category><![CDATA[Libraries & Networked Information]]></category>
		<category><![CDATA[Politics & Controversy]]></category>
		<category><![CDATA[Chronicle of Higher Education]]></category>
		<category><![CDATA[future]]></category>
		<category><![CDATA[information architecture]]></category>
		<category><![CDATA[interview]]></category>
		<category><![CDATA[lib20]]></category>
		<category><![CDATA[libraries]]></category>
		<category><![CDATA[library 2.0]]></category>

		<guid isPermaLink="false">http://maisonbisson.com/blog/post/11958/not-just-hip</guid>
		<description><![CDATA[
When a writer goes looking for young Turks (my words, not Scott&#8217;s), you should expect the story to include some brash quotes (writers are supposed to have a chip of ice in their hearts, after all). On the other hand, we&#8217;re librarians, so how brash can we be?
Scott Carlson&#8217;s Young Librarians, Talkin&#8217; &#8216;Bout Their Generation [...]]]></description>
			<content:encoded><![CDATA[<abbr class="unapi-id" title="maisonbisson-11958"><!-- &nbsp; --></abbr>
<p>When a writer goes looking for <a href="http://en.wikipedia.org/wiki/Young_Turks_%28disambiguation%29">young Turks</a> (my words, not Scott&#8217;s), you should expect the story to include some brash quotes (writers are supposed to have <a href="http://www.nytimes.com/books/99/03/21/specials/lecarre-interrogation.html">a chip of ice in their hearts</a>, after all). On the other hand, we&#8217;re librarians, so how brash can we be?</p>
<p>Scott Carlson&#8217;s <a href="http://chronicle.com/temp/email2.php?id=VxjmgshrNpdB5jdzxjxvtfmcxrXX5tpR" title="Young Librarians, Talkin' 'Bout Their Generation - Chronicle.com">Young Librarians, Talkin&#8217; &#8216;Bout Their Generation</a> in <a href="http://chronicle.com/">The Chronicle</a> this week did it better than most articles: rather than showing how hip or geeky we are, it asks us about the future. And it asks without overly romanticizing the shelves of paper-bound books that our users so identify with us or presupposing that Google will <a href="http://en.wikipedia.org/wiki/P0wn">p0wn</a> us. </p>
<p>The answers are good, definitely worth a look. Though I regret that the selected quote from my long-ish interview with Scott didn&#8217;t reflect on more of the good work and great people in libraries. Especially now, as code4lib2008 planning is kicking into gear, and with the number of projects on the table &#8212; Evergreen, Koha, Blacklight, and VuFind, just to name a few.</p>
<p>The future of libraries is a big, wide open question, but here are two things I&#8217;m certain of: Our very notions of the nature of information need to evolve, and we need to move quickly to build libraries that are as relevant to the next hundred years as our <a href="http://maisonbisson.com/blog/post/11845/20th-century-information-architecture">adored Carnegie libraries</a> were to the last.</p>
<p><tags>libraries, lib20, library 2.0, information architecture, interview, Chronicle of Higher Education, future</tags></p>
]]></content:encoded>
			<wfw:commentRss>http://maisonbisson.com/blog/post/11958/not-just-hip/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>20th Century Information Architecture</title>
		<link>http://maisonbisson.com/blog/post/11845/20th-century-information-architecture/</link>
		<comments>http://maisonbisson.com/blog/post/11845/20th-century-information-architecture/#comments</comments>
		<pubDate>Thu, 21 Jun 2007 14:12:57 +0000</pubDate>
		<dc:creator>Casey Bisson</dc:creator>
				<category><![CDATA[Libraries & Networked Information]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[19th century]]></category>
		<category><![CDATA[20th century]]></category>
		<category><![CDATA[Andrew Carnegie]]></category>
		<category><![CDATA[architecture]]></category>
		<category><![CDATA[Carnegie libraries]]></category>
		<category><![CDATA[history]]></category>
		<category><![CDATA[information architecture]]></category>
		<category><![CDATA[libraries]]></category>

		<guid isPermaLink="false">http://maisonbisson.com/blog/post/11845/#20th-century-information-architecture</guid>
		<description><![CDATA[
One hundred years ago the country was in the middle of a riot of library construction. Andrew Carnegie&#8217;s name is nearly synonymous with the period, largely due to his funding for over 1,500 libraries between 1883 and 1929, but architectural historian Abigail Van Slyck notes that the late 19th century was marked by widespread interest [...]]]></description>
			<content:encoded><![CDATA[<abbr class="unapi-id" title="maisonbisson-11845"><!-- &nbsp; --></abbr>
<p>One hundred years ago the country was in the middle of a riot of library construction. <a href="http://en.wikipedia.org/wiki/Andrew_Carnegie">Andrew Carnegie</a>&#8217;s name is nearly synonymous with the period, largely due to his <a href="http://en.wikipedia.org/wiki/Carnegie_library">funding for over 1,500 libraries between 1883 and 1929</a>, but architectural historian <a href="http://www.conncoll.edu/academics/web_profiles/aavan.html">Abigail Van Slyck</a> <a href="http://links.jstor.org/sici?sici=0037-9808(199112)50%3A4%3C359%3A%22UAOE%5B%3E2.0.CO%3B2-K" title="JSTOR: The Journal of the Society of Architectural Historians: Vol. 50, No. 4 (Dec., 1991), pp. 359-383">notes</a> that the late 19th century was marked by widespread interest in community development, with broad recognition of libraries as a means of promoting individual development.</p>
<p>“For library patrons, male and female, young and old, the new library offered a pleasant surprise.” Libraries became recognizable landmarks, and recognizably <em>public</em>. “Readers could enter freely, safe in the knowledge that they were welcome.”</p>
<p>And inside the library the barriers were coming down. Where once a user needed to request materials from the librarian, open stacks became increasingly common with libraries constructed near the turn of the century. Historian Walter Langsam <a href="http://www.cincypost.com/news/1999/carn101199.html" title="carn101199">praised the development this way</a>:</p>
<blockquote><p>The Carnegie libraries were important because they had open stacks which encouraged people to browse. The open stacks were more democratic. People could choose for themselves what books they wanted to read. The libraries were meant to be for people of all walks of life.</p></blockquote>
<p>(Van Slyck notes that Carnegie insistence on open stacks developed after the turn of the century.)</p>
<p>And while the widespread construction of libraries may have begun as “gifts of men grown wealthy during the [Civil] war,” they soon became valued institutions of the people.</p>
<p><tags>libraries, information architecture, history, architecture, Carnegie libraries, Andrew Carnegie, 20th century, 19th century</tags></p>
]]></content:encoded>
			<wfw:commentRss>http://maisonbisson.com/blog/post/11845/20th-century-information-architecture/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>