Cryptoquote

Current Mood:
Dustin Diamond emoticon
Dustin Diamond

This plugin allows you to put a cryptoquote on your site.  See it in action here.

Installation:

Download the plugin here.

Unpack the zip file into your wp-content/plugins directory.

Enable cryptoquote in your WordPress plugin admin page.

Use:

In order to put a cryptoquote on your page, simply put your phrase inside the following tags:

[cryptoquote] [/cryptoquote]

That’s it!  If all you want to do is turn a phrase into a cryptoquote, it will encrypt it for you.

If you already have a phrase that has been encrypted, you can disable the auto-encrypt by adding the following parameter to your tag:

[cryptoquote encrypt='false'] [/cryptoquote]

The choice is yours.  As an added bonus to your readers, if you let the plugin encrypt the phrase for you, a permalink will be added to the bottom of the puzzle that allows them to go back to the cryptoquote with the same cypher in place.

TODO:

  • The permalink doesn’t preserve any other GET variables, so this really only works if you’re using some sort of WordPress permalink setting for your entries.
  • Figure out a better way to do citations for the quotes.
  • replace use of strtr() with a multibyte-safe version
  • Add parameters:
  • more=’true’ : Prepend puzzle with a “more” tag

Version History:

11/9/2008 – version 1.0

Initial release

If you have any bugs or suggestions, feel free to leave a comment on this page.


This plugin is based on the original cryptoquote helper I wrote years ago, which can be found here.  For this plugin I completely rewrote the javascript code to make it work better in a blog environment, and because the original code was TERRIBLE (seriously, don’t look at it).

4 Responses

  1. Cool. This is oddly coincidental. I was going to leave you a message on IM about a Wordpress plug-in and this was your status message. I was going to ask if you knew of a Wordpress plugin that would automatically create a link when I type a word. So I could associate Gar with sysadminco.com, for example.

    I did a bit of searching, but I don’t really know what query to use. Maybe if it’s not out there it can be your next creation.

  2. Got a crappy bug report to make. I played with it a while and after a bit the spaces between words in the decoded section started being filled with whatever the previous letter was. I don’t know what I did to trigger it, though.

  3. It’s unlikely that I’ll ever write a plugin that I will never use outside of getting paid for it.

    Necessity is the seed that gets most of my hobby code written, maybe it can be yours too. http://codex.wordpress.org/Plugin_API

  4. I found one that does what I want, I think.

    http://stevenberg.net/projects/blogroll-autolinker

Leave a Reply