The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
Using PHPadsnew 2 with Vbulletin 3.
The following are some tips on using these two programs together, based on my own experience. It's expected that you know how to use phpadsnew 2 to set up ads and generate invocation code. PHP Invocation The first tip is how to use php invocation code. Using javascript is possible, but not all browsers support javascript and, in my experience, using php is faster. The php invocation code phpadsnew generates will look something like this... PHP Code:
PHP Code:
If you have multiple zones, you can string these together. On EN World we have a zone that only appears on our vbadvanced news page. On those pages we call the view_raw function an additional time for the extra zone (view_raw is the function that actually calls up the ad - the rest of the code initializes phpadsnew). Here's our code, as an example of a 2 zone system. PHP Code:
Ads new's maintenance.php file needs to run on a regular basis for it to perform correctly. You can invoke it from your scheduled task manager if you wish. If you do, I'd advise applying the following mod to the code of the maintenance.php file. Open it and go to the ending ?> mark. Right about it add this. PHP Code:
Any other tips/comments/questions welcomed. PHP Ads New 2 is at http://www.phpadsnew |
#22
|
||||
|
||||
Quote:
PHP Code:
|
#23
|
|||
|
|||
Thanks, but then how would I then call each zone onto the page where I want it? For example I decided I am going to have text ads on the main forum page, plus 2 468X60 banners, plus a small banner on the side. If I only use $phpAds_raw[html] in each of these 4 areas, how does it know to call the correct ad for that spot?
Thanks again! I guess the bigger question is this...... I will always have text ads in the same place (forum home page), I will always have 468x60 ads in the same place (header and footer), and I will always have the small ad in the same place (side column). How would I setup both VB and PHPADSNEW to randomly call an ad of each type and stick it in these spots? I figured it out! I wasnt as familar with phpadsnew as I thought. I had no zones setup, and was a little mixed up because of the "Advertiser" and "Publisher" terminology. This program is a lot bigger than I expected it to be. I then figured out how to use multiple calls.... thanks again! |
#24
|
|||
|
|||
Using the instructions in the original post, I have been unable to get my site off the ground. The local invocation just wont work. However, when I use java invocation, it works just right. However since its a high traffic site, I would prefer local invocation. I have tried every variation and possibility, but no go. Any leads as to what I can do to get the local php invocation working with my VB3
|
#25
|
||||
|
||||
Uhm, well for starters, you are putting the local mode invocation code into the template phpinclude_start yes?
And are you then placing the variable $phpAds_raw[html] in the appropriate spot? @Distributor Talk: The first call puts the information in $phpAds_raw[html], the second in $phpAds_raw2[html] and so on... |
#26
|
|||
|
|||
Ahoy! Thanks for replying.
Quote:
Quote:
|
#27
|
|||
|
|||
I ended up getting it to work flawlessly on my site. Even setup a template condition to not display it on the homepage of vbadvanced (the banners are in my header and footer)
I'll help you if you want. Drop me an email: chris@distributortalk.com it looks like you figured it out I see the ad on your homepage This automerge doublepost "feature" is the most annoying, confusing thing to hit vbulletin. |
#28
|
|||
|
|||
AHoy Chris,
Those ads are based on the javascript invocation, which I don't prefer due to the slightly increased loads. I hope I can still email you to figure this out since we seem to use the same templates! |
#29
|
|||
|
|||
I can't get it to work.
I followed the tutorial verbatim, but they wont show up on my forums. ideas? |
#30
|
||||
|
||||
Well, first off - the <?php and ?> tags need to be dropped before inserting the material into phpinclude_start. Their presence will trigger a parse error.
Second, make sure the zone # in the function call is correct - this is the part of the code most likely to change. Don't copy the code from my tutorial. Go to your phpads setup and have it give you the local mode invocation code. Then paste THAT CODE into phpinclude_start and delete the <?php and ?> markups along with the echo statement. Finally place the variable $phpAds_raw[html] where you need it to appear on your page. |
#31
|
|||
|
|||
Michael, I had dropped the <?php and ?> tags and tried. But even with their presence I did not receive any error. All code I pasted were from within phpadsnew. If the javainvocation code goes in the same are as $phpAds_raw[html] then all goes well.
|
Thread Tools | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|