Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Ping embeded comments
TheBreaker
New
Hello all,
I am integrating comments into one of my external sites and I seem to be runing into a situation. Sometimes the comments try to load up before the database finishes updating leaving me with an 404 error in place of the comments.
Since the iframe is generated via JS I really do not have any way to peeking into the frame to see if specific elements exist or to capture the http status code.
Does anyone know of a way to ping the comment thread directly to see if its a 200?
Details:
Vanilla version: 2.1.x
embed code:
/*** Required Settings: Edit BEFORE pasting into your web page ***/ var vanilla_forum_url = 'mysite.com'; // The full http url & path to your vanilla forum var vanilla_identifier = 'discussion id"'; // Your unique identifier for the content being commented on /*** Optional Settings: Ignore if you like ***/ var vanilla_discussion_id = 'discussion id'; // Attach this page of comments to a specific Vanilla DiscussionID. // var vanilla_category_id = ''; // Create this discussion in a specific Vanilla CategoryID. /*** DON'T EDIT BELOW THIS LINE ***/ (function() { var vanilla = document.createElement('script'); vanilla.type = 'text/javascript'; var timestamp = new Date().getTime(); vanilla.src = vanilla_forum_url + '/js/embed.js'; (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(vanilla); })();
Tagged:
0