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 |
#42
|
|||
|
|||
Has anyone integrated phpadsnew with magnus's AdColumns1.0 ?
I want to add a sidebar that rotates the display order on my forum on every refresh. I already have the zone and ads setup, just not sure how to deliver it with this script. |
#43
|
|||
|
|||
Hi,
I've struck a slight problem which I can't workout. I have tested the following on my internal test site which works flawlessly following the instructions on page 1 however no matter what I do it doesn't show the banner. My phpinclude_start is as follows Quote:
Quote:
Any ideas would be great. Cheers Darren |
#44
|
|||
|
|||
I'm using Max Media Manager 0.1x (same as PAN2.1) but I can't make it work. The phpinclude_start has this:
PHP Code:
Quote:
|
#45
|
||||
|
||||
Quote:
Also, is you're ad server on the same machine as your vbulletin? If not that would explain the SQL error, which appears to be caused by the SQL server you're talking to not having the appropriate table. |
#46
|
|||
|
|||
Michael,
Thanks for the information. It works great. Oddly enough, on my first site, it gives me the option to use local invocation, but on the second, only javascript. This is probably due to the fact the second site is on a different webserver, but alas, it works. Thanks again |
#47
|
||||
|
||||
i have a logout problem whit this code...some1 test if can logout whit this code on?
|
#48
|
|||
|
|||
For the life of me, I can't get this to work. Here is my phpinclude_start template:
PHP Code:
And here is a snippet from my footer template showing two different zones, one with local invocation and the other with javascript: PHP Code:
Any ideas as to why I can't get local invocation to work? EDIT: As a test, I tried local invocation on a non-forum page at the same site, and it works fine. You can see this on http://www.bigblueball.com/index.php (it's serving the 120x90 ad in in the right column). Still can't get it to work in the forums though. EDIT: After re-pasting the invocation code a second time, it seems to be working now. Nevermind..... |
#49
|
|||
|
|||
I am experiencing a strange problem when using this script.
To begin with, I originally added the banner to my page with the ob method described on the vbulletin website. When I found this thread, I removed those methods and added the php code directly to the include file as described here. The banners work fine. Unfortunately, I have a "shoutbox" module (CMPS) which is not working now that I added the phpadsnew script to my header. The shoutbox has not displayed properly with either method of calling the phpadsnew script. The reason that I know these two are related, is that in the shoutbox module window, I get the following error message: Table 'bannerads.adv_shoutbox' doesn't exist So obviously, phpadsnew is changing the database from "forum" to "bannerads", running the script, and then for some reason not going back to the original database. I am guessing that it needs to do a USE FORUM sql statement in order to get the default database back into the focus. So, do you think it is the phpadsnew or the shoutbox that needs the tweak? Any ideas on what could be causing this? Thanks. |
#50
|
|||
|
|||
Quote:
Ideas? I'm using vBulletin 3.0.7 and phpAdsNew 2.0.5. I did try both with and without "Use database compatibility mode". |
#51
|
||||
|
||||
Thanks for a brill tutorial Michael!
Can I just ask you to check what I'm doing is ok please? (It all seems to be working ok) I have two zones on the same page and this is how I've set it up: My phpinclude star file contains: HTML Code:
if (@include(getenv('DOCUMENT_ROOT').'/adserver/phpadsnew.inc.php')) if (!isset($phpAds_context)) { $phpAds_context = array(); $phpAds_raw = view_raw ('zone:2', 0, '_blank', '', '0', $phpAds_context); } { $phpAds_context2 = array(); $phpAds_raw2 = view_raw ('zone:3', 0, '_blank', '', '0', $phpAds_context2); } $phpAds_raw[html] -where I want the first zones ads to show, and, $phpAds_raw2[html] -where I want zone two ads to show. It all seems to be working fine, but just wondered if I have done it right or not! Thanks for looking. |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|