PHPackages                             hypejunction/hypegamemechanics - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. hypejunction/hypegamemechanics

AbandonedArchivedElgg-plugin[Utility &amp; Helpers](/categories/utility)

hypejunction/hypegamemechanics
==============================

Gamification for Elgg

5.0.1(6y ago)10617[2 issues](https://github.com/hypeJunction/hypeGameMechanics/issues)GPL-2.0PHPPHP &gt;=7.0

Since Jul 2Pushed 6y ago1 watchersCompare

[ Source](https://github.com/hypeJunction/hypeGameMechanics)[ Packagist](https://packagist.org/packages/hypejunction/hypegamemechanics)[ Docs](http://hypejunction.com)[ RSS](/packages/hypejunction-hypegamemechanics/feed)WikiDiscussions master Synced yesterday

READMEChangelog (8)Dependencies (1)Versions (9)Used By (0)

hypeGameMechanics
=================

[](#hypegamemechanics)

[![Elgg 3.0](https://camo.githubusercontent.com/e646ef90c665819eef06372ac1af176270e4db7642e8c52976072bca821b1694/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f456c67672d332e302d6f72616e67652e7376673f7374796c653d666c61742d737175617265)](https://camo.githubusercontent.com/e646ef90c665819eef06372ac1af176270e4db7642e8c52976072bca821b1694/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f456c67672d332e302d6f72616e67652e7376673f7374796c653d666c61742d737175617265)

User points and game mechanics for Elgg

Features
--------

[](#features)

hypeGameMechanics allows your users to:

- Earn points actively for performing certain actions / activities on the site
- Earn points passively by receiving interactions on their content items (e.g. ratings, comments, likes)
- Claim badges when a set of defined criteria are met

Introduction
------------

[](#introduction)

This plugin is governed by a set of `rules` - conditions that describe an event (action). Each rule has a unique name and defines a set of conditions that should be met for the points to be awarded or deducted.

### Rule Definitions

[](#rule-definitions)

A set of rules can be extended / modified via the `'get_rules','gm_score'` hook.

Each rule definition accepts the following parameters:

```
$rules = array(
	'events' => array(
		// Adding a blog post
		'create:object:blog' => array(
			'title' => elgg_echo('mechanics:create:object:blog'),
			'description' => '',
			// Events, to which this rule applies
			'events' => array(
				'publish::object'
			),
			// Positive or negative number of points to apply
			// Rule will be skipped if this value is 0
			// The option to set the score will also appear in plugin settings
			'score' => 0,
			// Entity attribute that should be used to determine the object
			'object_guid_attr' => 'guid',
			// Entity attribute that should be used to determine the user
			// who should receive points
			'subject_guid_attr' => 'owner_guid',
			// Attributes to validate
			// name => value pairs, where name is an attribute or metadata,
			// and value is a value or an array of values
			'attributes' => array(
				'type' => 'object',
				'subtype' => 'blog',
			),
			// A list of callback functions to trigger to validate the
			// applicability of this event
			// Callback functions will receive Rule object as parameter
			'callbacks' => array(
			),
			// override global settings for this rule
			'settings' => array(
				'daily_max' => 0,
				'daily_action_max' => 0,
				'alltime_action_max' => 0,
				'daily_recur_max' => 0,
				'alltime_recur_max' => 0,
				'object_recur_max' => 1,
				'daily_object_max' => 0,
				'alltime_object_max' => 0,
				'action_object_max' => 0,
				'allow_negative_total' => true,
			),
		)
	)
);
```

### Throttling

[](#throttling)

Global settings are exposed in the plugin settings, but you also override those for individual rules.

- `daily_max` - maximum number of points the user can accumulate each day with all rules
- `daily_action_max` - maximum number of points the user can accumulate each day with a given rule
- `alltime_action_max` - maximum number of points the user can accumulate with a given rule
- `daily_recur_max` - maximum number of times the points can be collected each day with a given rule
- `alltime_recur_max` - maximum number of times the points can be collected with a given rule
- `object_recur_max` - maximum number of times the points can be collected for a single object with a given rule This can be helpful to throttle rules that apply to multiple events, such as `'create','object'` and `'publish','object'`. Another example would be likes that only apply once to an object
- `daily_object_max` - maximum number of points the user can collect each day by performing actions on a single object
- `alltime_object_max` - maximum number of points the user can collect by performing actions on a single object
- `action_object_max` - maximum number of points the user can collect with a given rule on a single object For example, you can limit the maximum number of points for commenting on an object

### Badges

[](#badges)

Badges are rewards given to users upon fulfillment of predefined conditions. Each badge can be conditioned with 4 criteria:

- A minimum number of points the user should have
- Up to 10 rule definitions with a number of recurrences for each rule
- A number of points a user should spend to uncover the badge
- Other badges that are required before a badge can be claimed

There are 3 types of badges:

- `status` - status badges will define current user status on the site
- `experience` - experience badges will be displayed on the user profile to symbolize achievements/contributions
- `surprise` - surprise badges will not be visible in the badge gallery

### Notes

[](#notes)

- Administrators are exempt from point rules

Examples
--------

[](#examples)

To understand rule definitions, review various preset rules in `setup_scoring_rules()`

Here as some additional examples:

1. Award points when user updates their profile with a location

```
$rules['events']['profileupdate:user:location'] = array(
	'title' => elgg_echo('mechanics:profileupdate:user:location'),
	'events' => array(
		'profileupdate::user'
	),
	'attributes' => array(
		'location' => Rule::NOT_EMPTY
	),
	'settings' => array(
		'object_recur_max' => 1
	)
);
```

Screenshots
-----------

[](#screenshots)

[![alt text](https://camo.githubusercontent.com/5376dd70dbdc259875dae04f4e9070d0eb7747f4d763b1d163e893d9ab2c2645/68747470733a2f2f7261772e6769746875622e636f6d2f687970654a756e6374696f6e2f6879706547616d654d656368616e6963732f6d61737465722f73637265656e73686f74732f67616c6c6572792e706e67 "Badges gallery")](https://camo.githubusercontent.com/5376dd70dbdc259875dae04f4e9070d0eb7747f4d763b1d163e893d9ab2c2645/68747470733a2f2f7261772e6769746875622e636f6d2f687970654a756e6374696f6e2f6879706547616d654d656368616e6963732f6d61737465722f73637265656e73686f74732f67616c6c6572792e706e67)[![alt text](https://camo.githubusercontent.com/4e7dc219728aebd055ca468ba147885ed6965285be65bb75a1fe7f8b965fa6e1/68747470733a2f2f7261772e6769746875622e636f6d2f687970654a756e6374696f6e2f6879706547616d654d656368616e6963732f6d61737465722f73637265656e73686f74732f62616c616e63652e706e67 "Points balance")](https://camo.githubusercontent.com/4e7dc219728aebd055ca468ba147885ed6965285be65bb75a1fe7f8b965fa6e1/68747470733a2f2f7261772e6769746875622e636f6d2f687970654a756e6374696f6e2f6879706547616d654d656368616e6963732f6d61737465722f73637265656e73686f74732f62616c616e63652e706e67)[![alt text](https://camo.githubusercontent.com/fcb200353d68aa42030ff50e3061936e6a3e833ae5c63b10f088755184f33e04/68747470733a2f2f7261772e6769746875622e636f6d2f687970654a756e6374696f6e2f6879706547616d654d656368616e6963732f6d61737465722f73637265656e73686f74732f6c6561646572626f6172642e706e67 "Leaderboard")](https://camo.githubusercontent.com/fcb200353d68aa42030ff50e3061936e6a3e833ae5c63b10f088755184f33e04/68747470733a2f2f7261772e6769746875622e636f6d2f687970654a756e6374696f6e2f6879706547616d654d656368616e6963732f6d61737465722f73637265656e73686f74732f6c6561646572626f6172642e706e67)[![alt text](https://camo.githubusercontent.com/be1895c7ee2b0ad7c0c873335ba44258dee58b5bc374ec7d36e6094032a98e69/68747470733a2f2f7261772e6769746875622e636f6d2f687970654a756e6374696f6e2f6879706547616d654d656368616e6963732f6d61737465722f73637265656e73686f74732f62616467655f70726f67726573732e706e67 "Progress")](https://camo.githubusercontent.com/be1895c7ee2b0ad7c0c873335ba44258dee58b5bc374ec7d36e6094032a98e69/68747470733a2f2f7261772e6769746875622e636f6d2f687970654a756e6374696f6e2f6879706547616d654d656368616e6963732f6d61737465722f73637265656e73686f74732f62616467655f70726f67726573732e706e67)[![alt text](https://camo.githubusercontent.com/555f44da002589bc52b688b946bb3c70dcceb151962f6b025c605a443bd7479c/68747470733a2f2f7261772e6769746875622e636f6d2f687970654a756e6374696f6e2f6879706547616d654d656368616e6963732f6d61737465722f73637265656e73686f74732f62616467655f617761726465642e706e67 "Badge awarded")](https://camo.githubusercontent.com/555f44da002589bc52b688b946bb3c70dcceb151962f6b025c605a443bd7479c/68747470733a2f2f7261772e6769746875622e636f6d2f687970654a756e6374696f6e2f6879706547616d654d656368616e6963732f6d61737465722f73637265656e73686f74732f62616467655f617761726465642e706e67)[![alt text](https://camo.githubusercontent.com/67a2f011915b50ea1248f79d891971b16c324e28d3fe30b414918ae355360c95/68747470733a2f2f7261772e6769746875622e636f6d2f687970654a756e6374696f6e2f6879706547616d654d656368616e6963732f6d61737465722f73637265656e73686f74732f70656e616c74792e706e67 "Custom award")](https://camo.githubusercontent.com/67a2f011915b50ea1248f79d891971b16c324e28d3fe30b414918ae355360c95/68747470733a2f2f7261772e6769746875622e636f6d2f687970654a756e6374696f6e2f6879706547616d654d656368616e6963732f6d61737465722f73637265656e73686f74732f70656e616c74792e706e67)[![alt text](https://camo.githubusercontent.com/dc012ef5e7880d77479e7ab067be74bfbcf7dc6920c1eef9e15d5a613b4e59ae/68747470733a2f2f7261772e6769746875622e636f6d2f687970654a756e6374696f6e2f6879706547616d654d656368616e6963732f6d61737465722f73637265656e73686f74732f61646d696e5f7468726f74746c696e672e706e67 "Admin settings")](https://camo.githubusercontent.com/dc012ef5e7880d77479e7ab067be74bfbcf7dc6920c1eef9e15d5a613b4e59ae/68747470733a2f2f7261772e6769746875622e636f6d2f687970654a756e6374696f6e2f6879706547616d654d656368616e6963732f6d61737465722f73637265656e73686f74732f61646d696e5f7468726f74746c696e672e706e67)[![alt text](https://camo.githubusercontent.com/26ff5a622f125e742d8d2b2bfc1f16e2376d531773d41f366404316287e66ad9/68747470733a2f2f7261772e6769746875622e636f6d2f687970654a756e6374696f6e2f6879706547616d654d656368616e6963732f6d61737465722f73637265656e73686f74732f61646d696e5f73636f72652e706e67 "Scoring rules")](https://camo.githubusercontent.com/26ff5a622f125e742d8d2b2bfc1f16e2376d531773d41f366404316287e66ad9/68747470733a2f2f7261772e6769746875622e636f6d2f687970654a756e6374696f6e2f6879706547616d654d656368616e6963732f6d61737465722f73637265656e73686f74732f61646d696e5f73636f72652e706e67)

###  Health Score

30

—

LowBetter than 62% of packages

Maintenance16

Infrequent updates — may be unmaintained

Popularity18

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity63

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~170 days

Recently: every ~234 days

Total

8

Last Release

2455d ago

Major Versions

3.0.2 → 4.0.02017-03-16

4.0.2 → 5.0.02019-09-30

PHP version history (2 changes)3.0.0PHP &gt;=5.5

5.0.0PHP &gt;=7.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/5071b1cd852e094b3f564962a625e04c227adc73af30c5b46b243ab8f20154a7?d=identicon)[hypeJunction](/maintainers/hypeJunction)

---

Top Contributors

[![hypeJunction](https://avatars.githubusercontent.com/u/1202761?v=4)](https://github.com/hypeJunction "hypeJunction (65 commits)")

---

Tags

pluginelggbadgesuser-pointsgamificationsgame mechanics

### Embed Badge

![Health badge](/badges/hypejunction-hypegamemechanics/health.svg)

```
[![Health](https://phpackages.com/badges/hypejunction-hypegamemechanics/health.svg)](https://phpackages.com/packages/hypejunction-hypegamemechanics)
```

###  Alternatives

[helsingborg-stad/municipio

A bootstrap theme for creating municipality sites.

4028.3k10](/packages/helsingborg-stad-municipio)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
