|
|
|
|
Multiple InstancesFrom $1Table of contentsNo headersTo use multiple instances of Wildfire on the same web page, each instance has to have its own uniquely named textarea, div, and configuration variable. In the below example, the first instance of Wildfire is using the embedCode1 <textarea>, the divWildfirePost1 <div>, and the pconf1 configuration variable. The second one is using the embedCode2 <textarea>, the divWildfirePost2 <div>, and the pconf2 configuration variable. Similarly, any additional instances of Wildfire would have to use their own set of these three elements, which would be reference through its corresponding Wildfire.initPost() line.
<html>
<head>
<title>Example of Gigya Wildfire in Page</title>
<script src="http://cdn.gigya.com/wildfire/js/wfapiv2.js"></script>
</head>
<body>
<textarea id="embedCode1" style="display: none;"> Your layout, comment, image, or Flash embed code goes here </textarea>
<div id="divWildfirePost1"></div>
<script>
var pconf1={
CID: 'Site 1 - Widget A',
defaultContent: 'embedCode1',
UIConfig: '<config><display showPost="true" showBookmark="true" showEmail="true" /></config>'
};
//Wildfire.initPost( partner id, div id, width, height, configuration variable );
Wildfire.initPost('123456', 'divWildfirePost1', 400, 300, pconf1);
<textarea id="embedCode2" style="display: none;"> Your layout, comment, image, or Flash embed code goes here </textarea>
<div id="divWildfirePost2"></div>
<script>
var pconf2={
CID: 'Site 1 - Widget B',
defaultContent: 'embedCode2',
UIConfig: '<config><display showPost="true" showBookmark="true" showEmail="true" /></config>'
};
//Wildfire.initPost( partner id, div id, width, height, configuration variable );
Wildfire.initPost('123456', 'divWildfirePost2', 400, 300, pconf2);
</script>
</body>
</html>
Tags:
|
||||
|