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: blogging, real estate, real estate marketing, technology
Todd Carpenter says:
Send it over Greg. That’s cool. One other thing. I don’t know squat about how hard it would be to do, but I think quite a few people would love something like this as a Java Script.
I built an experimental blog to show how WordPress could be used as a simple, and completely free web site. freelo.wordpress.com
One drawback to wordpress.com is the inability to add PHP, or plugins. But you can add Java into a text box.
Just a thought.
January 23, 2008 — 5:15 pm
Jeff Kempe says:
YOU’RE THE BEST!
Send it, I’ll do my best to follow instructions and display it proudly. I’m thinking I could use a complete Cameron makeover…
(So…what’s PHP?)
January 23, 2008 — 5:48 pm
Jeff Kempe says:
Oh, c’mon. That was too easy!
Cut. Type. Paste.
Done!
Thank you!
January 23, 2008 — 6:28 pm
Loren Nason says:
i’ll try it Gregg.
send it on over
January 23, 2008 — 7:10 pm
CJ, Broker in L A, CA says:
Greg,
I just sent you an email. So glad to see you included a captcha thingie. I remember being blown away by the speed and aggression of the spambots on a form I tried a few years back.
January 23, 2008 — 7:16 pm
Eric Blackwell says:
@Todd C- That’s why I host my own…so I can add plugins and cool stuff to my heart’s content. It is not as hard as it sounds…simple actually… and let’s you really get the full benefit of the generosity of Gregg and others that develop for WP. I do that with our agents and it has made ALL the difference.
@Greg- Very nice job on this. There are free plugins out there, but I really like the real estate specific nature of yours.
@CJ- Captcha (or equivalent) is a must these days.
January 24, 2008 — 5:17 am
Todd says:
Not to be rude, but this proprietary solution is not the answer – XFN, hCard and Micro formats are:
http://microformats.org/wiki/xfn
http://microformats.org/wiki/hcard
Note: FireFox 3.0 will support both natively
January 24, 2008 — 7:14 am
Arizona Real Estate says:
Hi Gregg,
I don’t know too much about this sort of stuff (or plugins) but I was wondering if this code could be placed on both a blog and a website?
My blog only reaches spammers, so I’m not too enthusiastic to put your code on that; but I would like feedback from my website’s visitors.
Do you think I should try this code, or should I implement some other code? Any thoughts?
Thanks,
January 24, 2008 — 11:23 am
Todd Carpenter says:
Hey Eric, I host my own sites. Actually, HostGator does. But I have control. But I also think wordpress.com is a great place for bloggers to start. That’s the only reason why I thought it might be a good idea.
Anyway, thanks for the script Greg. I mainly wanted it to learn about the code. I’ going to try something different with it and will let you know if it works.
January 24, 2008 — 12:04 pm
Todd Carpenter says:
yourfreeblog.rembex.com. It’s on the to-do list already.
January 24, 2008 — 12:24 pm
Greg Swann says:
> I was wondering if this code could be placed on both a blog and a website?
It should work as advertised from any web page on any site that has PHP available — any Apache webserver, which is almost all webservers.
The only caveat is that I’m not controlling for width because I’m assuming the narrow space available in a sidebar. This skinny little form was too wide as written for Teri Lussier’s and Jay Thompson’s weblogs. But allowing for width, you should be fine.
January 24, 2008 — 12:34 pm
Dan Sullivan says:
I am curious about your opinion of a “no spam” policy. If someone asks you a question and you respond, can they be put on the newsletter list, or does no spam mean that they are excluded from that?
January 24, 2008 — 10:22 pm
Derek says:
Dan:
I hate it but I know Brian Brady used to have me subscribed to one of his newsletters and I never knowingly subscribed!
A few other RE bloggers whom I have emailed have put me on their lists as well. I hate it, but what I hate even more is having them to see that I unsubscribed! Had it been someone I did not know, I would care as much so…
January 26, 2008 — 2:38 pm
Wayne Long says:
Thanks for the contact box. It really frustrates me that so many webmasters make it so difficult to contact them.
On my website I have a contact box on almost every page somewhere so that people can contact me at any point in their visit. As soon as I started this practice I immediately began getting a major increase in contacts. Thanks for making it so simple for everyone.
February 3, 2008 — 3:02 pm