Time Interval Problem

a complete banner management system, any number of banners can be added
Forum rules
The content in this forum is dated Dec. 21 2005 and can be used as Archive only. This Forum is LOCKED and READ ONLY !

Time Interval Problem

Postby bjpembo on Wed 16. Nov, 2005 06:43

I have version 1.3.7 installed on phpbb 2.018, previously 17 and when i set a time interval on any banner, the banner will not display on my forum. If i remove the time interval's the banner displays fine. I recieve no error messages or have any other problems besides this. The current date on my forum is correct and i have no mods that affect the way the date or time is displayed. I tried to search and found a couple of topics on this problem but none of them had answers, i hope someone can help me out here. Thanks in advance :)
bjpembo
Poster
Poster
 
Posts: 4
Joined: Wed 16. Nov, 2005 06:39

Postby Beeveer on Wed 16. Nov, 2005 23:27

Does it work without time settings?
Nee, ik geef geen antwoorden in het Nederlands, die horen thuis op www.phpbb.nl ;)
User avatar
Beeveer
brilliant supporter
 
Posts: 264
Joined: Tue 30. Nov, 2004 19:13
Location: Boskoop, South-Holland, the Netherlands

Postby bjpembo on Wed 16. Nov, 2005 23:55

yes, it works fine without time intervals. but if i set a banner to start and end at any time, the banner will not display until i remove the time interval.
bjpembo
Poster
Poster
 
Posts: 4
Joined: Wed 16. Nov, 2005 06:39

Postby Delta221 on Mon 05. Dec, 2005 18:35

bjpembo wrote:yes, it works fine without time intervals. but if i set a banner to start and end at any time, the banner will not display until i remove the time interval.



same problem here, no solution ?
Delta221
Poster
Poster
 
Posts: 6
Joined: Wed 07. Sep, 2005 22:29
Location: Oslo

Postby mgutt on Wed 21. Dec, 2005 00:55

mgutt
Poster
Poster
 
Posts: 8
Joined: Tue 12. Oct, 2004 18:27

Postby bjpembo on Wed 21. Dec, 2005 22:19

just to bring the solution that worked for me over from the other thread.... thanks for the link to the correct thread as well. :D


includes/page_header.php

Replace this....
Code: Select all
$sql = "SELECT DISTINCT banner_id, banner_name, banner_spot, banner_description, banner_forum, banner_type, banner_width, banner_height, banner_filter FROM ".BANNERS_TABLE ."
      WHERE banner_active
      AND IF(banner_level_type,IF(banner_level_type=1,".intval($sql_level)."<=banner_level,IF(banner_level_type=2,".intval($sql_level).">=banner_level,".intval($sql_level)."<>banner_level)),banner_level=".intval($sql_level).")
      AND (banner_timetype=0
      OR (( $hour_now BETWEEN time_begin AND time_end) AND ((banner_timetype=2
      OR (( $week_now BETWEEN date_begin AND date_end) AND banner_timetype=4)
      OR (( $date_now BETWEEN date_begin AND date_end) AND banner_timetype=6)
      )))) ORDER BY banner_spot,banner_weigth*SUBSTRING(RAND(),6,2) DESC";



With this....

Code: Select all
$sql = "SELECT DISTINCT banner_id, banner_name, banner_spot, banner_url, banner_description, banner_forum, banner_type, banner_width, banner_height, banner_filter FROM ".BANNERS_TABLE ."
      WHERE banner_active
      AND IF(banner_level_type,IF(banner_level_type=1,".intval($sql_level)."<=banner_level,IF(banner_level_type=2,".intval($sql_level).">=banner_level,".intval($sql_level)."<>banner_level)),banner_level=".intval($sql_level).")
      AND (banner_timetype=0
      OR (( $hour_now BETWEEN time_begin AND time_end) AND banner_timetype=2)
      OR (( $week_now BETWEEN date_begin AND date_end) AND banner_timetype=4)
      OR (( $date_now BETWEEN date_begin AND date_end) AND banner_timetype=6)
      ) ORDER BY banner_spot,banner_weigth*SUBSTRING(RAND(),6,2) DESC";
[/code]
bjpembo
Poster
Poster
 
Posts: 4
Joined: Wed 16. Nov, 2005 06:39

Postby Delta221 on Wed 21. Dec, 2005 23:00

Works just great !! thanx alot buddy :-)
Mvh Delta221
Delta221
Poster
Poster
 
Posts: 6
Joined: Wed 07. Sep, 2005 22:29
Location: Oslo


Return to Complete banner [2.0.6/EM]

Who is online

Users browsing this forum: No registered users and 0 guests

cron