<?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:dc="http://purl.org/dc/elements/1.1/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0" xml:base="http://aquariumtap.com">
<channel>
 <title>Aquariumtap</title>
 <link>http://aquariumtap.com</link>
 <description />
 <language>en</language>
<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/aquariumtap" /><feedburner:info uri="aquariumtap" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item>
 <title>Palantir's bet against artificial intelligence</title>
 <link>http://feedproxy.google.com/~r/aquariumtap/~3/Zln6LY2L6Es/palantirs-bet-against-artificial-intelligence</link>
 <description>&lt;div class="field field-name-body field-type-text-with-summary field-label-hidden"&gt;&lt;div class="field-items"&gt;&lt;div class="field-item even" property="content:encoded"&gt;&lt;iframe width="640" height="360" src="http://www.youtube.com/embed/1Yi-JE3w190?feature=player_embedded" frameborder="0" allowfullscreen=""&gt;&lt;/iframe&gt;&lt;p&gt;
Palantir's analytic platform is based on a critique of artificial intelligence: no algorithm can replace the effectiveness of the human mind against a data set moved cunningly by other humans.  The video I've posted begins with two subjects.  The first is the failure of computers to become world champions of chess, a claim that began in the 1950's and publicly died out when IBM's Deep Blue lost to Kasparov in 1996.  If the brute force of 200 million evaluations per second cannot establish a clear victory, there must be more to "cunning" than great foresight in positioning symbols against formalized knowledge and rules.&lt;/p&gt;
&lt;p&gt;What is cunning?  I won't discuss that here, but I can highly recommend a book by Hubert Dreyfus called &lt;a href="http://www.amazon.com/gp/product/0262540673/ref=as_li_ss_tl?ie=UTF8&amp;amp;tag=aquariumtap-20&amp;amp;linkCode=as2&amp;amp;camp=1789&amp;amp;creative=390957&amp;amp;creativeASIN=0262540673"&gt;What Computers Still Can't Do: A Critique of Artificial Reason&lt;/a&gt;&lt;img src="http://www.assoc-amazon.com/e/ir?t=aquariumtap-20&amp;amp;l=as2&amp;amp;o=1&amp;amp;a=0262540673" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" /&gt;.&lt;/p&gt;
&lt;p&gt;The second subject of the introduction is PayPal's approach to fraud protection.  Initially PayPal followed a standard strategy of evaluating all records against a criteria for suspicious activity, then flagged matches for manual review by a human.  Certainly, they caught people and went after them, but each time they did, it would reveal part of their strategy.  The entrepreneurial adversary -- in the case of PayPal, a network of Russian hackers -- performed a diagnostic upon each failure, deduced why they were caught, and made alterations accordingly.  This will always be the case.  Anytime one team beats out another, there's a shift in strategy.  The question is, how do you keep up with an agile enemy?&lt;/p&gt;
&lt;p&gt;PayPal knew that computers were not as good as human analysts in detecting and accounting for those shifts, but there was an organizational flaw in their anti-fraud team that made the analyst (the person making sense of data) too dependent on the computer scientist (the person querying the data).  While other banking systems were using analysts to tell computer scientists how to improve their detection, PayPal set out to create tools to augment the analyst's reach into the data.  The scientist was moved from high level querying to low to mid level pattern detection, then presented that partially crunched data to the analyst for independent review.  These patterns were nodal connections between yellow flag transactors, rather than transactions that contained untrustworthy attributes.&lt;/p&gt;
&lt;p&gt;A former CTO of Amazon tells an anecdote that comes to mind: a large telephone company performed a marketing campaign based on two approaches.  The first approach used sophisticated segmentation models designed by doctorates in mathematics.  People were treated as symbols with attributes, and that was the basis for their campaign's targeting rules.  In the second approach, the company began with a pool of previously successful conversions and targeted their social network based on call activity.  The frequency of incoming and outgoing calls between two people informed the strength of a nodal connection.  The story goes that the second campaign, the one based on actions taken (phone calls forming a social graph), had a 5x adoption rate over the segmented models.  It was also far less expensive to produce.&lt;/p&gt;
&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/aquariumtap/~4/Zln6LY2L6Es" height="1" width="1"/&gt;</description>
 <pubDate>Fri, 13 Jan 2012 17:23:58 +0000</pubDate>
 <dc:creator>aquariumtap</dc:creator>
 <guid isPermaLink="false">13 at http://aquariumtap.com</guid>
<feedburner:origLink>http://aquariumtap.com/blog/palantirs-bet-against-artificial-intelligence</feedburner:origLink></item>
<item>
 <title>How to have comma-separated tags in Drupal 7</title>
 <link>http://feedproxy.google.com/~r/aquariumtap/~3/pFauPfZ060Y/how-have-comma-separated-tags-drupal-7</link>
 <description>&lt;div class="field field-name-field-image field-type-image field-label-hidden"&gt;&lt;div class="field-items"&gt;&lt;div class="field-item even" rel="og:image rdfs:seeAlso" resource="http://aquariumtap.com/sites/default/files/styles/full-node-top/public/field/image/nails-done-too.jpg"&gt;&lt;img typeof="foaf:Image" src="http://aquariumtap.com/sites/default/files/styles/full-node-top/public/field/image/nails-done-too.jpg" width="450" height="306" alt="comma delimited tags in drupal" /&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="field field-name-body field-type-text-with-summary field-label-hidden"&gt;&lt;div class="field-items"&gt;&lt;div class="field-item even" property="content:encoded"&gt;&lt;p&gt;If you'd like taxonomy tags separated by commas instead of the default series of divs output by default, you need to override the default theme function.&lt;/p&gt;
&lt;p&gt;What is the &lt;a href="http://api.drupal.org/api/drupal/core--includes--theme.inc/function/theme/8"&gt;theme() function&lt;/a&gt;?  It's Drupal's way of turning raw data into rendered, themed output -- in most cases, HTML markup.  All requests for rendered output are passed through theme().  A menu, a block, the title of a page: these UI components are stored in the database, passed through theme(), referenced against a registry, and finally routed to a function that can work and loop through the data to render markup.  This happens with taxonomy tags, although in somewhat abstracted way.&lt;/p&gt;
&lt;p&gt;In Drupal 7, taxonomy terms are handled through the Field API.  Drupal doesn't think of tags as something quite so specific; it's thought of as a type of field.  What that means is the theme function for tags is the same as the theme function for every other field, such as "title" or "body".  Take a look at &lt;span class="geshifilter"&gt;&lt;code class="drupal6 geshifilter-drupal6"&gt;theme_field&lt;span style="color: #66cc66;"&gt;(&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;)&lt;/span&gt;&lt;/code&gt;&lt;/span&gt;, which can be found in /modules/field.module.  Every time a field is rendered in Drupal, it's run through that same function.&lt;/p&gt;
&lt;p&gt;If you're not satisfied with the default markup, you can tell theme() to route to your function, instead of to the Drupal default.&lt;/p&gt;
&lt;p&gt;To override the default, copy and paste the entire &lt;span class="geshifilter"&gt;&lt;code class="drupal6 geshifilter-drupal6"&gt;theme_field&lt;span style="color: #66cc66;"&gt;(&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;)&lt;/span&gt;&lt;/code&gt;&lt;/span&gt; function into your theme's template.php file.  The goal here is to register your theme's implementation of "field", so instead of using theme_field(), Drupal will use YOURTHEME_field() to render output.  &lt;/p&gt;
&lt;p&gt;1) Rename the copied function from &lt;span class="geshifilter"&gt;&lt;code class="drupal6 geshifilter-drupal6"&gt;theme_field&lt;/code&gt;&lt;/span&gt; to &lt;span class="geshifilter"&gt;&lt;code class="drupal6 geshifilter-drupal6"&gt;YOURTHEME_field&lt;/code&gt;&lt;/span&gt;.&lt;br /&gt;
2) Clear your Drupal cache.&lt;/p&gt;
&lt;p&gt;That's it.  The theme registry will know to look to your function to render output for fields.  Now you can tweak the way field_tags in particular is rendered.  This is done within YOURTHEME_field().  The snippet below will output tags a comma-delimited list.&lt;/p&gt;
&lt;div class="geshifilter"&gt;
&lt;pre class="geshifilter-drupal6"&gt;&lt;span style="color: #808080; font-style: italic;"&gt;/**
 * Override of theme('field').
 */&lt;/span&gt;
&lt;span style="color: #000000; font-weight: bold;"&gt;function&lt;/span&gt; YOURTHEME_field&lt;span style="color: #66cc66;"&gt;(&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;$variables&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;)&lt;/span&gt; &lt;span style="color: #66cc66;"&gt;{&lt;/span&gt;
 
  &lt;span style="color: #0000ff;"&gt;$output&lt;/span&gt; = &lt;span style="color: #ff0000;"&gt;''&lt;/span&gt;;
 
  &lt;span style="color: #808080; font-style: italic;"&gt;// Render the label, if it's not hidden.&lt;/span&gt;
  &lt;span style="color: #b1b100;"&gt;if&lt;/span&gt; &lt;span style="color: #66cc66;"&gt;(&lt;/span&gt;!&lt;span style="color: #0000ff;"&gt;$variables&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;[&lt;/span&gt;&lt;span style="color: #ff0000;"&gt;'label_hidden'&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;]&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;)&lt;/span&gt; &lt;span style="color: #66cc66;"&gt;{&lt;/span&gt;
    &lt;span style="color: #0000ff;"&gt;$output&lt;/span&gt; .= &lt;span style="color: #ff0000;"&gt;'&amp;lt;div class="field-label"'&lt;/span&gt; . &lt;span style="color: #0000ff;"&gt;$variables&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;[&lt;/span&gt;&lt;span style="color: #ff0000;"&gt;'title_attributes'&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;]&lt;/span&gt; . &lt;span style="color: #ff0000;"&gt;'&amp;gt;'&lt;/span&gt; . &lt;span style="color: #0000ff;"&gt;$variables&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;[&lt;/span&gt;&lt;span style="color: #ff0000;"&gt;'label'&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;]&lt;/span&gt; . &lt;span style="color: #ff0000;"&gt;':&amp;amp;nbsp;&amp;lt;/div&amp;gt;'&lt;/span&gt;;
  &lt;span style="color: #66cc66;"&gt;}&lt;/span&gt;
 
  &lt;span style="color: #808080; font-style: italic;"&gt;// Render the items.&lt;/span&gt;
  &lt;span style="color: #0000ff;"&gt;$output&lt;/span&gt; .= &lt;span style="color: #ff0000;"&gt;'&amp;lt;div class="field-items"'&lt;/span&gt; . &lt;span style="color: #0000ff;"&gt;$variables&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;[&lt;/span&gt;&lt;span style="color: #ff0000;"&gt;'content_attributes'&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;]&lt;/span&gt; . &lt;span style="color: #ff0000;"&gt;'&amp;gt;'&lt;/span&gt;;
 
  &lt;span style="color: #b1b100;"&gt;if&lt;/span&gt; &lt;span style="color: #66cc66;"&gt;(&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;$variables&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;[&lt;/span&gt;&lt;span style="color: #ff0000;"&gt;'element'&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;]&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;[&lt;/span&gt;&lt;span style="color: #ff0000;"&gt;'#field_name'&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;]&lt;/span&gt; == &lt;span style="color: #ff0000;"&gt;'field_tags'&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;)&lt;/span&gt; &lt;span style="color: #66cc66;"&gt;{&lt;/span&gt;
    &lt;span style="color: #808080; font-style: italic;"&gt;// For tags, concatenate into a single, comma-delimitated string.&lt;/span&gt;
    &lt;span style="color: #b1b100;"&gt;foreach&lt;/span&gt; &lt;span style="color: #66cc66;"&gt;(&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;$variables&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;[&lt;/span&gt;&lt;span style="color: #ff0000;"&gt;'items'&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;]&lt;/span&gt; &lt;span style="color: #b1b100;"&gt;as&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;$delta&lt;/span&gt; =&amp;gt; &lt;span style="color: #0000ff;"&gt;$item&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;)&lt;/span&gt; &lt;span style="color: #66cc66;"&gt;{&lt;/span&gt;
      &lt;span style="color: #0000ff;"&gt;$rendered_tags&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;[&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;]&lt;/span&gt; = &lt;a href="http://api.drupal.org/api/function/drupal_render/6"&gt;&lt;span style="color: #000066;"&gt;drupal_render&lt;/span&gt;&lt;/a&gt;&lt;span style="color: #66cc66;"&gt;(&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;$item&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;)&lt;/span&gt;;
    &lt;span style="color: #66cc66;"&gt;}&lt;/span&gt;
    &lt;span style="color: #0000ff;"&gt;$output&lt;/span&gt; .= &lt;a href="http://www.php.net/implode"&gt;&lt;span style="color: #000066;"&gt;implode&lt;/span&gt;&lt;/a&gt;&lt;span style="color: #66cc66;"&gt;(&lt;/span&gt;&lt;span style="color: #ff0000;"&gt;', '&lt;/span&gt;, &lt;span style="color: #0000ff;"&gt;$rendered_tags&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;)&lt;/span&gt;;
  &lt;span style="color: #66cc66;"&gt;}&lt;/span&gt; &lt;span style="color: #b1b100;"&gt;else&lt;/span&gt; &lt;span style="color: #66cc66;"&gt;{&lt;/span&gt;
    &lt;span style="color: #808080; font-style: italic;"&gt;// Default rendering taken from theme_field().&lt;/span&gt;
    &lt;span style="color: #b1b100;"&gt;foreach&lt;/span&gt; &lt;span style="color: #66cc66;"&gt;(&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;$variables&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;[&lt;/span&gt;&lt;span style="color: #ff0000;"&gt;'items'&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;]&lt;/span&gt; &lt;span style="color: #b1b100;"&gt;as&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;$delta&lt;/span&gt; =&amp;gt; &lt;span style="color: #0000ff;"&gt;$item&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;)&lt;/span&gt; &lt;span style="color: #66cc66;"&gt;{&lt;/span&gt;
      &lt;span style="color: #0000ff;"&gt;$classes&lt;/span&gt; = &lt;span style="color: #ff0000;"&gt;'field-item '&lt;/span&gt; . &lt;span style="color: #66cc66;"&gt;(&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;$delta&lt;/span&gt; % &lt;span style="color: #cc66cc;"&gt;2&lt;/span&gt; ? &lt;span style="color: #ff0000;"&gt;'odd'&lt;/span&gt; : &lt;span style="color: #ff0000;"&gt;'even'&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;)&lt;/span&gt;;
      &lt;span style="color: #0000ff;"&gt;$output&lt;/span&gt; .= &lt;span style="color: #ff0000;"&gt;'&amp;lt;div class="'&lt;/span&gt; . &lt;span style="color: #0000ff;"&gt;$classes&lt;/span&gt; . &lt;span style="color: #ff0000;"&gt;'"'&lt;/span&gt; . &lt;span style="color: #0000ff;"&gt;$variables&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;[&lt;/span&gt;&lt;span style="color: #ff0000;"&gt;'item_attributes'&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;]&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;[&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;$delta&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;]&lt;/span&gt; . &lt;span style="color: #ff0000;"&gt;'&amp;gt;'&lt;/span&gt; . &lt;a href="http://api.drupal.org/api/function/drupal_render/6"&gt;&lt;span style="color: #000066;"&gt;drupal_render&lt;/span&gt;&lt;/a&gt;&lt;span style="color: #66cc66;"&gt;(&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;$item&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;)&lt;/span&gt; . &lt;span style="color: #ff0000;"&gt;'&amp;lt;/div&amp;gt;'&lt;/span&gt;;
    &lt;span style="color: #66cc66;"&gt;}&lt;/span&gt;
  &lt;span style="color: #66cc66;"&gt;}&lt;/span&gt;
  &lt;span style="color: #0000ff;"&gt;$output&lt;/span&gt; .= &lt;span style="color: #ff0000;"&gt;'&amp;lt;/div&amp;gt;'&lt;/span&gt;;
 
  &lt;span style="color: #808080; font-style: italic;"&gt;// Render the top-level DIV.&lt;/span&gt;
  &lt;span style="color: #0000ff;"&gt;$output&lt;/span&gt; = &lt;span style="color: #ff0000;"&gt;'&amp;lt;div class="'&lt;/span&gt; . &lt;span style="color: #0000ff;"&gt;$variables&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;[&lt;/span&gt;&lt;span style="color: #ff0000;"&gt;'classes'&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;]&lt;/span&gt; . &lt;span style="color: #ff0000;"&gt;'"'&lt;/span&gt; . &lt;span style="color: #0000ff;"&gt;$variables&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;[&lt;/span&gt;&lt;span style="color: #ff0000;"&gt;'attributes'&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;]&lt;/span&gt; . &lt;span style="color: #ff0000;"&gt;'&amp;gt;'&lt;/span&gt; . &lt;span style="color: #0000ff;"&gt;$output&lt;/span&gt; . &lt;span style="color: #ff0000;"&gt;'&amp;lt;/div&amp;gt;'&lt;/span&gt;;
 
  &lt;span style="color: #b1b100;"&gt;return&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;$output&lt;/span&gt;;
&lt;span style="color: #66cc66;"&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="field field-name-field-tags field-type-taxonomy-term-reference field-label-above"&gt;&lt;div class="field-label"&gt;Tags:&amp;nbsp;&lt;/div&gt;&lt;div class="field-items"&gt;&lt;div class="field-item even" rel="dc:subject"&gt;&lt;a href="/tags/tags" typeof="skos:Concept" property="rdfs:label skos:prefLabel"&gt;tags&lt;/a&gt;&lt;/div&gt;&lt;div class="field-item odd" rel="dc:subject"&gt;&lt;a href="/tags/taxonomy" typeof="skos:Concept" property="rdfs:label skos:prefLabel"&gt;taxonomy&lt;/a&gt;&lt;/div&gt;&lt;div class="field-item even" rel="dc:subject"&gt;&lt;a href="/tags/terms" typeof="skos:Concept" property="rdfs:label skos:prefLabel"&gt;terms&lt;/a&gt;&lt;/div&gt;&lt;div class="field-item odd" rel="dc:subject"&gt;&lt;a href="/tags/commas" typeof="skos:Concept" property="rdfs:label skos:prefLabel"&gt;commas&lt;/a&gt;&lt;/div&gt;&lt;div class="field-item even" rel="dc:subject"&gt;&lt;a href="/tags/how" typeof="skos:Concept" property="rdfs:label skos:prefLabel"&gt;how-to&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/aquariumtap/~4/pFauPfZ060Y" height="1" width="1"/&gt;</description>
 <pubDate>Sat, 01 Oct 2011 19:27:24 +0000</pubDate>
 <dc:creator>aquariumtap</dc:creator>
 <guid isPermaLink="false">12 at http://aquariumtap.com</guid>
<feedburner:origLink>http://aquariumtap.com/blog/how-have-comma-separated-tags-drupal-7</feedburner:origLink></item>
<item>
 <title>How to display just a template in Drupal 7</title>
 <link>http://feedproxy.google.com/~r/aquariumtap/~3/0lUIOlEXPpE/output-custom-html-drupal-7</link>
 <description>&lt;div class="field field-name-body field-type-text-with-summary field-label-hidden"&gt;&lt;div class="field-items"&gt;&lt;div class="field-item even" property="content:encoded"&gt;&lt;p&gt;Web developers from a MVC background (Model View Controller) are likely keen on this pattern: do your business logic in a script, collect everything into a data object, then send that data object to a template file for display.  &lt;/p&gt;
&lt;p&gt;That separation exists in Drupal, but it's mitigated by &lt;a href="http://api.drupal.org/api/drupal/core--includes--theme.inc/function/theme/8"&gt;theme()&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;This much is hammered to death in the docs: your view layer (or theme layer in drupalero-speak) should always be invoked by the theme() function.  Why?  Your module or theme can implement a default presentation layer, and by using theme(), other modules and themes will have the opportunity to override it.  The most easily accessible themer tutorials seem to focus on the task of overriding templates provided by Drupal core.  &lt;/p&gt;
&lt;p&gt;As an example, blocks in Drupal are handled by block.module, and the block module provides a default template called block.tpl.php.  To change the way all blocks look on your site, you can override block.tpl.php inside of your theme by copying and pasting the file into your theme's directory.  Alternatively, you can override the block module's template file using a function called {my_module}_block().  No matter how you slice it, the same data will be sent to function or theme that rises to the top of the theme() hierarchy.  Google around for "drupal theme suggestions" for more info on this topic, which is covered fairly well by existing documentation and blog posts.&lt;/p&gt;
&lt;p&gt;So what if you have a module called &lt;i&gt;custom&lt;/i&gt; and all you want is for mysite.com/custom to display a new file of your creation, custom.tpl.php?  &lt;/p&gt;
&lt;p&gt;Yes, use theme().  Here's what &lt;a href="http://api.drupal.org/api/drupal/includes--theme.inc/function/theme/7"&gt;the documentation says&lt;/a&gt;, which I find misleading (but read it anyway, it's important and relevant):&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;All requests for themed output must go through this function. It examines the request and routes it to the appropriate theme function or template, by checking the theme registry.&lt;/p&gt;
&lt;p&gt;The first argument to this function is the name of the theme hook. For instance, to theme a table, the theme hook name is 'table'. By default, this theme hook could be implemented by a function called 'theme_table' or a template file called 'table.tpl.php', but hook_theme() can override the default function or template name.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;Why do I find it misleading?  Because calling theme('custom') will not load theme('custom.tpl.php') &lt;b&gt;unless the hook "custom" has been registered in the theme registry&lt;/b&gt;.  The theme() documentation doesn't emphasize that or explain how it's done.  &lt;/p&gt;
&lt;p&gt;The registry is a performance necessity.  Drupal's hook-heavy architecture means it needs to scan an indefinite amount of extensions (modules + themes) to look for implementations of hooks, template files, etc.  This info is stored in a registry to avoid expensive I/O per page load.  For Drupal to recognize a new implementation, you need to clear your Drupal cache and update the registry.  &lt;/p&gt;
&lt;p&gt;Back to the original problem: a custom template is loaded for a particular path using these steps.  From a high level:&lt;/p&gt;
&lt;ul&gt;&lt;li&gt;Implement hook_menu() in your custom module so a system path (eg: somedomain.com/somepath) is tied to a function of your choosing.&lt;/li&gt;
&lt;li&gt;Choose theme().  The string 'theme" is the value for the key "page callback", and the "page argument" is the name of a custom theme hook.  For more info on page callback and page argument, see the &lt;a href="http://api.drupal.org/api/drupal/modules--system--system.api.php/function/hook_menu/7"&gt;hook_menu()&lt;/a&gt; docs.&lt;/li&gt;
&lt;li&gt;Register both your theme hook and its template in the theme registry by implementing &lt;a href="http://api.drupal.org/api/drupal/modules--system--system.api.php/function/hook_theme/7"&gt;hook_theme()&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;&lt;p&gt;Once it's put into code, it's pretty simple, but it's very drupaly idiosyncratic / not obvious / hard to parse by just reading the docs.  Here's a real example.  My module is called fusiontap.  (Whatever.)  &lt;/p&gt;
&lt;div class="geshifilter"&gt;
&lt;pre class="geshifilter-php"&gt;&lt;span style="color: #808080; font-style: italic;"&gt;/**
 * Implements hook_menu().
 */&lt;/span&gt;
&lt;span style="color: #000000; font-weight: bold;"&gt;function&lt;/span&gt; fusiontap_menu&lt;span style="color: #66cc66;"&gt;(&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;)&lt;/span&gt; &lt;span style="color: #66cc66;"&gt;{&lt;/span&gt;
  &lt;span style="color: #0000ff;"&gt;$items&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;[&lt;/span&gt;&lt;span style="color: #ff0000;"&gt;'aquariumtap/test'&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;]&lt;/span&gt; = &lt;a href="http://www.php.net/array"&gt;&lt;span style="color: #000066;"&gt;array&lt;/span&gt;&lt;/a&gt;&lt;span style="color: #66cc66;"&gt;(&lt;/span&gt;
    &lt;span style="color: #ff0000;"&gt;'title'&lt;/span&gt; =&amp;gt; &lt;span style="color: #ff0000;"&gt;'Sample Title'&lt;/span&gt;,
    &lt;span style="color: #ff0000;"&gt;'page callback'&lt;/span&gt; =&amp;gt; &lt;span style="color: #ff0000;"&gt;'theme'&lt;/span&gt;,
    &lt;span style="color: #ff0000;"&gt;'page arguments'&lt;/span&gt; =&amp;gt; &lt;a href="http://www.php.net/array"&gt;&lt;span style="color: #000066;"&gt;array&lt;/span&gt;&lt;/a&gt;&lt;span style="color: #66cc66;"&gt;(&lt;/span&gt;&lt;span style="color: #ff0000;"&gt;'sample_template'&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;)&lt;/span&gt;,
    &lt;span style="color: #ff0000;"&gt;'access arguments'&lt;/span&gt; =&amp;gt; &lt;a href="http://www.php.net/array"&gt;&lt;span style="color: #000066;"&gt;array&lt;/span&gt;&lt;/a&gt;&lt;span style="color: #66cc66;"&gt;(&lt;/span&gt;&lt;span style="color: #ff0000;"&gt;'access content'&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;)&lt;/span&gt;,
    &lt;span style="color: #ff0000;"&gt;'type'&lt;/span&gt; =&amp;gt; MENU_NORMAL_ITEM,
  &lt;span style="color: #66cc66;"&gt;)&lt;/span&gt;;
  &lt;span style="color: #b1b100;"&gt;return&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;$items&lt;/span&gt;;
&lt;span style="color: #66cc66;"&gt;}&lt;/span&gt;
 
&lt;span style="color: #000000; font-weight: bold;"&gt;function&lt;/span&gt; fusiontap_theme&lt;span style="color: #66cc66;"&gt;(&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;$existing&lt;/span&gt;, &lt;span style="color: #0000ff;"&gt;$type&lt;/span&gt;, &lt;span style="color: #0000ff;"&gt;$theme&lt;/span&gt;, &lt;span style="color: #0000ff;"&gt;$path&lt;/span&gt;&lt;span style="color: #66cc66;"&gt;)&lt;/span&gt; &lt;span style="color: #66cc66;"&gt;{&lt;/span&gt;
  &lt;span style="color: #b1b100;"&gt;return&lt;/span&gt; &lt;a href="http://www.php.net/array"&gt;&lt;span style="color: #000066;"&gt;array&lt;/span&gt;&lt;/a&gt;&lt;span style="color: #66cc66;"&gt;(&lt;/span&gt;
    &lt;span style="color: #ff0000;"&gt;'sample_template'&lt;/span&gt; =&amp;gt; &lt;a href="http://www.php.net/array"&gt;&lt;span style="color: #000066;"&gt;array&lt;/span&gt;&lt;/a&gt;&lt;span style="color: #66cc66;"&gt;(&lt;/span&gt;
      &lt;span style="color: #ff0000;"&gt;'template'&lt;/span&gt; =&amp;gt; &lt;span style="color: #ff0000;"&gt;'my_template'&lt;/span&gt;,
    &lt;span style="color: #66cc66;"&gt;)&lt;/span&gt;,
  &lt;span style="color: #66cc66;"&gt;)&lt;/span&gt;;
&lt;span style="color: #66cc66;"&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;The function fusiontap_theme() registers the theme hook "sample_template" into the registry.  Additionally, it tells Drupal to look for a template called "my_template".  Once the search happens, the extension will automatically be added based on the loaded template engine -- by default, that'll be .tpl.php, which is used by PHPTemplate.&lt;/p&gt;
&lt;p&gt;Next, make sure the file my_template.tpl.php exists in the same directory as your module.  It doesn't have to be exactly there, but you can get creative with file structure on your own time.  ;)  &lt;/p&gt;
&lt;p&gt;Finally, make sure to clear your Drupal cache to register your new functions and template file into the registry.  Voilà.&lt;/p&gt;
&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="field field-name-field-tags field-type-taxonomy-term-reference field-label-above"&gt;&lt;div class="field-label"&gt;Tags:&amp;nbsp;&lt;/div&gt;&lt;div class="field-items"&gt;&lt;div class="field-item even" rel="dc:subject"&gt;&lt;a href="/tags/how" typeof="skos:Concept" property="rdfs:label skos:prefLabel"&gt;how-to&lt;/a&gt;&lt;/div&gt;&lt;div class="field-item odd" rel="dc:subject"&gt;&lt;a href="/tags/templates" typeof="skos:Concept" property="rdfs:label skos:prefLabel"&gt;templates&lt;/a&gt;&lt;/div&gt;&lt;div class="field-item even" rel="dc:subject"&gt;&lt;a href="/tags/hookmenu" typeof="skos:Concept" property="rdfs:label skos:prefLabel"&gt;hook_menu&lt;/a&gt;&lt;/div&gt;&lt;div class="field-item odd" rel="dc:subject"&gt;&lt;a href="/tags/theme" typeof="skos:Concept" property="rdfs:label skos:prefLabel"&gt;theme&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/aquariumtap/~4/0lUIOlEXPpE" height="1" width="1"/&gt;</description>
 <pubDate>Tue, 30 Aug 2011 23:49:19 +0000</pubDate>
 <dc:creator>aquariumtap</dc:creator>
 <guid isPermaLink="false">8 at http://aquariumtap.com</guid>
<feedburner:origLink>http://aquariumtap.com/blog/output-custom-html-drupal-7</feedburner:origLink></item>
<item>
 <title>Three tips to speed up OS X Lion</title>
 <link>http://feedproxy.google.com/~r/aquariumtap/~3/WdUc_cWEsks/improve-osx-lion-performance</link>
 <description>&lt;div class="field field-name-body field-type-text-with-summary field-label-hidden"&gt;&lt;div class="field-items"&gt;&lt;div class="field-item even" property="content:encoded"&gt;&lt;p&gt;There's an understandable performance hit immediately after the OS X Lion upgrade: Spotlight is reindexing the hard drive.  But several days later I was still running up against mediocre to poor performance, and I had to take a few extra steps to make my Mid 2010 MacBook Pro snappy again.  Here are some tips.&lt;/p&gt;
&lt;ol&gt;&lt;li&gt;&lt;b&gt;Upgrade your hard drive to 7200RPM.&lt;/b&gt;  I'm not 100% certain that Lion is heavier on I/O than Snow Leopard, but I suspect it is.  The performance improvement after my upgrade was dramatic!  Launch times for certain applications went from 30 seconds to 5 seconds.  Searching through Mail is hugely improved.  Spotlight no longer staggers.  System startup time was cut in half.  I chose this particular hard drive, which includes 4 GB of solid state memory: &lt;a href="http://www.amazon.com/gp/product/B003NSBF32/ref=as_li_tf_tl?ie=UTF8&amp;amp;tag=aquariumtap-20&amp;amp;linkCode=as2&amp;amp;camp=217145&amp;amp;creative=399381&amp;amp;creativeASIN=B003NSBF32"&gt;Seagate Momentus XT 500 GB 7200RPM SATA 2.5 Inch Solid State Hybrid Drive&lt;/a&gt;&lt;img src="http://www.assoc-amazon.com/e/ir?t=aquariumtap-20&amp;amp;l=as2&amp;amp;o=1&amp;amp;a=B003NSBF32&amp;amp;camp=217145&amp;amp;creative=399381" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" /&gt;  The most frequently used files will be stored in solid state, so subsequent application loads will improve over time.  Very cool.&lt;/li&gt;
&lt;li&gt;&lt;b&gt;Clear your OSX cache.&lt;/b&gt;  This is done by starting up your computer while holding the left shift key, letting it boot up completely, then restarting it normally (without holding the shift key).  This improved performance for me, and also corrected a major issue I had with Finder locking up or displaying files incorrectly.&lt;/li&gt;
&lt;li&gt;&lt;b&gt;Chrome + MAMP + domains that end in ".local" are problematic.&lt;/b&gt;  It felt like a DNS issue, so I renamed my virtual hosts from &lt;i&gt;websitename&lt;/i&gt;.local to &lt;i&gt;websitename&lt;/i&gt;.dev.  The speed increase was substantial.&lt;/li&gt;
&lt;/ol&gt;&lt;p&gt;As an aside, the DigitalColor Meter in Lion no longer displays hex values.  I've replaced it with the $5 ColorSnapper application, which is well worth the money.  I find myself using it all the time.  &lt;/p&gt;
&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="field field-name-field-tags field-type-taxonomy-term-reference field-label-above"&gt;&lt;div class="field-label"&gt;Tags:&amp;nbsp;&lt;/div&gt;&lt;div class="field-items"&gt;&lt;div class="field-item even" rel="dc:subject"&gt;&lt;a href="/tags/lion" typeof="skos:Concept" property="rdfs:label skos:prefLabel"&gt;lion&lt;/a&gt;&lt;/div&gt;&lt;div class="field-item odd" rel="dc:subject"&gt;&lt;a href="/tags/performance" typeof="skos:Concept" property="rdfs:label skos:prefLabel"&gt;performance&lt;/a&gt;&lt;/div&gt;&lt;div class="field-item even" rel="dc:subject"&gt;&lt;a href="/tags/tips" typeof="skos:Concept" property="rdfs:label skos:prefLabel"&gt;tips&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/aquariumtap/~4/WdUc_cWEsks" height="1" width="1"/&gt;</description>
 <pubDate>Fri, 05 Aug 2011 16:08:35 +0000</pubDate>
 <dc:creator>aquariumtap</dc:creator>
 <guid isPermaLink="false">7 at http://aquariumtap.com</guid>
<feedburner:origLink>http://aquariumtap.com/blogs/improve-osx-lion-performance</feedburner:origLink></item>
<item>
 <title>How to change your content every X hours in Drupal</title>
 <link>http://feedproxy.google.com/~r/aquariumtap/~3/qrw10J-Hp-s/how-to-rotate-content</link>
 <description>&lt;div class="field field-name-field-image field-type-image field-label-hidden"&gt;&lt;div class="field-items"&gt;&lt;div class="field-item even" rel="og:image rdfs:seeAlso" resource="http://aquariumtap.com/sites/default/files/styles/full-node-top/public/field/image/views-time-based-cache_0.png"&gt;&lt;img typeof="foaf:Image" src="http://aquariumtap.com/sites/default/files/styles/full-node-top/public/field/image/views-time-based-cache_0.png" width="277" height="398" alt="" /&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="field field-name-body field-type-text-with-summary field-label-hidden"&gt;&lt;div class="field-items"&gt;&lt;div class="field-item even" property="content:encoded"&gt;&lt;p&gt;Scenario: you have a list of three featured articles on your front page.  You'd like to shuffle them every x hours.  Here are a couple of configuration strategies:&lt;/p&gt;
&lt;h3&gt;Random sort order + time based cache&lt;/h3&gt;
&lt;p&gt;&lt;img src="/sites/default/files/field/image/views-time-based-cache_0.png" /&gt;&lt;/p&gt;
&lt;p&gt;If your content is generated using Views, time-based caching will store the results of your query until it expires after a set interval of time.  Combine that with "Global: Randomize", and you have a View that randomizes each time the cache is cleared, but not with every page refresh.&lt;/p&gt;
&lt;h3&gt;Nodequeue + Nodequeue Randomizer&lt;/h3&gt;
&lt;p&gt;If you'd like to hand-pick the pool from which your three featured articles are drawn, the &lt;a href="http://drupal.org/project/nodequeue"&gt;nodequeue module&lt;/a&gt; allows creation of arbitrary list of nodes that can be weighted manually.  Views can use the content and weights from a nodequeue to pull your three featured articles.  To set up shuffling, install the &lt;a href="http://drupal.org/project/nodequeue_randomizer"&gt;Nodequeue Randomizer&lt;/a&gt; module.  It randomizes the weights of your nodequeue at set intervals.&lt;/p&gt;
&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="field field-name-field-tags field-type-taxonomy-term-reference field-label-above"&gt;&lt;div class="field-label"&gt;Tags:&amp;nbsp;&lt;/div&gt;&lt;div class="field-items"&gt;&lt;div class="field-item even" rel="dc:subject"&gt;&lt;a href="/tags/drupal-6" typeof="skos:Concept" property="rdfs:label skos:prefLabel"&gt;drupal 6&lt;/a&gt;&lt;/div&gt;&lt;div class="field-item odd" rel="dc:subject"&gt;&lt;a href="/tags/drupal-7" typeof="skos:Concept" property="rdfs:label skos:prefLabel"&gt;drupal 7&lt;/a&gt;&lt;/div&gt;&lt;div class="field-item even" rel="dc:subject"&gt;&lt;a href="/tags/views" typeof="skos:Concept" property="rdfs:label skos:prefLabel"&gt;views&lt;/a&gt;&lt;/div&gt;&lt;div class="field-item odd" rel="dc:subject"&gt;&lt;a href="/tags/cache" typeof="skos:Concept" property="rdfs:label skos:prefLabel"&gt;cache&lt;/a&gt;&lt;/div&gt;&lt;div class="field-item even" rel="dc:subject"&gt;&lt;a href="/tags/nodequeue" typeof="skos:Concept" property="rdfs:label skos:prefLabel"&gt;nodequeue&lt;/a&gt;&lt;/div&gt;&lt;div class="field-item odd" rel="dc:subject"&gt;&lt;a href="/tags/how" typeof="skos:Concept" property="rdfs:label skos:prefLabel"&gt;how-to&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/aquariumtap/~4/qrw10J-Hp-s" height="1" width="1"/&gt;</description>
 <pubDate>Tue, 14 Jun 2011 14:13:00 +0000</pubDate>
 <dc:creator>aquariumtap</dc:creator>
 <guid isPermaLink="false">6 at http://aquariumtap.com</guid>
<feedburner:origLink>http://aquariumtap.com/blog/drupal/how-to-rotate-content</feedburner:origLink></item>
<item>
 <title>How to share templates between Drupal Views</title>
 <link>http://feedproxy.google.com/~r/aquariumtap/~3/bVYTJnH4it4/how-share-templates-between-drupal-views</link>
 <description>&lt;div class="field field-name-field-image field-type-image field-label-hidden"&gt;&lt;div class="field-items"&gt;&lt;div class="field-item even" rel="og:image rdfs:seeAlso" resource="http://aquariumtap.com/sites/default/files/styles/full-node-top/public/field/image/Screen%20shot%202011-06-13%20at%2011.35.41%20AM.png"&gt;&lt;img typeof="foaf:Image" src="http://aquariumtap.com/sites/default/files/styles/full-node-top/public/field/image/Screen%20shot%202011-06-13%20at%2011.35.41%20AM.png" width="128" height="173" alt="Creating a new views display" /&gt;&lt;/div&gt;&lt;div class="field-item odd" rel="og:image rdfs:seeAlso" resource="http://aquariumtap.com/sites/default/files/styles/full-node-top/public/field/image/drupal-views-tag.png"&gt;&lt;img typeof="foaf:Image" src="http://aquariumtap.com/sites/default/files/styles/full-node-top/public/field/image/drupal-views-tag.png" width="457" height="53" alt="" /&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="field field-name-body field-type-text-with-summary field-label-hidden"&gt;&lt;div class="field-items"&gt;&lt;div class="field-item even" property="content:encoded"&gt;&lt;h3&gt;Two separate Views with the same front end&lt;/h3&gt;
&lt;p&gt;Scenario: you're running a gaming blog.  In the sidebar you have a block generated by Views that lists the 5 most popular games.  It looks perfect because you've custom templated the hell out of it using the template suggestions listed under "Theming Information".  For example, this is the list of templates available for the style output:&lt;/p&gt;
&lt;pre&gt;views-view-unformatted.tpl.php, 
&lt;b&gt;views-view-unformatted--featured-games.tpl.php&lt;/b&gt;,  
views-view-unformatted--fringe.tpl.php, 
views-view-unformatted--default.tpl.php, 
views-view-unformatted--featured-games--default.tpl.php&lt;/pre&gt;&lt;p&gt;The template in bold is the one in use.&lt;/p&gt;
&lt;p&gt;One frisky fall morning you decide to create a new section of your gaming blog called "Fringe Games".  You no longer want to display the five most popular games; instead you want a random selection, but the front end should look exactly the same as the other block.&lt;/p&gt;
&lt;p&gt;You follow your instincts and clone the View, change the sort order, and hope to call it a day.  But the front end doesn't look the same anymore because your custom templates refer to the machine name of the original view.&lt;/p&gt;
&lt;pre&gt;&lt;b&gt;views-view-unformatted.tpl.php&lt;/b&gt;, 
views-view-unformatted--featured-games-fringe.tpl.php, 
views-view-unformatted--news.tpl.php, 
views-view-unformatted--default.tpl.php, 
views-view-unformatted--featured-games-fringe--default.tpl.php&lt;/pre&gt;&lt;p&gt;You want to use views-view-unformatted--featured-games.tpl.php, but that's not an option.  Now what?&lt;/p&gt;
&lt;h3&gt;Sharing templates between Views using Displays&lt;/h3&gt;
&lt;p&gt;The best option is to create a new Display on the original View instead of cloning.  For something as minor as a fork in sort order, a new View is not necessary.&lt;/p&gt;
&lt;div&gt;&lt;img src="/sites/default/files/field/image/Screen%20shot%202011-06-13%20at%2011.35.41%20AM.png" /&gt;&lt;/div&gt;
&lt;p&gt;Your new Display will have the same template suggestions as the original Display, but you can override some parts of the query such as the filter or sort order.&lt;/p&gt;
&lt;h3&gt;Sharing templates between Views using Tags&lt;/h3&gt;
&lt;p&gt;&lt;img src="/sites/default/files/field/image/drupal-views-tag.png" title="Influence the Drupal views template suggestions using views" /&gt;&lt;/p&gt;
&lt;p&gt;If your Views are so different that overriding is too cumbersome or counter-productive, you can tag the two separate Views with the same keyword, and that'll give them an overlapping template suggestion.  In the suggestion list below, views-view-unformatted--fringe.tpl.php is based on the View's tag.&lt;/p&gt;
&lt;pre&gt;views-view-unformatted.tpl.php,
views-view-unformatted--featured-games.tpl.php, 
&lt;b&gt;views-view-unformatted--fringe.tpl.php,&lt;/b&gt;
views-view-unformatted--default.tpl.php, 
views-view-unformatted--featured-games--default.tpl.php&lt;/pre&gt;&lt;p&gt;Many thanks to Lynette Miles for the tip about templates and tags!  I highly recommend the book she and merlinofchaos wrote together, &lt;a href="http://drupal-building-blocks.com/"&gt;Drupal Building Blocks&lt;/a&gt;&lt;/p&gt;
&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="field field-name-field-tags field-type-taxonomy-term-reference field-label-above"&gt;&lt;div class="field-label"&gt;Tags:&amp;nbsp;&lt;/div&gt;&lt;div class="field-items"&gt;&lt;div class="field-item even" rel="dc:subject"&gt;&lt;a href="/tags/drupal-6" typeof="skos:Concept" property="rdfs:label skos:prefLabel"&gt;drupal 6&lt;/a&gt;&lt;/div&gt;&lt;div class="field-item odd" rel="dc:subject"&gt;&lt;a href="/tags/templates" typeof="skos:Concept" property="rdfs:label skos:prefLabel"&gt;templates&lt;/a&gt;&lt;/div&gt;&lt;div class="field-item even" rel="dc:subject"&gt;&lt;a href="/tags/views" typeof="skos:Concept" property="rdfs:label skos:prefLabel"&gt;views&lt;/a&gt;&lt;/div&gt;&lt;div class="field-item odd" rel="dc:subject"&gt;&lt;a href="/tags/how" typeof="skos:Concept" property="rdfs:label skos:prefLabel"&gt;how-to&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/aquariumtap/~4/bVYTJnH4it4" height="1" width="1"/&gt;</description>
 <pubDate>Mon, 13 Jun 2011 14:37:02 +0000</pubDate>
 <dc:creator>aquariumtap</dc:creator>
 <guid isPermaLink="false">5 at http://aquariumtap.com</guid>
<feedburner:origLink>http://aquariumtap.com/blog/how-share-templates-between-drupal-views</feedburner:origLink></item>
<item>
 <title>Mongo DB for Drupal 7 is an option for write-heavy sites</title>
 <link>http://feedproxy.google.com/~r/aquariumtap/~3/ZP8ftK7TzuA/mongo-db-drupal</link>
 <description>&lt;div class="field field-name-body field-type-text-with-summary field-label-hidden"&gt;&lt;div class="field-items"&gt;&lt;div class="field-item even" property="content:encoded"&gt;&lt;p&gt;MySQL replication can only support a single write database, and its speed is comparably slow.  It's not always the right fit, particularly if transactions are not required.&lt;/p&gt;
&lt;p&gt;Mongo DB is a document object store and alternative to a relational database system such as MySQL or PostgreSQL.  Some heavy-hitters in the Drupal community have invested time into the &lt;a href="http://drupal.org/project/mongodb"&gt;mongodb module&lt;/a&gt;, which is the product of migrating examiner.com from Cold Fusion to D7.  Examiner is an extremely high traffic site with about 25 page hits per second.  Its social features are too important and disseminated throughout the site to leverage a reverse-proxy cache layers like Varnish, which is the optimal solution for many sites receiving anonymous (read-only) traffic.&lt;/p&gt;
&lt;p&gt;The Mongo DB a partial replacement for RDMS in the areas of Drupal where it makes sense: fields, blocks, cache, session and the watchdog.&lt;/p&gt;
&lt;p&gt;The performance gain can be substantial.  Speaking only about Mongo as an data engine for Fields, Moshe Weitzman reported a &lt;a href="http://cyrve.com/mongodb"&gt;5x increase in write performance&lt;/a&gt; during informal benchmarks on his laptop.  In combination with a smoother &lt;a href="http://www.mongodb.org/display/DOCS/Sharding"&gt;process for sharding&lt;/a&gt;, I imagine Mongo DB will become a viable option for community-driven and write-intensive sites where page caching is not an option.&lt;/p&gt;
&lt;p&gt;There's a D6 version, but it's less supported.&lt;/p&gt;
&lt;h3&gt;Hilarious media:&lt;/h3&gt;
&lt;object style="height: 390px; width: 640px"&gt;&lt;param name="movie" value="http://www.youtube.com/v/b2F-DItXtZs?version=3" /&gt;&lt;param name="allowFullScreen" value="true" /&gt;&lt;param name="allowScriptAccess" value="always" /&gt;&lt;embed src="http://www.youtube.com/v/b2F-DItXtZs?version=3" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="640" height="390"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;h3&gt;Useful media:&lt;/h3&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href="http://www.archive.org/details/drupalconchi_day3_practical_mongo_db?start=53.5"&gt;Doug Green and chx at DrupalCon Chicago, March 2011&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.lullabot.com/podcasts/drupal-voices-136-karoly-negyesi-on-mongodb-and-nosql-databases"&gt;Chx podcast on MongoDB and NoSQL databases&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://sf2010.drupal.org/conference/sessions/mongodb-humongous-drupal"&gt;Chx presentation at DrupalCon SF, April 2010&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://group42.blip.tv/file/2677109/"&gt;Chx presentation, "A Mindset Change for Scalability"&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="field field-name-field-tags field-type-taxonomy-term-reference field-label-above"&gt;&lt;div class="field-label"&gt;Tags:&amp;nbsp;&lt;/div&gt;&lt;div class="field-items"&gt;&lt;div class="field-item even" rel="dc:subject"&gt;&lt;a href="/tags/mongo" typeof="skos:Concept" property="rdfs:label skos:prefLabel"&gt;mongo&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/aquariumtap/~4/ZP8ftK7TzuA" height="1" width="1"/&gt;</description>
 <pubDate>Mon, 16 May 2011 00:04:27 +0000</pubDate>
 <dc:creator>aquariumtap</dc:creator>
 <guid isPermaLink="false">4 at http://aquariumtap.com</guid>
<feedburner:origLink>http://aquariumtap.com/blog/mongo-db-drupal</feedburner:origLink></item>
<item>
 <title>Context module terminology</title>
 <link>http://feedproxy.google.com/~r/aquariumtap/~3/_Zcx88ON8sE/context-module-terminology</link>
 <description>&lt;div class="field field-name-body field-type-text-with-summary field-label-hidden"&gt;&lt;div class="field-items"&gt;&lt;div class="field-item even" property="content:encoded"&gt;&lt;p&gt;The Context module was initially an API without any user interface.  As it matured, the developers of the module (Development Seed) added a very nice UI component to configure Contexts.  In figuring out how to use the module, I found the terminology to be inconsistant and I wasn’t clear on how the UI and API related to one another.  Here are some of my notes.  If you see any errors, please correct me in the comments and I’ll update this.&lt;/p&gt;
&lt;h3&gt;Context terminology&lt;/h3&gt;
&lt;dl&gt;&lt;dt&gt;attribute (API)&lt;/dt&gt;
&lt;dd&gt;See &lt;em&gt;name&lt;/em&gt;.&lt;/dd&gt;
&lt;dt&gt;context (UI, API)&lt;/dt&gt;
&lt;dd&gt;This sometime refers to the &lt;em&gt;name&lt;/em&gt; field in the UI, which is called the &lt;em&gt;attribute&lt;/em&gt; in the API, and &lt;em&gt;key&lt;/em&gt; in the API.TXT.  Other times it refers to a configuration of &lt;em&gt;conditions&lt;/em&gt; and &lt;em&gt;reactions&lt;/em&gt;; for example, a &lt;em&gt;context&lt;/em&gt; has a &lt;em&gt;condition&lt;/em&gt; of being a “blog” content type, and has a &lt;em&gt;reaction&lt;/em&gt; of displaying a block.&lt;/dd&gt;
&lt;dt&gt;condition (UI, API)&lt;/dt&gt;
&lt;dd&gt;Conditions are toggled and configured through the UI, but there is an API to extend available conditions.  Instead of configuring conditions through the UI, it’s possible, for example, to call context_set() inside of a control statement inside your module’s implementation of hook_nodeapi.&lt;/dd&gt;
&lt;dt&gt;description (UI)&lt;/dt&gt;
&lt;dd&gt;No programmatic purpose.  It is analogous to a code comment.  It provides a field for notation about the &lt;em&gt;context&lt;/em&gt; in the UI.&lt;/dd&gt;
&lt;dt&gt;global context (Forums)&lt;/dt&gt;
&lt;dd&gt;I’ve seen people talk about a “global” context.  In the UI, this is referred to as a &lt;em&gt;sitewide context&lt;/em&gt;.  It’s a context with conditions that are always met (i.e., are sitewide, or global).&lt;/dd&gt;
&lt;dt&gt;name (UI)&lt;/dt&gt;
&lt;dd&gt;It is a unique string used as a key in the registry to index a &lt;em&gt;context&lt;/em&gt;.  Also known as &lt;em&gt;attribute&lt;/em&gt; or &lt;em&gt;key&lt;/em&gt;.&lt;/dd&gt;
&lt;dt&gt;namespace (API)&lt;/dt&gt;
&lt;dd&gt;A unique string, generally specific to your project, which is used to avoid name collisions with contrib modules.  The namespace of a &lt;em&gt;context&lt;/em&gt; created through the UI is always “context” (&lt;a href="http://drupal.org/node/723792#comment-3107394" target="_blank"&gt;source&lt;/a&gt;).&lt;/dd&gt;
&lt;dt&gt;reaction (UI, API)&lt;/dt&gt;
&lt;dd&gt;An event that is triggered by a set of&lt;em&gt;context conditions&lt;/em&gt;.&lt;/dd&gt;
&lt;dt&gt;sitewide context (UI)&lt;/dt&gt;
&lt;dd&gt;A &lt;em&gt;context&lt;/em&gt; with &lt;em&gt;conditions&lt;/em&gt; that are always met (i.e., are sitewide, or global).  It is created by selecting &lt;em&gt;sitewide context&lt;/em&gt; from the &lt;em&gt;conditions&lt;/em&gt; drop-down in the UI, and checking the checkbox.&lt;/dd&gt;
&lt;dt&gt;tag (UI)&lt;/dt&gt;
&lt;dd&gt;This is analogous to tags in the Views module.  Sites with large numbers of &lt;em&gt;contexts&lt;/em&gt; can group them together logically by tagging them.  They have no effect on &lt;em&gt;context&lt;/em&gt; behavior.&lt;/dd&gt;
&lt;dt&gt;value (API)&lt;/dt&gt;
&lt;dd&gt;This is only available through the API, and provides a valuable method of messaging between components in Drupal.  When setting a &lt;em&gt;context&lt;/em&gt; using context_set(), any valuable can be stored along with the context.  A common use-case is for a module to save the loaded node ID into a &lt;em&gt;context&lt;/em&gt;, which can later be retrieved by a block.&lt;/dd&gt;
&lt;/dl&gt;&lt;h3&gt;Additional reading:&lt;/h3&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href="http://drupal.org/node/723792" target="_blank"&gt;What is the “attribute name”?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://labs.treehouseagency.com/context-docs/"&gt;Class Hierarchy&lt;/a&gt; (doxygen docs by Treehouse Agency)&lt;/li&gt;
&lt;li&gt;&lt;a href="http://treehouseagency.com/blog/neil-hastings/2010/10/14/context-everywhere" target="_blank"&gt;Context Everywhere&lt;/a&gt; (by Treehouse Agency)&lt;/li&gt;
&lt;li&gt;&lt;a href="http://affinitybridge.com/blog/drupal-context-module-abridged" target="_blank"&gt;Context Module Abridged&lt;/a&gt; (by Affinity Bridge)&lt;/li&gt;
&lt;/ul&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/aquariumtap/~4/_Zcx88ON8sE" height="1" width="1"/&gt;</description>
 <pubDate>Sun, 15 May 2011 18:03:25 +0000</pubDate>
 <dc:creator>aquariumtap</dc:creator>
 <guid isPermaLink="false">2 at http://aquariumtap.com</guid>
<feedburner:origLink>http://aquariumtap.com/blog/context-module-terminology</feedburner:origLink></item>
</channel>
</rss>
