https://github.com/ctrlwebinc/badgefactor2
WordPress plugin to issue and manage Open Badges with Badgr server
https://github.com/ctrlwebinc/badgefactor2
Last synced: 7 months ago
JSON representation
WordPress plugin to issue and manage Open Badges with Badgr server
- Host: GitHub
- URL: https://github.com/ctrlwebinc/badgefactor2
- Owner: ctrlwebinc
- License: gpl-2.0
- Created: 2019-01-20T16:09:46.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2025-03-03T21:17:01.000Z (8 months ago)
- Last Synced: 2025-03-03T21:25:13.796Z (8 months ago)
- Language: PHP
- Size: 3.26 MB
- Stars: 0
- Watchers: 7
- Forks: 1
- Open Issues: 18
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
- Security: SECURITY.md
Awesome Lists containing this project
README
# Badge Factor 2
## What is Badge Factor 2
Badge Factor 2 is a [WordPress](https://wordpress.org/) plugin which issues and manages [Open Badges](https://openbadges.org/) with [Badgr Server](https://github.com/concentricsky/badgr-server).
## Templates
Badge Factor 2 uses a custom templating engine which uses Controllers to define all the fields required to display the template, which are assigned to a global `$bf2_template` variable.
If templates have not been overriden in the theme, Badge Factor 2 falls back to the templates provided in its plugin or add-ons. The template structure is as follows:
### Theme
- Including header and footer: `templates/{plugin}/{template_file}`
- Content template only: `templates/{plugin}/content/{template_file}`
### Plugins
- Including header and footer: `{plugin}/templates/{template_file}`
- Content template only: `{plugin}/templates/content/{template_file}`
### Available templates
#### Assertions (issued badges)
- `single-assertion.tpl.php`
- `content/single-assertion.tpl.php`
#### Badge Pages
- `archive-badge-page.tpl.php`
- `single-badge-page.tpl.php`
- `content/archive-badge-page.tpl.php`
- `content/single-badge-page.tpl.php`
#### Add-Ons
Some official Badge Factor 2 add-ons also provide templates in the same manner as the core plugin.
##### Certificates
Uses the templating engine, but returns a generated PDF, and therefore does not provide a template.
##### Courses
- `archive-course.tpl.php`
- `single-course.tpl.php`
- `content/archive-course.tpl.php`
- `content/single-course.tpl.php`
## Dependancies
Version 1.1.0 requires BuddyPress.
## A new version in the works
A new version of Badgefactor 2 is in the works to handle pathways.
The master-parcours and develop-parcours branches should be used to keep non-retroactively compatible changes out of master and develop.
### Pathways support utility
Badgefactor 2 supports pathways by connecting to a Laravel-based utility that does the heavy lifting.
Pathways are integrated into Badgefactor 2 by introducing a minimal amount of new Wordpress functionality. New Wordpress templates sometimes contain specifically-identified divs to allow supplemental js to fill these parts
asynchonously through AJAX to the laravel badges utility.
The following entries must be added to the Wordpress site's wp-config.php to enable patheways:
````
define( 'BF2_PATHWAYS_SUPPLEMENTAL_JS_URL','https://cadre21.ctrlweb.dev:2053/js/cadre21-supplemental.js' );
define( 'BF2_PATHWAYS_SUPPLEMENTAL_CSS_URL','https://cadre21.ctrlweb.dev:2053/css/main-cadre21.css' );
````