oddsblogs


::::: February 10, 2007 at 2:18 pm

Playing Card Hands - A Wordpress Plugin for Displaying Cards

Playing Card Hands is a wordpress plugin that allows playing cards to be easily inserted and displayed using simple tags in posts and comments. This is useful for bloggers writing about any card game: poker, spades, bridge, etc. The plugin is simple to install and use.

About a year ago, I was looking for a wordpress plugin that would allow me to display entire hands of cards (for example, a poker hand). I ran into this plugin, but each card had to be surrounded by a tag; this wasn’t what I wanted. So, I decided to roll my own :)

  • Download Link: playing-card-hands-v1_0.zip
  • Installation:
    1. Download and unzip the plugin to your wordpress plugin directory. On Linux, this might look like …
      cd wp-content/plugins
      wget http://www.oddsblogs.com/wp-content/uploads/playing-card-hands-v1_0.zip
      unzip playing-card-hands-v1_0.zip
    2. In your wordpress administration page, go to the “Plugins” tab and click “Activate” to activate the plugin.
  • Usage: Surround the hand you want by the [cards]...[/cards] tag. Separate individual cards by spaces. The first character indicates the card rank (2-A), the last the card suit (c, d, h, s for clubs, diamonds, hearts, spades, respectively). For example, [cards]th jh qh kh ah[/cards] produces T♥J♥Q♥K♥A♥, a royal flush. Sometimes you want to show say ace ace, or any diamond, or maybe any king or something; [cards]a a d k[/cards] gives you  ♦.
  • License: GPL.
  • Credits: The CSS was partially borrowed from the Card Converter Plugin, which I believe was partially borrowed from The (Unofficial) World Poker Tour Fan Site.

Feel free to edit the CSS if you’re so inclined.

Leave a comment or a trackback if you find the plugin useful, please!

Popularity: 100%

By Billy ::::: Permalink :::::
See Related Stories In: Programming

9 Comments »

February 24, 2007 @ 2:43 am #

thanks for the cool plugin!

after installing the plugin, you can easily add a button on the edit toolbar (shows up under the Code tab in WP 2.1) to insert the [cards] and [/cards] tags with a single click by hacking the wordpress code slightly:

find the quicktags.js file (it’s under wp-includes/js in WP 2.1 or under wp-admin in WP 1.5) and add a section like this

edButtons[edButtons.length] =
new edButton('ed_card'
,'cards'
,'[cards]'
,'[/cards]'
,'p'
);

 

February 24, 2007 @ 3:02 am #

well, ok, i guess i shoulda tried to escape that code in the comment. not sure how…

 

February 25, 2007 @ 2:49 pm #

Nice tip…thanks :)

 

March 5, 2007 @ 6:37 pm #

[…] gambling or card tricks? Card Converter and Playing Card Hands Wordpress Plugin for Displaying Cards allows you to display playing cards on your blog, a very useful WordPress Plugin for bloggers […]

 

September 5, 2007 @ 2:39 am #

[…] Playing Hand Cards: ya puedes mostrar las cartas de una baraja en tu posts. Estaría bien echar un póquer en los […]

 

November 16, 2007 @ 5:30 pm #

Nice one! Today I also finished my cute litte Wordpress plugin which is called “Playing Cards Generator”. The site where you can download the plugin is completely in german but the plugin itself has also an english translation. Just take a look here:
http://www.pokerup.de/wordpress-plugin-playing-cards-generator

 

November 25, 2007 @ 4:09 am #

Thanks for this as I have been looking for this plugin for hours.

 

February 24, 2008 @ 11:47 pm #

I have been in Network Marketing for about 15 years. I have NEVER seen such a total opportunity where almost everyone who takes a look wants to join. People just see the magic in this program

check it out by going to..

work at home online

 

March 3, 2008 @ 2:39 pm #

Candles at low cost and wide range of varieties can be found here .
To know more Click here

 

RSS feed for comments on this post. TrackBack URI

Leave a comment

Name (required)