![]() |
Those are template conditionals. You put them in the template where the ad will appear along with the rest of the HTML. If you're ads going to be in the header, then it all goes in the $header template.
The name of the CPMS index is adv_index So the conditional is HTML Code:
<if condition="THIS_SCRIPT=='adv_index'">ad code</if> |
Quote:
phpadsnew2 generates the ad code itself. Go to Publisher's & Zones and select "Generate Invocation Code" and use the "Remote invocation by javascript" - that's easier than trying to splice and php from phpadsnew into vbulletin. |
Thanks Michael.
Just to clarify, my code will always go in the template for whichever page I want it to appear on, right? |
$header is global - meaning it's called on all pages. If you want 4 zones for four different pages you'll put the invocation codes for ALL of them in the header. Each one should be surrounded by the appropriate conditional tags. Hence
<if>Ad 1 <else /><if>Ad 2 <else /><if>Ad 3 <else />Ad 4 </if></if></if> |
Ok I got that part..... but now how does vbulletin know where to put the ad on the page? For example, if I want a little ad on the forum home page to show a "sponsor" for a specific category, I would somehow need to call that ad right next to the category name. So from what you have said I understand I need to put the conditions in the header template, but now what other code needs to be put (and where) to get the small ads to show up.
Thanks again |
You put the code in the spot you want it to show up in. If you open a template, say forumhome, you're looking at an outline of the page before the values of any variables are plugged in. You put all that code at the location you want it. You may need to use tables for some additional formatting, depending on what you're looking for.
|
Hi again,
Thanks for all your help, ive got one more question. We ditched the vbadvanced page and dont need to worry about what ads are on what pages. We just need to be able to call 2 468x60 banners, and one or two small side banners for each page. Right now we are only able to call 1 large banner at the top. Here is how we are doing it: In the php_include section in styles we have: Code:
require("/home/httpd/vhosts/distributortalk.com/httpdocs/ads/phpadsnew.inc.php"); Code:
$ads_array[html] Thanks in advance! |
Hey guys,
I decided to install phpadsnew on a different domain so that I can setup zones and have advertising across all of my sites. What would be the best way to call the ads into vbulletin now that I have it setup like this? Can you give me an example? |
All times are GMT. The time now is 04: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 | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|