vBulletin Mods

The Official vBulletin Modifications Site
https://www.vbulletin.org/forum/showthread.php?t=324273

Ad module conditions in vBulletin Cloud 5
by solocommand
23 Jan 2017 20:23

1 Attachment(s)
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


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

results in the following HTML output


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Note that the <vb:if> and {vb:raw} tags are rendered in the HTML response when loading the page.

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?

solocommand 23 Jan 2017 20:40

According to a VB developer, template conditionals are disabled in all ad modules. Mods, feel free to close.

noypiscripter 24 Jan 2017 01:14

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.

solocommand 24 Jan 2017 17:57

Quote:

Originally Posted by noypiscripter (Post 2581260)
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.

Thanks! This should actually get me exactly what I need.


All times are GMT. The time now is 15:27.

Powered by vBulletin® Version 3.8.14
Copyright © 2020, MH Sub I, LLC dba vBulletin. All Rights Reserved. vBulletin® is a registered trademark of MH Sub I, LLC
Copyright ©2001 - , vbulletin.org. All rights reserved.