Marv
10-11-2011, 04:08 PM
Hi,
I?m trying to add forum-based placements for an AdServer for a use with vbulletin4. Because the placements are outside the built-in AdManager placements I can?t use him.
The code looks like this now:
<vb:if condition="$show['guest']">
<div class="postbit" align="center" style="background: #FFFFFF;">
<vb:if condition="$vbulletin->GPC['forumid'] == 337">
<script type='text/javascript'><!--//<![CDATA[
var m3_u = (location.protocol=='https:'?'https://www.mysite.com/openx/www/delivery/ajs.php':'http://www.mysite.com/openx/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=11");
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://www.mysite.com/openx/www/delivery/ck.php?n=a3c5bfe8&cb=INSERT_RANDOM_NUMBER_HERE' target='_blank'><img src='http://www.mysite.com/openx/www/delivery/avw.php?zoneid=11&cb=INSERT_RANDOM_NUMBER_HERE&n=a 3c5bfe8' border='0' alt='' /></a></noscript>
</div>
</vb:if>
<vb:elseif>
<script type='text/javascript'><!--//<![CDATA[
var m3_u = (location.protocol=='https:'?'https://www.mysite.com/openx/www/delivery/ajs.php':'http://www.mysite.com/openx/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=2");
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://www.mysite.com/openx/www/delivery/ck.php?n=a30f3c4a&cb=INSERT_RANDOM_NUMBER_HERE' target='_blank'><img src='http://www.mysite.com/openx/www/delivery/avw.php?zoneid=2&cb=INSERT_RANDOM_NUMBER_HERE&n=a3 0f3c4a' border='0' alt='' /></a></noscript>
</div>
</vb:elseif>
</div>
</vb:if>
As you can see, this should identify the forum I?m in and request the proper ads from the adserver. Unfortunaly, this won?t work. I?ve tested it by now with
<vb:if condition="$vbulletin->GPC['forumid'] == 337">
<vb:if condition="$vbulletin->$forum[forumid] == 337"> and
<vb:if condition="$forum[forumid] == 337">
but nothing worked.
Anyone an idea? Or may be a hint, what I?m doing wrong?
This thingy starts to be pain in the ass :/ Any help would be really appreciated.
I?m trying to add forum-based placements for an AdServer for a use with vbulletin4. Because the placements are outside the built-in AdManager placements I can?t use him.
The code looks like this now:
<vb:if condition="$show['guest']">
<div class="postbit" align="center" style="background: #FFFFFF;">
<vb:if condition="$vbulletin->GPC['forumid'] == 337">
<script type='text/javascript'><!--//<![CDATA[
var m3_u = (location.protocol=='https:'?'https://www.mysite.com/openx/www/delivery/ajs.php':'http://www.mysite.com/openx/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=11");
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://www.mysite.com/openx/www/delivery/ck.php?n=a3c5bfe8&cb=INSERT_RANDOM_NUMBER_HERE' target='_blank'><img src='http://www.mysite.com/openx/www/delivery/avw.php?zoneid=11&cb=INSERT_RANDOM_NUMBER_HERE&n=a 3c5bfe8' border='0' alt='' /></a></noscript>
</div>
</vb:if>
<vb:elseif>
<script type='text/javascript'><!--//<![CDATA[
var m3_u = (location.protocol=='https:'?'https://www.mysite.com/openx/www/delivery/ajs.php':'http://www.mysite.com/openx/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=2");
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://www.mysite.com/openx/www/delivery/ck.php?n=a30f3c4a&cb=INSERT_RANDOM_NUMBER_HERE' target='_blank'><img src='http://www.mysite.com/openx/www/delivery/avw.php?zoneid=2&cb=INSERT_RANDOM_NUMBER_HERE&n=a3 0f3c4a' border='0' alt='' /></a></noscript>
</div>
</vb:elseif>
</div>
</vb:if>
As you can see, this should identify the forum I?m in and request the proper ads from the adserver. Unfortunaly, this won?t work. I?ve tested it by now with
<vb:if condition="$vbulletin->GPC['forumid'] == 337">
<vb:if condition="$vbulletin->$forum[forumid] == 337"> and
<vb:if condition="$forum[forumid] == 337">
but nothing worked.
Anyone an idea? Or may be a hint, what I?m doing wrong?
This thingy starts to be pain in the ass :/ Any help would be really appreciated.