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 |
#112
|
||||
|
||||
Quote:
Been looking in my forumhome template and only found one instance with phpAds in it and that was the code that I just added. Also, if I'd like to add more than one banner, would I just add the code from phpAdsNew into the plugin code just as I did to make the initial one appear? |
#113
|
|||
|
|||
if you want to add a new banner you will probably have to make a new variable
for example.. a new plugin with the code PHP Code:
then anywhere in your template {$aNewVariable['html']} i havent tested this but i think it should work OK Jason |
#114
|
|||
|
|||
In addition to the code i've posted here
https://vborg.vbsupport.ru/showpost....&postcount=106 I would like to add something else for the peeps that want it to work with vbAdvanced go to Admin CP -> vBA CMPS -> Default Settings -> Portal Output Global Variables and add PHP Code:
This will work with the latest phpAdsNew 2.0.8 and vBulletin 3.6.x if you have more than one ads then you need to externalize (ie write all variables into this textbox without the $ in front) all variables you have in your hooks.. but the above will work with one ad just fine as always check www.pbzone.net to see it working A big thanks to this community it keeps me learning new things all the time p.s. if anyone has benefited from this or has problems please email me |
#115
|
||||
|
||||
Will this work for multiple banners?
|
#116
|
|||
|
|||
having some difficulty here. if I were to put the code:
{$phpAds_raw['html']} into my header, would i place it inside a <td> or outside of it. OH MY GOD! So yeah I just took the javascript invocation code and plugged it into the bottom of the header. Everythign is fine now. God da$#$n't that was a lotta time wasted. Am I the only one who feels like an idiot at least 90 percent of the work day thanks to vbulletin? |
#117
|
||||
|
||||
Quote:
Man, I had no idea that it was that simple until I started thinking about what I did with ubb Threads. After trying about 3 different hacks.... I had just tested out the Java invocation code....and whalla. What I'd like to do however, is insert a table where I can put the java code to the right of my banner. Here's what my header currently looks like: www.f-bodyhideout.com/forums If someone knows how to do it....please PM me or post up here. Thanks... Glad you're up and running myplacidcasual. |
#118
|
||||
|
||||
i dont have PHPINCLUDE_START
Quote:
|
#119
|
||||
|
||||
I tried the instructions above, but it isn't working with my 3.6.2. When I add the plugin, I get a MySQL error:
Quote:
|
#120
|
||||
|
||||
this has helped me a great deal - thank u so much.....
****installs**** |
#121
|
|||
|
|||
Has anyone got this working without using the Java invocation code?
I am trying to get this to work with the local invocation code with 3.6.4. |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|