![]() | ![]() | |
| ||||||
| Programming Talk Talk about PHP,HTML,JavaScript,CGI and other programming languages. |
![]() |
| | Bookmarks | Thread Tools |
| | #1 (permalink) |
|
|
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. 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. ad_header_logo is now simple: Code: Unregistered users can not view codes.Please register. Code: Unregistered users can not view codes.Please register. ad_tag_callback in template_compile execution order 5 Code: Unregistered users can not view codes.Please register. 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. 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. Code: Unregistered users can not view codes.Please register. 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 |
| | |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| |