There is a booted flag, but it may be only internally supported. I think what you describe lends itself to the code based initialization method. Have your code call the render method for each placement after load and config. There should be some samples in the tests directory of the source three. Also if you go to the creative test tool at http://safeframes.net you can generate and view sample code for a script based rendering of ads.


From: ed brandmark <ebrandmark@users.sf.net>;
To: [safeframes:discussion] <general@discussion.safeframes.p.re.sf.net>;
Subject: [safeframes:discussion] Integrating Code
Sent: Mon, Feb 24, 2014 9:11:36 PM

Hi all,

I have a question about integrating the Safe Iframe code. I have some sample code working if I have the publisher include a certain amount of code in the page. The problem I am having is related to integrating all the code into an include file (a JS file loaded into the page) so that the pages don't have to update.

So as I see it there are 3 steps to do.

a) Include 3 JS files - this isn't a problem

b) Include the class data that has the URL, the width/height, the DIV etc. This is the text/x-safeframe data

This causes problems as if included in a JS file I have to either document.write it or create a script element and both seem to have timing issues.

c) Initiate a new safeframes config via:
(function() {
var conf=new $sf.host.Config({
renderFile:http://cdn.atwola.com/_media/uac/r.html,
positions: {}

})();

The problem I have is timing issues- it seems to work sometimes but others it never initiates. I've tried placing the code in a function that gets called every few hundred milliseconds waiting to see if
$sf.host exists and if so creating the conf=new $sf.host.Config as above but ofte times it never gets started.

Any suggestions on how to do this? If needed, I can supply some simple codeing
That I've tried.

Thanks
Ed


Integrating Code


Sent from sourceforge.net because you indicated interest in https://sourceforge.net/p/safeframes/discussion/general/

To unsubscribe from further messages, please visit https://sourceforge.net/auth/subscriptions/