View Full Version : Ad management and generated code
pransis
04-04-2011, 12:20 PM
When adding ads via the Ad Manager, it adds this unusual code:
<vb:if condition="$adsshown[] = 8"></vb:if>
What's the purpose of this condition?
Lynne
04-04-2011, 03:06 PM
Where are you seeing that?
pransis
04-04-2011, 09:12 PM
In the ad location template. The condition is added AFTER the ad code and before the last </div>.
Also, there seems to be a bug when adding the last post thread view via the Ad Manager, it lacks the ID it usually generates for other ad locations. Adding the ID manually solves it but it should supposed to be working via the Ad Manager but it's not.
Lynne
04-04-2011, 11:30 PM
I have several test ads on my site, and none of them add any code to any template, so I honestly have no clue what you are talking about.
As for the bug, you may enter that into Jira here - http://tracker.vbulletin.com/secure/CreateIssue!default.jspa
pransis
04-05-2011, 12:58 AM
When you add an ad via the Ad Manager, it places the ad code inside one of the ad location templates. The code I mentioned above gets inserted AFTER the ad code just before the last DIV tag. I am running 4.1.2 and using the default skin. See screenshots below.
Lynne
04-05-2011, 01:39 AM
Weird. I have never seen that before and I looked in my templates and it wasn't there at all for me. Then I created an ad just like yours, and it shows up. It's from here in the functions_ad.php file:
// add a faux conditional before all the closing conditions to mark that we've shown certain ad already
$conditional_postfix = '<vb:if condition="$' . 'adsshown[] = ' . $adid . '"></vb:if>' . $conditional_postfix;
The number corresponds to the adid.
pransis
04-05-2011, 08:16 AM
Ah, what's the purpose of this faux conditional then?
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.