dev-master
9999999-devGenerate banners for the Yii framework
BSD-3-Clause
The Requires
by Artem Loktionov
yii2 helper banner superbanner
Generate banners for the Yii framework
Генерация кода рекламных баннеров, (*1)
'components' => [ 'superbanner' => [ 'class'=>'loktionov\superbanner\Superbanner', 'bannercount' => 100, ] ]
$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]);
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"); });' );
Generate banners for the Yii framework
BSD-3-Clause
yii2 helper banner superbanner