Summary
Have created a draft of a revive ad server plugin based on a subset of code from the official discourse ad plugin. Basically, I removed the ad networks and refactored the house-ad code (all documented in the README) to serve tags from our revive ad server, filtering for either desktop or mobile ads (Revive does not support responsive tags yet). Here this the current redesign:
https://github.com/unixneo/neo-revive-discourse
Status:
- Issue with rendering
<script>
tags (sync and async), but works fine with<iframe>
tags
TODO:
- Fix the issue rendering
<script>
tags<iframe>
tags
Examples:
This iframe tag works fine:
<!-- Revive Adserver iFrame Tag - Generated with Revive Adserver v4.2.0 -->
<iframe id='a41d6e46' name='a41d6e46' src='http://srv.adserver.com/www/delivery/afr.php?zoneid=63&cb=INSERT_RANDOM_NUMBER_HERE' frameborder='0' scrolling='no' width='728' height='90'><a href='http://srv.adserver.com/www/delivery/ck.php?n=aa785d4b&cb=INSERT_RANDOM_NUMBER_HERE' target='_blank'><img src='http://srv.adserver.com/www/delivery/avw.php?zoneid=63&cb=INSERT_RANDOM_NUMBER_HERE&n=aa785d4b' border='0' alt='' /></a></iframe>
This async js tag will not render (this is the tag format we normally use):
<!-- Revive Adserver Asynchronous JS Tag - Generated with Revive Adserver v4.2.0 -->
<ins data-revive-zoneid="63" data-revive-id="2d220f1e3f63403189face1b493bcc4b"></ins>
<script async src="//srv.adserver.com/www/delivery/asyncjs.php"></script>
Likewise, this js tag will not render:
<!-- Revive Adserver Javascript Tag - Generated with Revive Adserver v4.2.0 -->
<script type='text/javascript'><!--//<![CDATA[
var m3_u = (location.protocol=='https:'?'https://srv.adserver.com/www/delivery/ajs.php':'http://srv.adserver.com/www/delivery/ajs.php');
var m3_r = Math.floor(Math.random()*99999999999);
if (!document.MAX_used) document.MAX_used = ',';
document.write ("<scr"+"ipt type='text/javascript' src='"+m3_u);
document.write ("?zoneid=63");
document.write ('&cb=' + m3_r);
if (document.MAX_used != ',') document.write ("&exclude=" + document.MAX_used);
document.write (document.charset ? '&charset='+document.charset : (document.characterSet ? '&charset='+document.characterSet : ''));
document.write ("&loc=" + escape(window.location));
if (document.referrer) document.write ("&referer=" + escape(document.referrer));
if (document.context) document.write ("&context=" + escape(document.context));
if (document.mmm_fo) document.write ("&mmm_fo=1");
document.write ("'><\/scr"+"ipt>");
//]]>--></script><noscript><a href='http://srv.adserver.com/www/delivery/ck.php?n=aef496cd&cb=INSERT_RANDOM_NUMBER_HERE' target='_blank'><img src='http://srv.adserver.com/www/delivery/avw.php?zoneid=63&cb=INSERT_RANDOM_NUMBER_HERE&n=aef496cd' border='0' alt='' /></a></noscript>
Attempts to Fix:
Have tried htmlSafe() and triple handlebars, without success. I have no idea why only the iframe tag renders but the js tags will not render! Seems like an “emberjs” issue, which I don’t understand being a noob to Ember.js and Rails.
When do you need it done?
No hurry, we don’t plan to use this anytime soon; it is something I’m building for “the future”.
What is your budget, in $USD that you can offer for this task?
All reasonable offers to get me past this Ember.js rendering brick wall, are appreciated and welcome.
Notes:
For those interested, I don’t use DFP. Simply don’t like it. Revive works fine for us (self-hosting) but when this solution works, should work fine with DFP and other ad server tags as well, so the source code will remain freely available to all who might have a similar requirement.
Testing site (temporary for testing only):
Test site removed.