Wednesday, October 19, 2011

Include MTG autocard popup in websites for non .blogspot domains


Some months ago we explained how to include MTG autocard popup by including directly our script from Google Sites. This mode is actually used by some MTG sites like Magic no MolaThought Experiment or MTG Fiction.

Unfortunately, scripts hosted in Google Sites can be included directly in your website only if you're using Blogger or other Google's tools, for the other sites, the direct access it's protected. So if you've tried to include the script and no popups appeared, this is your post.

To have those great popups into your non-blogger site, you need to include the autocard script and gatherer helper, so download them and upload them into your server. You will need to change the reference to gatherer helper in autocard script, just in this line (48):



var GATHERER_HELPER = "https://sites.google.com/site/themunsonsapps/mtg/gatherer_helper.js";

Other way is to download the Standalone script, that doesn't need reference changes but won't be updated (you can perfectly do it).
If you don't have a server to host javascripts, you can use free javascript hosting services like Your Javascript, which allows you to host and free access to it. So to replace the bold url with your hosted script or just leave it like this, it will work even in no blogger servers:


<script type="text/javascript">
     URL_START = "http://xxxx.com"; 
</script>    

<script src="http://yourjavascript.com/31200217801/autocard_standalone.js" type="text/javascript">
  
</script>

For the linking rules, follow the lines described on the old post.

3 comments::

MetArena said...

Hello.
I stumbled upon your post and thought that might be a neat function for my website, but it doesnt seem to work on my website metarena.net. Any idea why? I am not familiar with html and java scripts but i followed your instructions.
type="text/javascript">
URL_START = "http://gatherer.wizards.com/Pages/Card/Details.aspx?name=";
URL_START_IMG = "http://magiccards.info/scans";


src="http://yourjavascript.com/71047145391/autocard.js" type="text/javascript">

Note i didnt write the script commands so i can comment.

best android cell said...

Thankss for sharing for more Lazer 84 Font

Digital Tech said...

These approaches can help maximize the potential of your site while adhering to Google's security protocols. hp server distributor in dubai

Post a Comment