update Piwik to version 2.16 (fixes #91)
This commit is contained in:
parent
296343bf3b
commit
d885a4baa9
5833 changed files with 418860 additions and 226988 deletions
55
www/analytics/plugins/Referrers/Reports/GetSocials.php
Normal file
55
www/analytics/plugins/Referrers/Reports/GetSocials.php
Normal file
|
|
@ -0,0 +1,55 @@
|
|||
<?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\Referrers\Reports;
|
||||
|
||||
use Piwik\Common;
|
||||
use Piwik\Piwik;
|
||||
use Piwik\Plugin\ViewDataTable;
|
||||
use Piwik\Plugins\CoreVisualizations\Visualizations\HtmlTable;
|
||||
use Piwik\Plugins\CoreVisualizations\Visualizations\JqplotGraph\Pie;
|
||||
use Piwik\Plugins\Referrers\Columns\SocialNetwork;
|
||||
|
||||
class GetSocials extends Base
|
||||
{
|
||||
protected function init()
|
||||
{
|
||||
parent::init();
|
||||
$this->dimension = new SocialNetwork();
|
||||
$this->name = Piwik::translate('Referrers_Socials');
|
||||
$this->documentation = Piwik::translate('Referrers_WebsitesReportDocumentation', '<br />');
|
||||
$this->actionToLoadSubTables = 'getUrlsForSocial';
|
||||
$this->order = 11;
|
||||
$this->widgetTitle = 'Referrers_WidgetSocials';
|
||||
}
|
||||
|
||||
public function getDefaultTypeViewDataTable()
|
||||
{
|
||||
return Pie::ID;
|
||||
}
|
||||
|
||||
public function configureView(ViewDataTable $view)
|
||||
{
|
||||
$view->config->show_pivot_by_subtable = false;
|
||||
$view->config->show_exclude_low_population = false;
|
||||
$view->config->show_goals = true;
|
||||
$view->config->addTranslation('label', $this->dimension->getName());
|
||||
|
||||
$view->requestConfig->filter_limit = 10;
|
||||
|
||||
if ($view->isViewDataTableId(HtmlTable::ID)) {
|
||||
$view->config->disable_subtable_when_show_goals = true;
|
||||
}
|
||||
|
||||
$widget = Common::getRequestVar('widget', false);
|
||||
if (empty($widget)) {
|
||||
$view->config->show_footer_message = Piwik::translate('Referrers_SocialFooterMessage');
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue