Aug 23 2007

Tips For Formatting Blog Comments

Categories: General Dave Rathbun @ 10:08 pm

Help, My Code Is GONE!

This is not my first blog. However, it is my first blog where people are regularly trying to include code samples in their comments. After two or three comments have been lost due to WordPress ignoring everything after a < I finally figured out what was going on. This post contains a few tips on how to include code (variable formulas, SQL code, and so on) when leaving a comment. The information presented here may very well be appropriate for other blogs as well.

Including Code Samples

If you want to include code samples, then you have to tell my blog that the text is actually code and not a sneaky attempt to include web site addresses. WordPress validates anything that looks like HTML/XHTML by fairly strict rules, and if it fails to validate, it’s removed. Web Intelligence formulas are less succeptable to this since they surround object names with [Square Brackets] but full client variables are enclosed in <Angle Brackets> which triggers the validation process.

The solution is quite simple: include the <code>appropriate text from your comment> inside the code tags as I have shown here. This will accomplish two things. First, it will tell my blog software not to validate your entries as HTML/XHTML. Second, it will use a nice fixed-width font like courier to format your code.

Available Comment Tags

Here is a listing of the other tags you can use while leaving a comment, and a description of what they do. In some cases the tag needs to be opened and then closed. For example, to make something bold you need <strong> before the text and then </strong> after the text. Everything between those two tags will be bold. You can combine certain tags to make something bold italic as well.

Code Function
<a href=” ” title=” ” >Link Text</a> Include a web link. You don’t have to do this if you don’t want to, as WordPress will automatically recognize an unformatted web link and make it clickable.
<acronym title=””></acronym> Format acronyms like SQL
<blockquote cite=” ” ></blockquote> Uses special formatting for quotes

This is a quote, which is set apart from the regular text. If you want to quote a prior comment you can copy / paste the text into your comment and format it like this so it stands out.

<code></code> Skips HTML/XHTML validation and applies fixed-width font
<em></em> Applies italic formatting for emphasis
<strike></strike> Allows you to show fixes corrections you have made in your text, usually used for specific effects rather than to track edits
<strong></strong> Applies bold formatting for stronger emphases
<sup></sup> <sub></sub> You can set up superscripts or subscripts in your comments if you need to.
<u></u> Applies underline formatting

Comment Moderation

When you leave your first comment it will be placed in a moderation queue. It will not show up to other folks reading my blog until I have a chance to review it. Please do not be offended, every single person that leaves a comment goes through the exact same process. Blog-spam (as well as board-spam such as we incurred on BOB earlier in 2007) is the new target of those folks that would like to sell you various items used to do various things to various portions of your anatomy, sell you replica watches, get your degree online, or offer you your share of $11M US that is sitting in some foreign account. I wonder why it’s always a nice round amount. Does anybody ever have an account balance that is exactly 11,000,000.00? But, I digress. 😆

Once you have one comment approved your follow-up comments should be automatically approved. On some occasions the anti-spam filter may kick in and ask me to approve you again. Don’t worry, that should happen fairly quickly. Oh, and if you change anything about the way you post comments (like your email address, for example) you’ll have to be approved again.

I didn’t start this blog to be a lecture. I want to encourage comments and feedback, and I know it has probably been frustrating for some. I have a feeling that this post will help. If you have any questions, leave a comment. 😀

2 Responses to “Tips For Formatting Blog Comments”

  1. Comment by Anita Craig

    I have a comment about the list of “Recent Comments”. 😉

    I’d like a longer list! Or maybe a link to something like “Comments left in the last 24 hours”. ;-0

  2. Comment by Dave Rathbun

    That’s a great idea, Anita. You can also subscribe to the comments if you use an RSS reader. I don’t, so I have no idea how that works. 🙂

    I will see what I can do.