vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=252)
-   -   Ad management and generated code (https://vborg.vbsupport.ru/showthread.php?t=261404)

pransis 04-04-2011 12:20 PM

Ad management and generated code
 
When adding ads via the Ad Manager, it adds this unusual code:
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/...e!default.jspa

pransis 04-05-2011 12:58 AM

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

PHP Code:

            // 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?


All times are GMT. The time now is 02:18 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01003 seconds
  • Memory Usage 1,725KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code_printable
  • (1)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (7)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete