PlanetMike.com

Blog

Michael Clark's journal of important and not-so-important thoughts.



Support Me

Please support Michael Clark

Last 10 Articles


Categories


Archives


MonthChunks


CodeQuote

Update 2008-01-17: I found a bug that breaks the display of code in certain situations, such that the close code tag never kicks in. Silly, I know. I’m going to work on this on Thursday afternoon.

When you enter text on a WordPress blog, quotation marks and apostrophes are displayed as smart quotes, also known as curly quotes, and sometimes as fancy quotes. But if you are including html or other programming code on your page, when someone copies and pastes the code, they end up with a mess since most programming interpreters don’t like smart quotes. CodeQuote disables smart quotes within <code> and </code> blocks.

Example (Regular Text)
Michael Clark said “Hello, World! It’s a wonderful day, isn’t it?”

Example (in a <code> block)

Michael Clark said "<b>Hello, World!</b> It's a wonderful day, isn't it?"

The open and close code tag must be on a line by itself!

This plugin does not modify the database or any system settings. I have tested CodeQuote only on WordPress version 2.3.2.

Installation

  1. Download CodeQuote to the plugins directory under wp-content of your blog.
  2. Unzip the codequote.zip file.
  3. Activate the plugin on your plugins page.
  4. (Optional) I suggest you subscribe to my RSS feed so you can stay informed about any updates to CodeQuote.

Uninstall

  1. Deactivate the plugin on your plugins page.
  2. Delete codequote.php from your plugins directory, under wp-content of your blog directory.

If you discover any problems, or have any suggestions on improving CodeQuote, please contact me.

Payment

Using CodeQuote is free, you do not have to pay me anything. If you find it useful, and you’d like to pay me, any (or all!) of the following would be greatly appreciated:

History

  • January 7, 2008: Initial release (version 0.93). I found another bug (feature!) based on a blank line on the line before the open code command.
  • January 7, 2008: Initial release (version 0.92). I think I fixed the case when you have a < inside your code block.
  • January 7, 2008: Very initial release (version 0.91). Fixed a silly typo, cleaned up logic a bit. Found a bug still working on regarding < symbols.
  • January 7, 2008: Very initial release (version 0.9).

If you're new here, you may want to subscribe to my RSS feed. This allows you to read my newer articles without having to visit the site again. Thanks for visiting! Mike

Subscribe by RSS

Use my RSS feed to stay up to date


WordPress Plugins


Most Popular Posts


Stuff


Copyright © 1997-2008 Michael Boyd Clark
PlanetMike’s Technology Journal is proudly powered by WordPress
Entries (RSS) and Comments (RSS).