tips and tricks for movable type
automated mailto link for an author
November 06, 2002
You probably have a contact link somewhere on your page which allows people to send you mail. Instead of hard-coding the email address, you can use this code:
<a href="mailto:<MTEntryAuthorEmail spam_protect="1">">send me mail</a>
</MTEntries>
(Of course, change girlie to your author name.)
The advantage to this method is that, if you ever want to change your email address, you can do so in one place (your Author Profile), rebuild all your pages, and every instance of your email contact link will be updated without your having to do it manually per template. Plus, you get the benefit of the spam_protect attribute.
TrackBack: 1
(URL: http://www.thegirliematters.com/sf/mt-track.cgi/111)
» Enhancing the Blog Installation
Excerpt: If I ever had time, I could install a number of plugins for Movable Type: search, related entries, word count.
Weblog: Emmanuel's Professional Blog
Tracked: 11.22.02 12:44 AM
Comments
That is a good tip.
I was wondering the other day about a somewhat related problem: if there is a way to make an email address used in a post or comment "spam_protected". Maybe with one of Brad's notorious plugins, but still have not figured out howto.
Could maybe use the macro feature and auto link any word with an '@' in it as "href=mailto:...".
Have you seen this question before? Maybe on the forum?
Forum Thread
=)
I know who to ask :-) ...
Thanks girlie!
Lawrence
Girlie,
I am using your tip <MTEntries lastn="1" author="girlie"> now also in my RSS feeds, since I have a second author on my Blog now.
BTW I made a MT template for Comments in RSS 2.0 style which http://www.groovycompany.nl/Events/comments.xml" rel="nofollow">validates, if anyone is interested...
Lawrence
Hi, I have a question I'm hoping you can help me with. I want to add a link like the one you have here for email that will show up only when comments are turned off. Any help or suggestions you may have would be greatly appreciated!
I would like to have a Contact Form like this one but it shouldn't be part of the comment-feed for an entry.
Does MT have a cgi script already setup to use such a form?
Thanks
Neil