There’s always something to howl about.

Speaking in tongues: A universal contact form for real estate weblogs…

Nota bene: Slightly amended. Reread carefully.

I landed on Jeff Kempe’s weblog yesterday. In the way of the web, I don’t remember how I got there or why I came. But I spent a little while looking around, without quite realizing what I was looking for.

And then it hit me: There’s no contact information. No phone number. No “email me!” link. No contact form. You can find Jeff’s phone number on the About page, but that’s about it.

Maybe he wants it that way. Maybe it’s none of my business. And maybe I’m not so religious about this stuff that I can go out look for motes — or even beams. But Brian Brady is dead-on when he talks about asking for the business, so I decided to do something for Jeff, whether he likes it or not.

And: You can play, too.

What I came up with is a sort of universal contact form for real estate webloggers.

You can see how it looks on DistinctivePhoenix.com in the image to the right. It’s built to adopt the look-and-feel imposed by your weblog’s theme’s CSS file, so it should look just right when you deploy it. I deliberately made it narrow because sidebars can be pretty tight places.

The code itself is pretty simple, so if you feel comfortable editing PHP, you can go in and modify it to your heart’s content.

But if the thought of editing software makes your brain ache, you can deploy this form by editing only five lines of code, all very simple.

First, you have to email me to get me to send you the form. For the life of me, I can’t figure out how to get a PHP file to download from our server without executing. I can email you a zip file, but our anonymous FTP is so anonymous I can’t figure out its true name.

Anyway, when you get the PHP file, you’re going to do this — in a text editor, not in Microsoft Word: Edit the second through the fifth lines. They’ll start out looking like this:

$myName = "Firstname Lastname";
$myCompany = "The Almagamated ClusterFunk Team";
$myEmailAddress = "MyEmailAddress@MyFileServer.com";
$myWeblogAddress = "http://www.MyExactWeblogURL.com/";

Just edit the copy between the quotation marks and leave everything else — including the quotation marks — alone.

When this form runs, it’s going to send email to you and to your correspondent. That’s how you’ll get the contact information. It’s also going to load whatever page you assign to “$myWeblogAddress”. If you want, you can build a “thank-you” page like this one. If you do that, paste that exact address into the space for “$myWeblogAddress”.

Save the file and then FTP it up to your file server. If your weblog runs off the top level of your server, put it there. If it runs from “/public_html”, put it there. If it runs from a subdirectory (like BloodhoundBlog does), put “ContactMeForm.php” in the same subdirectory as the top level of your weblog.

Now we need to edit one more line. In the “sidebar.php” file for your current theme, add this line:

<?PHP include ("ContactMeForm.php"); ?>

where you want the contact form to appear.

Save the file and then FTP “sidebar.php” into the folder with the files for your current theme (for a hosted WordPress weblog, that’s “wp-content/themes/YourCurrentThemeFolder”).

(If you’re using WordPress’ “widgets” code from within WordPress, paste that line where you want it to go in the sidebar widget editor.)

Here’s what should happen if this is working right: When you submit the form, you should see the web page you specified in “$myWeblogAddress”. Soon afterward, you should get a cordial email that the form will have sent to you and to your correspondent.

If these things don’t happen: You may not have done everything as described here, so check your work to make sure. Alternatively, your file server may have one or more features of PHP turned off. The most likely candidate for exclusion is the “mail” function, which hosting vendors often turn off because it can be used by spammers. If this or other PHP functions are turned off, you will need your hosting vendor to turn them on. Don’t take any grief from them. You’re paying for these features.

Assuming all goes well, now you have a simple, non-threatening contact form on your weblog. And it could be Jeff Kempe does, too!

Technorati Tags: , , ,