update Piwik to version 2.16 (fixes #91)
This commit is contained in:
parent
9abe039dc8
commit
47263617c5
59 changed files with 418860 additions and 226988 deletions
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
/**
|
||||
* Piwik - Open source web analytics
|
||||
* Piwik - free/libre analytics platform
|
||||
*
|
||||
* @link http://piwik.org
|
||||
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
|
||||
|
|
@ -22,43 +22,33 @@ class Controller extends \Piwik\Plugin\Controller
|
|||
public function index()
|
||||
{
|
||||
$view = new View('@Widgetize/index');
|
||||
$view->availableWidgets = Common::json_encode(WidgetsList::get());
|
||||
$view->availableWidgets = json_encode(WidgetsList::get());
|
||||
$this->setGeneralVariablesView($view);
|
||||
return $view->render();
|
||||
}
|
||||
|
||||
public function testJsInclude1()
|
||||
{
|
||||
$view = new View('@Widgetize/testJsInclude1');
|
||||
$view->url1 = '?module=Widgetize&action=js&moduleToWidgetize=UserSettings&actionToWidgetize=getBrowser&idSite=1&period=day&date=yesterday';
|
||||
$view->url2 = '?module=Widgetize&action=js&moduleToWidgetize=API&actionToWidgetize=index&method=ExamplePlugin.getGoldenRatio&format=original';
|
||||
return $view->render();
|
||||
}
|
||||
|
||||
public function testJsInclude2()
|
||||
{
|
||||
$view = new View('@Widgetize/testJsInclude2');
|
||||
$view->url1 = '?module=Widgetize&action=js&moduleToWidgetize=UserSettings&actionToWidgetize=getBrowser&idSite=1&period=day&date=yesterday';
|
||||
$view->url2 = '?module=Widgetize&action=js&moduleToWidgetize=UserCountry&actionToWidgetize=getCountry&idSite=1&period=day&date=yesterday&viewDataTable=cloud&show_footer=0';
|
||||
$view->url3 = '?module=Widgetize&action=js&moduleToWidgetize=Referrers&actionToWidgetize=getKeywords&idSite=1&period=day&date=yesterday&viewDataTable=table&show_footer=0';
|
||||
return $view->render();
|
||||
}
|
||||
|
||||
public function iframe()
|
||||
{
|
||||
Request::reloadAuthUsingTokenAuth();
|
||||
$this->init();
|
||||
|
||||
$controllerName = Common::getRequestVar('moduleToWidgetize');
|
||||
$actionName = Common::getRequestVar('actionToWidgetize');
|
||||
$outputDataTable = FrontController::getInstance()->fetchDispatch($controllerName, $actionName);
|
||||
$actionName = Common::getRequestVar('actionToWidgetize');
|
||||
|
||||
if($controllerName == 'API') {
|
||||
throw new \Exception("Widgetizing API requests is not supported for security reasons. Please change query parameter 'moduleToWidgetize'.");
|
||||
}
|
||||
|
||||
if ($controllerName == 'Dashboard' && $actionName == 'index') {
|
||||
$view = new View('@Widgetize/iframe_empty');
|
||||
} else {
|
||||
$view = new View('@Widgetize/iframe');
|
||||
}
|
||||
|
||||
$this->setGeneralVariablesView($view);
|
||||
$view->setXFrameOptions('allow');
|
||||
$view->content = $outputDataTable;
|
||||
$view->content = FrontController::getInstance()->fetchDispatch($controllerName, $actionName);
|
||||
|
||||
return $view->render();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
24
www/analytics/plugins/Widgetize/Menu.php
Normal file
24
www/analytics/plugins/Widgetize/Menu.php
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
<?php
|
||||
/**
|
||||
* Piwik - free/libre analytics platform
|
||||
*
|
||||
* @link http://piwik.org
|
||||
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
|
||||
*
|
||||
*/
|
||||
namespace Piwik\Plugins\Widgetize;
|
||||
|
||||
use Piwik\Menu\MenuUser;
|
||||
use Piwik\Piwik;
|
||||
|
||||
class Menu extends \Piwik\Plugin\Menu
|
||||
{
|
||||
public function configureUserMenu(MenuUser $menu)
|
||||
{
|
||||
$tooltip = Piwik::translate('Widgetize_TopLinkTooltip');
|
||||
$urlParams = $this->urlForAction('index', array('segment' => false));
|
||||
|
||||
$menu->addPlatformItem('General_Widgets', $urlParams, 5, $tooltip);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* Piwik - Open source web analytics
|
||||
* Piwik - free/libre analytics platform
|
||||
*
|
||||
* @link http://piwik.org
|
||||
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
|
||||
|
|
@ -9,40 +9,28 @@
|
|||
*/
|
||||
|
||||
namespace Piwik\Plugins\Widgetize;
|
||||
use Piwik\Menu\MenuTop;
|
||||
use Piwik\Piwik;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
class Widgetize extends \Piwik\Plugin
|
||||
{
|
||||
/**
|
||||
* @see Piwik\Plugin::getListHooksRegistered
|
||||
* @see Piwik\Plugin::registerEvents
|
||||
*/
|
||||
public function getListHooksRegistered()
|
||||
public function registerEvents()
|
||||
{
|
||||
return array(
|
||||
'AssetManager.getJavaScriptFiles' => 'getJsFiles',
|
||||
'AssetManager.getStylesheetFiles' => 'getStylesheetFiles',
|
||||
'Menu.Top.addItems' => 'addTopMenu',
|
||||
'Translate.getClientSideTranslationKeys' => 'getClientSideTranslationKeys'
|
||||
);
|
||||
}
|
||||
|
||||
public function addTopMenu()
|
||||
{
|
||||
$tooltip = Piwik::translate('Widgetize_TopLinkTooltip');
|
||||
$urlParams = array('module' => 'Widgetize', 'action' => 'index', 'segment' => false);
|
||||
|
||||
MenuTop::addEntry('General_Widgets', $urlParams, true, 5, $isHTML = false, $tooltip);
|
||||
}
|
||||
|
||||
public function getJsFiles(&$jsFiles)
|
||||
{
|
||||
$jsFiles[] = "libs/jquery/jquery.truncate.js";
|
||||
$jsFiles[] = "libs/jquery/jquery.scrollTo.js";
|
||||
$jsFiles[] = "plugins/Zeitgeist/javascripts/piwikHelper.js";
|
||||
$jsFiles[] = "libs/bower_components/jquery.scrollTo/jquery.scrollTo.min.js";
|
||||
$jsFiles[] = "plugins/Morpheus/javascripts/piwikHelper.js";
|
||||
$jsFiles[] = "plugins/Morpheus/javascripts/jquery.icheck.min.js";
|
||||
$jsFiles[] = "plugins/Morpheus/javascripts/morpheus.js";
|
||||
$jsFiles[] = "plugins/CoreHome/javascripts/dataTable.js";
|
||||
$jsFiles[] = "plugins/Dashboard/javascripts/widgetMenu.js";
|
||||
$jsFiles[] = "plugins/Widgetize/javascripts/widgetize.js";
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/*!
|
||||
* Piwik - Web Analytics
|
||||
* Piwik - free/libre analytics platform
|
||||
*
|
||||
* @link http://piwik.org
|
||||
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
|
||||
|
|
@ -64,7 +64,7 @@ function widgetize() {
|
|||
'</span>' +
|
||||
'</div>' +
|
||||
'<div> <label for="embedThisWidgetDirectLink">› Direct Link</label>' +
|
||||
'<span id="embedThisWidgetDirectLink"> ' + self.getInputFormWithHtml('directLinkEmbed', urlIframe) + ' - <a href="' + urlIframe + '" target="_blank">' + _pk_translate('Widgetize_OpenInNewWindow') + '</a></span>'
|
||||
'<span id="embedThisWidgetDirectLink"> ' + self.getInputFormWithHtml('directLinkEmbed', urlIframe) + ' - <a href="' + urlIframe + '" rel="noreferrer" target="_blank">' + _pk_translate('Widgetize_OpenInNewWindow') + '</a></span>'
|
||||
+ '</div>'
|
||||
);
|
||||
|
||||
|
|
|
|||
5
www/analytics/plugins/Widgetize/lang/ar.json
Normal file
5
www/analytics/plugins/Widgetize/lang/ar.json
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
"Widgetize": {
|
||||
"OpenInNewWindow": "فتح في نافذة جديدة"
|
||||
}
|
||||
}
|
||||
5
www/analytics/plugins/Widgetize/lang/be.json
Normal file
5
www/analytics/plugins/Widgetize/lang/be.json
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
"Widgetize": {
|
||||
"OpenInNewWindow": "Адкрыць у новым акне"
|
||||
}
|
||||
}
|
||||
6
www/analytics/plugins/Widgetize/lang/bg.json
Normal file
6
www/analytics/plugins/Widgetize/lang/bg.json
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"Widgetize": {
|
||||
"OpenInNewWindow": "Отвори в нов прозорец",
|
||||
"TopLinkTooltip": "Запазете Piwik докладите като джаджи и вградете таблото във вашето приложение като iframe."
|
||||
}
|
||||
}
|
||||
5
www/analytics/plugins/Widgetize/lang/bn.json
Normal file
5
www/analytics/plugins/Widgetize/lang/bn.json
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
"Widgetize": {
|
||||
"OpenInNewWindow": "নতুন উইন্ডোতে খুলুন"
|
||||
}
|
||||
}
|
||||
5
www/analytics/plugins/Widgetize/lang/bs.json
Normal file
5
www/analytics/plugins/Widgetize/lang/bs.json
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
"Widgetize": {
|
||||
"OpenInNewWindow": "Otvori u novom prozoru"
|
||||
}
|
||||
}
|
||||
6
www/analytics/plugins/Widgetize/lang/ca.json
Normal file
6
www/analytics/plugins/Widgetize/lang/ca.json
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"Widgetize": {
|
||||
"OpenInNewWindow": "Obrir en una nova finestra",
|
||||
"TopLinkTooltip": "Exporteu informes i ginys de Piwik i incrusteu el Tauler de Control a la vostra aplicació com un iframe."
|
||||
}
|
||||
}
|
||||
7
www/analytics/plugins/Widgetize/lang/cs.json
Normal file
7
www/analytics/plugins/Widgetize/lang/cs.json
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
"Widgetize": {
|
||||
"OpenInNewWindow": "Otevřít nové okno",
|
||||
"PluginDescription": "Zobrazte jakékoliv hlášení z Piwiku na vašich stránkách pomocí jednoduchého vkládacího HTML tagu.",
|
||||
"TopLinkTooltip": "Exportujte své Piwik hlášení jako widgety a použijte eje e vaší aplikaci jako iframe."
|
||||
}
|
||||
}
|
||||
5
www/analytics/plugins/Widgetize/lang/cy.json
Normal file
5
www/analytics/plugins/Widgetize/lang/cy.json
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
"Widgetize": {
|
||||
"OpenInNewWindow": "Agor mewn ffenestr newydd"
|
||||
}
|
||||
}
|
||||
7
www/analytics/plugins/Widgetize/lang/da.json
Normal file
7
www/analytics/plugins/Widgetize/lang/da.json
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
"Widgetize": {
|
||||
"OpenInNewWindow": "Åben i et nyt vindue",
|
||||
"PluginDescription": "Viser alle Piwik rapport på webstedet eller app med et simpel indlejrings HTML-tag.",
|
||||
"TopLinkTooltip": "Eksporter Piwik rapporter som moduler og indlejre dit kontrolpanel i din applikation som en iframe."
|
||||
}
|
||||
}
|
||||
7
www/analytics/plugins/Widgetize/lang/de.json
Normal file
7
www/analytics/plugins/Widgetize/lang/de.json
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
"Widgetize": {
|
||||
"OpenInNewWindow": "In neuem Fenster öffnen",
|
||||
"PluginDescription": "Zeigt sämtliche Piwik Berichte in Ihrer Website oder App mit einem einfachen Embed HTML tag an.",
|
||||
"TopLinkTooltip": "Exportieren Sie Berichte als Widgets und binden Sie das Dashboard in Ihrer Applikation als iframe ein."
|
||||
}
|
||||
}
|
||||
7
www/analytics/plugins/Widgetize/lang/el.json
Normal file
7
www/analytics/plugins/Widgetize/lang/el.json
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
"Widgetize": {
|
||||
"OpenInNewWindow": "Άνοιγμα σε νέο παράθυρο",
|
||||
"PluginDescription": "Εμφάνιση οποιασδήποτε αναφοράς του Piwik στον ιστοτόπο ή την εφαρμογή σας με μια απλή σήμανση ενσωμάτωσης σε HTML.",
|
||||
"TopLinkTooltip": "Εξαγωγή Αναφορών Piwik ως Μικροεφαρμογές και ενσωμάτωσή του Κεντρικού Πίνακα στην εφαρμογή σας ως πλαίσιο."
|
||||
}
|
||||
}
|
||||
7
www/analytics/plugins/Widgetize/lang/en.json
Normal file
7
www/analytics/plugins/Widgetize/lang/en.json
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
"Widgetize": {
|
||||
"OpenInNewWindow": "Open in a new window",
|
||||
"PluginDescription": "Display any Piwik report in your website or app with a simple Embed HTML tag.",
|
||||
"TopLinkTooltip": "Export Piwik Reports as Widgets and embed the Dashboard in your app as an iframe."
|
||||
}
|
||||
}
|
||||
7
www/analytics/plugins/Widgetize/lang/es.json
Normal file
7
www/analytics/plugins/Widgetize/lang/es.json
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
"Widgetize": {
|
||||
"OpenInNewWindow": "Abrir en una nueva ventana",
|
||||
"PluginDescription": "Mostrar un informe Piwik en su sitio de internet o aplicación con una simple etiqueta HTML incrustada.",
|
||||
"TopLinkTooltip": "Exportar los informes de Piwik como una aplicación (widget) e incrustar el panel en su aplicación como un elemento iframe."
|
||||
}
|
||||
}
|
||||
5
www/analytics/plugins/Widgetize/lang/et.json
Normal file
5
www/analytics/plugins/Widgetize/lang/et.json
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
"Widgetize": {
|
||||
"OpenInNewWindow": "Ava uues aknas"
|
||||
}
|
||||
}
|
||||
5
www/analytics/plugins/Widgetize/lang/fa.json
Normal file
5
www/analytics/plugins/Widgetize/lang/fa.json
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
"Widgetize": {
|
||||
"OpenInNewWindow": "باز کردن در یک پنجره جدید"
|
||||
}
|
||||
}
|
||||
6
www/analytics/plugins/Widgetize/lang/fi.json
Normal file
6
www/analytics/plugins/Widgetize/lang/fi.json
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"Widgetize": {
|
||||
"OpenInNewWindow": "Avaa uudessa ikkunassa",
|
||||
"TopLinkTooltip": "Vie Piwikin raportteja vimpaimiksi ja lisää työpöytä ohjelmaan iframena."
|
||||
}
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue