<?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"
	>

<channel>
	<title>Graceful Exits &#187; software</title>
	<atom:link href="http://www.jpstacey.info/blog/category/software/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.jpstacey.info/blog</link>
	<description>Garbage collection, in a very real sense</description>
	<pubDate>Thu, 17 Jul 2008 19:08:52 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5.1</generator>
	<language>en</language>
			<item>
		<title>The Straight Edge minimalist Wordpress theme</title>
		<link>http://www.jpstacey.info/blog/2008/07/16/the-straight-edge-minimalist-wordpress-theme/</link>
		<comments>http://www.jpstacey.info/blog/2008/07/16/the-straight-edge-minimalist-wordpress-theme/#comments</comments>
		<pubDate>Wed, 16 Jul 2008 21:19:00 +0000</pubDate>
		<dc:creator>jps</dc:creator>
		
		<category><![CDATA[design]]></category>

		<category><![CDATA[projects]]></category>

		<category><![CDATA[software]]></category>

		<category><![CDATA[alpha]]></category>

		<category><![CDATA[download]]></category>

		<category><![CDATA[php]]></category>

		<category><![CDATA[straightedge]]></category>

		<category><![CDATA[theme]]></category>

		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.jpstacey.info/blog/?p=172</guid>
		<description><![CDATA[The Straight Edge theme is now available for download.]]></description>
			<content:encoded><![CDATA[<p><a href="/blog/2008/06/30/embracing-minimalism/" >As promised</a>, I&#8217;m releasing <a href="/blog/files/code/straightedge.tgz" >the Straight Edge theme</a> used on this blog under GPL2. </p>
<p>There&#8217;s a brief README.txt in the zipped archive linked above, but the theme&#8217;s main features are:</p>
<ul>
<li>XHTML compatible (in core theme files)</li>
<li>Minimal, semantic markup</li>
<li><em>No sidebar</em></li>
<li>Excerpts on archive and category pages</li>
<li>Implicit RSS feeds: the only orange icon is in your browser chrome</li>
<li>Adaptive top navigation</li>
<li>Separate pages for archives, categorisation and blogrolls</li>
<li>Next/previous rel links in header</li>
<li>Support for special pages e.g. blogroll, tag cloud</li>
</ul>
<p>The todo list includes:</p>
<ul>
<li>Implement my Blogthis! plugin, while trying to keep minimalist</li>
<li>Unobtrusive hiding of elements, using jQuery</li>
<li>Improve styling</li>
</ul>
<p>The theme is in a fairly alpha state. The PHP is fairly straightforward, apart from some neat theme functions, but don&#8217;t blame me if everything goes bang.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jpstacey.info/blog/2008/07/16/the-straight-edge-minimalist-wordpress-theme/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Hardy Heron and the Dell Precision M4300</title>
		<link>http://www.jpstacey.info/blog/2008/07/16/hardy-heron-and-the-dell-precision-m4300/</link>
		<comments>http://www.jpstacey.info/blog/2008/07/16/hardy-heron-and-the-dell-precision-m4300/#comments</comments>
		<pubDate>Wed, 16 Jul 2008 19:16:10 +0000</pubDate>
		<dc:creator>jps</dc:creator>
		
		<category><![CDATA[hardware]]></category>

		<category><![CDATA[projects]]></category>

		<category><![CDATA[quickies]]></category>

		<category><![CDATA[software]]></category>

		<category><![CDATA[alsa]]></category>

		<category><![CDATA[dell]]></category>

		<category><![CDATA[display]]></category>

		<category><![CDATA[hardy]]></category>

		<category><![CDATA[heron]]></category>

		<category><![CDATA[install]]></category>

		<category><![CDATA[laptop]]></category>

		<category><![CDATA[linux]]></category>

		<category><![CDATA[m4300]]></category>

		<category><![CDATA[nvidia]]></category>

		<category><![CDATA[precision]]></category>

		<category><![CDATA[sound]]></category>

		<category><![CDATA[ubuntu]]></category>

		<category><![CDATA[upgrade]]></category>

		<guid isPermaLink="false">http://www.jpstacey.info/blog/?p=184</guid>
		<description><![CDATA[Summary: it just works.]]></description>
			<content:encoded><![CDATA[<p>In brief: the problems discussed <a href="http://www.jpstacey.info/blog/2008/01/07/the-full-sensory-experience-of-linux-on-a-dell-m4300-sound-vision-and-tinfoil-hat-microwaves/" >here</a> and <a href="http://www.jpstacey.info/blog/2007/08/28/laptop-and-linux-the-fixes-for-a-dell-precision-m4300/" >here</a> go away under the most recent <a href="http://www.ubuntu.com/" >Ubuntu</a> release, Hardy Heron, which I can generally recommend.</p>
<p>Alsa seems stable and graphics support is present from installation onwards. Enabling fancier 3D compiz effects requires the nvidia-glx-new package; compiz spots this, however and prompts for installation. All very smooth. Wireless works; my VoIP headset works; but I haven&#8217;t yet tested Bluetooth.</p>
<p>The only problem was in upgrading from Gutsy: my previous peregrinations had rendered my hybrid distribution shafted and incapable of upgrade. This isn&#8217;t a problem, though, if one has installed the /home directory (and in my case the /music one too) on a separate partition: the Ubuntu Live CD will blat the root partition with Heron, but leave the other partitions alone if you so require. Don&#8217;t resize any of your partitions during installation, though, or you&#8217;ll lose everything. Everything!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jpstacey.info/blog/2008/07/16/hardy-heron-and-the-dell-precision-m4300/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Embracing minimalism</title>
		<link>http://www.jpstacey.info/blog/2008/06/30/embracing-minimalism/</link>
		<comments>http://www.jpstacey.info/blog/2008/06/30/embracing-minimalism/#comments</comments>
		<pubDate>Mon, 30 Jun 2008 12:47:34 +0000</pubDate>
		<dc:creator>jps</dc:creator>
		
		<category><![CDATA[design]]></category>

		<category><![CDATA[news]]></category>

		<category><![CDATA[projects]]></category>

		<category><![CDATA[quickies]]></category>

		<category><![CDATA[software]]></category>

		<category><![CDATA[alpha]]></category>

		<category><![CDATA[minimalism]]></category>

		<category><![CDATA[pilgrim]]></category>

		<category><![CDATA[straightedge]]></category>

		<category><![CDATA[theme]]></category>

		<category><![CDATA[tomayko]]></category>

		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.jpstacey.info/blog/?p=170</guid>
		<description><![CDATA[Graceful Exits goes straight-edge with Straight Edge, a minimalist theme written by yours truly.]]></description>
			<content:encoded><![CDATA[<p>After re-reading <a href="http://www.jpstacey.info/blog/2008/06/22/rss-feeds-keep-them-well-hidden/" >my earlier post</a>, which was in general agreement with Pilgrim and Tomayko&#8217;s minimalism, I decided to practise what I had preached and write a minimalist theme implementing some of the applications of the principles of minimalism. </p>
<p>It&#8217;s called Straight Edge, and I&#8217;ve switched to it today. Once I&#8217;ve finished alpha-testing it I&#8217;ll write more about it, and offer it for download if anyone&#8217;s interested.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jpstacey.info/blog/2008/06/30/embracing-minimalism/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Upgrading this blog to Wordpress 2.5.1</title>
		<link>http://www.jpstacey.info/blog/2008/06/16/upgrading-this-blog-to-wordpress-251/</link>
		<comments>http://www.jpstacey.info/blog/2008/06/16/upgrading-this-blog-to-wordpress-251/#comments</comments>
		<pubDate>Mon, 16 Jun 2008 19:15:19 +0000</pubDate>
		<dc:creator>jps</dc:creator>
		
		<category><![CDATA[content]]></category>

		<category><![CDATA[meta]]></category>

		<category><![CDATA[software]]></category>

		<category><![CDATA[mysql]]></category>

		<category><![CDATA[upgrade]]></category>

		<category><![CDATA[version]]></category>

		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.jpstacey.info/blog/?p=164</guid>
		<description><![CDATA[Finally. Jeez.... Anything broken?]]></description>
			<content:encoded><![CDATA[<p>After having been stuck on version 2.0.1 for over two years, I&#8217;ve just <a href="http://wordpress.org/download/" >upgraded to the most recent version</a>, 2.5.1. The only hiccup was needing to ask my web provider to give me a new MySQL database: since 2.5, Wordpress has required MySQL 4.0 or newer. </p>
<p>Otherwise, it all seems to be running very smoothly. Do let me know if you see anything crazy. I hope to upgrade more frequently in future, as it was <a href="http://codex.wordpress.org/Upgrading_WordPress" >a far better experience than I&#8217;d expected</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jpstacey.info/blog/2008/06/16/upgrading-this-blog-to-wordpress-251/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Drupal for NGOs - first ever meet yesterday</title>
		<link>http://www.jpstacey.info/blog/2008/06/11/drupal-for-ngos-first-ever-meet-yesterday/</link>
		<comments>http://www.jpstacey.info/blog/2008/06/11/drupal-for-ngos-first-ever-meet-yesterday/#comments</comments>
		<pubDate>Wed, 11 Jun 2008 19:17:34 +0000</pubDate>
		<dc:creator>jps</dc:creator>
		
		<category><![CDATA[conferences]]></category>

		<category><![CDATA[framework]]></category>

		<category><![CDATA[software]]></category>

		<category><![CDATA[ai]]></category>

		<category><![CDATA[amnesty]]></category>

		<category><![CDATA[drupal]]></category>

		<category><![CDATA[greenpeace]]></category>

		<category><![CDATA[hack]]></category>

		<category><![CDATA[joelbassuk]]></category>

		<category><![CDATA[meet]]></category>

		<category><![CDATA[module]]></category>

		<category><![CDATA[ngos]]></category>

		<category><![CDATA[oxfam]]></category>

		<category><![CDATA[plone]]></category>

		<category><![CDATA[robpurdie]]></category>

		<category><![CDATA[social]]></category>

		<category><![CDATA[theme]]></category>

		<category><![CDATA[tracyfrauzel]]></category>

		<guid isPermaLink="false">http://www.jpstacey.info/blog/2008/06/11/drupal-for-ngos-first-ever-meet-yesterday/</guid>
		<description><![CDATA[More people use Drupal in UK NGOs than you think. And than was planned for at the first, full-to-bursting Drupal for NGOs meet-up.]]></description>
			<content:encoded><![CDATA[<p>Yesterday Neal, <a href="http://throwingbeans.org/" >Tom</a> and I wandered to London, where <a href="http://importantprojects.com/" >Rob Purdie</a> was hosting the <a href="http://upcoming.yahoo.com/event/610734/" >first ever Drupal for NGOs meeting</a> at <a href="http://www.amnesty.org.uk/" >Amnesty International</a>&#8217;s UK headquarters. It was a hot, dry evening, and Neal&#8217;s attempts to Brompton it over from Marylebone left him dry-mouthed enough to avoid the copious snacks that Rob and others had laid on for us.</p>
<p>It was clear after the first half hour or so that there were going to be far more people there than Rob had expected: I think in the end there were around 50 to 60 attendees. A brief, slightly confusing &#8220;speed-dating&#8221; session later, I also realised that there was a real cross-section of <a href="http://drupal.org/" >Drupal</a> fans there. There were freelance theme developers, module coders, hardcore sysadmins, CSSers, end users, tech writers, Drupal beginners&#8230;. A well-rounded audience, that hopefully stopped the meeting being too focussed on one layer of the CMS.</p>
<p>The talk from Tracy Frauzel at <a href="http://www.greenpeace.org.uk/" >Greenpeace</a>, about their experience with Drupal, was really enlightening, as was the phoned-in discussion from Joel Bassuk of <a href="http://www.oxfam.org/" >Oxfam International</a> (new site going live, 3&#8211;4 weeks&#8217; time). It&#8217;s good to hear of people enjoying their transition from other systems to Drupal (even if the imports tend&#8212;like all data imports&#8212;to be occasionally painful). </p>
<p>It was also interesting to see how far people would tend to go with contributed modules, tweaking the theme and hammering away at the admin config, rather than building their own modules or (shudder) hacking core. Oxfam&#8217;s experience with forking <a href="http://plone.org/" >Plone</a> shows the perils of hacking core; to avoid doing that in Drupal, Greenpeace had used the usual <a href="http://drupal.org/node/131061" title="locale hack and alternative module" >locale hack</a> to translate core strings to their liking (I say &#8220;usual&#8221;: I hadn&#8217;t seen it in the wild before, so again it was nice to hear a success story).</p>
<p>I really look forward to where Drupal for NGOs will go from here&#8212;maybe collaborative/accretive online conversations and resources, but most importantly the next event. This one was a really smooth first event, and it bodes well for future ones. From my experiences with the <a href="http://oxford.geeknights.net/" >OGNs</a>, I&#8217;ve learnt that organizing a fairly straightforward event can be incredibly stressful, and when it all works perfectly then nobody notices all the effort you&#8217;re making: that&#8217;s sort of the point of the effort, but it&#8217;s incredibly infuriating that people think you&#8217;re kicking back and feeling chilled! All the contributors, everyone who spoke or who volunteered some information, contributed to a great evening. Cheers, everyone.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jpstacey.info/blog/2008/06/11/drupal-for-ngos-first-ever-meet-yesterday/feed/</wfw:commentRss>
		</item>
		<item>
		<title>User loading and saving in Drupal 5.x</title>
		<link>http://www.jpstacey.info/blog/2008/06/09/user-loading-and-saving-in-drupal-5x/</link>
		<comments>http://www.jpstacey.info/blog/2008/06/09/user-loading-and-saving-in-drupal-5x/#comments</comments>
		<pubDate>Mon, 09 Jun 2008 15:48:48 +0000</pubDate>
		<dc:creator>jps</dc:creator>
		
		<category><![CDATA[diagnostics]]></category>

		<category><![CDATA[hacking]]></category>

		<category><![CDATA[information]]></category>

		<category><![CDATA[projects]]></category>

		<category><![CDATA[software]]></category>

		<category><![CDATA[5.x]]></category>

		<category><![CDATA[api]]></category>

		<category><![CDATA[core]]></category>

		<category><![CDATA[drupal]]></category>

		<category><![CDATA[hook]]></category>

		<category><![CDATA[id]]></category>

		<category><![CDATA[profile]]></category>

		<category><![CDATA[user]]></category>

		<category><![CDATA[user_load]]></category>

		<category><![CDATA[user_save]]></category>

		<guid isPermaLink="false">http://www.jpstacey.info/blog/2008/06/09/user-loading-and-saving-in-drupal-5x/</guid>
		<description><![CDATA[Workflows of Drupal's user load and save functionality: spot the hooks and win a programmatical prize.]]></description>
			<content:encoded><![CDATA[<p>Recently at <a href="http://torchbox.com/" >Torchbox</a> we&#8217;ve been looking into how to build extra functionality on top of Drupal users. The standard Drupal user object is a combination of the contents from the users table, plus any properties provided by the core <code>profile</code> module. This means that the Drupal user is a combination of rows (and admittedly deserialized, structured data) from a couple of tables in a relational database. </p>
<div style="float: right;"><a title="flowcharts of user_load and user_save" href="#user-flowcharts"><img src="/blog/files/drupal/core/drupal_user_teaser.gif" alt="flowcharts of user_load and user_save" width="145" height="184" /></a></div>
<p>That works just fine for most purposes, but we may have to bring in content from not just outside the core Drupal tables but outside the core database, and even on a remote server through webservices. To this end we&#8217;ve decomposed the core <code>user</code> module&#8217;s <code>user_load()</code> and <code>user_save()</code> functions. This helps us understand better both the workflow and at what points in it our own code can motor into life, query all those extra resources (or set those queries in motion), assemble the rest of the user++ object, and then hand control back over to Drupal.</p>
<p>For those who don&#8217;t know much about Drupal, its core has a <em>hook-based</em> API structure. At certain points in its workflow, it checks all the modules for functions following certain naming conventions (typically the module name followed by the hook name e.g. <code>mymodule_init</code> on response startup, or <code>mymodule_block</code> to return details about the module&#8217;s support for Drupal page furniture). Any matching hook functions are called in the order defined by module weightings, and then page processing will generally continue: you can crowbar a grind-to-a-halt <code>exit()</code> in your hook, but it&#8217;d be unwise, as you can never be sure what tidying up Drupal might need to do after your hook. Outside these hooks, your code has little control over Drupal&#8217;s core functioning, unless you stub out entirely the bits of core you need yourself, and get your request to use those bits instead.z</p>
<p>Because of the way they let your code tag along with Drupal&#8217;s powerful core, hooks are essential to developing modules in the most <em>Drupalish</em> way. With that in mind, <a name="user-flowcharts"></a>here are flow diagrams of the three basic aspects of user functionality&#8212;create new, load, save existing&#8212;lifted straight from examination of the code:</p>
<ul>
<li><a href="/blog/files/drupal/core/drupal_user_load.gif">Loading an existing user with user_load</a></li>
<li><a href="/blog/files/drupal/core/drupal_user_create.gif">Creating a user: saving a new user with user_save</a></li>
<li><a href="/blog/files/drupal/core/drupal_user_update.gif">Updating a user: saving an existing user with user_save</a></li>
</ul>
<p>Although you have to save a user before you can load them, I&#8217;ve put this functionality first in the above (admittedly unordered) list. There are two main reasons for this:</p>
<ol>
<li><code>user_save</code> actually calls <code>user_load</code> a number of times, once or twice, to &#8220;refresh&#8221; the user object</li>
<li><code>user_load</code> is a more primitive function and so bears examination first</li>
</ol>
<p>Stripped down, <code>user_load</code> consists of: querying the database for a core user record matching the search criteria; returning this and the extended profile data; unserializing a free-data field and inserting it into the user object; discovering user roles; <strong>triggering <code>hook_user('load')</code></strong> and returning the object (or boolean false, if no user found).</p>
<p>What this reveals (which I didn&#8217;t realise before) is that <em>the anonymous user is in the Drupal users table</em>, with ID=0. Otherwise, searching for this user would return no records, and the anonymous user object could not be instantiated. You could therefore attach rich data to the anonymous user, if you were in a hacky mood.</p>
<p>The two <code>user_save</code> workflows are fairly similar. Creating a user means obtaining an ID from the database: because some MySQL providers have poorer feature sets than others, referential integrity is ensured at the application level rather than the database level. In place of obtaining an ID, user update <strong>calls <code>hook_user('update')</code> to pre-process</strong> the user. Both workflows then set aside special fields, such as the user&#8217;s password, user roles and any profile fields managed by that module (determined from <code>user_fields()</code>). Then they save this data into the database in slightly different orders, with user creation <code>calling </code><code>hook_user('insert')</code> early on, and the update procedure <code>calling </code><code>hook_user('after_update')</code> much later in the process, just before determining the external authentication mappings (e.g. OpenID) and returning the user object.</p>
<p>What does this mean for us? Well, we&#8217;ll want varying amounts of data to piggyback on the core user object, so we have somewhere to cache it. Ideally this data won&#8217;t be summoned&#8212;brought out of the distributed data &#8216;cloud&#8217;&#8212;on every request/response cycle, so we&#8217;ll need to do some local cacheing, but not so much that we&#8217;ll get out of synch with the cloud (or that we&#8217;ll duplicate sensitive data). We think that, given the pair of hooks in <code>user_save</code> for existing users, we&#8217;ll have just enough leverage to do this: the first hook will effectively &#8220;tear down&#8221; our extra data, so we can do what we want with it, and store it somewhere temporarily; the second hook will &#8220;set up&#8221; the user for the rest of the request, by putting all that data back in. The existence of <code>user_load</code> within <code>user_save</code> complicates things somewhat, but at the same time it gives us some more wiggle room, because each call to that function fires another hook.</p>
<p>A Drupal hook is worth a thousand lines of module code, but they&#8217;re still a bit few and far between for some workflows. Hopefully the accompanying images will help anyone reading to find them, and ditch those thousand lines before they&#8217;re even written.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jpstacey.info/blog/2008/06/09/user-loading-and-saving-in-drupal-5x/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Postcode Anywhere and MailBuild integration with Drupal</title>
		<link>http://www.jpstacey.info/blog/2008/05/22/postcode-anywhere-and-mailbuild-integration-with-drupal/</link>
		<comments>http://www.jpstacey.info/blog/2008/05/22/postcode-anywhere-and-mailbuild-integration-with-drupal/#comments</comments>
		<pubDate>Thu, 22 May 2008 20:28:26 +0000</pubDate>
		<dc:creator>jps</dc:creator>
		
		<category><![CDATA[projects]]></category>

		<category><![CDATA[software]]></category>

		<category><![CDATA[createsend]]></category>

		<category><![CDATA[drupal]]></category>

		<category><![CDATA[drupal-5.x]]></category>

		<category><![CDATA[googlecode]]></category>

		<category><![CDATA[gpl]]></category>

		<category><![CDATA[mailbuild]]></category>

		<category><![CDATA[module]]></category>

		<category><![CDATA[newsletter]]></category>

		<category><![CDATA[pamb]]></category>

		<category><![CDATA[postcode]]></category>

		<category><![CDATA[postcodeanywhere]]></category>

		<category><![CDATA[rest]]></category>

		<category><![CDATA[soap]]></category>

		<category><![CDATA[sourceforge]]></category>

		<category><![CDATA[torchbox]]></category>

		<guid isPermaLink="false">http://www.jpstacey.info/blog/2008/05/22/postcode-anywhere-and-mailbuild-integration-with-drupal/</guid>
		<description><![CDATA[Integrate SOAP-y web services with Drupal at a low level using PAMB.]]></description>
			<content:encoded><![CDATA[<p>As a result of building a website for a <a href="http://torchbox.com/" >Torchbox</a> client, I came up with a <a href="http://drupal.org/" >Drupal</a> 5.x module to query the Postcode Anywhere and MailBuild webservices (if they look like an unlikely mix, don&#8217;t worry: they&#8217;re not coupled together generally, so you can use one without the other). I&#8217;ve been meaning to make it live for ages, but never got round to scrubbing the client&#8217;s data out of it. Now that we&#8217;ve unearthed the module for other work then I&#8217;ve finally finished cleaning it.</p>
<p>First, a bit of background. <a href="http://www.postcodeanywhere.co.uk/" >Postcode Anywhere</a> provides a per-lookup paid webservice, converting UK postcodes into valid house names/numbers, streets, towns etc. It allows you to accept a user&#8217;s submission of a postcode to e.g. a signup form, then present them with a list of sample addresses, rather than them having to fill in all of their address details.</p>
<p>There&#8217;s only really one method exposed for the PA functionality, and it takes a text postcode and returns an array of results:</p>
<blockquote class="code"><p>
$data = pamb_pa_get_bypostcode($postcode);
</p>
</blockquote>
<p><a href="http://www.mailbuild.com/" >MailBuild and CreateSend</a>, on the other hand, provide a way to store email lists and send newsletter campaigns to subscribers. However, our client also wanted to use it to store snail-mail addresses, so they could use it for both requests for printed matter and also to keep subscribers up to date via email. It was possible to implement this using custom fields, of which the service permits around a dozen: address line 1, address line 2 etc.</p>
<p>There&#8217;s an <a href="http://drupal.org/project/mailbuild" >existing Mailbuild module</a>, which technically does the trick, but it&#8217;s overkill compared to what the client wanted. pamb&#8217;s integration is essentially just &#8220;push&#8221;: it passes the results of a form submission to CreateSend, by using a <i>template</i> (the one you&#8217;ve moved to your theme directory) to &#8220;theme&#8221; the data as an XML packet. If there are no problems then the system returns nothing; otherwise, it returns a structure of data including the HTTP response and the SOAP packet from the request.</p>
<p>Here&#8217;s some sample code:</p>
<blockquote class="code"><p>
/* Send SOAP packet */<br />
$no_probs = pamb_mb_send_soap($form_id, $form_values);</p>
<p>/* If OK, set a generic message and redirect: the redirect will pick up<br />
   on the generic message and know all has gone well */<br />
if(!isset($no_probs)) {<br />
&nbsp;&nbsp;drupal_set_message(t(AUTO_SUCCESS));<br />
}</p>
<p>/* If not OK, $no_probs contains the diagnostics */<br />
else {<br />
&nbsp;&nbsp;/* do something else */<br />
&nbsp;&nbsp;drupal_set_message(t(AUTO_ERROR));<br />
}
</p>
</blockquote>
<p>For now, for want of a better name, the module is called &#8220;pamb.&#8221; And [edit] the code is now <a href="http://sourceforge.net/projects/drupal-pamb/" >available on Sourceforge</a> under the <a href="http://www.gnu.org/licenses/old-licenses/gpl-2.0.html">GPL</a>: that should make it compatible with <a href="http://drupal.org/LICENSE.txt">Drupal&#8217;s core licence</a>. </p>
<ol>
<li><a href="http://sourceforge.net/svn/?group_id=228839" >Download pamb</a>: currently only available in subversion, but clients exist for Linux, Windows and OSX.</li>
<li>Unpack it into your <code>modules</code> directory</li>
<li>Edit the defines at the top of the file for your own Postcode Anywhere or MailBuild/CreateSend accounts.</li>
<li>Stick the <code>pamb_soap.tpl.php</code> in your theme directory</li>
<li>Switch on the module in the admin interface</li>
</ol>
<p>You&#8217;re now ready to start developing with its handful of functions. Feedback more than welcome, as given Drupal&#8217;s minimal support for mailing-list functionality in core it&#8217;d be good to make this into a fully-functional module for similar third-party contact services, and even port it to 6.x.</p>
<p>[edit 2008-06-17: now hosted on Sourceforge]</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jpstacey.info/blog/2008/05/22/postcode-anywhere-and-mailbuild-integration-with-drupal/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Human discourse will never be the same again</title>
		<link>http://www.jpstacey.info/blog/2008/05/16/human-discourse-will-never-be-the-same-again/</link>
		<comments>http://www.jpstacey.info/blog/2008/05/16/human-discourse-will-never-be-the-same-again/#comments</comments>
		<pubDate>Fri, 16 May 2008 18:04:45 +0000</pubDate>
		<dc:creator>jps</dc:creator>
		
		<category><![CDATA[network]]></category>

		<category><![CDATA[quickies]]></category>

		<category><![CDATA[software]]></category>

		<category><![CDATA[jokes]]></category>

		<category><![CDATA[saas]]></category>

		<category><![CDATA[sound]]></category>

		<category><![CDATA[web2.0]]></category>

		<guid isPermaLink="false">http://www.jpstacey.info/blog/2008/05/16/human-discourse-will-never-be-the-same-again/</guid>
		<description><![CDATA["This blogpost has made me feel something I haven't felt in years!"
"What's that?"
"My pulse!"]]></description>
			<content:encoded><![CDATA[<p>Software as a service finally comes of age, with the web&#8217;s new-found ability to pipe the <a href="http://www.sadtrombone.com/">sad trombone</a> and <a href="http://www.instantrimshot.com/">instant rimshot</a> directly into your office or home (via <a href="http://www.b3ta.com/newsletter/issue328/">b3ta</a>).</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jpstacey.info/blog/2008/05/16/human-discourse-will-never-be-the-same-again/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Compiling languages down to Javascript</title>
		<link>http://www.jpstacey.info/blog/2008/05/12/compiling-languages-down-to-javascript/</link>
		<comments>http://www.jpstacey.info/blog/2008/05/12/compiling-languages-down-to-javascript/#comments</comments>
		<pubDate>Mon, 12 May 2008 14:39:46 +0000</pubDate>
		<dc:creator>jps</dc:creator>
		
		<category><![CDATA[futurology]]></category>

		<category><![CDATA[paradigms]]></category>

		<category><![CDATA[quickies]]></category>

		<category><![CDATA[software]]></category>

		<category><![CDATA[browser]]></category>

		<category><![CDATA[convergence]]></category>

		<category><![CDATA[ide]]></category>

		<category><![CDATA[java]]></category>

		<category><![CDATA[javascript]]></category>

		<category><![CDATA[virtual]]></category>

		<category><![CDATA[vm]]></category>

		<guid isPermaLink="false">http://www.jpstacey.info/blog/2008/05/12/compiling-languages-down-to-javascript/</guid>
		<description><![CDATA[A hundred years from now, all code will look both similar and different.]]></description>
			<content:encoded><![CDATA[<p>If it&#8217;s really the case that <a href="/blog/2008/05/11/emacs-as-an-anagram-of-ecma-s/">browsers, virtual machines and IDEs will one day converge</a>, then the first steps would be to <a href="http://ejohn.org/blog/running-java-in-javascript/">run Java, Ruby and other languages in a browser using Javascript</a>. (Hat tip to <a href="http://gagravarr.livejournal.com/">Nick</a> for the timely links.)</p>
<p>[Edit: <a href="http://codespeak.net/pypy/dist/pypy/doc/js/whatis.html">run Python using Javascript</a> too.]</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jpstacey.info/blog/2008/05/12/compiling-languages-down-to-javascript/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Emacs as an anagram of &#8220;ECMA-S&#8221;</title>
		<link>http://www.jpstacey.info/blog/2008/05/11/emacs-as-an-anagram-of-ecma-s/</link>
		<comments>http://www.jpstacey.info/blog/2008/05/11/emacs-as-an-anagram-of-ecma-s/#comments</comments>
		<pubDate>Sun, 11 May 2008 17:51:31 +0000</pubDate>
		<dc:creator>jps</dc:creator>
		
		<category><![CDATA[enterprise]]></category>

		<category><![CDATA[futurology]]></category>

		<category><![CDATA[software]]></category>

		<category><![CDATA[browser]]></category>

		<category><![CDATA[ecmascript]]></category>

		<category><![CDATA[emacs]]></category>

		<category><![CDATA[firefox]]></category>

		<category><![CDATA[flash]]></category>

		<category><![CDATA[ide]]></category>

		<category><![CDATA[javascript]]></category>

		<category><![CDATA[rants]]></category>

		<category><![CDATA[ria]]></category>

		<category><![CDATA[steve]]></category>

		<category><![CDATA[yegge]]></category>

		<guid isPermaLink="false">http://www.jpstacey.info/blog/2008/05/11/emacs-as-an-anagram-of-ecma-s/</guid>
		<description><![CDATA[Your editor will become your browser will become your IDE. The process has already begun. Please wait.]]></description>
			<content:encoded><![CDATA[<p><a href="http://steve-yegge.blogspot.com/2008/04/xemacs-is-dead-long-live-xemacs.html">Steve Yegge on *Emacs</a>, pointing also to the possible future direction of the *browser:</p>
<blockquote><p>&#8220;IDEs are draining users away, but it&#8217;s not the classic fat-client IDEs that are ultimately going to kill Emacs. It&#8217;s the browsers. They have all the power of a fat-client platform and all the flexibility of a dynamic system. I said earlier that Firefox wants to be Emacs. It should be obvious that Emacs also wants to be Firefox&#8230;</p>
<p>&#8220;&#8230; [N]ow the browsers are starting to sprout desktop-quality apps and productivity tools. It won&#8217;t be long, I think, before the best Java development environment on the planet is written in JavaScript.&#8221;</p>
</blockquote>
<p>I&#8217;m more of a vi user these days&#8212;it behaves much more consistently over emergency ssh sessions&#8212;but as a general advocate of Emacs over IDEs I can see his point. Browsers <em>should</em> want to be like Emacs, or at any rate more like the VM of your choice.</p>
<p>Between browser-as-VM, Firefox, ECMAScript and compatibility frameworks there&#8217;s the seeds of an RIA revolution. After all, to what extent will industries gladly rest their financial weight on RIAs, so long as they&#8217;re all written in Flash-on-the-browser, and so long as browsers remain so unpredictable and Flash remains&#8230; well, Flash?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jpstacey.info/blog/2008/05/11/emacs-as-an-anagram-of-ecma-s/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
