![]() |
I have a fresh vB3.8.2 with no other mods but this and two themes, one implements the <ad/> tag and another doesn't. The board is natively set to UTC+10 and I have added the time zone to the time stamps when viewing the only post on the board in each style it can be seen that when the ads are on the time stamp is UTC and when off reverts to board time. Board time is correctly reported at the bottom of the main page for the user in either case.
I continue to drill down on this. I am certain it has something to do with the local mode bug in openX but this still shouldn't throw vB - there must be some way of protecting the local variables in vB so that they are not zapped with the call out to openX by a simple plugin. By the By, something to be aware of is that if you use the disable hooks in config.php to check your board functionality with the way that this plugin works the <ad/> tags break the templates calling for view_ad which (with hooks disabled) is an undefined function - yielding thus a fatal error. Code:
Fatal error: Call to undefined function view_ad() in /var/www/archq/forums/global.php(614) : eval()'d code on line 1 Code:
define('DISABLE_HOOKS', true); |
Thanks for taking the time to try and get this working.
|
well, i finally decided to just install a older version of openads.
It works fine with this plugin and does the trick for me. IF the time problems get fixed, then i might try to upgrade to the new openads |
That is good news as a fall back - I have set my board to time display detailed so they get a relative take on the time stamp - but it is far from a workable solution. I have too much running on openX and am going to pursue this to the bitter end :)
Cheers, Will |
OK.... Drum roll:
The fix is almost absurdly simple. You have to specify the openads timezone variable before making the callout. I can only confirm this for vB3.8.3, phpAdsNew Banner Ads Integration 1.0.4, openX 2.8 and php5 so please don't go jumping into your plugins and stuffing up boards without backups and copying and pasting the original code to a text editor. The line needed is the spec of the local server timezone for your host: Code:
OA_setTimeZone('Australia/Sydney'); To fix this problem with Local Mode (not xml-rpc) method calls to openX 2.8 you need edit the plugin: view ad function http://www.sourcepoint.com.au/outlin...d_function.png http://www.sourcepoint.com.au/outlin...d_function.png Select all in the plugin code box and replace with this: Code:
if (!function_exists('view_ad')) Code:
OA_setTimeZone('TIME/ZONE'); OR if you just want to insert the line yourself find: Code:
$phpAds_context[] = array('!=' => 'bannerid:'.$ad['bannerid']); Code:
OA_setTimeZone('TIME/ZONE'); Code:
return "<!-- BEGIN ad {$adcomment} -->{$ad['html']}<!-- END ad {$adid} -->"; or at least that has fixed the issue for me. Now I must say that I am not sure of what effect this might have on the openX server if it is not in the timezone that the main boards are - this could conceivable cause problems associated with skew of the statistics or other database date and time records within openX. If I notice anything like this I will report here. Cheers, Will |
Fantastic Will, will try this now, have had to stay on 2.4.3 due to the ad tag bug.
Cheers Bruce |
Quote:
|
It's this Add-on with a modification (one only) to the plugin that delivers the ad.
|
Thanks for the answer. Is the modification related to the ability to use local calls or not? I really wanted to get rid of the javascript...
|
This mod invokes the ads via local mode or xml-rpc calls by defining a template tag <ad />.
The javascript invocation method is not implemented using the <ad /> tag to callout phpAdsNew [openX]. If I understand you correctly, you are using javascript invocation calls generated by the zone defined in phpAdsNew [openX]? This method is slow and very inefficient compared to local mode therefore I tried this mod in order to improve performance but immediately ran into the problem of it no longer being supported for vB3.8.x or openX (as such). Having a server with vB3.8.3 and openX 2.8 on the same localhost I thought I'd give this mod a go and see if it works. It does, but with the caveat that as soon as you invoke an ad using the <ad /> tag all timestamps on the board are reverted to UTC (whatever the server config or userCP setting) but the board time remains correct and displays correctly (timezone and all) at the bottom of the pages. The reason for this is that when making local mode calls to openX 2.8 the timezone is not correctly handled - as reported in this bug. Several workarounds are suggested and I found that ultimately defining the openX timezone prior to making the callout (with the localhost local timezone - nothing to do with a user's preference setting offset) fixed the problemo. So that, in a nutshell, is it. I have not experimented with xml-rpc but since this mod provides it as an alternative call I suspect it works as expected. You can therefore do away with javascript invocation by implementing this mod with the single plugin modification I posted above. HTH Cheers, \\' I suppose that this mod could be relaunched as OpenX Banner Ads Integration and stated as compatible with vB 3.8 and OpenX2.8 - much more testing would have to be done though and the local system timezone would have to be implemented as opposed to hardwiring it in the plugin. |
All times are GMT. The time now is 01:51 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 | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|