Banner advertisement manager for Yii2
This package is auto-updated.
Last update: 2021-03-20 18:54:55 UTC
Place advertisements banners on your Page.
- Advertisements are valid from startdate to enddate
- Multiple places where banners can appear
- Active Banners are placed randomly
- Uses slugs to identify banners over URL
- Counts banner visits
$ composer require thyseus/yii2-banner $ php yii migrate/up --migrationPath=@vendor/thyseus/yii2-banner/migrations
Add following lines to your main configuration file:
'modules' => [ 'banner' => [ 'class' => 'thyseus\banner\Module', 'allowedRoles' => ['admin', 'banner'], # which roles are allowed to administrate banners? ], ],
Place this snippet inside your view where you want the corresponding adspace to appear:
<?php echo $this->render('@vendor/thyseus/yii2-banner/views/banner/_banner', ['adspace' => 'location_header_top']); echo $this->render('@vendor/thyseus/yii2-banner/views/banner/_banner', ['adspace' => 'location_header_right']); echo $this->render('@vendor/thyseus/yii2-banner/views/banner/_banner', ['adspace' => 'location_header_bottom']);
The following Actions are possible:
- admin: https://your-domain/banner/banner/admin
- create: https://your-domain/banner/banner/create
- visit: https://your-domain/banner/banner/visit/
- view: https://your-domain/banner/banner/view/
- update: https://your-domain/banner/banner/update/
- delete: https://your-domain/banner/banner/delete/
Contributing to this project
Anyone and everyone is welcome to contribute.
Yii2-banner is released under the GPLv3 License.