tips and tricks for movable type
suppress display of blank comment fields
May 02, 2003
Depending on your information requirements for visitors making comments on your blog, you may not want those fields displayed if they're left blank. You can use the MTIfEmpty plugin to hide them.
Code Sample:
<MTComments>
<$MTCommentBody$><br />
<span class="comments-post">Posted by <$MTCommentAuthor$> on <$MTCommentDate$><br />
<MTIfNotEmpty var="CommentEmail">
<a href="mailto:<$MTCommentEmail spam_protect="1"$>">Email</a>
</MTIfNotEmpty>
<MTIfNotEmpty var="CommentURL">
<a href="<$MTCommentURL$>"
target="_blank">Link</a>
</MTIfNotEmpty></span>
</MTComments>
<$MTCommentBody$><br />
<span class="comments-post">Posted by <$MTCommentAuthor$> on <$MTCommentDate$><br />
<MTIfNotEmpty var="CommentEmail">
<a href="mailto:<$MTCommentEmail spam_protect="1"$>">Email</a>
</MTIfNotEmpty>
<MTIfNotEmpty var="CommentURL">
<a href="<$MTCommentURL$>"
target="_blank">Link</a>
</MTIfNotEmpty></span>
</MTComments>
Comments
been there, done that , got the t-shirt.. *sigh*
comments still spawn the authorlink/commentURL in the commentwindow :o/
meanwhile I'm losing overview of changes and whatsoever..
I'd love some help ^_^
Not sure what the comment URL opening in the same window has to do with suppressing the display of blank comment fields - but have you seen MTCommentAuthorLink and Sanitize Specs??
Wah, i lost trakc of where I was surfing. Since it was quite late and me being highly confused ^_^ i posted on the wrong site ;)
got ur link, hooked to the forum and tadaaa, it works
many thanks, u made my day *g*