All Projects → chiliec → yii2-vote

chiliec / yii2-vote

Licence: BSD-3-Clause license
Provides voting for any model 👍 👎

Programming Languages

PHP
23972 projects - #3 most used programming language

Projects that are alternatives of or similar to yii2-vote

Raty
🌟 Raty - A Star Rating Plugin
Stars: ✭ 2,292 (+3174.29%)
Mutual labels:  rating, voting, vote
rater-js
Star rating widget for the browser. Unlimited number of stars. No dependencies. No Jquery required.
Stars: ✭ 66 (-5.71%)
Mutual labels:  rating, voting, vote
yii2-rollbar
Rollbar for Yii2
Stars: ✭ 36 (-48.57%)
Mutual labels:  yii2, yii2-extension
yii2-translatable
Translatable behavior aggregates logic of linking translations to the primary model
Stars: ✭ 15 (-78.57%)
Mutual labels:  yii2, yii2-extension
yii2-newsletter
Module for saving user contacts from newsletter form to database
Stars: ✭ 17 (-75.71%)
Mutual labels:  yii2, yii2-extension
Laravel-rating
Laravel package that allows you to rate, like & dislike and vote(+1,-1) your models with a simple and clear ways
Stars: ✭ 204 (+191.43%)
Mutual labels:  rating, vote
content
Content management system for Yii2
Stars: ✭ 54 (-22.86%)
Mutual labels:  yii2, yii2-extension
yii2-stat
Yii2 Multi Web Statistic Module (yametrika, google-analytic, own db-counter)
Stars: ✭ 18 (-74.29%)
Mutual labels:  yii2, yii2-extension
Ar Softdelete
Soft delete behavior for ActiveRecord
Stars: ✭ 188 (+168.57%)
Mutual labels:  yii2, yii2-extension
behavior-trait
Allows handling events via inline declared methods, which can be added by traits
Stars: ✭ 18 (-74.29%)
Mutual labels:  yii2, yii2-extension
yii2-cashier
Yii2 Cashier provides an interface to Stripe's subscription billing services.
Stars: ✭ 43 (-38.57%)
Mutual labels:  yii2, yii2-extension
yii2-linkable-behavior
Yii2 behavior to help creating urls easier
Stars: ✭ 12 (-82.86%)
Mutual labels:  yii2, yii2-extension
yii2-lets-talk
With this extension you can open chat with someone in popular messengers using the link on your website.
Stars: ✭ 15 (-78.57%)
Mutual labels:  yii2, yii2-extension
install
basic script for project installation
Stars: ✭ 17 (-75.71%)
Mutual labels:  yii2, yii2-extension
yii2-mailqueue
Yii2 mail queue component for yii2-swiftmailer.
Stars: ✭ 15 (-78.57%)
Mutual labels:  yii2, yii2-extension
Yii2 Translate Manager
Translation Manager
Stars: ✭ 221 (+215.71%)
Mutual labels:  yii2, yii2-extension
yii2-jwt-tools
An easy way to configure JWT authentication and validation on Yii Framework 2 Projects
Stars: ✭ 22 (-68.57%)
Mutual labels:  yii2, yii2-extension
Crontab
Yii2 extension for crontab support
Stars: ✭ 170 (+142.86%)
Mutual labels:  yii2, yii2-extension
Yii2 Enhanced Gii
Enhanced Yii2 Gii (generator) that generates related Models & CRUD
Stars: ✭ 183 (+161.43%)
Mutual labels:  yii2, yii2-extension
ar-search
Provides unified search model for Yii ActiveRecord
Stars: ✭ 31 (-55.71%)
Mutual labels:  yii2, yii2-extension

Vote for Yii2

Latest Stable Version Total Downloads Build Status Code Climate Test Coverage License

How yii2-vote works

Installation

Next steps will guide you through the process of installing yii2-vote using composer. Installation is a quick and easy three-step process.

Step 1: Install component via composer

Run command

php composer.phar require --prefer-dist chiliec/yii2-vote "^4.2"

or add

"chiliec/yii2-vote": "^4.2"

to the require section of your composer.json file.

Step 2: Configuring your application

Add following lines to your main configuration file:

'bootstrap' => [
    'chiliec\vote\components\VoteBootstrap',
],
'modules' => [
    'vote' => [
        'class' => 'chiliec\vote\Module',
        // show messages in popover
        'popOverEnabled' => true,
        // global values for all models
        // 'allowGuests' => true,
        // 'allowChangeVote' => true,
        'models' => [
        	// example declaration of models
            // \common\models\Post::className(),
            // 'backend\models\Post',
            // 2 => 'frontend\models\Story',
            // 3 => [
            //     'modelName' => \backend\models\Mail::className(),
            //     you can rewrite global values for specific model
            //     'allowGuests' => false,
            //     'allowChangeVote' => false,
            // ],
        ],      
    ],
],

And add widget in view:

<?php echo \chiliec\vote\widgets\Vote::widget([
    'model' => $model,
    // optional fields
    // 'showAggregateRating' => true,
]); ?>

Also you can add widget for display top rated models:

<?php echo \chiliec\vote\widgets\TopRated::widget([
    'modelName' => \common\models\Post::className(),
    'title' => 'Top rated models',
    'path' => 'site/view',
    'limit' => 10,
    'titleField' => 'title',
]) ?>

Step 3: Updating database schema

After you downloaded and configured Yii2-vote, the last thing you need to do is updating your database schema by applying the migrations:

$ php yii migrate/up --migrationPath=@vendor/chiliec/yii2-vote/migrations

Documentation

Extended information about configuration of this module see in docs/README.md. There you can find:

List of contributors

Other vote solutions for Yii2

Articles and tutorials

Usage examples

  • Your site could be the first in this list

License

yii2-vote is released under the BSD 3-Clause License. See the bundled LICENSE.md for details.

How to contribute

See CONTRIBUTING.md for details.

Enjoy and don't hesitate to send issues and pull requests :)

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].