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 |
#82
|
|||
|
|||
Quote:
I'm lost. How does this site: www.gearchatter.com, generate the zone on the left to diplay all his ads? |
#83
|
||||
|
||||
I know whenever you help people with something like this -- you open a can of worms that keeps you busy putting out people's fires.
I followed your distructions and added 6 banners (six different invocation codes) to my 30+ styles at www.moparstyle.com -- and everything works great. 99.44% of the time when I use one of the hacks here -- everything works fine. When it doesn't -- I generally find a typo on my part when I reread. This is long way of saying all is well -- and I appreciate your help. Much faster than having the server running all of that Java code. |
#84
|
|||
|
|||
Quote:
|
#85
|
|||
|
|||
I'm trying to place more than one ad (different zones) on my templates. On the header template I placed the first one, then on the postbit template I want to place another. On other template, I want to place the last one. But I'm not able to display them. Just the first one displays. Here is the code I placed on the phpinclude_start template:
Code:
ob_start(); if (@include(getenv('DOCUMENT_ROOT').'/maxserver/phpadsnew.inc.php')) { if (!isset($phpAds_context)) { //LeaderBoard Banner $phpAds_context = array(); $phpAds_raw = view_local ('', 5, 0, 0, '_blank', '', '0', $phpAds_context); //Medium Rectangle $phpAds_context2 = array(); $phpAds_raw2 = view_local ('', 21, 0, 0, '_blank', '', '0', $phpAds_context2); //Wide Skyscraper $phpAds_context3 = array(); $phpAds_raw3 = view_local ('', 37, 0, 0, '_blank', '', '0', $phpAds_context3); } } ob_end_clean(); Note: I'm using MMM 0.1.x |
#86
|
|||
|
|||
I have one spot in my header that I want to have 43 banners rotate in. I want them to rotate with each page change or refresh. I am using direct selection. I can get one banner to display... I can get two banners to display next to each other at the same time. How do I get them to rotate... one at a time? Code?
|
#87
|
|||
|
|||
I cant get this to work even following the instructions on the first page of this thread.
Soes anyone have simple instructions to follow to get this running on VB 3.5.0?? Many thanks |
#88
|
|||
|
|||
Does this work with vB 3.5.1?
|
#89
|
|||
|
|||
Hey Guys and Gals, can you guys help me out.
I'm installing PHPadsnew and I appear to have everything working on my server and html site. I'm trying to finish the install/integration into my Vb 3.51 forums. The instructions say to modify the PHPINCLUDE_start template. For the life of me, I cannot find this template. I've looked through the templates and either I'm blind or its not there. Is this a template in vB 3.51? If so, where is it if, because apparently I'm blind, and running search in templates is not showing it to me. If it's not a template in 3.51; then what should I modify to get this hack to work? Thanks! |
#90
|
|||
|
|||
Mark,
The phpinclude_start template is gone starting with 3.5. It is replaced with the plugins system. Try adding a new plugin with a hook location of global_start and put the phpAdsNew code in there. |
#91
|
||||
|
||||
I have create a new plug-in (globalstart hook) and insert the code of the first post
in header the raw html, and just set the schedule task righ, but when I active the plug-in and try to open my page, it dont be able to connect to the database, why? my vbulletin version is 3.5.2 and using vba index in the root dir with forum in /forum dir |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|