https://github.com/thyseus/yii2-banner
https://github.com/thyseus/yii2-banner
Last synced: about 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/thyseus/yii2-banner
- Owner: thyseus
- Created: 2017-05-16T12:04:58.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2018-06-06T08:25:10.000Z (about 8 years ago)
- Last Synced: 2025-02-14T15:17:17.114Z (over 1 year ago)
- Language: PHP
- Size: 9.77 KB
- Stars: 2
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG
Awesome Lists containing this project
README
# ATTENTION:
github has been bought by Microsoft. This repository is orphaned and has been moved to:
https://gitlab.com/thyseus/yii2-banner
Thanks a lot for your understanding and blame Microsoft.
# Yii2-banner
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
## Installation
```bash
$ composer require thyseus/yii2-banner
$ php yii migrate/up --migrationPath=@vendor/thyseus/yii2-banner/migrations
```
## Configuration
Add following lines to your main configuration file:
```php
'modules' => [
'banner' => [
'class' => 'thyseus\banner\Module',
'allowedRoles' => ['admin', 'banner'], # which roles are allowed to administrate banners?
],
],
```
## Place Banner:
Place this snippet inside your view where you want the corresponding adspace to appear:
```php
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']);
```
## Actions
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.
## License
Yii2-banner is released under the GPLv3 License.