Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.5 > vBulletin 3.5 Add-ons

Reply
 
Thread Tools
phpAdsNew Banner Ads integration (advertisements, classified ads, Adsense, etc.) Details »»
phpAdsNew Banner Ads integration (advertisements, classified ads, Adsense, etc.)
Version: 1.0.4, by The M.I.P. The M.I.P. is offline
Developer Last Online: Nov 2023 Show Printable Version Email this Page

Version: 3.5.x Rating:
Released: 11-05-2005 Last Update: 10-11-2006 Installs: 571
Uses Plugins
 
No support by the author.

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.

PREREQUISITES:
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).

INSTALLATION:
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 lib-xmlrpc-class.inc.php and lib-xmlrpc.inc.php 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.

UPGRADE:
  • 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.

USAGE:
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.

Examples:
  • 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>

NOTES:
  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.

PS:
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

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #332  
Old 07-17-2006, 06:05 AM
dwbro1's Avatar
dwbro1 dwbro1 is offline
 
Join Date: Apr 2006
Posts: 63
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ok I've seen alot of folks asking but did not see anyone respond. I got this working tonight and on 3.6 RC1 (weee)

To make them forum specific here is what I did:

Add this to the bottom of the navbar template

<center><ad what="fid$foruminfo['forumid']" /></center>

In the keywords field of the banner in phpadsnew I put:

fid2 (This make is display on the page when forum ID 2 is the one I'm viewing)

I also have this in header:

<ad what="header" />

and in the keywords for the banner I want I have:

Header (on my test banner for the forum ID2 I put this in the header:

fid2, header (and it displays on both locations)

I also noticed a bug in either the code or documentation in the server settings where it says use the "path" or if using xml-rpc to use the "url" I had to use the URL even though I'm not using xml-rpc or it would not work at all.

Hope this helps..
Reply With Quote
  #333  
Old 07-19-2006, 01:57 AM
jcerious jcerious is offline
 
Join Date: Feb 2006
Posts: 28
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

dwbro you are AWESOME! Thanks so much for posting that! I had the exact same question.

So, can I ask you a couple of things? I've just gotten a little ways into figuring this whole thing out. I haven't gotten nearly as far as you. But I'm not sure if maybe I'm wasting my time.

I would like to be able to run a specific set of ads on a specific forum AND all topics and threads that are started in that forum. But for the life of me I can't figure out how you'd do that with this.

For instance let's just say you had 3 forums and they were called 1 2 and 3. And let's say you had ads from 3 different customers and you wanted to run ads from customer 1 ONLY in forum 1 - and so on. Can you tell - in your advanced state ! if that is something that can be easily done with this?

THANKS for your info!

OH, AND one other question. How did you figure this out? Was it in some documentation somewhere??? Thanks!
Reply With Quote
  #334  
Old 07-19-2006, 03:35 AM
dwbro1's Avatar
dwbro1 dwbro1 is offline
 
Join Date: Apr 2006
Posts: 63
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by jcerious
For instance let's just say you had 3 forums and they were called 1 2 and 3. And let's say you had ads from 3 different customers and you wanted to run ads from customer 1 ONLY in forum 1 - and so on. Can you tell - in your advanced state ! if that is something that can be easily done with this?
If you do what I said above that is exactly what it does. Here:

Take this and add it to your vb template
Quote:
<ad what="fid$foruminfo['forumid']" />
The Bold Part here is the first part of the identifier
Quote:
<ad what="fid$foruminfo['forumid']" />
The Bold Part shown here is replaced with a number I assign
Quote:
<ad what="fid$foruminfo['forumid']" />
when creating a banner in PAN you have the ability to add a keyword for that banner. In the Key word field you put this:
Quote:
fid2
The "FID" is just my naming scheme and the number represents which forum I want it to display in. You know each Forum is assigned a specific #number, so then the template replaces the template code with what ever forum you are currently viewing, if you use the same number in the keyword field that is assigned to that specific forum. Then phpads knows which key word to search for to display those banners with those key words.

Hope that makes sense.
Reply With Quote
  #335  
Old 07-20-2006, 12:53 AM
jcerious jcerious is offline
 
Join Date: Feb 2006
Posts: 28
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You know, actually I'm not sure I totally understand, but I'll take your word for it for now and when I get around to actually trying to implement it and try it out then maybe it will all become clear! Anyway, thanks so much for the info - looks like you're the first person to post info on how to do this. I might hit you up with a few more questions when I try to implement it myself. But you've given me the "courage" to move forward! I.e. showing me it's possible.
Reply With Quote
  #336  
Old 07-20-2006, 02:11 AM
jcerious jcerious is offline
 
Join Date: Feb 2006
Posts: 28
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Well, I've had a chance to play around with this a bit and I'm having trouble putting your code into the template file.

When I put: <ad what="fid$foruminfo['forumid']" />

anywhere into the "forumdisplay" template I get an error message when I try to save it. The error basically says:

Parse error: parse error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING

Am I right that the code you gave is supposed to go into whatever page you want the ads to show up on?
Reply With Quote
  #337  
Old 07-20-2006, 02:13 AM
jcerious jcerious is offline
 
Join Date: Feb 2006
Posts: 28
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ooops! Nevermind. My stupid web page editor actually changed the code to reformat it to its liking. No more error.
Reply With Quote
  #338  
Old 07-20-2006, 02:23 AM
jcerious jcerious is offline
 
Join Date: Feb 2006
Posts: 28
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hey! It worked! It actually put an ad on a page! Very cool!

And it seems to have worked exactly as you said. I copied your same code to the "showthread" template and the ad I had planned for that forum did indeed come up on the forumindex AND in the threads under that forum.

Thing is though. I don't understand how it knows to come up in all the threads under a particular forum. But it seems to work.

I guess although you can't tell by the URL what forum you're in when you're looking at a thread, I guess it is in the vb database so it just knows to pull up the ad from there.

Anyway, very cool that it works! And thanks so much for your help dwbro1.

By the way, I wonder if you've played around with inserting ads inbetween posts in a thread? I wonder if that's possible?
Reply With Quote
  #339  
Old 07-20-2006, 08:51 PM
jcerious jcerious is offline
 
Join Date: Feb 2006
Posts: 28
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Now that I've had a day to play around with it everything seems very good. But my experiments have brought up a new question. What if I want to run more than one ad per page. Like say I have 3 advertisers and I want to put them all on the same pages. I don't see how you can put more than one ad at a time on a page. Oh, I'm using text ads so I don't know if that makes any difference.

Would you know how to do that dwbro?

Thanks!
Reply With Quote
  #340  
Old 07-21-2006, 12:27 AM
ppc123 ppc123 is offline
 
Join Date: Jun 2006
Posts: 8
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

First of alll, dwbro1, thank you so much for that post,

according to dwbro1's instructions, what would i put in the banner keywords for the banner to show in the main forum index(index.php)?
Reply With Quote
  #341  
Old 07-27-2006, 11:38 AM
jaybolt jaybolt is offline
 
Join Date: Jun 2004
Location: UK
Posts: 20
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I have my banners displayed under my navbar. Problem is the Flash banners sit ontop of the drop down menus then they display. Static image banners are fine - does anyone know how I can alter this so that drop down menus will sit on top of the banners? In CSS it would be a z-index: value but I don't know how this could be achieved on VB

For anyone who needs to see what I am on about, check http://www.yorkshire-divers.com/forums/ and then try the dropdown menus when a flash banner is displayed.

Cheers
Reply With Quote
Reply

Thread Tools

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

Forum Jump


All times are GMT. The time now is 03:43 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.06532 seconds
  • Memory Usage 2,320KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (5)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (2)pagenav_pagelinkrel
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete