Skip to content

Commit

Permalink
Merge pull request #10 from wfp/develop
Browse files Browse the repository at this point in the history
develop
  • Loading branch information
lashab committed May 10, 2016
2 parents a95e679 + 2e908b6 commit 9115c2e
Show file tree
Hide file tree
Showing 13 changed files with 1,038 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
vendor
45 changes: 45 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,47 @@
# Survey Manager
Module for managing third-party surveys in Drupal 8.

# Installation

Download and enable it as a regular module.

# How it works
This module uses Block API, every survey is just a specific type of block.

This gives you flexibility of block visibility settings. You can control how, where and who will see the survey.


There are 2 types of surveys:

## Embed survey
This is a type of survey where you can put/embed third party JS scripts (e.g. SurveyMonkey).
You put Embed surveys in some region but they wont appear in any of them, their contents of embed code will be printed at the bottom of the page as a script.


## HTML Survey
This is just a regular block, it has a field for storing whatever HTML you want and it will be printed out as a regular block in regions or as a filter in any content.


# Usage
After installing this module you will see Survey Manger link under Structure menu. This is where all your surveys reside.

You can create or edit surveys from that page.

## Usage of filter [survey:id]
This module implements filter for text formatters, you can enable this filter from your text formmatter configuration page.
After enabling this filter you can use it in your content. e.g [survey:123] where 123 is the id of the survey you want to embed in your content.
This Filter works fro HTML Surveys.


# Developer Guideline

```
# Install development dependencies
composer install
# Run PHP code audits
composer run phpcs
# Run PHP Copy-Paste detector
composer run phpcpd
```
33 changes: 33 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
"name": "drupal/survey_manager",
"type": "drupal-module",
"description": "Manage third-party surveys",
"authors": [
{
"name": "Otar Zakalashvili",
"email": "oto.zakalashvili@gmail.com",
"homepage": "http://otarza.space"
}
],
"keywords": [
"survey"
],
"license": "GPL-2.0+",
"homepage": "http://drupal.org/project/survey_manager",
"require": {
"php": ">=5.5.9"
},
"require-dev": {
"drupal/coder": "8.2.5",
"andrewholgate/drupalstrict": "0.1.1",
"sebastian/phpcpd": "2.0.2"
},
"scripts": {
"phpcs": "./vendor/bin/phpcs --standard=Drupal,DrupalPractice,DrupalStrict --extensions=php,module,install,profile,drush.inc,test,admin.inc,yml,js,css --report-width=4 --colors --ignore=vendor/ ./",
"phpcpd": "./vendor/bin/phpcpd --names *.php,*.module,*.profile,*.install,*.drush.inc,*.test --min-lines 6 --min-tokens 10 --fuzzy --exclude=vendor ./",
"audit": "composer run phpcs && composer run phpcpd",
"post-install-cmd": [
"[ -f ./vendor/bin/phpcs ]; ./vendor/bin/phpcs --config-set installed_paths ../../drupal/coder/coder_sniffer,../../andrewholgate/drupalstrict"
]
}
}
Loading

0 comments on commit 9115c2e

Please sign in to comment.