Group Abstract Group Abstract

Message Boards Message Boards

How do you embed a CDF in a Tikiwiki blog post?

GROUPS:
I'm tring to post a CDF to my Tikiwiki 12 blog but can't get it to work quite right. I created a CDF to demostrate the Fermi-Dirac function. The fermidistribution.cdf file was uploaded to the file gallery with fileID=55. The femidistibustion.png was uploaded to the file gallery with fileID=56. The files can be retrieved in several ways as far as I can tell. The dlxx means download the file with fileID=xx. The displayxx means display file with fileID=xx. The files are loaded into the MySQL database instead of being stored in a directory.

I tried the two syntax options based on what the “From Desktop to Web: Deploying Ideas with CDF” video indicated. The first option uses the download syntax and the second option uses the display option. I call the html file using the Tikiwiki {IFRAME()} command in the blog posting. The {IFRAME()} command was used in the following forms and the resulting actions are indicated as well:

1. {IFRAME(width="596" height="614" scrolling="no" src=https://www.p-brane.com/nano/display64)}{IFRAME} ⇒Yields a blank frame
2. {IFRAME(height=596,width=614, scrolling=auto)}tiki-print.php?field=64{IFRAME} ⇒ Yields the home page with an error message
3. {IFRAME(width="596" height="614" scrolling="no")}tiki-download_file.php?fileID=63{IFRAME} ⇒ Yields a download box. If you open the file in the browser then the cdf plays and functions as expected.
4. {IFRAME(width="596" height="614" scrolling="no" src=https://www.p-brane.com/nano/dl64)}{IFRAME} ⇒ Yields a download box (same as 3). If you open the file in the browser then the cdf plays and functions as expected.

What is the proper syntax to use so that the cdf runs without having to open a file to an new browser window or tab ( using IFRAME or something else)?


Option one has fileID=64

 [color=#006400]<html>
 <body>
 
 <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.setDefaultContent('<a href="http://www.wolfram.com/cdf-player/"><img  src="https://www.p-brane.com/nano/dl56"></a>');
 cdf.embed('https://www.p-brane.com/nano/dl55', 596, 614);
 </script>

</body>
</html>[/color]

Option two has fileID=63

[color=#006400]<html>
<body>

<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.setDefaultContent('<a href="http://www.wolfram.com/cdf-player/"><img  src="https://www.p-brane.com/nano/display56"></a>');
cdf.embed('https://www.p-brane.com/nano/display55', 596, 614);
</script>

</body>
</html>[/color]
 
Update 2/24/14
I discoverd that the following code runs in IE but not in Chrome and Firefox.
 This code runs fine in IE.
 
 {IFRAME(width="710" height="710" scrolling="no" src=https://www.p-brane.com/nano/display63)}
 {IFRAME}
 
 where display63 contains
 
 <html>
 <body>

<sc<x>ript type="text/javascript" src="http://www.wolfram.com/cdf-player/plugin/v2.1/cdfplugin.js"></script>
<sc<x>ript type="text/javascript">
var cdf = new cdfplugin();
cdf.setDefaultContent('<a href="http://www.wolfram.com/cdf-player/"><img  src="https://www.p-brane.com/nano/display56"></a>');
cdf.embed('https://www.p-brane.com/nano/display55', 596, 614);
</script>

</body>
</html>
POSTED BY: Jay Morreale
Answer
10 months ago
I aslo posted this question over at the the Tikiwiki Community website as: How do you embed a Mathematica CDF in a Tikiwiki blog post?
POSTED BY: Jay Morreale
Answer
10 months ago