Posts Photos Archives About

I had been planning to do this for a while: it's my first WordPress Plugin! Over at Roy on Magic, I often have to write out decklists and such, so I wanted to have an autocard feature similar to the one used at MTGSalvation. After a quick five-minute search I couldn't figure out how they did it, so I just wrote the plugin myself. Actual effort was around 3.5 hours, most of it struggling with PHP and Regular Expressions. :p

Details and download are at Hopefully someone else will find it useful.

Update Jan 2021: Since the wiki link above is obsolete, I've rescued the text below for archival purposes. This is not an active project! The download link below should be working, but I make no guarantees as to whether it will still work with current wordpress versions.

MTG Autocard for Wordpress

What: Wordpress Plugin

Plugin Name: MTG Autocard for Wordpress


Description: For Magic: The Gathering bloggers, a plugin that will automatically convert [CARD] and [DECK] tags to autocard links.

Author: Roy Tang

Version: 1.1

Author URI:

Revision 12-Oct-2008 (v1.1): Changed the algorithm that splits the card list into columns; can now potentially split into more than two columns.

Revision 13-Apr-2008: Fixed a bug where two [CARD] tag pairs in the same line/paragraph won't be converted correctly.

Installation Notes

Download the latest version file from /files/

Extract autocard.php

Upload autocard.php into your wp-content/plugins folder

Activate the plugin in the Wordpress Admin interface

Usage Notes

When posting, use [CARD](cardname)[/CARD] to generate an autocard link to a single card.

When posting a decklist, use a format like

4 Cardname1
4 Cardname2

12 Cardname3
8 Cardname4

The above will generate a two-column table with autocard links. The program will try to break the list into two columns at the first header that exists after the midpoint.

To change the style of the decklist table, add a CSS definition for "autocard_table" in your style.css, for example:

.autocard_table {border: 1px red solid; background-color: yellow;}

Todo list

  • Create a settings page to allow the user to select the URL opened by the autocard links. (Currently always uses
  • More options for formatting the autocard_table, i.e. more columns, etc.
Sun, Feb. 10, 2008, 11:18 p.m. / / blog / #wordpress #software-development / 💬 2 / 371 words

Last modified at: Dec. 13, 2021, 7:57 p.m. Source file

Referenced by


Mario B said...

Hey there im trying to find this exact plugin to use in my wordpress blog and ur link seems to be dead, do u still have this for download?

roy said...

Hi, I'm no longer maintaining this plugin and am now using the Wordpress MTG Helper plugin, you can find it here:

Cheers :D