<?xml version="1.0" encoding="ISO-8859-1"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/atom10full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><feed xmlns="http://www.w3.org/2005/Atom" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0">
    <title>Tristan Media LLC Blog</title>
    <link rel="alternate" type="text/html" href="http://blog.tristanmedia.com/" />
    
    <id>tag:blog.tristanmedia.com,2008-06-26://11</id>
    <updated>2009-04-10T18:00:38Z</updated>
    <subtitle>One can never have enough scripting languages: Notes on Perl, PHP, Python, and Ruby</subtitle>
    <generator uri="http://www.sixapart.com/movabletype/">Movable Type Commercial 4.21-en</generator>

<link rel="self" href="http://feeds.feedburner.com/TristanMediaBlog" type="application/atom+xml" /><feedburner:emailServiceId>TristanMediaBlog</feedburner:emailServiceId><feedburner:feedburnerHostname>http://feedburner.google.com</feedburner:feedburnerHostname><entry>
    <title>Don't buy a Samsung monitor &amp; Tekserve rocks</title>
    <link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/TristanMediaBlog/~3/kiE7XDc8jiI/dont-buy-a-samsung-monitor.php" />
    <id>tag:blog.tristanmedia.com,2009://11.7542</id>

    <published>2009-04-10T16:55:53Z</published>
    <updated>2009-04-10T18:00:38Z</updated>

    <summary>The perils of buying a Samsung monitor are now evident. Feburary 6: bought a Samsung 2043BWX monitor from Tekserve Last week of February: monitor dies - no image whatsoever March 10: trying to meet deadlines, finally have time to submit...</summary>
    <author>
        <name />
        <uri>http://bloggy.com/</uri>
    </author>
    
        <category term="Hardware" scheme="http://www.sixapart.com/ns/types#category" />
    
    <category term="monitor" label="monitor" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="samsung" label="samsung" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="tekserve" label="tekserve" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://blog.tristanmedia.com/">
        &lt;p&gt;The perils of buying a Samsung monitor are now evident.&lt;/p&gt;



&lt;ul&gt;
&lt;li&gt;Feburary 6: bought a Samsung 2043BWX monitor from &lt;a href="http://tekserve.com/"&gt;Tekserve&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Last week of February: monitor dies - no image whatsoever&lt;/li&gt;
&lt;li&gt;March 10: trying to meet deadlines, finally have time to submit an exchange request to Samsung, giving a credit card so they can mail a replacement&lt;/li&gt;
&lt;li&gt;Next 4 weeks: status on Samsung site does change.  I call weekly, am told that it will ship out after 15 business days, and I should be patient.&lt;/li&gt;
&lt;li&gt;April 3: Told no monitor is available for an exchange, and I will be called back with options such as other monitors they could send.&lt;/li&gt;
&lt;li&gt;April 6: I call back after getting no call from Samsung service, am told the person who could authorize shipping me a different model has been out and they will call me the next day.&lt;/li&gt;
&lt;li&gt;April 8: I call again, and I'm told that shipping a replacement is impossible.  I will need to ship them my monitor and wait 5+ business days for it to be repaired.&lt;/li&gt;
&lt;/ul&gt;



&lt;p&gt;So, basically 4+ weeks of phone calls, and empty promises to call me back, to learn they're not going to replace a monitor that I could have shipped in had I been told to do so on March 10.  Since I bill hourly for my consulting work, I would have been better off just throwing away the monitor based on the time this has taken.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Update:&lt;/strong&gt; I sent an email to customer service at &lt;a href="http://tekserve.com/"&gt;Tekserve&lt;/a&gt; with a link to this blog post asking for help, and one of the owners(!) wrote back to say they'll replace it right away.&lt;/p&gt;
        
    &lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/TristanMediaBlog?a=kiE7XDc8jiI:fYOeYXj9jS4:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TristanMediaBlog?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TristanMediaBlog?a=kiE7XDc8jiI:fYOeYXj9jS4:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TristanMediaBlog?i=kiE7XDc8jiI:fYOeYXj9jS4:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TristanMediaBlog?a=kiE7XDc8jiI:fYOeYXj9jS4:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TristanMediaBlog?i=kiE7XDc8jiI:fYOeYXj9jS4:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/TristanMediaBlog/~4/kiE7XDc8jiI" height="1" width="1"/&gt;</content>
<feedburner:origLink>http://blog.tristanmedia.com/2009/04/dont-buy-a-samsung-monitor.php</feedburner:origLink></entry>

<entry>
    <title>Notes on mysql replication in Ubuntu hardy</title>
    <link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/TristanMediaBlog/~3/x6erpVWjcdk/notes-on-mysql-replication-in.php" />
    <id>tag:blog.tristanmedia.com,2008://11.7261</id>

    <published>2008-09-08T22:53:30Z</published>
    <updated>2008-09-08T23:17:17Z</updated>

    <summary>I'm moving some sites currently on shared hosting to Slicehost and setting up MySQL replication so I can run backups from the slave and push them to Amazon S3 storage on a regular basis using s3sync. This ONLamp article gives...</summary>
    <author>
        <name />
        <uri>http://bloggy.com/</uri>
    </author>
    
        <category term="Web Dev" scheme="http://www.sixapart.com/ns/types#category" />
    
    <category term="debian" label="debian" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="iptables" label="iptables" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="mysql" label="mysql" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="replication" label="replication" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="ubuntu" label="ubuntu" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://blog.tristanmedia.com/">
        &lt;p&gt;I'm moving some sites currently on shared hosting to &lt;a href="https://manage.slicehost.com/customers/new?referrer=a8284dea9d9b5be8497b288872559c4d"&gt;Slicehost&lt;/a&gt; and setting up MySQL replication so I can run backups from the slave and push them to Amazon S3 storage on a regular basis using &lt;a href="http://s3sync.net/wiki"&gt;s3sync&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;This &lt;span class="caps"&gt;ONL&lt;/span&gt;amp &lt;a href="http://www.onlamp.com/pub/a/onlamp/2005/06/16/MySQLian.html"&gt;article&lt;/a&gt; gives a handy step-by-step guide.  One thing that got me though, was that I had set up iptables to firewall my servers, and I needed to get my master and slave able to talk to each other without opening up MySQL to the whole world.  My solution was to email Slicehost and request private IP addresses for both servers.  I then changed this line in /etc/mysql/my.cnf from&lt;/p&gt;

&lt;blockquote&gt;&lt;p&gt;bind-address          = 127.0.0.1&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;to &lt;/p&gt;

&lt;blockquote&gt;&lt;p&gt;bind-address          = my private IP address&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;on each server.  Then I added this to my iptables rules on both:&lt;/p&gt;

&lt;blockquote&gt;&lt;p&gt;-A &lt;span class="caps"&gt;INPUT &lt;/span&gt;-p tcp -m tcp --dport 3306 -j &lt;span class="caps"&gt;ACCEPT&lt;/span&gt;&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;I reloaded the iptables rules with iptables-restore, and then checked with telnet from another server outside of those 2 to make sure I couldn't reach port 3306.&lt;/p&gt;

&lt;p&gt;The next problem I encountered was an error like this when I restarted the slave after copying over the data in the master to get started:&lt;/p&gt;

&lt;blockquote&gt;&lt;p&gt;error: 'Access denied for user 'debian-sys-maint'@'localhost' (using password: &lt;span class="caps"&gt;YES&lt;/span&gt;)'&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;A search of the Ubuntu forums gave me this &lt;a href="http://ubuntuforums.org/archive/index.php/t-112505.html"&gt;thread&lt;/a&gt; which explained that debian uses a file called /etc/mysql/debian.cnf for that user password, and when I moved things over from the master &lt;span class="caps"&gt;DB,&lt;/span&gt; I changed the password for that user.  The solution is to change to password in that file on the slave to the same password found on the master.&lt;/p&gt;
        
    &lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~f/TristanMediaBlog?a=0qIVFZd2"&gt;&lt;img src="http://feeds.feedburner.com/~f/TristanMediaBlog?d=41" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/TristanMediaBlog?a=praaK5cT"&gt;&lt;img src="http://feeds.feedburner.com/~f/TristanMediaBlog?i=praaK5cT" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/TristanMediaBlog?a=Fhx9HTX3"&gt;&lt;img src="http://feeds.feedburner.com/~f/TristanMediaBlog?i=Fhx9HTX3" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/TristanMediaBlog/~4/x6erpVWjcdk" height="1" width="1"/&gt;</content>
<feedburner:origLink>http://blog.tristanmedia.com/2008/09/notes-on-mysql-replication-in.php</feedburner:origLink></entry>

<entry>
    <title>Culture Pundits official launch</title>
    <link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/TristanMediaBlog/~3/d7tP6aUqo9Y/culture-pundits-official-launc.php" />
    <id>tag:blog.tristanmedia.com,2008://11.7259</id>

    <published>2008-09-08T16:58:44Z</published>
    <updated>2008-09-08T23:14:18Z</updated>

    <summary> We first set up the Culture Pundits website in August 2007, but now that we have reached a critical mass of websites, traffic, and advertisers, we have announced the official launch. Check out the press release....</summary>
    <author>
        <name />
        <uri>http://bloggy.com/</uri>
    </author>
    
        <category term="Web Biz" scheme="http://www.sixapart.com/ns/types#category" />
    
    <category term="advertising" label="advertising" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="culturepundits" label="culturepundits" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://blog.tristanmedia.com/">
        &lt;p&gt;&lt;img src="http://blog.tristanmedia.com/upload/2008/09/culture_pundits_official_launc/cp-logo.jpg" width="250" height="90" alt="cp-logo.jpg"/&gt;&lt;/p&gt;

&lt;p&gt;We first set up the &lt;a href="http://www.culturepundits.com/"&gt;Culture Pundits&lt;/a&gt; website in August 2007, but now that we have reached a critical mass of websites, traffic, and advertisers, we have announced the official launch.&lt;/p&gt;

&lt;p&gt;Check out the &lt;a href="http://www.culturepundits.com/pr/official_launch_20080908"&gt;press release&lt;/a&gt;.&lt;/p&gt;
        
    &lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~f/TristanMediaBlog?a=Swgh8uJV"&gt;&lt;img src="http://feeds.feedburner.com/~f/TristanMediaBlog?d=41" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/TristanMediaBlog?a=8oggA3jO"&gt;&lt;img src="http://feeds.feedburner.com/~f/TristanMediaBlog?i=8oggA3jO" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/TristanMediaBlog?a=oGZR3rYl"&gt;&lt;img src="http://feeds.feedburner.com/~f/TristanMediaBlog?i=oGZR3rYl" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/TristanMediaBlog/~4/d7tP6aUqo9Y" height="1" width="1"/&gt;</content>
<feedburner:origLink>http://blog.tristanmedia.com/2008/09/culture-pundits-official-launc.php</feedburner:origLink></entry>

<entry>
    <title>Custom Drupal Modules - creating filters for Views</title>
    <link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/TristanMediaBlog/~3/9AhKVsqyopw/custom-drupal-modules-creating.php" />
    <id>tag:blog.tristanmedia.com,2008://11.7174</id>

    <published>2008-07-03T19:40:45Z</published>
    <updated>2008-07-05T04:14:33Z</updated>

    <summary>Continuing my exploration of custom modules and views, here is my code for allowing view builders to filter entries based on a status field, say "special offers" that is represented in our module's database table by an integer with 1...</summary>
    <author>
        <name />
        <uri>http://bloggy.com/</uri>
    </author>
    
        <category term="Drupal5" scheme="http://www.sixapart.com/ns/types#category" />
    
    <category term="customdrupalmodules" label="custom drupal modules" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="drupalviews" label="drupal views" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://blog.tristanmedia.com/">
        &lt;p&gt;Continuing my exploration of custom modules and views, here is my code for allowing view builders to filter entries based on a status field, say "special offers" that is represented in our module's database table by an integer with 1 for true or 0 for false.&lt;/p&gt;

&lt;p&gt;Add this key to your array entry for a table, at the same level as the 'join' key.  See my &lt;a href="http://blog.tristanmedia.com/2008/06/custom-drupal-modules-and-view.php"&gt;earlier post&lt;/a&gt; for how the rest of the array works.&lt;/p&gt;

&lt;p&gt;In this case, the database column is called "is_special_offer."  The keys you should supply are discussed &lt;a href="http://drupal.org/node/99794"&gt;here&lt;/a&gt; in the Views handbook.&lt;/p&gt;



&lt;pre&gt;
'filters' =&amp;gt; array(
  'is_special_offer' =&amp;gt; array(
     'name' =&amp;gt; 'Product: Is Special Offer',
     'operator' =&amp;gt; 'views_handler_operator_eqneq',
     'list' =&amp;gt; 'views_handler_operator_yesno',
     'list-type' =&amp;gt; 'select',
     'help' =&amp;gt; t('Show only Special Offers'),
  )
)
&lt;/pre&gt;
        
    &lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~f/TristanMediaBlog?a=wNBjzM8l"&gt;&lt;img src="http://feeds.feedburner.com/~f/TristanMediaBlog?d=41" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/TristanMediaBlog?a=7Nd7mq7L"&gt;&lt;img src="http://feeds.feedburner.com/~f/TristanMediaBlog?i=7Nd7mq7L" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/TristanMediaBlog?a=lIe7795H"&gt;&lt;img src="http://feeds.feedburner.com/~f/TristanMediaBlog?i=lIe7795H" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/TristanMediaBlog/~4/9AhKVsqyopw" height="1" width="1"/&gt;</content>
<feedburner:origLink>http://blog.tristanmedia.com/2008/07/custom-drupal-modules-creating.php</feedburner:origLink></entry>

<entry>
    <title>Blueprint CSS framework</title>
    <link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/TristanMediaBlog/~3/IU2DHqcii8I/blueprint-css-framework.php" />
    <id>tag:blog.tristanmedia.com,2008://11.7163</id>

    <published>2008-06-29T01:45:27Z</published>
    <updated>2008-06-29T17:27:24Z</updated>

    <summary>All hail the power of Blueprint. All of my new projects use it as the base for setting up the design. We used it as the basis for the redesign of ArtCal done in cooperation with Subsidiary Design. It's the...</summary>
    <author>
        <name />
        <uri>http://bloggy.com/</uri>
    </author>
    
        <category term="Web Design" scheme="http://www.sixapart.com/ns/types#category" />
    
    <category term="ajax" label="ajax" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="blueprint" label="blueprint" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="css" label="css" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="feeds" label="feeds" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="googleapi" label="google api" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://blog.tristanmedia.com/">
        &lt;p&gt;All hail the power of &lt;a href="http://code.google.com/p/blueprintcss/"&gt;Blueprint&lt;/a&gt;.  All of my new projects use it as the base for setting up the design.  We used it as the basis for the redesign of &lt;a href="http://www.artcal.net/"&gt;ArtCal&lt;/a&gt; done in cooperation with &lt;a href="http://www.subsidiarydesign.com/"&gt;Subsidiary Design&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;It's the easiest grid layout &lt;span class="caps"&gt;CSS&lt;/span&gt; I have ever used, and much more convenient than &lt;a href="http://developer.yahoo.com/yui/grids/"&gt;&lt;span class="caps"&gt;YUI&lt;/span&gt; Grids&lt;/a&gt;.  You also get the advantage of attractively designed fonts and sizes for all &lt;span class="caps"&gt;HTML &lt;/span&gt;elements including headers.&lt;/p&gt;

&lt;p&gt;In anticipation of a big press release distribution announcing the official launch of &lt;a href="http://www.culturepundits.com/"&gt;Culture Pundits&lt;/a&gt;, I redesigned my &lt;a href="http://www.tristanmedia.com/"&gt;Tristan Media &lt;span class="caps"&gt;LLC&lt;/span&gt;&lt;/a&gt; homepage using Blueprint, adding blocks for my three main projects.  I'm using &lt;span class="caps"&gt;PHP &lt;/span&gt;with a &lt;a href="http://www.json.org/"&gt;&lt;span class="caps"&gt;JSON&lt;/span&gt;&lt;/a&gt; feed to rotate the featured &lt;a href="http://www.artcat.com/"&gt;ArtCat&lt;/a&gt; artist on every page load.  I'm using the &lt;a href="http://code.google.com/apis/ajaxfeeds/"&gt;Google &lt;span class="caps"&gt;AJAX&lt;/span&gt; Feed &lt;span class="caps"&gt;API&lt;/span&gt;&lt;/a&gt; to display recent items from &lt;span class="caps"&gt;RSS &lt;/span&gt;feeds.&lt;/p&gt;

&lt;p&gt;Subsidiary is also working on new artist and gallery templates for ArtCat, using Blueprint.&lt;/p&gt;
        
    &lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~f/TristanMediaBlog?a=owEfiz5E"&gt;&lt;img src="http://feeds.feedburner.com/~f/TristanMediaBlog?d=41" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/TristanMediaBlog?a=btyNgUF9"&gt;&lt;img src="http://feeds.feedburner.com/~f/TristanMediaBlog?i=btyNgUF9" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/TristanMediaBlog?a=S13Snjse"&gt;&lt;img src="http://feeds.feedburner.com/~f/TristanMediaBlog?i=S13Snjse" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/TristanMediaBlog/~4/IU2DHqcii8I" height="1" width="1"/&gt;</content>
<feedburner:origLink>http://blog.tristanmedia.com/2008/06/blueprint-css-framework.php</feedburner:origLink></entry>

<entry>
    <title>Be careful when buying a domain on Dotster</title>
    <link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/TristanMediaBlog/~3/l4tlsr7Vfyc/be-careful-when-buying-a-domai.php" />
    <id>tag:blog.tristanmedia.com,2008://11.7161</id>

    <published>2008-06-27T20:34:57Z</published>
    <updated>2008-06-29T01:05:47Z</updated>

    <summary>Yesterday, I used Dotster to buy a domain name for a new art gallery client. Their name is an Polynesian name shared with a certain beach in the Pacific, and has no hint of a porn connection, as far as...</summary>
    <author>
        <name />
        <uri>http://bloggy.com/</uri>
    </author>
    
        <category term="Web Biz" scheme="http://www.sixapart.com/ns/types#category" />
    
    <category term="dns" label="dns" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="dotster" label="dotster" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="porn" label="porn" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://blog.tristanmedia.com/">
        &lt;p&gt;Yesterday, I used &lt;a href="http://www.dotster.com/"&gt;Dotster&lt;/a&gt; to buy a domain name for a new art gallery client.  Their name is an Polynesian name shared with a certain beach in the Pacific, and has no hint of a porn connection, as far as I know.  This is a screen grab of what Dotster put up as a placeholder page.  I recommend &lt;a href="http://promote.pairnic.com/direct.pl?3919"&gt;pairNIC&lt;/a&gt; in the future.&lt;/p&gt;

&lt;p&gt;&lt;img src="http://bloggy.com/assets/2008/06/dotster-porn-placeholder.jpg" width="400" alt="dotster-porn-placeholder.jpg"/&gt;&lt;/p&gt;
        
    &lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~f/TristanMediaBlog?a=GqTt9TxH"&gt;&lt;img src="http://feeds.feedburner.com/~f/TristanMediaBlog?d=41" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/TristanMediaBlog?a=FPChXWsn"&gt;&lt;img src="http://feeds.feedburner.com/~f/TristanMediaBlog?i=FPChXWsn" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/TristanMediaBlog?a=WCPkgMtU"&gt;&lt;img src="http://feeds.feedburner.com/~f/TristanMediaBlog?i=WCPkgMtU" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/TristanMediaBlog/~4/l4tlsr7Vfyc" height="1" width="1"/&gt;</content>
<feedburner:origLink>http://blog.tristanmedia.com/2008/06/be-careful-when-buying-a-domai.php</feedburner:origLink></entry>

<entry>
    <title>Custom Drupal Modules and Views</title>
    <link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/TristanMediaBlog/~3/zgj2ymHRme4/custom-drupal-modules-and-view.php" />
    <id>tag:blog.tristanmedia.com,2008://11.7159</id>

    <published>2008-06-26T16:53:51Z</published>
    <updated>2008-07-03T18:18:32Z</updated>

    <summary>I'm working with a client on a Drupal site where another programmer has implemented several custom content types via a module, not CCK. I'm researching how to integrate this with the Views module, and found this useful information so far....</summary>
    <author>
        <name />
        <uri>http://bloggy.com/</uri>
    </author>
    
        <category term="Drupal5" scheme="http://www.sixapart.com/ns/types#category" />
    
    <category term="customdrupalmodules" label="custom drupal modules" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="drupalviews" label="drupal views" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://blog.tristanmedia.com/">
        &lt;p&gt;I'm working with a client on a Drupal site where another programmer has implemented  several custom content types via a module, not &lt;a href="http://drupal.org/project/cck"&gt;&lt;span class="caps"&gt;CCK&lt;/span&gt;&lt;/a&gt;.  I'm researching how to integrate this with the &lt;a href="http://drupal.org/project/views"&gt;Views&lt;/a&gt; module, and found this useful information so far.&lt;/p&gt;


&lt;ul&gt;
&lt;li&gt;&lt;a href="http://drupal.org/handbook/modules/views/api"&gt;http://drupal.org/handbook/modules/views/api&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://drupal.org/node/148456"&gt;http://drupal.org/node/148456&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;



&lt;p&gt;The hook of note seems to be hook_views_tables to get the view editing interface to know about the columns in our custom table.&lt;/p&gt;

&lt;p&gt;Here is the start of a function to return the information to the Views module.  In this example we use product_id as the primary key of our table, which is the same as the node's nid.  This only exposes the name of the product to the view, but more columns and tables will be added later.&lt;/p&gt;



&lt;pre&gt;
// hook to tell views about our tables
function mymodule_views_tables() {
 $tables['mymodule_product'] = array(
   'name' =&amp;gt; 'mymodule_product',
   'join' =&amp;gt; array(
     'left' =&amp;gt; array(
       'table' =&amp;gt; 'node',
       'field' =&amp;gt; 'nid'
       ),
      'right' =&amp;gt; array(
        'field' =&amp;gt; 'product_id'
       )
     ),
     'fields' =&amp;gt; array(
       'name' =&amp;gt; array('name' =&amp;gt; t('Product: Name'),  
                       'sortable' =&amp;gt; TRUE),
     ),
   );

 return $tables;
}
&lt;/pre&gt;
        
    &lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~f/TristanMediaBlog?a=ZAUrh0CA"&gt;&lt;img src="http://feeds.feedburner.com/~f/TristanMediaBlog?d=41" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/TristanMediaBlog?a=2eN1fIZU"&gt;&lt;img src="http://feeds.feedburner.com/~f/TristanMediaBlog?i=2eN1fIZU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/TristanMediaBlog?a=nfvo6Xwe"&gt;&lt;img src="http://feeds.feedburner.com/~f/TristanMediaBlog?i=nfvo6Xwe" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/TristanMediaBlog/~4/zgj2ymHRme4" height="1" width="1"/&gt;</content>
<feedburner:origLink>http://blog.tristanmedia.com/2008/06/custom-drupal-modules-and-view.php</feedburner:origLink></entry>

</feed>
