Friday, July 22, 2011

Embedding a Computable Document in a Blogger Post

Peeking at the source code in the Wolfram blog post here has revealed to me how to embed CDF documents in Blogger posts, and here is the proof:



To view this content, please install Wolfram CDF Player. You can install the free CDF Player here.

6 comments:

Al-Ahmadgaid Asaad said...

Hey there,

can you make a step by step tutorial on how to embed that computable document format to blogger. I was trying to embed also some cdf file I have and read/watched the tutorials in wolfram website, but just can't figure it out. I'm not good in programming. So, it would be great if you could help me.

Thanks...

Al

Q said...

I'm having trouble figuring out _where_ to put CDF's that I've generated, if I then want to embed them into a Blogger post. If I upload them to Google Docs, I can't seem to determine what the path should be. From the Wolfram blog site, the code should look like this (I'm putting in some extra spaces so I can post this as a comment):

< script type="text/javascript" src="http://www.wolfram.com/cdf-player/plugin/v2.1/cdfplugin.js" >< /script >
< script type="text/javascript" >
var cdf = new cdfplugin();
cdf.embed('/path/to/filename.cdf', width, height);
< /script >

but the problem is I don't know what to actually use for the /path/to.... As far as I can tell, you've used a different procedure:

cdf.addCDFObject("A0a80e4147b724017e6b37e1ab7e8f9c5", "http://blog.wolfram.com/data/uploads/2011/07/Animation11.cdf", 450, 300);

which links to an external site. Is there a way to use this with "one's own" CDF files?

Thanks -
Mike

Stephen Luttrell said...

@Al-Ahmadgaid Asaad

I'm sorry about the delay in responding - I didn't tell Blogger about a change to my email address, so comments weren't being correctly forwarded to me.

I gave a detailed description of how I created this post on the comp.soft-sys.math.mathematica newsgroup on 28 August 2011.

Here is the link to the Google Groups copy of that post:

http://groups.google.com/group/comp.soft-sys.math.mathematica/browse_thread/thread/8f952252c5857eff/959d2b1420d663c8?hl=en&lnk=gst&q=cdf+luttrell#959d2b1420d663c8

Stephen Luttrell said...

@gfrblxt

I'm sorry about the delay in responding - I didn't tell Blogger about a change to my email address, so comments weren't being correctly forwarded to me.

The example that I posted links to a CDF that is stored remotely at http://blog.wolfram.com/data/uploads/2011/07/Animation11.cdf - see the code that I quoted in my previous comment. I presume that you replace this with a link to your own CDF located wherever is convenient for you.

Q said...

Stephen,

Thanks - I appreciate the help. I am now just trying to figure out if there's a place in the Google domain where I can store the CDFs themselves - the "obvious" choice, in Google Docs, doesn't seem to work. Maybe I'm just not getting the path correct.

Thanks again,
Mike

Antonio Brito from Brazil said...

Cdf in Google doc will be great. I hope be available soon