Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/Referrers/Controller.php')
-rw-r--r--plugins/Referrers/Controller.php17
1 files changed, 8 insertions, 9 deletions
diff --git a/plugins/Referrers/Controller.php b/plugins/Referrers/Controller.php
index 1b258f4c6a..4554acd35a 100644
--- a/plugins/Referrers/Controller.php
+++ b/plugins/Referrers/Controller.php
@@ -74,9 +74,8 @@ class Controller extends \Piwik\Plugin\Controller
$distinctMetrics = $this->addEvolutionPropertiesToView($prettyDate, $distinctMetrics, $prettyLastPeriodDate, $previousValues);
}
-
/** @var Sparklines $view */
- $view = ViewDataTable\Factory::build(Sparklines::ID, $api = false, $controller = false, $force = true, $loadUserParams = false);
+ $view = ViewDataTable\Factory::build(Sparklines::ID, $api = '', $controller = '', $force = true, $loadUserParams = false);
// DIRECT ENTRY
$metrics['visitorsFromDirectEntry'] = $numberFormatter->formatNumber($metrics['visitorsFromDirectEntry']);
@@ -392,16 +391,16 @@ function DisplayTopKeywords($url = "")
';
$jsonRequest = str_replace('format=php', 'format=json', $api);
- echo "<p>This widget is designed to work in your website directly.
+ echo "<p style='padding: 0 12px;'>This widget is designed to work in your website directly.
This widget makes it easy to use Piwik to <i>automatically display the list of Top Keywords</i>, for each of your website Page URLs.</p>
- <p>
+ <p style='padding: 0 12px;'>
<b>Example API URL</b> - For example if you would like to get the top 10 keywords, used last week, to land on the page <a rel='noreferrer' target='_blank' href='$topPageUrl'>$topPageUrl</a>,
in format JSON: you would dynamically fetch the data using <a rel='noreferrer' target='_blank' href='$jsonRequest&url=" . urlencode($topPageUrl) . "'>this API request URL</a>. Make sure you encode the 'url' parameter in the URL.</p>
- <p><b>PHP Function ready to use!</b> - If you use PHP on your website, we have prepared a small code snippet that you can copy paste in your Website PHP files. You can then simply call the function <code>DisplayTopKeywords();</code> anywhere in your template, at the bottom of the content or in your blog sidebar.
+ <p style='padding: 0 12px;'><b>PHP Function ready to use!</b> - If you use PHP on your website, we have prepared a small code snippet that you can copy paste in your Website PHP files. You can then simply call the function <code>DisplayTopKeywords();</code> anywhere in your template, at the bottom of the content or in your blog sidebar.
If you run this code in your page $topPageUrl, it would output the following:";
- echo "<div style='width:400px;margin-left:20px;padding:10px;border:1px solid black;'>";
+ echo "<div style='width:400px;margin:10px 10px 0 10px;padding:10px;border:1px solid #333;'>";
function DisplayTopKeywords($url = "", $api)
{
// Do not spend more than 1 second fetching the data
@@ -433,12 +432,12 @@ function DisplayTopKeywords($url = "")
DisplayTopKeywords($topPageUrl, $api);
echo "</div><br/>
- <p>Here is the PHP function that you can paste in your pages:</P>
- <textarea cols=60 rows=8>&lt;?php\n" . htmlspecialchars($code) . "\n DisplayTopKeywords();</textarea>
+ <p style='padding: 0 12px;'>Here is the PHP function that you can paste in your pages:</P>
+ <textarea style='padding: 0 12px;height:auto;width:auto;margin-left:12px;' cols=60 rows=8>&lt;?php\n" . htmlspecialchars($code) . "\n DisplayTopKeywords();</textarea>
";
echo "
- <p><strong>Notes</strong>: You can for example edit the code to to make the Top search keywords link to your Website search result pages.
+ <p style='padding: 12px;'><strong>Notes</strong>: You can for example edit the code to to make the Top search keywords link to your Website search result pages.
<br/>On medium to large traffic websites, we recommend to cache this data, as to minimize the performance impact of calling the Piwik API on each page view.
</p>
";