Somehow it all fits together.
  • 15
  • Mar, 08

My Blog is Now Running on WordPress

Well, it’s my second migration. First I built this blog on my own using php. Then I decided to venture out and stop re-inventing the wheel and use a real blogging software tool. I chose Mephisto at the time (about a year ago), but I eventually regretted that and am now completely content with WordPress. I doubt I will ever switch again. I have researched it well this time and talked to professional bloggers who have researched it well. WordPress is king.

Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • del.icio.us
  • Facebook
  • e-mail
  • StumbleUpon
  • Technorati
  • TwitThis
  • 04
  • Mar, 08

Add a field to Contact Us form in Drupal

I needed to add a checkbox to Drupal’s Contact Us form for a client of mine. The client requested that I add a way for those filling out the form to request a newsletter. I discovered it’s pretty easy to add a form field and get it added as part of the email that’s sent. You just need to hack into the module on your server (sorry, no GUI for this). Here’s what I did:

First, find the module file: modules/contact/contact.module

If you prefer command line editing open up that file in your favorite editor. If you prefer the download/edit/upload approach via FTP that will work also. I assume if you have interest in this article, that you have some knowledge of either of those 2 methods. If not, I wonder how you set up Drupal in the first place.

Now that you are in edit mode, find a chunk of code that talks about not allowing anonymous users to send themselves a copy for spam reasons. Found that comment? Good, now just above it you are going to add your field. I found it easy to copy/paste an existing form element and edit it’s contents, but you can type it out if you like. Actually, feel free to copy/paste and edit my example below. Here’s what I ended up with:

 $form['newsletter'] = array('#type' => 'checkbox',
    '#title' => t('Sign me up for the Newsletter'),
  );

You may want to add a comment somewhere in there to remind yourself at a later date that this is no longer part of the original configuration.

That was easy, now I just need to tell it to add content to the email sent out so that when that box is checked, it actually does something! Next look for a chunk of comment code that looks like this:


// Compose the body:

below that you will find a couple lines that start with “$message[] =” which is where the body of the email’s message gets created. Just add another line that says something like the following:

 if ($form_values['newsletter'] == 1) {
    $message[] = "Yes, please send me a newsletter";
  } else {
    $message[] = "No, please do not send me a newsletter";
  }

Now crank open your form and test it out. Assuming you are the recipient of the email being generated, you will get a nice extra piece of text at the bottom of the email with this new content based on the user’s input.

Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • del.icio.us
  • Facebook
  • e-mail
  • StumbleUpon
  • Technorati
  • TwitThis
  • 25
  • Jan, 08

See who’s following your friends on Twitter

Twitter allows you to see who users are following, but for whatever reason, doesn’t allow you to see who is following users. This is lame, and I’m not sure what the thought process is behind it. But there’s a neat little Google search hack I came up with today that you can use to see just who’s following any given user. I’m pretty sure that this won’t give you an exact count, but it’s close enough.

just plug the following into your friendly Google search engine:

*username* “with_friends” site:twitter.com

The results will not only give you a nice list of who’s following that person, but a link to each of their Twitter pages.

So, for example. To see a list of who’s following Barack Obama, you would use the following search:

BarackObama “with_friends” site:twitter.com

Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • del.icio.us
  • Facebook
  • e-mail
  • StumbleUpon
  • Technorati
  • TwitThis
  • 29
  • Dec, 07

Mephisto to Typo migration?

This blog you are reading is powered by Mephisto. I originally created this blog using my own code in PHP and was so tired of re-inventing the wheel that I went out and researched what I thought would be the best blogging software for my needs. I’m in love with Ruby on Rails, so one of my requirements was that it had to be using that technology. In my research I narrowed it down to Typo and Mephisto, but there wasn’t much activity over in the Typo camp and there were plenty of people blogging about their switch from Mephisto to Typo. So, I chose Mephisto thinking it was the better of the two.

I’ve since realized that Typo’s development activity has gone way up, and Mephisto’s has gone way down. I have been using Typo on another blog venture of mine and am in love with it. Actually, I’m loving it much more than Mephisto these days for several reasons, most of which pertain to user friendliness. I did run into an issue with trackback spam on Typo, which I’ve read as a big complaint about it. But trackbacks aren’t even an option on Mephisto, so what’s the big deal?

The point I’m trying to make here is this. If there’s anyone out there with experience migrating from Mephisto to Typo I’d like to hear from you. There’s plenty of google hits about going from Typo to Mephisto, but nothing in the opposite direction. I’m interested in converting this blog, Tongue and Groove (once again).

Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • del.icio.us
  • Facebook
  • e-mail
  • StumbleUpon
  • Technorati
  • TwitThis
  • 11
  • Dec, 07

I got screwed by Adobe AIR Beta 1

For anyone out there using Adobe AIR products already: BEWARE!

Something that I didn’t pay much attention to when downloading Beta 1 was that it was going to stop working on December 11. I’ve been using an application called Ora Time and Expense that only works with Beta 1, which is why I haven’t switched to Beta 2 yet. But today that app stopped working.

I was using Ora Time and Expense to track my time for a project I’m working on. Actually, I finished on Saturday and was going to look at my time tracked tonight to create an invoice for the client. Wouldn’t you know it? Adobe AIR Beta 1 stopped working, and therefore I couldn’t access the time I had tracked. Ora’s website gives no help as they acknowledge that it only works with Beta 1 and for months now has promised a new version.

I finally had to get a Firefox extension that allowed me to view SQLite databases and search my hard drive for the te.db file where all of my data was stored. What a pain!

Just remember, Beta 2 stops working on June 1, 2008. If you find the next killer AIR app, make sure it’s not something you’ll need past that date.

Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • del.icio.us
  • Facebook
  • e-mail
  • StumbleUpon
  • Technorati
  • TwitThis