vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   How do I target ads to specific forums? (https://vborg.vbsupport.ru/showthread.php?t=149225)

Dismounted 06-10-2007 02:48 AM

Quote:

Originally Posted by ski diva (Post 1265018)
Yes.

Here's an example of the code:

Replace the two instances of "zone:3" with:
Code:

zone:<if condition="$foruminfo['forumid'] == FORUMID">ZONENUMBER<else />3</if>
To do this with multiple forums:
Code:

zone:<if condition="$foruminfo['forumid'] == FORUMID">ZONENUMBER<else /><if condition="$foruminfo['forumid'] == FORUMID2">ZONENUMBER2<else />3</if></if>

ski diva 06-11-2007 11:54 PM

Thanks, Dismounted, but this doesn't seem to work; all it seems to do is remove the ad from all the forums instead of allowing me to deliver a specific ad to a specific forum.

I must be doing something wrong, but I don't know what it is.

And tobybird: I'm not trying to do contextual advertising. It's more straightforward than that; what I want to do is have the ads vary by forum. For example, if there's a "gardening" forum, I want to have a specific gardening ad there. If there's a "cooking" forum, the ad would be different. Or maybe have I'd have all the forums with the same ad, except for one.

HELP!!!!!

Dismounted 06-12-2007 09:27 AM

You need to create multiple zones and replace the capitalised words in the code I gave you.

ski diva 06-12-2007 05:39 PM

Let me try to restate my problem, so that I can take advantage of the help you're trying to give me!

All of my forums draw from the same template. There are a dozen different forums, to each of which I would like to deliver a specific banner. The Cooking forum gets a Cooking ad. The Ratkilling forum gets a Ratkilling ad. And so on.

Right now, I can only deliver the same ad (or range of ads) to all forums. Which is fine if I have an advertiser who sells both Cooking and Ratkilling equipment.

How can I specify which goes where?

Dismounted 06-13-2007 09:36 AM

You need to setup multiple zones to match the forums and use the code I gave you to assign a different zone to each forum.

ski diva 06-13-2007 02:19 PM

Sorry to be so dense about this (you're being so helpful), but I must be doing something wrong. I established another zone and put the invocation code for it in the forumdisplay template, below the code for the first zone. Then I changed the invocation code in the first zone, as you suggested, and all that happens is I get the same ad going to all forums (the one I wanted to target to a specific forums). Maybe you could take a look and let me know what I'm doing wrong? I'd appreciate the help:

Quote:

<script language='JavaScript' type='text/javascript' src='http://www.XXXXXXX.com/openads/adx.js'></script>
<script language='JavaScript' type='text/javascript'>
<!--
if (!document.phpAds_used) document.phpAds_used = ',';
phpAds_random = new String (Math.random()); phpAds_random = phpAds_random.substring(2,11);

document.write ("<" + "script language='JavaScript' type='text/javascript' src='");
document.write ("http://www.XXXXXXX.com/openads/adjs.php?n=" + phpAds_random);
document.write ("&amp;what=zone: <if condition=”$foruminfo [ ‘forumid’ ] == id:11”>zone:7<else />3</if>");
document.write ("&amp;exclude=" + document.phpAds_used);
if (document.referrer)
document.write ("&amp;referer=" + escape(document.referrer));
document.write ("'><" + "/script>");
//-->
</script><noscript><a href='http://www.XXXXXXX.com/openads/adclick.php?n=a6409d73' target='_blank'><img src='http://www.XXXXXXX.com/openads/adview.php?what=zone: <if condition=”$foruminfo [ ‘forumid’ ] == id:11”>zone:7<else />3</if></if>&amp;n=a6409d73' border='0' alt=''></a></noscript>

<script language='JavaScript' type='text/javascript' src='http://www.theskidiva.com/openads/adx.js'></script>
<script language='JavaScript' type='text/javascript'>
<!--
if (!document.phpAds_used) document.phpAds_used = ',';
phpAds_random = new String (Math.random()); phpAds_random = phpAds_random.substring(2,11);

document.write ("<" + "script language='JavaScript' type='text/javascript' src='");
document.write ("http://www.XXXXXXX.com/openads/adjs.php?n=" + phpAds_random);
document.write ("&amp;what=zone:7");
document.write ("&amp;exclude=" + document.phpAds_used);
if (document.referrer)
document.write ("&amp;referer=" + escape(document.referrer));
document.write ("'><" + "/script>");
//-->
</script><noscript><a href='http://www.XXXXXXX.com/openads/adclick.php?n=a9afbf66' target='_blank'><img src='http://www.XXXXXXX.com/openads/adview.php?what=zone:7&amp;n=a9afbf66' border='0' alt=''></a></noscript>


Edited a little bit later:

I changed the code to the following:

zone:<if condition="$foruminfo['forumid'] == 11">7<else />3</if>

and now I'm getting both ads (side by side) in all forums. I only want the ad that's linked to zone 7 in one of the forums (in this case, id:11). The rest of the forums get the ad that's linked to zone 3

Any ideas?

Dismounted 06-14-2007 06:59 AM

Code:

<script language='JavaScript' type='text/javascript' src='http://www.XXXXXXX.com/openads/adx.js'></script>
<script language='JavaScript' type='text/javascript'>
<!--
if (!document.phpAds_used) document.phpAds_used = ',';
phpAds_random = new String (Math.random()); phpAds_random = phpAds_random.substring(2,11);

document.write ("<" + "script language='JavaScript' type='text/javascript' src='");
document.write ("http://www.XXXXXXX.com/openads/adjs.php?n=" + phpAds_random);
document.write ("&amp;what=zone:<if condition="$foruminfo['forumid'] == 11">7<else />3</if>");
document.write ("&amp;exclude=" + document.phpAds_used);
if (document.referrer)
document.write ("&amp;referer=" + escape(document.referrer));
document.write ("'><" + "/script>");
//-->
</script><noscript><a href='http://www.XXXXXXX.com/openads/adclick.php?n=a6409d73' target='_blank'><img src='http://www.XXXXXXX.com/openads/adview.php?what=zone:<if condition="$foruminfo['forumid'] == 11">7<else />3</if>&amp;n=a6409d73' border='0' alt=''></a></noscript>

<script language='JavaScript' type='text/javascript' src='http://www.theskidiva.com/openads/adx.js'></script>
<script language='JavaScript' type='text/javascript'>
<!--
if (!document.phpAds_used) document.phpAds_used = ',';
phpAds_random = new String (Math.random()); phpAds_random = phpAds_random.substring(2,11);

document.write ("<" + "script language='JavaScript' type='text/javascript' src='");
document.write ("http://www.XXXXXXX.com/openads/adjs.php?n=" + phpAds_random);
document.write ("&amp;what=zone:<if condition="$foruminfo['forumid'] == 11">7<else />3</if>");
document.write ("&amp;exclude=" + document.phpAds_used);
if (document.referrer)
document.write ("&amp;referer=" + escape(document.referrer));
document.write ("'><" + "/script>");
//-->
</script><noscript><a href='http://www.XXXXXXX.com/openads/adclick.php?n=a9afbf66' target='_blank'><img src='http://www.XXXXXXX.com/openads/adview.php?what=zone:7&amp;n=a9afbf66' border='0' alt=''></a></noscript>


ski diva 06-14-2007 12:19 PM

Sorry to say this didn't work, either.

Any other ideas? I really need some help!

Dismounted 06-15-2007 09:43 AM

What happens?

ski diva 06-15-2007 11:45 AM

I get both ads side by side in all the forums, rather than one ad in all forums exccept one where it'd be replaced by the other ad.


All times are GMT. The time now is 04:47 PM.

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.00960 seconds
  • Memory Usage 1,754KB
  • 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
  • (3)bbcode_code_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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