Technology

Could BuddyPress Go The Distance?

Facebook and MySpace are trying to turn themselves into application platforms (how else will they monetize their audience?). Google is pushing OpenSocial to compete with it. But no matter what features they offer their users, they user still orbits the site.

Scot Hacker talks of BuddyPress changing the game, turning “social networks” from destination websites, to features you’ll find on every website. And the “social network” is the internet, with all those sites sharing information meaningfully.

Some might say this is little more than overgrown XFN, but Tris Hussey thinks Ning is on the ropes and Facebook should be worried.

At least the design shows all the right stuff.

Detecting Broken Images in JavaScript

We’ve become accustomed to link rot and broken images in nearly all corners of the web, but is there a way to keep things a bit cleaner? K.T. Lam of Hong Kong University of Science and Technology came up with this sweet trick using jQuery and readyState to find and replace broken images: jQuery('span#gbs_'+info.bib_key).parents('ul').find('img.bookjacket[@readyState*="uninitialized"]').replaceWith('<img src="'+info.thumbnail_url+'" […] » about 200 words

Find Stuff By Minimum Bounding Rectangle

MySQL offers ENVELOPE() to find the minimum bounding rectangle of a geometric object. The result is a polygon with four segments, defined by five points. It took me a while to make sense of it, partially because the only documentation that I’ve run across so far for POLYGON() syntax is in the ENVELOPE() function mentioned […] » about 200 words

Working With Spatial Data in MySQL

It’s MySQL spatial data week here, though I am spreading out the posts to, um, ease the pain (or boredom). Anyway, here are some commands/functions I don’t want to forget about later:

Start with an existing table called geometry, add a spatial column and index it:

``` ALTER TABLE geometry ADD coord POINT NOT NULL; CREATE SPATIAL INDEX coord ON geometry (coord); ```

Insert some data; think in terms of POINT(X Y) or POINT(lat lon):

``` INSERT INTO geometry (coord) VALUES( GeomFromText( 'POINT(40 -100)' )); INSERT INTO geometry (coord) VALUES( GeomFromText( 'POINT(1 1)' )); ```

Get those X,Y coordinates back from the table:

``` SELECT X(coord), Y(coord) FROM geometry ```

Get points within a bounding rectangle:

``` SELECT MBRContains( GeomFromText( 'POLYGON((0 0,0 3,3 3,3 0,0 0))' ), coord ) FROM geometry ```

bSuite 4 beta 2

I announced the bSuite 4 public beta not long ago, now I’ve just posted a new version to SVN that addresses some of the bugs and fleshes out some of the features. I have yet to update the bSuite page, but here’s a preview of what’s new or changed:

  • Additional stats reports
  • WP2.5-style tag input tools on the Page edit screen*
  • WP2.5-style category selector on the Page edit screen*
  • WP2.5-style excerpt input on the Page edit screen*
  • For multi-author sites: ability to grant edit permissions by role for each page (with a configurable default)
  • An “include” shortcode that makes it easy to show content from one post or page on another.

About the new shortcode, use it like this:

[inclu``de post_id=“1234” url=“a url to a post or page in your blog” field=“post_excerpt”]

One of post_id or url is required; field is optional and defaults to post_excerpt first, then to post_content if there is no excerpt.

*Why would you want to input tags, set categories, or add an excerpt to a Page? They help readers find and explore our content. What’s so wrong with that?

Calculating Distance Between Points In MySQL

MySQL has some powerful, and perhaps underused spatial extensions, but the most interesting functions are still unimplemented: “Note: Currently, MySQL does not implement these functions…”

Among those as-yet unimplemented functions is DISTANCE(). Alternatives can be found here and here, though neither is clean or simple. I wonder if a simple MBRContains() is good enough, though…

JSON on RHEL & PHP 5.1.6

Stuck with PHP 5.1.6 on RHEL or even CentOS (and a sysadmin who insists on using packages)? Need JSON? I did. The solution is easy:

yum install php-devel<br /> pecl install json

The pecl install failed when it hit an 8MB memory limit, and I was clueless about how to fix it until I learned that the pecl installer ignores the php.ini. Turns out the best solution is to use the pear installer (which does follow php.ini settings):

pear install pecl/json

Many Eyes, Bugs Being Shallow, All That

WordPress 2.5.1 added a really powerful feature to register_taxonomy(): automatic registration of permalinks and query vars to match the taxonomy. Well, theoretically it added that feature. It wasn’t working in practice. After some searching yesterday and today, I finally found the bug and worked up a fix. I made a diff and set off to […] » about 200 words

Where Do They Find The Time?

Clay Shirky recently posted (wayback) a transcript of his Web 2.0 Expo keynote. …If you take Wikipedia as a kind of unit, all of Wikipedia, the whole project — every page, every edit, every talk page, every line of code, in every language that Wikipedia exists in — that represents something like the cumulation of 100 million […] » about 500 words

Anglia Ruskin University Faces Criticism 2.0

Anglia Ruskin University is in Cambridge, but it’s not Cambridge University. It’s likely that none of us would even know of Anglia Ruskin‘s existence if it wasn’t for Naomi Sugai, but she’s not interested in promoting the school.

She’s got complaints, she’s fed up, and she’s taking her case to YouTube.

Well, she took her case to YouTube, and then she got suspended. The video that’s up now doesn’t seem suspension-worthy, but the Telegraph story suggests there’s a different version that may slander an ARU administrator, and that’s the reason ARU gives for suspending her.

2002 Honda Civic iPod/iPhone Install

Last weekend, while I was putting an iPod interface into my Scion I did the same thing for my 2002 Honda Civic. Using Ben Johnson’s story as a guide, I bought a PIE HON98-AUX interface and dove in. Aside from tools (screwdrivers and 8 and 10mm sockets), you’ll need: The interface adapter Audio wiring — […] » about 700 words

2004 Scion xB iPod/iPhone Install

Based on this story about an iPod interface install I purchased a PIE TOY03-AUX aux input adapter so I could finally listen to my iPhone without using the lousy FM transmitter. Sure, I coulda bought a new car, as the manufacturers seem to have finally come to their senses and started including such inputs, but […] » about 400 words

Flickr Adds Video

I asked for it in 2004, before YouTube, Vimeo, Viddler, or Revver appeared on the scene, and before MySpace and Facebook added video sharing as a feature. Four years later they finally added it. Neil Rickards should get credit for creating the theme of “long photos” (Neil called them “moving photos”). And anybody who was around then isn’t the least surprised at how angry some are now about the new feature (see sarcastic response to that).

SWIFT: Another Ham Handed Attempt At Social Networking

All yesterday and this morning I’ve been seeing tweets about SWIFT, so I finally googled it to see what it was about. The service promises to help organize conferences in some new 2.0 way, but it looks to be about as preposterous a social network as WalMart’s aborted 2006 attempt at copying MySpace. There are […] » about 300 words

WordPress 2.5 Out, MaisonBisson Upgraded

WordPress 2.5 is out (and the WordPress site got a facelift), and I’ve already upgraded MaisonBisson using SVN. The changes are exciting, and seem to reflect a tradition that’s developing in WordPress of delivering some really revolutionary features in the x.5 release. The loss of file-based object caching was a bit of a problem, as […] » about 300 words

Interesting WordPress Plugins

WP Contact Manager turns WordPress into a contact manager. It’s a combination of theme and plugins (including Custom Write Panel) that allows you to enter and manage contacts as blog posts (familiar, eh?). Use Members Only to secure access.

TDO Mini Forms “allows you to add highly customisable forms to your website that allows non-registered users and/or subscribers (also configurable) to submit posts. The posts are kept in ”draft“ until an admin can publish them (also configurable).”