This page is for posters to test comments prior to submitting them to WUWT. Your tests will be deleted in a while, though especially interesting tests, examples, hints, and cool stuff will remain for quite a while longer.
Some things that don’t seem to work any more, or perhaps never did, are kept in Ric Werme’s Guide to WUWT.
Formatting in comments
WordPress does not provide much documentation for the HTML formatting permitted in comments. There are only a few commands that are useful, and a few more that are pretty much useless.
A typical HTML formatting command has the general form of <name>text to be formatted</name>. A common mistake is to forget the end command. Until WordPress gets a preview function, we have to live with it.
N.B. WordPress handles some formatting very differently than web browsers do. A post of mine shows these and less useful commands in action at WUWT.
N.B. You may notice that the underline command, <u>, is missing. WordPress seems to suppress for almost all users, so I’m not including it here. Feel free to try it, don’t expect it to work.
|b (bold)||This is <b>bold</b> text||This is bold text|
|Command strong also does bolding.|
|i (italics)||This is <i>italicized</i> text||This is italicized text|
|Command em (emphasize) also does italics.|
|a (anchor)||See <a href=http://wermenh.com>My home page</a>||See My home page|
|A URL by itself (with a space on either side) is often adequate in WordPress. It will make a link to that URL and display the URL, e.g. See http://wermenh.com.
Some source on the web is presenting anchor commands with other parameters beyond href, e.g. rel=nofollow. In general, use just href=url and don’t forget the text to display to the reader.
|blockquote (indent text)||My text
More of my text
More of my text
|Quoted text can be many paragraphs long.
WordPress italicizes quoted text (and the <i> command enters normal text).
|strike||This is <strike>text with strike</strike>||This is text with strike|
|pre (“preformatted” – use for monospace display)||<pre>These lines are bracketed<br>with <pre> and </pre>||
These lines are bracketed with <pre> and </pre>
|Preformatted text, generally done right. Use it when you have a table or something else that will look best in monospace. Each space is displayed, something that <code> (next) doesn’t do.|
|code (use for monospace display)||<code>Wordpress handles this very differently</code>||
|See http://wattsupwiththat.com/resources/#comment-65319 to see what this really does.|
Using the URL for a YouTube video creates a link like any other URL. However, WordPress accepts the HTML for “embedded” videos. From the YouTube page after the video finishes, click on the “embed” button and it will suggest HTML like:
<iframe width="560" height="315" src="http://www.youtube.com/embed/yaBNjTtCxd4" frameborder="0" allowfullscreen> </iframe>
WordPress will convert this into an internal square bracket command, changing the URL and ignoring the dimension. You can use this command yourself, and use its options for dimensions. WordPress converts the above into something like:
Use this form and change the w and h options to suit your interests.
Images in comments
If WordPress thinks a URL refers to an image, it will display the image
instead of creating a link to it. The following rules may be a bit excessive,
but they should work:
- The URL must end with .jpg, .gif, or .png. (Maybe others.)
- The URL must be the only thing on the line.
- This means you don’t use <img>, which WordPress ignores and displays nothing.
- This means WordPress controls the image size.
- <iframe> doesn’t work either, it just displays a link to the image.
If you have an image whose URL doesn’t end with the right kind of prefix, there may be two options if the url includes attributes, i.e. if it has a question mark followed by attribute=value pairs separated by ampersands.
Often the attributes just provide information to the server about the source of the URL. In that case, you may be able to just delete everything from the question mark to the end.
For some URLs, e.g. many from FaceBook, the attributes provide lookup information to the server and it can’t be deleted. Most servers don’t bother to check for unfamiliar attributes, so try appending “&xxx=foo.jpg”. This will give you a URL with one of the extensions WordPress will accept.
WordPress will usually scale images to fit the horizontal space available for text. One place it doesn’t is in blockquoted text, there it seems to display fullsize and large images overwrite the rightside nav bar text.
Special characters in comments
Those of us who remember acceptance of ASCII-68 (a specification released in 1968) are often not clever enough to figure out all the nuances of today’s international character sets. Besides, most keyboards lack the keys for those characters, and that’s the real problem. Even if you use a non-ASCII but useful character like ° (as in 23°C) some optical character recognition software or cut and paste operation is likely to change it to 23oC or worse, 230C.
Nevertheless, there are very useful characters that are most reliably entered as HTML character entities:
|Type this||To get||Notes|
|<||<||Less than sign
Left angle bracket
|°||°||Degree (Use with C and F, but not K (kelvins))|
|Superscripts (use 8304, 185, 178-179, 8308-8313 for superscript digits 0-9)|
|Subscripts (use 8320-8329 for subscript digits 0-9)|
|ñ||ñ||For La Niña & El Niño|
|±||±||Plus or minus|
| ||Like a space, with no special processing (i.e. word wrapping or multiple space discarding)|
|>||>||Greater than sign
Right angle bracket
Generally not needed
Various operating systems and applications have mechanisms to let you directly enter character codes. For example, on Microsoft Windows, holding down ALT and typing 248 on the numeric keypad may generate the degree symbol. I may extend the table above to include these some day, but the character entity names are easier to remember, so I recommend them.
WordPress supports Latex. To use it, do something like:
Linking to past comments
Each comment has a URL that links to the start of that comment. This is usually the best way to refer to comment a different post. The URL is “hidden” under the timestamp for that comment. While details vary with operating system and browser, the best way to copy it is to right click on the time stamp near the start of the comment, choose “Copy link location” from the pop-up menu, and paste it into the comment you’re writing. You should see something like http://wattsupwiththat.com/2013/07/15/central-park-in-ushcnv2-5-october-2012-magically-becomes-cooler-in-july-in-the-dust-bowl-years/#comment-1364445.
The “#<label>” at the end of the URL tells a browser where to start the page view. It reads the page from the Web, searches for the label and starts the page view there. As noted above, WordPress will create a link for you, you don’t need to add an <a> command around it.
One way to avoid the moderation queue.
Several keywords doom your comment to the moderation queue. One word, “Anthony,” is caught so that people trying to send a note to Anthony will be intercepted and Anthony should see the message pretty quickly.
If you enter Anthony as An<u>th</u>ony, it appears to not be caught,
so apparently the comparison uses the name with the HTML within it and
sees a mismatch.