Fourms Products

Go Back   KXDesign > Programming Discussion > Programming Talk > Need a programmers help troubleshooting an old but good product for vB

Programming Talk Talk about PHP,HTML,JavaScript,CGI and other programming languages.

Reply
 
Bookmarks Thread Tools
Old 21-05-2009   #1 (permalink)
New Member
 
A Little About stardotstar
  • Join Date: May 2009
  • Posts: 1
  • Rep Power: 0 stardotstar is an unknown quantity at this point
Default Need a programmers help troubleshooting an old but good product for vB

Hi all,

I am new at building product/plugins for vB - I spent much time with phpBB cutting my teeth on the mods for the 2.x series.

I am getting my head around calling php from external programmes and in this case I am using a product from vB.org that integrates phpAdsNew - now openx.

The problem I have found there is that it is only supported up to vB3.5 and after playing with it I got it working just fine on 3.8.2 with one major flaw.

I needed to use what openx calls local mode invocation since the ad server and vB are on the same physical machine - using javascript is very slow when there are a few ads on the page.

This apparently is a simple call to openx server in php called view.raw with the necessary variables set.

Having got the product working and the necessary calls into the templates - it uses a new tag <ad /> I got my dearly needed speed increase (further improved by implementing memchached).

But suddenly I notice that the post timestamps are skewed into the past (about 10 or 11 hours - the same as taking off the GMT offset - on my board +10). I checked the server = ok, I sent emails = OK, I checked an unmodded board = ok and therefore started to troubleshoot.

I found that in my templates/styles if I removed any reference to the invocation of the phpAdsNew integration the time would revert to normal offset.

Therefore the time is not being altered only displayed incorrectly - and only within certain frames - for example the time is incorrect (- 10 hours) in personal message received times and all posts within threads and indexes etc BUT not at the very bottom of the board where the board time is displayed eg:

Code:
Unregistered users can not view codes.Please register.
So I would see this post if I had lodged it just then as 03:09am and if I took the call to the openx server out it would revert to 13:09 or 01:09pm as it should be.

Note that the server is set to Localtime (+10) and the time is correct, the time is also correctly set within openx and I am investigating there what may be happening when the call is made.

Interestingly the use of javascript to pull the ad into the board (although slow) does not cause this time skew - only the "local mode" call.


Here is what I think is happening.

When a page is generated the header has a call to another template which contains the "invocation code" for the ad. In the past I have used Javascript here.

so:

Code:
Unregistered users can not view codes.Please register.
in the header serves an ad up to the right of the site logo.

ad_header_logo is now simple:

Code:
Unregistered users can not view codes.Please register.
where in the past it was the javascript invoation code like this:
Code:
Unregistered users can not view codes.Please register.
So far so good. The local mode call invokes the following two plugins as part of the product phpAdsNew Integration

ad_tag_callback in template_compile execution order 5
Code:
Unregistered users can not view codes.Please register.
Then we have
view_ad function in init_startup also at 5

Code:
Unregistered users can not view codes.Please register.

The important part in this as far as I can see is the local mode not xmlrpc

Code:
Unregistered users can not view codes.Please register.
Can anyone see within this code what might cause the date/time stamp of the board to be replaced but only on each page display not within the actual time keeping itself?

You can see this phenomenon for you self without needing to log in at my board. Australian R/C Helicopters Online

It is also interesting to note that this does not effect the display of the time when "detailed" is used - I guess because that function doesn't care if the time is "zoned" as such since it is a "difference" not a literal stamp.

I have just tried to change the time to "Normal" and edited the time format to "h:i A e" which shows the time zone - and what do you know - UTC Is what is being delivered back to the pages as they render:
Code:
Unregistered users can not view codes.Please register.
instead of
Code:
Unregistered users can not view codes.Please register.
which is what is shown at the base of the pages.

The time of the post from the postbit is

$post[posttime]

and somehow that is getting transformed back to UTC...

Any help would be appreciated, I am starting to get somewhere as a developer of this kind of code and will continue to ponder and submerge myself in the workings of vB and the products/openx.

Cheers
Will
stardotstar is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
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
Trackbacks are Off
Pingbacks are Off
Refbacks are Off



All times are GMT +1. The time now is 20:52.


Content Copyrighted To KXDesign© 2008-2009
Powered by vBulletin® Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0