Download the PHP package sunlab/wn-gamification-plugin without Composer

On this page you can find all versions of the php package sunlab/wn-gamification-plugin. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package wn-gamification-plugin

Gamification

This plugin allows you to reward your members when some actions are made. To increment the statistics, this plugin is using SunLab.Measures

How to use

From the backend, create all the needed badges. A badge need at least, a name.

Automatic attachment with SunLab.Measures

When filling measure name and amount needed: the users will automatically receive badges once the measure reach the amount needed. Refer to SunLab.Measures for measure incrementation.

Manually attaching/detaching badge

To attach or detach a badge manually, use attachBadge and detachBadge method, which accept a badge reference as string (its name), int (its id), or a Badge model.

Verify badge attachment

To simplify badge attachment verification, the plugin include a hasBadge method, which accept a badge reference as string (its name), int (its id), or a Badge model.

Components

This plugin comes with two components:

BadgesList

Displays all the badge that can be rewarded, and the number of members of member who already won it.

UserBadges

Displays only the badges that a specific member won. The member could be the one actually logged in, or set by an url parameter.

Tree view

The Badge model implement SimpleTree. If you want to display the badges as a tree, use the components' property tree-displayed to optimize the database search.

The default query will load the badges ordered by their measure name and amount needed.

Measures reminder

SunLab.Measures is internally used by the plugin to increment some measures when some events are emitted. You can configure the most basic events from the backend using the generic event listener of Measures, but for complexes cases, you'll need to manually create the listener from a Plugin.php file.

A use case for this could be to give a badge rewarding immediately after the registration, because plugins' events are not supported by Measures as of today, we need to create it manually:


All versions of wn-gamification-plugin with dependencies

PHP Build Version
Package Version
Requires php Version >=7.0
composer/installers Version ~1.0
sunlab/wn-measures-plugin Version ^v1.0.0
winter/wn-user-plugin Version ^2.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package sunlab/wn-gamification-plugin contains the following files

Loading the files please wait ....