Current time: 2012-02-09, 05:00 AM Hello There, Guest! Please Login or Register






Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Autocard for MyBB forums
2009-09-26, 00:34 AM
Post: #1
Autocard for MyBB forums
If you have an MTG forum that runs on MyBB (like this one does), you might be interested in how to implement autocard for MTG cards. Here how.

1. Head over to your Admin CP and login, then go to Configuration and click MyCode on the left-hand side.

2. Click Add New MyCode and give your MyCode a name (like Autocard!). You don't have to put a short description but if you want to, you can.

3. In the Regular Expression box, put this in:

Code:
\[c\](.*?)\[/c\]

4. In the Replacement box, use this:

Code:
<a href="http://magiccards.info/autocard.php?card=$1" onclick="return !window.open(this.href,'_blank','width=800,height=600,menubar=no,resizable=yes,scrollbars=yes'); return false;" title="$1">$1</a>

5. Test your code in the Sandbox. If it's all good, hit Save MyCode and you're done!

If you also want to link to cards without using the card name, put this in a new MyCode in Regular Expression:

Code:
\[c=(.*?)\](.*?)\[/c\]

and this in Replacement:

Code:
<a href="http://magiccards.info/autocard.php?card=$1" onclick="return !window.open(this.href,'_blank','width=800,height=600,menubar=no,resizable=yes,scrollbars=yes'); return false;" title="$1">$2</a>

There you go!
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)

Contact Us | DeckConstruct | Return to Top | Return to Content | Lite (Archive) Mode | RSS Syndication