WordPress Plugin: Wavatars

By Shamus Posted Monday Dec 17, 2007

Filed under: Projects 520 comments

wavatars.jpg

Overview:

Wavatars is a plugin that will generate and assign icons to the visitors leaving comments at your site. The icons are based on email, so a given visitor will get the same icon each time they comment. It livens up comment threads and gives people memorable “faces” to aid in following conversation threads. It’s also fun.

Features:

  1. Wavatars can generate 956,384 different shapes in 57,600 different color combinations for a total of 55,087,718,400 (55 billion) unique Wavatars. Yeah, you should have plenty. You’ll run out of human beings (or hard drive space) long before you run out of Wavatars.
  2. The icons are generated on-the-fly. You can adjust the desired size of the icons.
  3. For easy deployment, icons will automatically preceed the commenter’s name. You can set HTML to come directly before and after the icon (to put it inside of a <DIV> tag, for example) or you can control the placement of the icons manually if you don’t mind adding a single line of PHP to your theme.
  4. Wavatars are based entirely on email and are thus very portable. The same email will result in the same Wavatar, even on different sites, so users will have the same icon on all Wavatar-enabled sites. (Assuming, or course, that there are other Wavatar-enabled sites. I don’t know if anyone will want this plugin or not.)
  5. This plugin also supports Gravatars. If you like, it can show the Gravatar for a given user (if available) and fall back on their Wavatar only if they don’t have a Gravatar set up. This means users can choose to set up a unique icon for themselves, and if they don’t, they will be assigned a unique Wavatar. This is a great system that lets people personalize if they want, yet still provide a decent icon for the lazy or apathetic.

Installation

  1. Download the plugin.
  2. Copy it onto your website in the wordpress /plugins folder. Then enable the plugin. That’s it. Wavatars will instantly appear for all posts (even old ones) on your blog. If you don’t like how the image looks within your theme, read on…

The administration panel is under Options » Wavatars. You can adjust the size of the Wavatars, and assign HTML to come before and after each image to help nudge it into place. Each image is also set with the CSS “wavatars” class. On this site, I don’t have any HTML prefix or suffix, and instead just added these lines to my CSS:


.wavatar {
float: left;
padding: 3px;
background: #fff;
margin-top: -25px;
margin-left: -25px;
margin-right: 5px;
}

If that still doesn’t give you enough control over wavatar placement and you don’t mind editing your theme, just turn off automatic placement and add the line wavatar_show($comment_author_email); to your comment loop wherever you want the image to appear.

Your mileagle may vary. It all depends on your installed theme.

Note that the plugin requires that your install of PHP support the GD library. If it doesn’t, the Wavatars won’t show up and you’ll get a warning in the Wavatar admin panel. You can still use this plugin to display Gravatars, even if the GD library isn’t available.

This is the first release. You could even go so far as to call it “beta” if you want to be formal about it. It’s only been tested on one server (this one) so far. Please leave bug reports and questions in the comments below.

Download Wavatars v1.0.0

 


 

Wavatars Development

By Shamus Posted Sunday Dec 16, 2007

Filed under: Projects 140 comments

After I showed off my new Wavatars WordPress plugin on Saturday, a lot of people posted just to see what their wavatar looked like. I feel bad, but I’m afraid that initial system had to go and as a result, everyone’s Wavatar has been changed. This was for a good cause. I’ve moved away from PHP generated random numbers to random values derived directly from the hash of the email. To translate out of programmer babble: The plugin will now generate the same wavatar for you no matter where the plugin is running. Different websites running the same plugin will give you the same, predictable results.

I also added a bunch of new parts for greater variety, so the plugin can now generate 956,384 different shapes in 57,600 different color combinations for a total of 55,087,718,400 unique Wavatars. That should be enough combinations for now.

I’ll be releasing the plugin later this week. If you have a WordPress blog then you’ll be able to have wavatars on your own site. I’ve ironed out the installation problems, so that you should be able to simply upload the thing and turn it on. (In theory.)

Also, I can’t take credit for the idea, which I first saw at implemented as MonsterID. (Hat Tip: MetaBLOG.)

 


 

New Website Features

By Shamus Posted Saturday Dec 15, 2007

Filed under: Projects 123 comments

I’m doing a large update to the site right now. If something breaks, that’s why.

8:45am Step 1: I’m deleting a bunch of old plugins, removing orphaned files, removing a bunch of themes I’m not using, and a bunch of other fussy stuff.

9:00am Step 2: Some changes to the theme. The monthly list of archives is replaced with a much-shorter yearly list. The category icons are a little nicer. Some other minor tweaks to spacing & placement. Gravatars are gone for the moment, but I’ll put them back later.

9:15am Step 3: Wow. I managed to get this far without breaking anything. Check out the sidebar on the right, and you should see the new theme switcher, wich will allow you to change between white and black layouts.

9:45am Step 4: What a pain. I made a plugin to generate little smiley face avatars (for people who dont have Gravatars) and it worked great locally, but failed in a dozen different ways once I made it live here on the server. Between different versions of PHP and file write permission problems, I had to make all sorts of goofy changes. Boo.

10:00am Step 5: Okay, the fallback icons (I’m calling them “wavatars”) are working again. So, if you have a Gravatar it should use it. If you DON’T, you should get a unique avatar generated by your email adress.

10:30am All Done: The “wavatars” was going to be a plugin for public release. I thought it was ready for distrubution, but the problems I encountered just installing it on my own server indicate that I need to add some version checking. I REALLY wanted it to be seamless and useable for non-technical users, but I see there is no way to avoid it: The user has to be at least savvy enough to set directory permissions to 777 for the thing to work. PHP can create the directory, but not set it to 777. Dang.

I still do plan on releasing wavatars, although I need to test it a bit better to make sure it can fail gracefully instead of puking PHP errors all over the comments when something goes wrong.

 


 

Half-Life 2 Episode 2: T Minus One

By Shamus Posted Friday Dec 14, 2007

Filed under: Game Reviews 32 comments

hl2ep2_t_minus_one1.jpg
It’s sunset again. This means that for Gordon, it’s been about five days since he stepped off the train in City 17 and saw the smiling face of Dr. Breen. Half-Life 2 took three days. Episode One took an additional day. Episode Two seems like it should have been more than a day, but the sun never went down. (In a couple of spots in the mines you can look straight up and see the sky. It’s clearly not night. Even if it was, that would have to be be the night of day four. No matter how you look at it, it can’t be more than five days since the opening of HL2.

They should have titled this “The Cutscene Chapter”. Deprived of the ability to communicate, there isn’t much for Gordon to do in this part of the game except push the button and listen to people talk. The rocket launch goes off flawlessly, the portal energy is negated, and Earth is saved. Yay for the good guys!

And yet, this is the darkest chapter in the entire story thus far. Continue reading ⟩⟩ “Half-Life 2 Episode 2: T Minus One”

 


 

Fusic

By Shamus Posted Friday Dec 14, 2007

Filed under: Pictures 37 comments

Here is a post I wrote about my previous mobile phone, two years ago. It turned out to be more phone than I needed. I don’t commute, and I spend most of the day in front of a decent computer with broadband, so I have no use for all the web / messaging features it had. About the only feature that might have been useful to me (aside from, you know, making phone calls) was the camera. I tried it once, discovered that it sucked, and never bothered with it again.

There were many little features on the phone that I never used. I investigated them once, and found that almost everything web-related was broken, cost money to use, or both. This didn’t bother me, since all I wanted was a phone, but it did make me wonder why they bother.

Yesterday I got a new phone:

fusic1.jpg

It’s nice, although I’m not an expert on the things and I’m probably not the best person to ask. This is the phone Sprint was giving away for free, which means it’s probably crap. It’s a… “Fusic”. No, I’m not making that up. Somebody really named a phone Fusic. It sounds like a blend of “F*** you” & “music”, which is actually pretty appropriate given the marketing focus they have. The big feature they’re trying to draw attention to is the built-in music store, where you can buy DRM-saddled music which only plays on the phone. For $2.50. Their offer is so outrageous and inept it actually made me giggle when I saw it. It’s like seeing a guy in the street selling betamax tapes of terrible movies for $100. You wonder, does he know what a complete tool he’s being?

fusic2.jpg
On the other hand, the phone is a fine MP3 player, which is all that really matters. It’s been ages since I bought any digital music directly. I’ve found the most reliable way to get unencumbered digital music is to just buy physical media and rip it. It’s stupid, but it works.

The size of the phone – my big complaint with my previous phone two years ago – is much better. It’s more width and less depth, which means it fits in my hand when I hold it, fits on my face when I use it, and doesn’t leave a big lump when I put it in my pocket. Progress!

It has a thousand features I’ll never use, most of which I have turned off to save money. I can’t comprehend their pricing system, which would give even the most eager rules lawyer the heebie-jeebies. From what I can tell most features take a flat monthly fee to enable, and then they nickel-and-dime you when to make use of them. Again, I laugh at a company that will send me a new phone via overnight express shipping for free, and then try to haggle a nickel out of me over a text message. It’s amazing that after all this technological progress what the phone companies really want is to bring back the concept of the pay phone: Their vision is to give everyone their very own pay phone where the phone company can hit them up for loose change while the thing is in use. No matter how many gadgets they pack into the phone, aparently the part they miss the most is the one where the user inserts their coins.

 


 

Sprint + Nextel

By Shamus Posted Thursday Dec 13, 2007

Filed under: Rants 45 comments

Our family uses Sprint for our mobile phones. A while back they merged with Nextel. I’m sure they were planning on a merger that combined powers, like the way several transformers can connect to each other and form a massive juggernaut of cybernetic awesome that will obliterate your neighborhood while saving it from evil. Instead, the merger acted more like a transporter malfunction. Where you once had two semi-capable crew members, you now have one guy with four arms, half a brain, and lungs on the outside of his body.

I suppose these cell-phone mergers can continue to make larger and larger companies of ever increasing ineptitude, until all we have is one huge company that only sells broken phones and sends out monthly bills written in Klingon with live scorpions to people who may or may not be customers.

Back in the 80’s, Douglas Adams made the computer game Bureaucracy, the goal of which was to confront a long and complicated series of bureaucratic hurdles resulting from a recent change of address. At first I thought that the Sprint / Nextel webpage was hopelessly defective and dysfunctional, but then I realized that it’s entirely possible that they are simply branching out into the burgeoning videogame market. The site pays wonderful homage to the old Douglas Adams text adventure, and really brings the experience into the 21st century. It’s now an MMO where millions can go and try to interact with the company in humorous ways, like getting them to stop billing you for features your phone doesn’t even support. (If you want to wuss out you can call tech support, but only if you speak Farsi and can conclude your business before the two-minute “random” disconnect timer expires.)

There are countless ways to log in to the website. Use your email. Use one of your several phone numbers. Use your user name. Each one has a different password. Each one has a different way in which it’s supposed to inform you of lost passwords (although I hasten to add that in this case, THEY seem to be the ones who lost it, not me) and a different mechanism for verifying your identity to reset your password. The only unifying attribute of all of these systems is that none of them work. If you do manage to log in with one set of credentials, it will sometimes prompt you to use a different set for no apparent reason, then fail and log you out. It’s like playing Chutes & Ladders, except that all chutes lead back to the very beginning and there’s no way to win.

It’s obvious that these problems are the result of mooshing together a couple of companies. Some bean-counters looked at the numbers and figured out that Sprint customers + Nextel customers = more money, without considering what sort of abominable clusterfarg it was going to be to get two distinct networks to work as one. As I navigate the page it bounces between my. sprint.com and go.nextel.com without warning. I shudder to think of the crude hacks they must have employed in a rush to make the site as semi-functional as it is. I’m glad I don’t work in IT in that place. I’m sure they are working long hours to solve impossible difficulties on a live system while the people who created the problems in the first place phone them up every few minutes to ask them what’s taking so long.

While the company is inept at things like billing, providing support, and managing a mobile phone network, they are the absolute masters at the business of giving phones away for free. The skill at which they are able to do this is awe-inspiring. On Tuesday afternoon my wife picked out her new phone (using the only part of their website that works, the give-me-a-free-phone part) and it arrived the next morning. Twelve hours later. I thought this was a fluke, but it happened again. I upgraded my phone last night just before going to bed, and today it was on the porch before I’d finished my morning coffee. That sort of high-speed shipping isn’t cheap. The shipping itself is probably worth as much as the phone. How do they do that?

I’m really enjoying the irony of a communications company which is more or less unable to communicate with its customers, but is excellent at distributing stuff for free. The way things are going right now, it’s going to take me longer to set the thing up than it did for them to get it to my house.

 


 

Half-Life 2 Episode 2: Our Mutual Fiend

By Shamus Posted Wednesday Dec 12, 2007

Filed under: Game Reviews 56 comments

hl2ep2_mutual_fiend1.jpg
The first half of this chapter consists entirely of cutscenes. Alyx is reunited with her father. We meet the grouchy and difficult Dr. Magnusson. We get to see the rocket they’ve been working on. We see Kliener again and say goodbye to Llamar his pet headcrab. Everyone chats and reminds us about the key plot points: The destroyed citadel left a big swirly beam of energy that can be opened into a super portal, allowing the Combine to invade us again, only this time they probably won’t muck about trying to subjugate us, they will probably exterminate us outright. In order to prevent the portal from opening, we have to launch this rocket so that it can emit some Macguffin rays at the swirly beam and close it forever.

We meet Uriah the Vortigaunt. Unlike all the other Vorts, he has a real name. He wears clothing.

Next we have a battle to kick the Combine out of the complex. It’s not clear at first if they somehow know about the rocket, or if they are just invading the place on general principles. It’s a pretty conventional battle. The only notable part is that we get to deal damage to an advisor for the first time. I’m not sure if the bullets truly hurt it or merely annoyed it, but in either case it flees before we can give it the beating it so richly deserves.

hl2ep2_mutual_fiend3.jpg
Once that attack is thwarted, we regroup with the others and finally get a look at that data packet we’ve been hauling around since the previous episode. It’s been a long wait, and in true Half-Life fashion the answers only lead to more questions. Here we see an explicit link between the Half-Life universe and Portal, and the characters mention Aperture Science by name. It seems Aperture lost a cargo ship ages ago – before the alien invasion – and nobody knows what became of it. Judith Mossman somehow found it embedded in the ice of Antarctica, and it seems obvious that at least part of the next episode will take us there. Eli is adamant that we destroy whatever technology is lurking there, fearing that the Combine will get it, or that it will blow up in humanity’s face if we try to use it.

Eli and Gordon are left alone for a moment, and he makes reference to “Our mutual friend” – the mysterious G-man. This is the first time in the series that anyone else seems to be aware of him. Eli seems ready to divulge more, but Dr. Magnusson barges in before he can tell us anything useful. Once again we walk away from a conversation without learning any of the key answers for which we’ve waited so long.

Speculation: While Valve hasn’t confirmed anything, pretty much everyone expects that at least part of the next game will take place in Antarctica. I think the technology Eli fears is the portal gun, and I think we’ll get to use it for a section of the game, after which we’ll be obliged to destroy it.

In a previous post someone suggested (although I can’t find the comment now) that the G-Man may end up being a sort of “good” guy, or at least an ally. He’s evil, but his purposes seem to go against the Combine. He’s saved Gordon. He saved Alyx. By doing so he’s also saved humanity. He certainly didn’t do this for humanitarian purposes. Why he’s doing it remains a mystery, but he’s clearly a being driven by pragmatic self-interest, not avarice and cruelty like the Combine. Some people have speculated that the “final” confrontation of the series will be between Gordon on the G-Man in some form, but my guess is that the G-Man will continue to nudge Gordon along until the end, and then slip away in his magic doorway once the fight is over and the Combine is defeated.

Dr. Magnusson reveals that the Combine is sending striders at the complex for the express purpose of taking out the rocket. Ok, so they do somehow know about the rocket. It’s not clear how the Combine – now cut off from their homeworld, deprived of their primary base of operations and set adrift in the wilderness – have managed to secure that information. I suppose we can assume the telepathic advisors discerned this with their mental powers. Or something.

The final set piece is huge and ambitious. We must fight waves of striders in a huge outdoor area, and must prevent any of them from getting close enough to the base to destroy the rocket silo. Towards this end, Dr. Magnusson presents us with “The Magnusphere”, a stickybomb which we can pick up with the gravity gun, place on the back of our car, drive out to a strider, and then use the gravity gun to shoot the Magnusphere at the body of a strider. Assuming we don’t miss, the sphere will stick to the surface of the beast, and then we just need to switch to some other weapon and shoot the Magnusphere to detonate it, thus destroying the strider. Oh yeah: Kill all the escorting hunters first, or they will shoot the Magnusphere out of the air before it gets near the strider.

Let us agree that this is the most inelegant and convoluted method of dispatching an enemy you could hope to come up with. I guess I wouldn’t mind so much if I didn’t see NPCs dashing around with rocket launchers, which can do the job easier, faster, and with less hassle, as well as the fact that they are effective against all foes, not just striders.

Ignoring the fact that Dr. Magnusson seems to be making life hard for us on purpose, this makes for a very interesting fight. It’s quite frantic, and there is a powerful sense of tension as the striders blast the outlying buildings on the way to the silo, shrinking the area you have in which to operate, and increasing the distance you have to drive to get a new Magnusphere. It’s one of those situations where failure makes things harder and success makes things easier (Valve usually goes for the opposite) and the result is some truly chaotic, heart-pounding conflict.