2017 © Pedro Peláez
 

yii2-extension yii2-superbanner

Generate banners for the Yii framework

image

loktionov/yii2-superbanner

Generate banners for the Yii framework

  • Monday, March 30, 2015
  • by loktionov
  • Repository
  • 1 Watchers
  • 0 Stars
  • 6 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

superbanner

Генерация кода рекламных баннеров, (*1)

Config

'components' => [
'superbanner' => [
            'class'=>'loktionov\superbanner\Superbanner',
            'bannercount' => 100,
        ]
]

Controller

$sb = Yii::$app->superbanner;
//или так, если не объявлять как компонент в конфиге
$sb = new Superbanner();

$s1 = $sb->GetBanners(12);
$s2 = $sb->GetBanners(24);
$s3 = $sb->GetBanners('18%', 'superbanner2');
$s4 = $sb->GetBanners('56');

$s5 = Yii::$app->superbanner->GetBanners(12);

return $this->render('index', ['banners'=>$s3]);

View

foreach($banners as $b) {
    echo $b;
}
$this->registerJs(
    '$("document").ready(function(){
     var hsh = window.location.hash.substring(1);
     if(hsh != "")
      $("#" + hsh).css("border", "1px solid red");
    });'
); 

The Versions

30/03 2015

dev-master

9999999-dev

Generate banners for the Yii framework

  Sources   Download

BSD-3-Clause

The Requires

 

by Artem Loktionov

yii2 helper banner superbanner