vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   Randomly running some code (https://vborg.vbsupport.ru/showthread.php?t=303779)

kh99 10-25-2013 01:24 PM

Well, if I view the html source of the page you linked to above, and search for 'data-zone="ron" data-format="300x250"', I find it once, but occasionally I'll find it twice. So it kind of seems to me like it might be working, but I don't see any ads at all on that page.

Edit: Also (possibly related), when I look at the JS console I see this:

Code:

[11:25:24.433] ReferenceError: GS_googleAddAdSenseService is not defined @ http://access-programmers.co.uk/forums/showthread.php?p=1301767&mode=linear#post1301767:59
[11:25:24.433] ReferenceError: GA_googleAddSlot is not defined @ http://access-programmers.co.uk/forums/showthread.php?p=1301767&mode=linear#post1301767:63
[11:25:24.433] ReferenceError: GA_googleFetchAds is not defined @ http://access-programmers.co.uk/forums/showthread.php?p=1301767&mode=linear#post1301767:72
[11:25:24.565] ReferenceError: GA_googleFillSlot is not defined @ http://access-programmers.co.uk/forums/showthread.php?p=1301767&mode=linear#post1301767:569
[11:25:24.572] ReferenceError: GA_googleFillSlot is not defined @ http://access-programmers.co.uk/forums/showthread.php?p=1301767&mode=linear#post1301767:906
[11:25:25.095] The Web Console logging API (console.log, console.info, console.warn, console.error) has been disabled by a script on this page.
[11:25:25.240] Use of attributes' nodeValue attribute is deprecated. Use value instead. @ http://cdn1.developermedia.com/a.min.js:1


Jon12345 10-25-2013 01:28 PM

Something doesn't seem quite right. For 1 in 3, I am now at 9 out of 13.

kh99 10-25-2013 02:09 PM

OK, well maybe there's something about the way it works that I don't understand. Anyway, here's another one you can try:
Code:

<if condition="(((float)$GLOBALS[pagestarttime])*1000)%4==0">

That one doesn't work too well for me because strangely some of the digits of what's supposed to be the current time with microseconds don't change from one page to another. But apparently it's OS dependent and I'm running on my home Windows 7 computer, so it might work better for you.

Edit:...otherwise, it's not too difficult to write a plugin that does an actual random number.

Jon12345 10-29-2013 04:41 PM

How do I reverse the condition?

I have an advert showing if condition=x. But I want to stop showing an advert in another location is condition=x. So, what is the reverse?

Edit:Worked it out. Use != instead of ==


All times are GMT. The time now is 02:48 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.02176 seconds
  • Memory Usage 1,721KB
  • 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
  • (2)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (4)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete