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 |
Here's a way to prevent certain usergroups from being logged as having seen an ad (they'll still see them but the ad view won't be logged). In the file phpadsnew.inc.php find the following code:
PHP Code:
PHP Code:
|
What should i put as the file name?
|
phpads-vbulletin.inc.php would work
|
I tried running the maintenance.php on my VBulletin 3.0.7 and wanted to make sure it was working so I tried to run it and got this error.
PhpAdsNew Maintenance Warning: main(/www/adserver/maintenance/maintenance.php): failed to open stream: No such file or directory in /admincp/cronadmin.php on line 56 Fatal error: main(): Failed opening required '/www/adserver/maintenance/maintenance.php' (include_path='.:/usr/local/nf/lib/php') in /mnt/web_h/d48/s32/b0239134/www/forums/admincp/cronadmin.php on line 56 |
Right there - the error message told me what I need to help you.. The absolute path to the file you want to include should be..
/mnt/web_h/d48/s32/b0239134/www/adserver/maintenance/maintenance.php |
Hi mike I tired what you said to put: (/mnt/web_h/d48/s32/b0239134/www/adserver/maintenan
I still get an error! How much will it cost to fix the problem for me? PhpAdsNew Maintenance Warning: main(/mnt/web_h/d48/s32/b0239134/www/adserver/maintenan): failed to open stream: No such file or directory in /admincp/cronadmin.php on line 56 Fatal error: main(): Failed opening required '/mnt/web_h/d48/s32/b0239134/www/adserver/maintenan' (include_path='.:/usr/local/nf/lib/php') in /mnt/web_h/d48/s32/b0239134/www/forums/admincp/cronadmin.php on line 56 |
FrankieFive, you need to adjust the number of caracters of the field filename of the table cron of your database because the default value of 50 caracters is not enought.
Try to run this query in the PHPMyAdmin: Code:
ALTER TABLE `cron` CHANGE `filename` `filename` VARCHAR( 70 ) NOT NULL |
Quote:
|
Quote:
If you get a "You don't have permission to run queries" error you'll need to edit your config.php file to give yourself permission to run queries. |
All times are GMT. The time now is 09:19 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|