vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.5 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=113)
-   -   phpAdsNew Banner Ads integration (advertisements, classified ads, Adsense, etc.) (https://vborg.vbsupport.ru/showthread.php?t=100229)

DreyerMedia 11-07-2007 05:07 PM

Is it possible to use this mod when you have openads installed on a remote server?

kafi 11-23-2007 11:01 AM

This hack serves me very well, hovever I have found, that it cause overloading of server (not this addon but open ads maybe)

There is a recomendation to move plugin to files.... I would like to give it a try, but how ??? :)

Thank you!

al-moslem 11-27-2007 08:06 AM

Dear All,

I installed this good hack, and it was working fine, but suddenly the home page of the forum and the admin login page gives me this error:

Fatal error: Call to undefined function view_ad() in /home/XXXXXXX/public_html/vb/global.php(563) : eval()'d code on line 15

How can I remove this hack manually, because I can login to AdminCP and remove it from there.

Please assist me.

Regards,

Hoffi 12-02-2007 12:37 PM

Disbale Hoos in your config File. Just Comment that one Line out near at the End of the File.

TenPercenter 12-12-2007 08:45 PM

Is there a way to utilize either of these two local invocation options?

"Don't show the banner again on the same page"
"Don't show a banner from the same campaign again on the same page"

I want to run a string small banners up one column using a single zone, and I'd like to have no banners repeated on any one page load. This gives me a true randomized banner selction even when i have banners from many different campaigns and publishers.

TomasDR 12-30-2007 09:50 PM

I have been using this addon for a while and it has worked fine. Today I added my first flash banner and it doesn't display.

I get an error 'FlashObject' is undefined. Or in Firefox FlashObject is not defined.

The view source is the following:
Code:

    <!-- BEGIN ad 96495895 -->
<div id='m3_0869ec791522e23bbf6e5d350caab773' style='display: inline;'><img src='http://ads.xxxxxxx.com/www/images/1x1.gif' alt='New York Shark Bar' title='New York Shark Bar' border='0' /></div>
 
<script type='text/javascript'>  <!--// <![CDATA[  var fo = new FlashObject('http://ads.xxxxxxx.com/www/delivery/ai.php?filename=sharkbar.swf&contenttype=swf&clickTARGET=_blank&clickTAG=http://ads.xxxxxxx.com/www/delivery/ck.php?oaparams=2__bannerid=14__zoneid=1__cb=bb83a83d89', 'mymovie', '468', '60', '8');  fo.addParam('wmode','transparent');  fo.write('m3_0869ec791522e23bbf6e5d350caab773');  // ]]> --></script><div id='beacon_14' style='position: absolute; left: 0px; top: 0px; visibility: hidden;'><img src='http://ads.xxxxxxx.com/www/delivery/lg.php?bannerid=14&campaignid=8&zoneid=1&channel_ids=,&cb=bb83a83d89' width='0' height='0' alt='' style='width: 0px; height: 0px;' /></div><!-- END ad 96495895 -->

Any ideas?

Fred. 01-06-2008 07:55 PM

I use this plugin from the begin, and now i want to disable the plugin for a moment. (openads update)

when i disable the plugin, i get a blank forum page with no info or error?

How can i resolve this?

Raptor 01-16-2008 09:15 PM

can the banners be added using this mod:

https://vborg.vbsupport.ru/showthread.php?t=154361

flOid 01-25-2008 04:38 PM

XML-RPC isn't working anymore with the newest Openads versions.

An update would be nice...

Kalina 02-21-2008 09:00 AM

Yeah, Openads, which is now OpenX, is not working with this anymore. :(

Been searching all night for a solution.

computer1 02-23-2008 09:19 AM

I get this erryror when I try to put this code to my header
<ad what="zone:1" />
I run the newest version off php news

Database error in vBulletin 3.6.8:

Invalid SQL:

SELECT title, styleid, dateline, username, template_un
FROM template
WHERE templateid = 606;

MySQL Error : Table 'advbanner.template' doesn't exist
Error Number : 1146

Fred. 04-06-2008 01:02 PM

I use this plugin from the begin, and now i want to disable the plugin for a moment. (upgrade)

when i disable the plugin, i get a blank forum page with no info or error?

How can i resolve this?

*edit*

Plugin removed and updated to openx 2.4.4 :-)

LWillmann 04-09-2008 11:49 AM

Quote:

Originally Posted by Kalina (Post 1447970)
Yeah, Openads, which is now OpenX, is not working with this anymore. :(

Been searching all night for a solution.

I had to write myself a half-arsed product that isn't pretty to get my ads on the site to get it to work with the newer versions when I couldn't get this working with a new site.

I have a site that this has been running on for two years, and I've upgraded the board and it's still working. But I'm terrified to upgrade the ad software for fear of breaking it.

But I have discovered a problem with what appears to be template caching. It appears that the template that has the ads in it is being cached (and I don't want this) so my adviews aren't being properly counted.

obmob 05-14-2008 12:03 AM

This is working on 3.7? o.o

Trana 05-14-2008 03:52 AM

Ack, this doesn't work in 3.7.0? I upgraded and my banners are gone.

T.S. 05-18-2008 03:38 PM

Does anybody know if somebody is working on a 3.7/OpenX version of this?

Ramsesx 05-25-2008 07:56 PM

An easy way to get vb3.7 working with openx, you only need to paste the openx created java script zone code into the place you wish your banner to be.

Tapage 06-17-2008 09:52 PM

Quote:

Originally Posted by Ramsesx (Post 1531246)
An easy way to get vb3.7 working with openx, you only need to paste the openx created java script zone code into the place you wish your banner to be.

I'm running 3.6.8 would be the same .. ?

Tapage 06-17-2008 09:54 PM

How I can paste the code .. or better my question is where ..

Ramsesx 06-22-2008 09:34 AM

Quote:

Originally Posted by Tapage (Post 1552084)
I'm running 3.6.8 would be the same .. ?

Sure, should working on all websites.
Quote:

Originally Posted by Tapage (Post 1552086)
How I can paste the code .. or better my question is where ..

Go first into your openx admin area f.ex. yoursiteurlopenx/www/admin/dashboard.php
After -->Inventory ---> Direct Selection
There should be the Bannercode.
Will be only there if you created a campaign and zone.
You can change the code from default php to javascript tag (Please choose the type of banner invocation).
You only need to add this javascript to the place you want to show the banner.
In my case I added it into the header template.
Code:

<tr>
  <td width="25" align="$stylevar[left]">&nbsp;</td>
  <td align="$stylevar[right]"><div align="left"><a href="$vboptions[forumhome].php$session[sessionurl_q]"><img src="$stylevar[titleimage]" alt="$vboptions[bbtitle]" width="468" height="60" border="0" /></a></div>
<td>
        <!--/* OpenX Javascript Tag v2.5.67-beta */-->

...........
</td>
<tr>
        <td width="20" align="$stylevar[left]">&nbsp;</td>
       
        <td align="$stylevar[right]">        <div id="buttons_outer">
                <div id="buttons_inner">
                        <div id="buttons">


montsa007 06-23-2008 03:23 AM

Will this work on 3.6.10??

Tapage 06-23-2008 04:11 PM

Quote:

Originally Posted by Ramsesx (Post 1555913)
Sure, should working on all websites.

Go first into your openx admin area f.ex. yoursiteurlopenx/www/admin/dashboard.php
After -->Inventory ---> Direct Selection
There should be the Bannercode.
Will be only there if you created a campaign and zone.
You can change the code from default php to javascript tag (Please choose the type of banner invocation).
You only need to add this javascript to the place you want to show the banner.
In my case I added it into the header template.
Code:

<tr>
  <td width="25" align="$stylevar[left]">&nbsp;</td>
  <td align="$stylevar[right]"><div align="left"><a href="$vboptions[forumhome].php$session[sessionurl_q]"><img src="$stylevar[titleimage]" alt="$vboptions[bbtitle]" width="468" height="60" border="0" /></a></div>
<td>
        <!--/* OpenX Javascript Tag v2.5.67-beta */-->

...........
</td>
<tr>
        <td width="20" align="$stylevar[left]">&nbsp;</td>
       
        <td align="$stylevar[right]">        <div id="buttons_outer">
                <div id="buttons_inner">
                        <div id="buttons">


Thanks dude . . I will do it in my forum ( already have the java tag in open X ) and report it back here .. !

jw00dy 07-24-2008 04:48 AM

I screwed up and upgraded to OpenX 2.6 and something with the invocation code has changed making this not work anymore :(

The M.I.P. if you are out there, would you mind helping get this fixed. I am not a coder, so fixing it myself ... well it wouldn't happen.

I can help with the new invocation codes etc since I have them...

Help!

To everyone else, don't upgrade to 2.6 unless you don't want to serve ads any more...

Dennis B 08-05-2008 03:00 AM

Alright, got it working here with 3.7.2 and openx 2.6.0. :up:
  1. Remove this hack entirely, but before you do it, make note of the "search strings", the "XYZ" that go into every <ad what="XYZ">
  2. Follow Ramsesx instructions above, just don't forget to paste each old "search string", the "XYZ" that went into <ad what="XYZ">, into the "Banner selection" box when getting the javascript.
That's it! :D

jw00dy 08-06-2008 09:18 PM

This is a work around, but not quite a fix. I ended up canning 2.6 and going back. I had to recreate everything, but I'm back in business...

If you want it to work with the <ad what="adsf"> tag only, don't go to 2.6.

Dennis B 08-07-2008 11:28 AM

Oh yes, that's exactly the case, it's just one way of getting it to work, I never implied it to be a fix. :)

slo_chewie 09-15-2008 10:01 PM

I've gotten OpenX to work on my board. I am getting occasional MySQL errors I don't know how to get around though. The MySQL errors don't seem to affect my forum members, but the emails are kind of annoying and I would like to know if anyone knows how to fix it.

If someone else already posted this then I apologize. My work around was an amalgamation of ideas I got reading this forum, the OpenX forums and vBulletin manual.

I got my PHP Invocation code from OpenX and modified it slightly and created a plugin in the vBulletin Admin.

Log into the Admin. Plugins & Products -> Add New Plugin

Product: vBulletin
Hook Location: global_start
Title: OpenX
Execution Order: 5
Plugin PHP Code:
Code:

$tz = date_default_timezone_get();

define('MAX_PATH', '/home/website/openx');
  if (@include_once(MAX_PATH . '/www/delivery/alocal.php')) {
    if (!isset($phpAds_context)) {
      $phpAds_context = array();
    }
    $phpAds_raw = view_local('', 0, 3, 0, '', '', '0', $phpAds_context, '');
  }

date_default_timezone_set($tz);

Then I added $phpAds_raw[html] to my header template where I wanted the banner to appear. In my case I just replaced the <ad ... /> tag I previously inserted when installing phpAdsNew vBulletin plugin.


* If you are using PHP4 then the code will be slightly different.
See: http://forum.openx.org/index.php?showtopic=503421161&pid=71517&st=0&#entr y71517

I originally didn't have the timezone code in on my forum and it was making my forum times show UTC. I found that post and can confirm it works.

Anyone know how to fix the MySQL errors. I get a couple errors every hour that are similar too:

Code:

Database error in vBulletin 3.7.3:

Invalid SQL:

                        SELECT post.postid
                        FROM post AS post
                       
                        WHERE post.threadid = 5560
                                AND post.visible = 1
                               
                               
                        ORDER BY post.dateline
                        LIMIT 0, 15;

MySQL Error  : Table 'openads.post' doesn't exist
Error Number  : 1146

Edit: I should note I had to remove the comments from the Invocation code to get it to work on my forum. The banners wouldn't appear until I did so.

LWillmann 09-16-2008 11:32 AM

Could that be the maintenance script that's run by OpenX? You might want to check into the maintenance queries that OpenX runs and see if there's something to it.

slo_chewie 09-16-2008 02:56 PM

Ha, you are correct. That error was from the Maintenance script.

Disabled the automatic maintenance, edited my previous openads cron to work with openx and it's all good now.

Edit: Nevermind disabled the maintenance script and I still get the errors. You are correct though it seems to be a cron or vbulletin task. Happens like clock work at 9, 29, and 49 minutes after every hour.

Blackhat 09-30-2008 08:45 PM

I just added this and it works, but am I supposed to get an sql error anytime soon ? :)

dyna 10-13-2008 12:53 AM

guys, it seems like by using the javascript (which is what I am trying to get off of) we are making this thing less efficient. in fact i don't know what the point of having this mod is if we are putting in the javascript. the <ad variable call is gone right? i was interested in using the mod (<ad variable) so as to eliminate the additional http calls from the java script. using openx 2.6.4 and vb 3.7.3. am i missing some point somewhere? thanks.

shadowdancer36 10-14-2008 05:53 PM

No updates for this hack huh?

LWillmann 11-13-2008 02:18 AM

I have a new way to make this work. Granted it's not as pretty as this, but it does work, and I have been using it on one website for over a year without any problems.

I created a new plugin, I called it 'OpenAds Integration'
It's hooked in the vBulletin product at the init_startup (I've tested it 3.6.8 PL2 and 3.7.4)

Here is the code for it:
PHP Code:

if (@include(getenv('DOCUMENT_ROOT').'/location for your OpenAds install/phpadsnew.inc.php'))
{
  if (!isset(
$phpAds_context))
  {
    
$phpAds_context = array();
  }
  
$phpAds_head41 view_raw ('zone:2'0'''''0'$phpAds_context);
$phpAds_context[] = array('!=' => 'bannerid:'.$phpAds_head41['bannerid']);

  
$phpAds_side01 view_raw ('zone:1'0'''''0'$phpAds_context);
$phpAds_context[] = array('!=' => 'bannerid:'.$phpAds_side01['bannerid']);
  
$phpAds_side02 view_raw ('zone:1'0'''''0'$phpAds_context);
$phpAds_context[] = array('!=' => 'bannerid:'.$phpAds_side02['bannerid']);
  
$phpAds_side03 view_raw ('zone:1'0'''''0'$phpAds_context);
$phpAds_context[] = array('!=' => 'bannerid:'.$phpAds_side03['bannerid']);
.
.
.
.
 
  
//** initialize as many AdBanners as you want here ***


Then in my templates, where ever I want a random banner to appear, I enter this code:
PHP Code:

$phpAds_side01[html

And I get the banner and associated code on the page.

There are a few drawbacks to this option... If you have a side column on your site and you display 50 ads, you have to build an array in this plugin for 50 ads, and then you have to enter the 50 entries into your template.

But this could be just a launching point for some other coder to pick up and run with it. I've tried to build a 'bits' system before and failed. I would imagine that you could extend what I've done and make it better pretty easily.

I know it's not what exactly what people have been hoping for, but hopefully it's a step in the right direction.

Marvin Hlavac 11-17-2008 02:01 PM

Quote:

Originally Posted by LWillmann (Post 1664612)
PHP Code:

if (@include(getenv('DOCUMENT_ROOT').'/location for your OpenAds install/phpadsnew.inc.php'))
{
  if (!isset(
$phpAds_context))
  {
    
$phpAds_context = array();
  }
  
$phpAds_head41 view_raw ('zone:2'0'''''0'$phpAds_context);
$phpAds_context[] = array('!=' => 'bannerid:'.$phpAds_head41['bannerid']);

  
$phpAds_side01 view_raw ('zone:1'0'''''0'$phpAds_context);
$phpAds_context[] = array('!=' => 'bannerid:'.$phpAds_side01['bannerid']);
  
$phpAds_side02 view_raw ('zone:1'0'''''0'$phpAds_context);
$phpAds_context[] = array('!=' => 'bannerid:'.$phpAds_side02['bannerid']);
  
$phpAds_side03 view_raw ('zone:1'0'''''0'$phpAds_context);
$phpAds_context[] = array('!=' => 'bannerid:'.$phpAds_side03['bannerid']);
.
.
.
.
 
  
//** initialize as many AdBanners as you want here ***



Would you be so kind and tell me step-by-step where exactly to place the above code, and how to do it? I'd appreciate it very much.

I have spent three days attempting to show ads on my vB forum using OpenX. I have no luck at all, but I admit I don't have much technical knowledge in this area.

LWillmann 11-17-2008 03:22 PM

Quote:

Originally Posted by Marvin Hlavac (Post 1667492)
Would you be so kind and tell me step-by-step where exactly to place the above code, and how to do it? I'd appreciate it very much.

I have spent three days attempting to show ads on my vB forum using OpenX. I have no luck at all, but I admit I don't have much technical knowledge in this area.

In your ACP, you have to go to the Plugin Manager, and Add a New Plugin.

For that new product, you choose the Vbulletin Product

For the Hook Location, you choose "init_startup" (3.7.4 is alphabetized so it should be easy to find)

Give the new plugin a name "OpenAds Integration" for example.

Execution Order 5 is ok by default (I've never changed the order number).

Copy the code from my large php code box into the Plugin PHP Code box.

A few notes about the plugin part:

PHP Code:

  $phpAds_side01 view_raw ('zone:1'0'''''0'$phpAds_context); 
$phpAds_context[] = array('!=' => 'bannerid:'.$phpAds_side01['bannerid']); 

These lines go in pairs. You have to have the two to work together.

If you want to run just two ads, then you can run have just phpAds_side01, and phpAds_side02. But you have to make the change in BOTH lines.

If you want to add more banners, just copy and pase more pairs, and increase the numbers. You don't want duplicate numbers, or you might run into issues.

NOTE the zone:1 part. You will have different zones in your OpenAds/OpenX install. This Zone number will correspond to the Zone you want to pull the ads from.

So, if your side ads are in zone 1, and your header ads are in zone 2, then you need to note that in these lines.

In my sample lines, my header zone is 3, my paying sponsors are in zone 2 and my site banner exchange is zone 1.

Once you make the code changes you need to, click Save to save the new plugin.

Then go to the template editor.

Edit the appropriate template, and place the code I showed in the smaller box:

PHP Code:

$phpAds_side01[html

do display the proper ad number.

In my case, on my right column of ads, I have a table with say 10 boxes, so I start at the top with that 01, and then the next row is 02, then 03, 04 etc on to 10. Even if I don't have 10 advertisers it's ok. The boxes stay hidden for me, unless I use a border on the table, until I ad an advertiser. When I ad the next advertiser in that zone, the ad automatically pops up and I didn't have to make a change to the templates or coding at all.

If I want more, just ad more to my array (the plugin pairs of lines for that zone) and then I can ad more to that table, and it will work.

Does this make it any easier?

Marvin Hlavac 11-18-2008 09:06 AM

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!

LWillmann 11-18-2008 11:10 AM

I think I will.

I will do a better write up and will post a new mod thread with this in it.

Marvin Hlavac 11-18-2008 04:09 PM

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:

http://www.example.com/openx/www/delivery/ck.php?oaparams=2__bannerid=3__zoneid=0__log=no__c b=fc0c60228e__oadest=http://www.example.com/

Is this how the URL is supposed to look (real domain substituted by example.com)?

LWillmann 11-18-2008 04:51 PM

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.

meadwench 11-25-2008 02:15 PM

You can also put ads in threads and between categories:

To put in threads:
http://www.vbulletin.com/forum/showthread.php?t=157022

To put between categories:
http://www.vbulletin.com/forum/showthread.php?t=225587

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: http://www.gotmead.com/forum/index.php

Vicky Rowe
Gotmead.com


All times are GMT. The time now is 04:25 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.02405 seconds
  • Memory Usage 1,883KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (5)bbcode_code_printable
  • (5)bbcode_php_printable
  • (7)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete