Additional Info
Type
Package ID
shenafu:mtgautocard
First Created
January 06, 2010, 02:49:04 AM
Last Updated
January 22, 2016, 12:10:54 AM

MTG Autocard v1.8

magic the gathering autocard mana symbols decklist BBC tags
Compatible With 2.0.11
Latest version v1.8
Downloads 2,247
Reviews 0
Rating 0/5
Subscribers 6
License (View License)
Author(s)
MTG Autocard
mod for SMF forums
by Xay Voong
v1.8

PURPOSE: Allows BBC tags that create links to autocard, make and export decklists for Magic: the Gathering, and display mana symbols.

COMPATIBILITY: For SMF Forums 2.0.11+

INSTRUCTIONS:
See http://shenafu.com/smf/index.php?topic=4.0 for full instructions and examples.

[card]cardname[/card] will turn the cardname into an anchor/link that points to an outside source (e.g. wizards.com, starcitygames, or magiccards.info).

[card=realname]nickname[/card] where realname is the card's real name and nickname is what appears with the rest of the post.

[deck=deckname]list of cards[/deck] will create a nice table for your decklist. Users can export them into various formats, such as Apprentice's .dec.
Note that this mod copies a file called deck.php into your SMF root directory. The installation script automatically chmods it to 0755 after installation. Otherwise you may get 500 errors when a user tries to download a decklist. You may also try other values like 0666 or 0777 depending on your server's settings.
Note that the images for the deck-export icons are found under the icons folder. They are copied to the default theme's images folder. You must manually copy them to other themes' images folders for them to be usable in nondefault themes.

[mana]mana cost[/mana] will be replaced with respective icons for the given mana cost.

These are the valid letters, numbers, and hybrids that can be used within the mana tags:
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 i
w u b r g c x y z s t q p k
w/u u/w u/b b/u b/r r/b r/g g/r w/b b/w u/r r/u b/g g/b r/w w/r g/u u/g
2/w w/2 2/u u/2 2/b b/2 2/r r/2 2/g g/2
p/w w/p p/u u/p p/b b/p p/r r/p p/g g/p p/c c/p

c for colorless (diamond) mana
s for snow
t for tap
q for untap
p for planeswalk
k for chaos/planechase
i for infinite

MOD SETTINGS:
You can modify a few settings under
ADMIN -> CONFIGURATION -> MODIFICATION SETTINGS -> MISCELLANEOUS.

These are their default values:
MTG Autocard URL: http://magiccards.info/query?q=!
MTG Decklist Pattern: /^\s*(\/\/.*|SB: )?(?:x?(?=\d))?(\d+)?\s*(\s?x |\*|\[\w+?])?\s*([^{]*?)\s*?({.*}|--.*)?\s*$/


DISCLAIMER:
I wrote the code myself. However, all the code inside this zip is for public domain. So no need to ask for permission if you want to use it for whatever purpose. Images are copyrighted by WotC or respective parties, most likely.


Changelog
v1.8
added colorless (diamond) mana, using letter c
added infinite mana, using letter i
changed chaos letter to k
used png instead of gif

v1.7
changed decklist pattern: to include ranges of numbers before cardnames

v1.6
chmod deck.php to 0755 post-installation
changed decklist pattern to take into account SB: and // comments from MWS decklists

v1.5
changed decklist pattern: to consider 'x' before count; e.g. x4 Zap

v1.4
deck download now converts HTML entities to normal characters (e.g. quotes)

v1.3
added phyrexian hybrid mana symbols
changed MTG Autocard URL: http://magiccards.info/query?q=!

v1.2
export and download decklists to various formats (i.e. Apprentice, MTGO)

v1.1
$sourcesdir/Subs.php: BBC tag for mana
$sourcedir/Subs-Editor.php: added BBC buttons (card, mana, deck) to post editor
Smileys for mana symbols => Smileys/mana
Icons for editor buttons => Themes/default/images/bbc

v1.0.3
error Undefined offset: 4 in Subs.php: function AUTOCARD_REPLACE_CALLBACK()

v1.0.2
Localization search position="end"

v1.0.1
2010-01-06
modSettings variable names match up in all files


v1.0.0
2010-01-05
$sourcesdir/Subs.php: modified to contain autocard and deck functions and tags
$sourcesdir/ManageSettings.php: miscellaneous settings
$languagedir/Modifications.english.php: localized text
Manual installation info
You have to register or login to be able to leave a review
There are currently no reviews on this customization
Advertisement: