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)

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 ? :)


All times are GMT. The time now is 02:02 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.02788 seconds
  • Memory Usage 1,747KB
  • 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
  • (3)bbcode_code_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (2)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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