hide map for Character groups Quest Stations when there are no stations
This commit is contained in:
commit
df14dfafc3
4371 changed files with 1220224 additions and 0 deletions
1
www/analytics/plugins/ExamplePlugin/.gitignore
vendored
Normal file
1
www/analytics/plugins/ExamplePlugin/.gitignore
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
tests/processed/*xml
|
||||
42
www/analytics/plugins/ExamplePlugin/.travis.yml
Normal file
42
www/analytics/plugins/ExamplePlugin/.travis.yml
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
language: php
|
||||
|
||||
php:
|
||||
- 5.3
|
||||
|
||||
env:
|
||||
matrix:
|
||||
- TEST_SUITE=CoreTests MYSQL_ADAPTER=PDO_MYSQL
|
||||
- TEST_SUITE=PluginTests MYSQL_ADAPTER=PDO_MYSQL
|
||||
|
||||
script: ./travis.sh
|
||||
|
||||
install:
|
||||
- TEST_PIWIK_VERSION=$(wget builds.piwik.org/LATEST -q -O -)
|
||||
- TEST_PIWIK_VERSION=`echo $TEST_PIWIK_VERSION | tr -d ' ' | tr -d '\n'`
|
||||
- mkdir ExamplePlugin
|
||||
- cp -R !(ExamplePlugin) ExamplePlugin
|
||||
- cp -R .git/ ExamplePlugin/
|
||||
- git clone https://github.com/piwik/piwik.git piwik
|
||||
- cd piwik
|
||||
- git checkout "$TEST_PIWIK_VERSION"
|
||||
- git submodule init
|
||||
- git submodule update || true
|
||||
- composer self-update
|
||||
- composer install
|
||||
- rm -rf plugins/ExamplePlugin
|
||||
- cd ../
|
||||
- mv ExamplePlugin piwik/plugins
|
||||
|
||||
before_script:
|
||||
- cd piwik
|
||||
- uname -a
|
||||
- date
|
||||
- mysql -e 'create database piwik_tests;'
|
||||
- ./tests/travis/prepare.sh
|
||||
- ./tests/travis/setup_webserver.sh
|
||||
- wget https://raw.github.com/piwik/piwik-tests-plugins/master/activateplugin.php
|
||||
- php activateplugin.php ExamplePlugin
|
||||
- cd tests/PHPUnit
|
||||
|
||||
after_script:
|
||||
- cat /var/log/nginx/error.log
|
||||
36
www/analytics/plugins/ExamplePlugin/API.php
Normal file
36
www/analytics/plugins/ExamplePlugin/API.php
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
<?php
|
||||
/**
|
||||
* Piwik - Open source web analytics
|
||||
*
|
||||
* @link http://piwik.org
|
||||
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
|
||||
*
|
||||
*/
|
||||
namespace Piwik\Plugins\ExamplePlugin;
|
||||
|
||||
/**
|
||||
* API for plugin ExamplePlugin
|
||||
*
|
||||
* @method static \Piwik\Plugins\ExamplePlugin\API getInstance()
|
||||
*/
|
||||
class API extends \Piwik\Plugin\API
|
||||
{
|
||||
/**
|
||||
* Example method. Please remove if you do not need this API method.
|
||||
* You can call this API method like this:
|
||||
* /index.php?module=API&method=ExamplePlugin.getAnswerToLife
|
||||
* /index.php?module=API&method=ExamplePlugin.getAnswerToLife?truth=0
|
||||
*
|
||||
* @param bool $truth
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function getAnswerToLife($truth = true)
|
||||
{
|
||||
if ($truth) {
|
||||
return 42;
|
||||
}
|
||||
|
||||
return 24;
|
||||
}
|
||||
}
|
||||
27
www/analytics/plugins/ExamplePlugin/Controller.php
Normal file
27
www/analytics/plugins/ExamplePlugin/Controller.php
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
<?php
|
||||
/**
|
||||
* Piwik - Open source web analytics
|
||||
*
|
||||
* @link http://piwik.org
|
||||
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
|
||||
*
|
||||
*/
|
||||
namespace Piwik\Plugins\ExamplePlugin;
|
||||
|
||||
use Piwik\View;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
class Controller extends \Piwik\Plugin\Controller
|
||||
{
|
||||
|
||||
public function index()
|
||||
{
|
||||
$view = new View('@ExamplePlugin/index.twig');
|
||||
$this->setBasicVariablesView($view);
|
||||
$view->answerToLife = '42';
|
||||
|
||||
return $view->render();
|
||||
}
|
||||
}
|
||||
29
www/analytics/plugins/ExamplePlugin/ExamplePlugin.php
Normal file
29
www/analytics/plugins/ExamplePlugin/ExamplePlugin.php
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
<?php
|
||||
/**
|
||||
* Piwik - Open source web analytics
|
||||
*
|
||||
* @link http://piwik.org
|
||||
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
|
||||
*
|
||||
*/
|
||||
namespace Piwik\Plugins\ExamplePlugin;
|
||||
|
||||
/**
|
||||
*/
|
||||
class ExamplePlugin extends \Piwik\Plugin
|
||||
{
|
||||
/**
|
||||
* @see Piwik\Plugin::getListHooksRegistered
|
||||
*/
|
||||
public function getListHooksRegistered()
|
||||
{
|
||||
return array(
|
||||
'AssetManager.getJavaScriptFiles' => 'getJsFiles',
|
||||
);
|
||||
}
|
||||
|
||||
public function getJsFiles(&$jsFiles)
|
||||
{
|
||||
$jsFiles[] = 'plugins/ExamplePlugin/javascripts/plugin.js';
|
||||
}
|
||||
}
|
||||
18
www/analytics/plugins/ExamplePlugin/README.md
Normal file
18
www/analytics/plugins/ExamplePlugin/README.md
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
# Piwik ExamplePlugin Plugin
|
||||
|
||||
## Description
|
||||
|
||||
Add your plugin description here.
|
||||
|
||||
## FAQ
|
||||
|
||||
__My question?__
|
||||
My answer
|
||||
|
||||
## Changelog
|
||||
|
||||
Here goes the changelog text.
|
||||
|
||||
## Support
|
||||
|
||||
Please direct any feedback to ...
|
||||
20
www/analytics/plugins/ExamplePlugin/javascripts/plugin.js
Normal file
20
www/analytics/plugins/ExamplePlugin/javascripts/plugin.js
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
/*!
|
||||
* Piwik - Web Analytics
|
||||
*
|
||||
* @link http://piwik.org
|
||||
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
|
||||
*/
|
||||
|
||||
$(document).ready(function () {
|
||||
/**
|
||||
* Please note that this JavaScript file will be loaded only if you
|
||||
* enable the following setting in your config:
|
||||
*
|
||||
* [Debug]
|
||||
* disable_merged_assets = 1
|
||||
*/
|
||||
|
||||
if('undefined' != (typeof console)) { /* IE8 has no console */
|
||||
console.log('Plugin file loaded');
|
||||
}
|
||||
});
|
||||
13
www/analytics/plugins/ExamplePlugin/plugin.json
Normal file
13
www/analytics/plugins/ExamplePlugin/plugin.json
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
{
|
||||
"name": "ExamplePlugin",
|
||||
"version": "0.1.0",
|
||||
"description": "ExampleDescription",
|
||||
"theme": false,
|
||||
"authors": [
|
||||
{
|
||||
"name": "Piwik",
|
||||
"email": "",
|
||||
"homepage": ""
|
||||
}
|
||||
]
|
||||
}
|
||||
0
www/analytics/plugins/ExamplePlugin/screenshots/.gitkeep
Normal file
0
www/analytics/plugins/ExamplePlugin/screenshots/.gitkeep
Normal file
4
www/analytics/plugins/ExamplePlugin/templates/index.twig
Normal file
4
www/analytics/plugins/ExamplePlugin/templates/index.twig
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
<strong>Hello world!</strong>
|
||||
<br/>
|
||||
|
||||
The answer to life is {{ answerToLife }}
|
||||
Loading…
Add table
Add a link
Reference in a new issue