Plugin Directory

Changeset 1839117


Ignore:
Timestamp:
03/13/2018 06:24:41 AM (8 years ago)
Author:
devdmkr
Message:

update

Location:
prime-ads/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • prime-ads/trunk/inc/services/AdsHelper.php

    r1838590 r1839117  
    5555    public $positions = array();
    5656
    57     public $screenWidth;
     57    public $screenWidth = array();
    5858    public $screenWidthInPx;
    5959
     
    154154
    155155        $widthCond = '';
    156         if($this->screenWidth)
    157             $widthCond = ' AND (`resolutions`="" OR `resolutions` LIKE "%[' . $this->screenWidth . ']%") ';
     156        if($this->screenWidth){
     157            $widthCond = ' AND (`resolutions`=""';
     158            foreach ($this->screenWidth as $sWidth) {
     159                $widthCond .= ' OR `resolutions` LIKE "%[' . $sWidth . ']%"';
     160            }
     161            $widthCond .= ') ';
     162        }
    158163           
    159164        $sql .= ') AS t WHERE `is_active`=1 AND ((`by_timetable`=0 AND `position`=' . $position . ' ' . $widthCond . ') OR (`by_timetable`=1 AND ((`days_of_week` LIKE "%[' . date('w') . ']%" AND ((`not_show`=0 AND time_exp) OR (`not_show`=1 AND !time_exp)) AND `position`=' . $position . ' ' . $widthCond . ') OR (!(`days_of_week` LIKE "%[' . date('w') . ']%" AND ((`not_show`=0 AND time_exp) OR (`not_show`=1 AND !time_exp))) AND `position_not_in_timetable`=' . $position . '))))';
     
    649654    public function setScreenWidth($width)
    650655    {
    651         if($width < 360) $this->screenWidth = '<360';
    652         if($width >= 360 && $width < 600) $this->screenWidth = '360-600';
    653         if($width >= 600 && $width < 768) $this->screenWidth = '600-767';
    654         if($width >= 768 && $width < 1024) $this->screenWidth = '768-1023';
    655         if($width >= 1024) $this->screenWidth = '>1024';
    656         if($width >= 1280) $this->screenWidth = '>1280';
    657         if($width >= 1440) $this->screenWidth = '>1440';
    658         if($width >= 1920) $this->screenWidth = '>1920';
     656        if($width < 360) $this->screenWidth = array('<360');
     657        if($width >= 360 && $width < 600) $this->screenWidth = array('360-600');
     658        if($width >= 600 && $width < 768) $this->screenWidth = array('600-767');
     659        if($width >= 768 && $width < 1024) $this->screenWidth = array('768-1023');
     660        if($width >= 1024) $this->screenWidth = array('>1024');
     661        if($width >= 1280) $this->screenWidth[] = '>1280';
     662        if($width >= 1440) $this->screenWidth[] = '>1440';
     663        if($width >= 1920) $this->screenWidth[] = '>1920';
    659664    }
    660665
  • prime-ads/trunk/prime-ads.php

    r1838590 r1839117  
    33    Plugin Name: Prime Ads
    44    Description: Вывод рекламы с сервиса Prime Ads
    5     Version: 2.1.0
     5    Version: 2.1.1
    66    Author: Proffit
    77    Author URI: http://proffit.guru/
     
    1919use AdsNS\SxGeo\SxGeo;
    2020
    21 define('ADS_VERSION', '2.1.0');
     21define('ADS_VERSION', '2.1.1');
    2222define('ADS_DB_VERSION', '2.0.4');
    2323define('ADS_PATH', realpath(__DIR__));
  • prime-ads/trunk/readme.txt

    r1838590 r1839117  
    77Requires at least: 4.0
    88Tested up to: 4.7
    9 Stable tag: 2.1.0
     9Stable tag: 2.1.1
    1010
    1111Ответная часть сервиса монитизации Prime Ads (http://primeads.ru)
Note: See TracChangeset for help on using the changeset viewer.