![]() |
How do I target ads to specific forums?
I know how to get an ad to appear at the top of the page of each forum. Right now I have the same ad appearing for each one. But I'd like to make it so that the ads are forum specific. For example, if I have a forum on "Decorating," I'd like to have an ad that's relevant to that. Or if I have a forum on "Gardening," there'd likewise be an appropriate ad.
Can anyone help? |
Are you using any ad provider?
|
Yes, I'm using OpenAds.
|
It should automatically display relevant ads. Or am I wrong?
|
I'm trying to target specific ads to show in specific forums. For example, I'd like to have ads about "gardening" appear in the "gardening" forum, or ads about "decorating" in the decorating forum. So it wouldn't be the same ad appearing in all the forums.
I'm not sure how to do that (I'm new at Openads), so if you can tell me how, it'd be very much appreciated. |
If it's like AdSense, it would automatically pick up keywords from the page.
|
I don't think it does that. Openads works by establishing zones and then linking ads by keywords to each zone. I can set up a zone for "forums" in general," but I can't figure out how to do this for each specific forum.
|
In the ad code, does it have a place to put the "zone"?
|
Yes.
Here's an example of the code: Quote:
|
Have you looked through the Openads forum? I just found this... Is this what you are wanting to accomplish?
Howto: Using Keywords For Banner Selection Discussion Quote:
Quote:
|
Quote:
Code:
zone:<if condition="$foruminfo['forumid'] == FORUMID">ZONENUMBER<else />3</if> Code:
zone:<if condition="$foruminfo['forumid'] == FORUMID">ZONENUMBER<else /><if condition="$foruminfo['forumid'] == FORUMID2">ZONENUMBER2<else />3</if></if> |
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!!!!! |
You need to create multiple zones and replace the capitalised words in the code I gave you.
|
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? |
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.
|
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:
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? |
Code:
<script language='JavaScript' type='text/javascript' src='http://www.XXXXXXX.com/openads/adx.js'></script> |
Sorry to say this didn't work, either.
Any other ideas? I really need some help! |
What happens?
|
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.
|
You only need one set of them, not two. So just use this:
Code:
<script language='JavaScript' type='text/javascript' src='http://www.XXXXXXX.com/openads/adx.js'></script> |
Thanks for all your help, but this is not working at all.
So I thought I'd just try to keep the ads from feeding in to one specific forum entirely, but I haven't had any luck with that, either. Any suggestions? |
Code:
<script language='JavaScript' type='text/javascript' src='http://www.XXXXXXX.com/openads/adx.js'></script> |
I know it sounds nuts, and I really appreciate your help, but this doesn't work, either.
Boy, this is frustrating!!!!!! |
What happens? Have you replaced the XXXXXXX.com's?
|
Are you using "forums" as a general word, ski diva?
If you're trying to get this to show up in individual threads shouldn't "$thread[forumid]" be used then? Also, I've never even used "$foruminfo['forumid']" either.. I've only used "$forumid" or "$forum[forumid]".. I'm not saying "$foruminfo[forumid]" is wrong, but is there any actual benefit in using it over the shorthand, Dismounted? I also don't understand why single quotations are required in the code? (e.g. $foruminfo['forumid']). Also, speaking of the single quotations, I've noticed in the code ski diva has posted there are extra spaces in the conditional code ($foruminfo[SPACE'forumid'SPACE]). Not sure if this matters. Well, anyway.. I was just trying to offer up some possible reasons why the code isn't working. Also, if you were getting double ads on each page, I'd say you were copying the code twice? I don't think even vBulletin misunderstanding the conditional code could cause double ads in this situation. Although.. Dismounted is wayyyyyyyy smarter than me, so probably everything I've suggested is wrong. :) Anyway.. You haven't been very descriptive about where you're trying to use this code, so maybe just try $forumid == 11 or $thread[forumid] ==11 instead. |
Quote:
Quote:
|
Quote:
Now if the OP would respond so we (meaning you :p) can figure out what's going wrong. :D |
Okay, I'm here.
What I'm getting now is the ads that are linked to the second zone in the code are appearing in all cases -- that is, across all forums. This applies to the forum that I want to get its own ad, too without the others appearing (this is the first zone in the code). The ad that I want delivered to that zone specifically is not appearing at all. Weird, huh? BTW, Dismounted, I took your advice and only put in the block of code you gave me once; I guess I misunderstood when you said I needed multiple zones. I thought that meant I had to put in the code in for all the multiple zones. |
I use an iframe tag and invocation code to display ads on my word search puzzle pages.
First off, I'm not a coder by any stretch of the imagination and I don't know if what I did will work in your instance but it worked for me to rotate ads. I simply created a new html page, place the invocation code in it (generated by openads for javascript) and set a metatag refresh time in it. The ads are displayed in a page using an html iframe tag in that page to call the invocation code html page. The html page with the invocation code: 1)create new html page 2)place metatag for refresh near top. 3)place invocation code from openads below metatag for refreshing ads in iframe. 4)save it as: WhateverYouWantToNameYourFile.html Invocation code was the code generated by openads 2.0 for javascript. I simply copied that into a new HTML page and named it something. Above the invocation code I placed the metatag for refresh the invocation code and set a time in it. The metatag is: <META HTTP-EQUIV="refresh" CONTENT="60"> The 60 simply is the time in seconds. Also in the page with the invocation code, at the very top, I have: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> which works for me. Iframe tag: <iframe height="140" width="760" scrolling="no"frame frameborder="0" border="0px" src="WhateverYouWantToNameYourFile.html"></iframe> Be sure to include the quotes in this example. Above code for iframe to be placed in whatever page you want the adds to refresh or rotate. I added the height and width because I don't know how to have an iframe automatically fit an ad. I set scrolling to no to eliminate the scroll bars which appear in the iframe. The frameborder numbers are set to 0 so no border appears. You can see it in action here. All my word search puzzle pages have the iframe code I mentioned above so if you want to see other examples just choose one of the puzzles. The ads will refresh in 60 seconds without changing the puzzle. For the majority of ads on my forum board I use vb admanagement with openads. It works fairly straightforward. |
You do know the use of iFrames are highly not recommended, it's bad coding style. Also, he's not trying to rotate ads, he's trying to get DIFFERENT ads in different forums.
|
Dismounted, you got that exactly right! Rotating ads IS NOT the problem.
There HAS to be a way to solve this, though, wouldn't you think? :confused: |
Quote:
I tried what you posted but it doesn't work. Code:
<!--/* Openads Javascript Tag v2.3.39-beta */--> It seems like the key variable lies in the phrase document.write ("?zoneid=4"); Is there any way to use if and else statements before and after this entire line? Here's the pseudo code: If (forumid == x) document.write ("?zoneid=4"); else if (forumid == y) document.write ("?zoneid=5"); else document.write("?zoneid=6"); Can you tell me how to write the if and else statement in the java script provided by openads? |
You'll have to tell me the forum IDs...
|
for exmaple if the forum ids are 12 and 22, what would the code look like? Thanks ahead for your help btw.
|
Find:
Code:
document.write ("?zoneid=4"); Code:
document.write ("?zoneid=<if condition="$foruminfo['forumid'] == 12">4<else /><if condition="$foruminfo['forumid'] == 22">5<else />6</if></if>"); |
code turned out a little different for me.. but Dismounted gave the general road map
Code:
document.write ("&<if condition="$foruminfo['forumid'] == 45">what=zone:1</if>"); |
All times are GMT. The time now is 06:01 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 | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|