Register Members List Search Today's Posts Mark Forums Read

Mod Options
phpAdsNew Banner Ads integration (advertisements, classified ads, Adsense, etc.) Details »
phpAdsNew Banner Ads integration (advertisements, classified ads, Adsense, etc.)
Mod Version: 1.0.4, by The M.I.P. (Member) The M.I.P. is offline
Developer Last Online: Jul 2011 I like it Show Printable Version Email this Page

This modification is in the archives.
vB Version: 3.5.x Rating: (19 votes - 4.79 average) Installs: 571
Released: 06 Nov 2005 Last Update: 12 Oct 2006 Downloads: 998
Not Supported Uses Plugins  

OpenAds / phpAdsNew Integration 1.0.4 for vBulletin 3.[56].x
2006-06-08 by mip

Integrates the OpenAds / phpAdsNew ads system by introducing a new template tag <ad ... />.
You can even deliver your Adsense stuff via phpAdsNew using HTML banners.

The features of phpAdsNew combined with the power of vBulletin's templating system gives you the possibility to place ads for specific user groups, forums, and keywords.

This plugin requires a working installation (local or remote) of a recent version ofOpenAds / phpAdsNew (free software released under the GPL).
When using OpenAds, replace phpAdsNew in this documentation with OpenAds (phpAdsNew is just the predecessor of OpenAds).

When having a previous version of this product installed, see section UPGRADE instead.

Install product "phpadsnew-1.0.4.xml".
Set phpAdsNew path in Server Settings and Optimization Options to point to either your local phpAdsNew installation or a remote server (using XML-RPC).
It is strongly recommended to set $phpAds_config['compatibility_mode'] = true; in phpAdsNew config file, to prevent problems when phpAdsNew uses a database different from the one used by your vBulletin board.

When using XML-RPC, make sure to have and copied from phpAdsNew misc/samples/xmlrpc/php/ to your forum's includes/ directory (not necessary when using a local phpAdsNew installation).

Read the NOTES section below.

Click INSTALL in this thread to mark product as "installed" and receive notifications when a new version comes out.

  • 1.0.3 --> 1.0.4
    1. Import product as usual, with "Allow Overwrite" set to Yes.
  • 1.0.2 --> 1.0.3
    Upgrading is recommended, as this is a bugfix release.
    1. Import product as usual, with "Allow Overwrite" set to Yes.
    2. Recompile any templates where you experienced problems with the <ad .../> tag (notably those where this tag is used repeatedly on a line).
  • 1.0.1 --> 1.0.2
    1. Import product as usual, with "Allow Overwrite" set to Yes.
    2. Set $phpAds_config['compatibility_mode'] = true; in phpAdsNew config file.
  • 1.0 --> 1.0.1
    There's basically no need to upgrade, as the changes don't affect a working installation, but I recommend to do so, to ease possible upgrades in the future.
    1. Import product as usual, with "Allow Overwrite" set to Yes.
    2. Alter the path to phpAdsNew in vBulletin Server Settings and Optimization Options to point to your phpAdsNew installation.
      As opposed to version 1.0 of this product, a local path is not relative to the DOCUMENT_ROOT.

Use the newly introduced <ad ... /> tag in your templates.
The syntax is similar to phpAdsNew's view_raw() function call - the tag understands what, clientid, target, source, and withtext as arguments.

Please make yourself familiar with phpAdsNew prior to using this product. You can't expect this product to work, if you didn't check if your phpAdsNew is delivering your banners cleanly.

  • Get banner using keywords:
    <ad what="foo|bar" />
  • Get banner for guest usergroup (in this case, "ug1" must be set as a keyword in phpADsNew, see 2nd screenshot):
    <ad what="ug$bbuserinfo['usergroupid']" />
    (same technique can be applied to deliver forum-specific ads)
  • Similar invocation using template conditionals:
    <if condition="$bbuserinfo['usergroupid']==1"><ad what="" /></if>

  1. Always use the latest stable version of phpAdsNew.
    Old versions had bugs and some even had severe security issues - I'll give no support for installations with an outdated phpAdsNew.
    At the time of writing, latest version is 2.0.8.
  2. Templates which make use of the ad-tag might need to get recompiled after product change.
  3. Recommendations for heavy-duty servers: Move the plugin code to files; try to avoid using xml-rpc or cache xml-rpc requests (e.g. with memcache).
  4. Have an eye on current phpAdsNew security issues
  5. This product comes with ABSOLUTELY NO WARRANTY, to the extent permitted by applicable law.
  6. Support is provided at will.
    Don't expect help if you haven't read instructions or phpAdsNew manual, if you're using non-standard vBulletin software or if your problem descriptions are useless.

This plugin is donationware - it helps you to make some money, so please be fair and honor my work with an adequate pecuniary donation.
Donate via Paypal

Download Now

Only licensed members can download files, Click Here for more information.


Click image for larger version

Name:	panplugin_01.gif
Views:	3054
Size:	40.8 KB
ID:	54593   Click image for larger version

Name:	panplugin_02.gif
Views:	2409
Size:	26.4 KB
ID:	54594   Click image for larger version

Name:	panplugin_03.gif
Views:	3729
Size:	25.9 KB
ID:	54595   Click image for larger version

Name:	panplugin_04.gif
Views:	2354
Size:	42.7 KB
ID:	54596  

Click image for larger version

Name:	panplugin_05.gif
Views:	4077
Size:	34.8 KB
ID:	54597  

Show Your Support

  • To receive notifications regarding updates -> Click to Mark as Installed.
  • If you like this modification support the author by donating.
  • This modification may not be copied, reproduced or published elsewhere without author's permission.
Old 18 Nov 2008, 10:06
Marvin Hlavac Marvin Hlavac is offline
Join Date: Sep 2007
Yes, it is working for me now! I thank you very much, LWillmann. After 4 days of frustration, your solution finally made it work for me. I suggest you copy & paste your above step-by-step guide to a new thread.

Again, thank you very kindly for taking the time to share this with everyone!

Last edited by Marvin Hlavac; 18 Nov 2008 at 10:11.
Reply With Quote
Old 18 Nov 2008, 12:10
LWillmann LWillmann is offline
Join Date: Jan 2006
I think I will.

I will do a better write up and will post a new mod thread with this in it.
Reply With Quote
Old 18 Nov 2008, 17:09
Marvin Hlavac Marvin Hlavac is offline
Join Date: Sep 2007
That would be excellent!

Now that I am able to display a banner exactly where I need it, my next step is going to be to make the link to work. For some reason, when I click the banner, I'm directed to a non-existent URL.

Here's an example:

Is this how the URL is supposed to look (real domain substituted by
Reply With Quote
Old 18 Nov 2008, 17:51
LWillmann LWillmann is offline
Join Date: Jan 2006
Those settings are done in OpenAds/OpenX, in the Advertiser Settings, Campaign/Banner Settings You'll have to go there to verify that everything is configured correctly.
Reply With Quote
Old 25 Nov 2008, 15:15
meadwench's Avatar
meadwench meadwench is offline
Join Date: Sep 2007
You can also put ads in threads and between categories:

To put in threads:

To put between categories:

I've done this, and the space to show the ad is showing up, but the ad is not. My header and footer ads show up great, but the ads inside the forum itself don't.

I've tried putting in the link for my header ads, since I know they work, but it doesn't work inside the threads and categories.

Anyone got any ideas?

My site:

Vicky Rowe
Vicky Rowe
Owner, - Your source for Mead (Honey wine) information
Satori Digital Marketing - Affordable Small Business Internet Solutions
Reply With Quote
Old 04 Feb 2009, 23:19
funinthesun funinthesun is offline
Join Date: Oct 2005
I've tried all the methods posted on here but can't get OpenX to work with 3.8.1 without getting a parse syntax error. Any ideas?

Last edited by funinthesun; 11 Feb 2009 at 11:53.
Reply With Quote
Old 20 May 2009, 11:37
stardotstar stardotstar is offline
Join Date: May 2008
Real name: Will
I have localmode calls working well (very fast page loads) but I am getting time skew despite the vb clock, server clock and all other services being correctly set. whenever I do a

<ad what="zone:1" />

The post bit timestamps are all back in time by the amount of the GMT offset... (+10) very strange. If I take the invocation out the times go back to normal. Interestingly enough the time stamp at the bottom of the board is correct. I wonder if the plugin is writing a UTC time to a local variable that then is built into the post bit...

Any one with any idea on help would be appreciated in the mean time I will continue to hack away at it - I am on 3.8.2.

Man, its sooo fast! I have to get it working!

I notice that if I use "detailed" as a time setting in the vB options I get a correct result... Must be a variable getting reset somehow... Any ideas?

Last edited by stardotstar; 20 May 2009 at 11:47.
Reply With Quote
Old 20 May 2009, 12:06
stardotstar stardotstar is offline
Join Date: May 2008
Real name: Will
OK I think I can see where this is happening but just don't know how to track it down - it is possible that this is specific to 3.8.2 and I would be very willing to write up my method for getting it to work if I can get this time issue sorted.

The Time skew occurs if and only if there is a local mode invocation called using the <ad /> code.

I can put

<ad what="zone:1" /> in the footer or header, refer to it from an ad location or whatever but so long as there is a reference to this tag the time jumps back 10 hours.

So when I look at the plugin called
Ad tag callback
I see that its hook is at the template_compile and this tells me that it is a likely cause of elements of the time being rewritten...

Interestingly the time statement at the bottom of the board is always correctly displayed and if I switch the time mode to "detailed" I get the correct time (ie 1 minute ago) for a post just made instead of a 10 hour shift into the past... BUT in the PM inbox the time shift is still evident.

This is the plugin code:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

can anyone see anything that might cause the effect on time display in postbit and elsewhere in the templates?

Does anyone think I am on the right track or is it futile troubleshooting this wonderful but rather antiquated (for 3.5) implementation now?>
Reply With Quote
Old 22 May 2009, 11:03
stardotstar stardotstar is offline
Join Date: May 2008
Real name: Will
Guys, I am not sure how much interest there is for this mod to be adapted to work with 3.8.2 but I for one have spent some considerable time getting it to work with only one issue - the clock is set back to UTC during the callout to the ad server when using local mode. I can't see any reason why it will not work as advertised with vB3.8.2 using javascript invocation.

It is a great mod and one that with a little patience rewards the effort to implement.

Much thanks to the developer, not just for the hack but also the inspiration and opportunity to learn so miuch more about plugin integration while trying to fix what is a bug with openx - not a problem with this great hack.

If The M.I.P is still monitoring this thread I would offer, in exchange for some tips to work around the UTC problem (I have many threads about posing possible work arounds but have not got any workable answers or come up with a solution myself yet) I will make every effort to update the plugin for 3.8.2 or at the very least write a step by step integration guide for 3.8.2 and openx2.8.

I know that this is an easy thing to work around for a programmer but the problem is finding one who can see the context quickly enough to make the fix!

Just putting it out there The M.I.P. thanks for the great work on this inspired product and thanks for reading everyone!

Reply With Quote
Old 23 May 2009, 00:28
jw00dy's Avatar
jw00dy jw00dy is offline
Join Date: Dec 2004
I am interested for sure.
Just another squirrel trying to get a nut
Reply With Quote
Old 27 May 2009, 18:16
bertwrld bertwrld is offline
Join Date: Nov 2006
Real name: Bert Cannavelli
I get a shifted time as well, a fix would be great.
Reply With Quote
Old 28 May 2009, 10:31
stardotstar stardotstar is offline
Join Date: May 2008
Real name: Will
I have detailed the nature of the problem here:
that links to a couple of alternative attempts to glean what info i can about the nature of the tz problem and the openx bug that is allegedly responsible.

Not much in the way of progress toward a solution I am afraid as yet.
Reply With Quote
Old 31 May 2009, 16:35
bertwrld bertwrld is offline
Join Date: Nov 2006
Real name: Bert Cannavelli
Curious as to any luck with this as of yet?
Reply With Quote
Old 01 Jun 2009, 02:58
stardotstar stardotstar is offline
Join Date: May 2008
Real name: Will
Not yet, following various leads; I'll be sure to keep you updated of progress.
Reply With Quote
Old 02 Jun 2009, 20:47
bertwrld bertwrld is offline
Join Date: Nov 2006
Real name: Bert Cannavelli
Right on, thanks.

The java delivery def uses a lot of resources.
Reply With Quote

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Mod Options

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

New To Site? Need Help?

All times are GMT. The time now is 22:32.

Layout Options | Width: Wide Color: