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.

0 comments::

Post a Comment