The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Ad module conditions in vBulletin Cloud 5
Hi folks,
After submitting a support request on vbulletin.com I was told to post here requesting help. We are using the hosted version of vBulletin Cloud (5.2.5) and having trouble using conditionals and variables inside an ad module. Ultimately I need access to the current thread ID if there is one to map to a topic ID with my ad provider. This was previously done as a PHP plugin in the non-hosted version. Screenshot of the ad module is attached (with the direction that you can use conditionals and variables!) The following code Code:
<vb:if condition="condition"><!-- conditionals working --></vb:if> <script type="text/javascript" src="https://cygnus-d.openx.net/w/1.0/jstag"></script> <!-- {vb:var thread} --> <script type="text/javascript"> console.info('thread', "{vb:raw thread}"); OX.requestAd({"auid":"498342"}); </script> Code:
<div class="widget-content restore axd axd_187"> <div class="axd-inner js-module__hide-if-empty "> <div class="ad_187_inner"><vb:if condition="condition"><!-- conditionals working --></vb:if> <script type="text/javascript" src="https://cygnus-d.openx.net/w/1.0/jstag"></script> <!-- {vb:var thread} --> <script type="text/javascript"> console.info('thread', "{vb:raw thread}"); OX.requestAd({"auid":"498342"}); </script></div> </div> </div> </div> <!-- *** END WIDGET widgetid:38, widgetinstanceid:187, template:widget_ad *** --> <!-- *** START WIDGET widgetid:38, widgetinstanceid:188, template:widget_ad *** --> I tried to report that this wasn't working as it is supposed to be and was told to post about it here by the support staff. Any ideas? Are conditionals and variables not actually available or am I doing something wrong? |
#2
|
|||
|
|||
According to a VB developer, template conditionals are disabled in all ad modules. Mods, feel free to close.
|
#3
|
||||
|
||||
The thread id is stored in the pageData.nodeid JS variable. If you are on a thread page, that nodeid is the id of the thread.
|
#4
|
|||
|
|||
Thanks! This should actually get me exactly what I need.
|
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|