This commit is contained in:
@@ -1,11 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<module>
|
||||
<name>statsequipment</name>
|
||||
<displayName>Software</displayName>
|
||||
<version>1</version>
|
||||
<description>Display the software used by your visitors.</description>
|
||||
<author>PrestaShop</author>
|
||||
<tab>analytics_stats</tab>
|
||||
<is_configurable>0</is_configurable>
|
||||
<need_instance>1</need_instance>
|
||||
</module>
|
||||
@@ -1,15 +0,0 @@
|
||||
<?php
|
||||
|
||||
global $_MODULE;
|
||||
$_MODULE = array();
|
||||
$_MODULE['<{statsequipment}prestashop>statsequipment_719d067b229178f03bcfa1da4ac4dede'] = 'Software';
|
||||
$_MODULE['<{statsequipment}prestashop>statsequipment_a7b3ac03f9e0f1dabad82e41f6cfed37'] = 'Anzeige der von Ihren Besuchern benutzten Software';
|
||||
$_MODULE['<{statsequipment}prestashop>statsequipment_dcbcd22b719ba36dad1330178c6bf761'] = 'Bestimmen Sie den Web-Browser-Prozentsatz, den Ihr Kunden nutzt.';
|
||||
$_MODULE['<{statsequipment}prestashop>statsequipment_998e4c5c80f27dec552e99dfed34889a'] = 'CSV-Export';
|
||||
$_MODULE['<{statsequipment}prestashop>statsequipment_dc29a12c359732b223367cb61df2196d'] = 'Bestimmen Sie den Prozentsatz der Betriebssysteme, die Ihre Kunden nutzen.';
|
||||
$_MODULE['<{statsequipment}prestashop>statsequipment_575e3c9cac82aacd649b1196d845588a'] = 'Plug-ins';
|
||||
$_MODULE['<{statsequipment}prestashop>statsequipment_6602bbeb2956c035fb4cb5e844a4861b'] = 'Guide';
|
||||
$_MODULE['<{statsequipment}prestashop>statsequipment_501361472d0528ee07f202297f599d40'] = 'Stellen Sie sicher, dass Ihre Webseite für alle zugänglich ist ';
|
||||
$_MODULE['<{statsequipment}prestashop>statsequipment_8ebe1665d646cc99d4a80835d1734cad'] = 'Bei der Webseitenverwaltung ist es wichtig, die von den Kunden genutzte Software im Auge zu behalten, um sicher zu gehen, dass die Webseite allen das Gleiche anzeigt. PrestaShop wurde so konzipiert, dass es mit den meisten neueren Webbrowsern und Betriebssystemen kompatibel ist. Falls Sie schließlich jedoch Ihren Webbrowser durch fortgeschrittene Funktionen erweitern oder sogar den PrestaShop Core Code verändern, können diese Zusätze nicht für alle zugänglich sein. Daher ist es angeraten, Tabs auf dem Prozentsatz der Kunden für jede Software-Art zu behalten, bevor Sie etwas hinzufügen oder ändern, was nur einer begrenzten Zahl an Benutzern zugänglich ist.';
|
||||
$_MODULE['<{statsequipment}prestashop>statsequipment_8ce59076ab4eaa3570ff2a931706d3c1'] = 'Web-Browser-Benutzung';
|
||||
$_MODULE['<{statsequipment}prestashop>statsequipment_eb84ea9e8324beffd94fdeff011edfd7'] = 'Betriebssystem-Benutzung';
|
||||
@@ -1,4 +0,0 @@
|
||||
<?php
|
||||
|
||||
global $_MODULE;
|
||||
$_MODULE = array();
|
||||
@@ -1,15 +0,0 @@
|
||||
<?php
|
||||
|
||||
global $_MODULE;
|
||||
$_MODULE = array();
|
||||
$_MODULE['<{statsequipment}prestashop>statsequipment_719d067b229178f03bcfa1da4ac4dede'] = 'Software';
|
||||
$_MODULE['<{statsequipment}prestashop>statsequipment_a7b3ac03f9e0f1dabad82e41f6cfed37'] = 'Mostrar el Software utilizado por sus visitantes';
|
||||
$_MODULE['<{statsequipment}prestashop>statsequipment_dcbcd22b719ba36dad1330178c6bf761'] = 'Determine la repartición de los buscadores que utilizan sus clientes';
|
||||
$_MODULE['<{statsequipment}prestashop>statsequipment_998e4c5c80f27dec552e99dfed34889a'] = 'CSV Export';
|
||||
$_MODULE['<{statsequipment}prestashop>statsequipment_dc29a12c359732b223367cb61df2196d'] = 'Determine la repartición de los sistemas operativo que utilizan sus clientes';
|
||||
$_MODULE['<{statsequipment}prestashop>statsequipment_575e3c9cac82aacd649b1196d845588a'] = 'Plug-ins';
|
||||
$_MODULE['<{statsequipment}prestashop>statsequipment_6602bbeb2956c035fb4cb5e844a4861b'] = 'Guía';
|
||||
$_MODULE['<{statsequipment}prestashop>statsequipment_501361472d0528ee07f202297f599d40'] = 'Asegúrese de que su sitio Web sea accesible a todos';
|
||||
$_MODULE['<{statsequipment}prestashop>statsequipment_8ebe1665d646cc99d4a80835d1734cad'] = 'Cuando se administran sitios web, es importante no perder de vista el software utilizado por los visitantes con el fin de asegurarse de que el sitio se muestra de manera idéntica para cada uno. PrestaShop fue creado para ser compatible con la mayoría de los buscadores recientes y de los sistemas operativos de ordenadores (OS) de la red. Sin embargo, puesto que usted puede terminar agregando características avanzadas a su sitio Web o incluso modificar el código de base de PrestaShop, estas adiciones pueden no ser accesibles para todos. Por esa razón es una buena idea guardar en pestañas una relación del porcentaje de usuarios para cada tipo de software antes de hacer algún cambio al que sólo podrá acceder un número limitado de usuarios. ';
|
||||
$_MODULE['<{statsequipment}prestashop>statsequipment_8ce59076ab4eaa3570ff2a931706d3c1'] = 'Buscador utilizado';
|
||||
$_MODULE['<{statsequipment}prestashop>statsequipment_eb84ea9e8324beffd94fdeff011edfd7'] = 'Sistema operativo utilizado';
|
||||
@@ -1,15 +0,0 @@
|
||||
<?php
|
||||
|
||||
global $_MODULE;
|
||||
$_MODULE = array();
|
||||
$_MODULE['<{statsequipment}prestashop>statsequipment_719d067b229178f03bcfa1da4ac4dede'] = 'Equipement';
|
||||
$_MODULE['<{statsequipment}prestashop>statsequipment_a7b3ac03f9e0f1dabad82e41f6cfed37'] = 'Affiche l\'équipement de vos visiteurs';
|
||||
$_MODULE['<{statsequipment}prestashop>statsequipment_dcbcd22b719ba36dad1330178c6bf761'] = 'Déterminez la répartition des navigateurs web utilisés par vos clients';
|
||||
$_MODULE['<{statsequipment}prestashop>statsequipment_998e4c5c80f27dec552e99dfed34889a'] = 'Export CSV';
|
||||
$_MODULE['<{statsequipment}prestashop>statsequipment_dc29a12c359732b223367cb61df2196d'] = 'Déterminez la répartition des systèmes d\'exploitation utilisés par vos clients';
|
||||
$_MODULE['<{statsequipment}prestashop>statsequipment_575e3c9cac82aacd649b1196d845588a'] = 'Extensions';
|
||||
$_MODULE['<{statsequipment}prestashop>statsequipment_6602bbeb2956c035fb4cb5e844a4861b'] = 'Guide';
|
||||
$_MODULE['<{statsequipment}prestashop>statsequipment_501361472d0528ee07f202297f599d40'] = 'Veillez à ce que votre site soit accessible à tous';
|
||||
$_MODULE['<{statsequipment}prestashop>statsequipment_8ebe1665d646cc99d4a80835d1734cad'] = 'Lorsque l\'on gère des sites web, il est important de garder une trace des logiciels utilisés par les visiteurs afin de s\'assurer que le site s\'affiche de la même façon pour tout le monde. Et PrestaShop a été construit de manière à être compatible avec la plupart des navigateurs Web récents et les systèmes d\'exploitation. Toutefois, dans le cas où vous auriez ajouté des fonctionnalités avancées à votre site Web ou même modifié le code de base PrestaShop, ces ajouts pourraient ne pas être accessibles par tous. C\'est pourquoi il est bon de contrôler le pourcentage de visiteurs pour chaque système avant de songer à ajouter ce type de fonctionnalités trop spécifiques.';
|
||||
$_MODULE['<{statsequipment}prestashop>statsequipment_8ce59076ab4eaa3570ff2a931706d3c1'] = 'Navigateurs utilisés';
|
||||
$_MODULE['<{statsequipment}prestashop>statsequipment_eb84ea9e8324beffd94fdeff011edfd7'] = 'Systèmes d\'exploitation utilisés';
|
||||
@@ -1,15 +0,0 @@
|
||||
<?php
|
||||
|
||||
global $_MODULE;
|
||||
$_MODULE = array();
|
||||
$_MODULE['<{statsequipment}prestashop>statsequipment_719d067b229178f03bcfa1da4ac4dede'] = 'Software';
|
||||
$_MODULE['<{statsequipment}prestashop>statsequipment_a7b3ac03f9e0f1dabad82e41f6cfed37'] = 'Visualizza il software utilizzato dai visitatori';
|
||||
$_MODULE['<{statsequipment}prestashop>statsequipment_dcbcd22b719ba36dad1330178c6bf761'] = 'Determina la percentuale di browser utilizzati dai tuoi clienti.';
|
||||
$_MODULE['<{statsequipment}prestashop>statsequipment_998e4c5c80f27dec552e99dfed34889a'] = 'Esporta CSV';
|
||||
$_MODULE['<{statsequipment}prestashop>statsequipment_dc29a12c359732b223367cb61df2196d'] = 'Determina la percentuale di sistemi operativi usati dai tuoi clienti.';
|
||||
$_MODULE['<{statsequipment}prestashop>statsequipment_575e3c9cac82aacd649b1196d845588a'] = 'Plug-in';
|
||||
$_MODULE['<{statsequipment}prestashop>statsequipment_6602bbeb2956c035fb4cb5e844a4861b'] = 'Guida';
|
||||
$_MODULE['<{statsequipment}prestashop>statsequipment_501361472d0528ee07f202297f599d40'] = 'Assicuratevi che il tuo sito web sia accessibile a tutti';
|
||||
$_MODULE['<{statsequipment}prestashop>statsequipment_8ebe1665d646cc99d4a80835d1734cad'] = 'Nella gestione dei siti web, è importante tenere traccia dei software utilizzati dai visitatori, al fine di essere sicuri che il sito sia visualizzato allo stesso modo da tutti, per questo PrestaShop è stato costruito in modo da essere compatibile con la maggior parte dei browser e recenti sistemi operativi (OS). Tuttavia, siccome potrà capitare che tu aggiunga funzionalità avanzate al tuo sito web o modifichi il codice di base PrestaShop, tali aggiunte possono non essere accessibili a tutti. Ecco perché è una buona idea tenere sotto controllo la percentuale di utenti per ogni tipo di software prima di aggiungere o modificare qualcosa a cui potrà accedere solo un numero limitato di utenti.';
|
||||
$_MODULE['<{statsequipment}prestashop>statsequipment_8ce59076ab4eaa3570ff2a931706d3c1'] = 'Uso del browser';
|
||||
$_MODULE['<{statsequipment}prestashop>statsequipment_eb84ea9e8324beffd94fdeff011edfd7'] = 'Uso del sistema operativo';
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 1.0 KiB |
@@ -1,175 +0,0 @@
|
||||
<?php
|
||||
/*
|
||||
* 2007-2011 PrestaShop
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Academic Free License (AFL 3.0)
|
||||
* that is bundled with this package in the file LICENSE.txt.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* http://opensource.org/licenses/afl-3.0.php
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@prestashop.com so we can send you a copy immediately.
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||
* versions in the future. If you wish to customize PrestaShop for your
|
||||
* needs please refer to http://www.prestashop.com for more information.
|
||||
*
|
||||
* @author PrestaShop SA <contact@prestashop.com>
|
||||
* @copyright 2007-2011 PrestaShop SA
|
||||
* @version Release: $Revision: 1.4 $
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*/
|
||||
|
||||
if (!defined('_CAN_LOAD_FILES_'))
|
||||
exit;
|
||||
|
||||
class StatsEquipment extends ModuleGraph
|
||||
{
|
||||
private $_html = '';
|
||||
private $_query = '';
|
||||
private $_query2 = '';
|
||||
|
||||
function __construct()
|
||||
{
|
||||
$this->name = 'statsequipment';
|
||||
$this->tab = 'analytics_stats';
|
||||
$this->version = 1.0;
|
||||
$this->author = 'PrestaShop';
|
||||
|
||||
parent::__construct();
|
||||
|
||||
$this->displayName = $this->l('Software');
|
||||
$this->description = $this->l('Display the software used by your visitors.');
|
||||
}
|
||||
|
||||
public function install()
|
||||
{
|
||||
return (parent::install() AND $this->registerHook('AdminStatsModules'));
|
||||
}
|
||||
|
||||
private function getEquipment()
|
||||
{
|
||||
$result = Db::getInstance(_PS_USE_SQL_SLAVE_)->ExecuteS('
|
||||
SELECT DISTINCT g.*
|
||||
FROM `'._DB_PREFIX_.'connections` c
|
||||
LEFT JOIN `'._DB_PREFIX_.'guest` g ON g.`id_guest` = c.`id_guest`
|
||||
WHERE c.`date_add` BETWEEN '.ModuleGraph::getDateBetween(), false);
|
||||
|
||||
$calcArray = array('jsOK' => 0, 'jsKO' => 0, 'javaOK' => 0, 'javaKO' => 0, 'wmpOK' => 0, 'wmpKO' => 0, 'qtOK' => 0, 'qtKO' => 0, 'realOK' => 0, 'realKO' => 0, 'flashOK' => 0, 'flashKO' => 0, 'directorOK' => 0, 'directorKO' => 0);
|
||||
while ($row = Db::getInstance(_PS_USE_SQL_SLAVE_)->nextRow($result))
|
||||
{
|
||||
if (!$row['javascript'])
|
||||
{
|
||||
++$calcArray['jsKO'];
|
||||
continue;
|
||||
}
|
||||
++$calcArray['jsOK'];
|
||||
($row['windows_media']) ? ++$calcArray['wmpOK'] : ++$calcArray['wmpKO'];
|
||||
($row['real_player']) ? ++$calcArray['realOK'] : ++$calcArray['realKO'];
|
||||
($row['adobe_flash']) ? ++$calcArray['flashOK'] : ++$calcArray['flashKO'];
|
||||
($row['adobe_director']) ? ++$calcArray['directorOK'] : ++$calcArray['directorKO'];
|
||||
($row['sun_java']) ? ++$calcArray['javaOK'] : ++$calcArray['javaKO'];
|
||||
($row['apple_quicktime']) ? ++$calcArray['qtOK'] : ++$calcArray['qtKO'];
|
||||
}
|
||||
|
||||
if (!$calcArray['jsOK'])
|
||||
return false;
|
||||
|
||||
$equip = array(
|
||||
'Windows Media Player' => $calcArray['wmpOK'] / ($calcArray['wmpOK'] + $calcArray['wmpKO']),
|
||||
'Real Player' => $calcArray['realOK'] / ($calcArray['realOK'] + $calcArray['realKO']),
|
||||
'Apple Quicktime' => $calcArray['qtOK'] / ($calcArray['qtOK'] + $calcArray['qtKO']),
|
||||
'Sun Java' => $calcArray['javaOK'] / ($calcArray['javaOK'] + $calcArray['javaKO']),
|
||||
'Adobe Flash' => $calcArray['flashOK'] / ($calcArray['flashOK'] + $calcArray['flashKO']),
|
||||
'Adobe Shockwave' => $calcArray['directorOK'] / ($calcArray['directorOK'] + $calcArray['directorKO'])
|
||||
);
|
||||
arsort($equip);
|
||||
return $equip;
|
||||
}
|
||||
|
||||
public function hookAdminStatsModules($params)
|
||||
{
|
||||
if (Tools::getValue('export'))
|
||||
if (Tools::getValue('exportType') == 'browser')
|
||||
$this->csvExport(array('type' => 'pie', 'option' => 'wb'));
|
||||
elseif (Tools::getValue('exportType') == 'os')
|
||||
$this->csvExport(array('type' => 'pie', 'option' => 'os'));
|
||||
|
||||
$equipment = $this->getEquipment();
|
||||
$this->_html = '
|
||||
<fieldset class="width3"><legend><img src="../modules/'.$this->name.'/logo.gif" /> '.$this->displayName.'</legend>
|
||||
<center>
|
||||
<p><img src="../img/admin/down.gif" />'.$this->l('Determine the percentage of web browsers used by your customers.').'</p>
|
||||
'.ModuleGraph::engine(array('type' => 'pie', 'option' => 'wb')).'<br /><br />
|
||||
<p><a href="'.$_SERVER['REQUEST_URI'].'&export=1&exportType=browser"><img src="../img/admin/asterisk.gif" />'.$this->l('CSV Export').'</a></p>
|
||||
<p><img src="../img/admin/down.gif" />'.$this->l('Determine the percentage of operating systems used by your customers.').'</p>
|
||||
'.ModuleGraph::engine(array('type' => 'pie', 'option' => 'os')).'
|
||||
<p><a href="'.$_SERVER['REQUEST_URI'].'&export=1&exportType=os"><img src="../img/admin/asterisk.gif" />'.$this->l('CSV Export').'</a></p>';
|
||||
|
||||
if ($equipment)
|
||||
{
|
||||
$this->_html .= '<table class="table space" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr><th style="width: 200px">'.$this->l('Plug-ins').'</th><th></th></tr>';
|
||||
foreach ($equipment as $name => $value)
|
||||
$this->_html .= '<tr><td>'.$name.'</td><td>'.number_format(100 * $value, 2).'%</td></tr>';
|
||||
$this->_html .= '</table>';
|
||||
}
|
||||
$this->_html .= '
|
||||
</center>
|
||||
</fieldset><br />
|
||||
<fieldset class="width3"><legend><img src="../img/admin/comment.gif" /> '.$this->l('Guide').'</legend>
|
||||
<h2>'.$this->l('Ensure that your website is accessible to all.').'</h2>
|
||||
<p>
|
||||
'.$this->l('When managing Websites, it is important to keep track of software used by visitors in order to be sure that the site displays the same way for everyone. PrestaShop was built in order to be compatible with most recent Web browsers and computer operating systems (OS). However, because you may end up adding advanced features to your Website or even modify the core PrestaShop code, these additions may not be accessible by everyone. That is why it is a good idea to keep tabs on the percentage of users for each type of software before adding or changing something that only a limited number of users will be able to access.').'
|
||||
</p><br />
|
||||
|
||||
</fieldset>';
|
||||
return $this->_html;
|
||||
}
|
||||
|
||||
public function setOption($option, $layers = 1)
|
||||
{
|
||||
switch($option)
|
||||
{
|
||||
case 'wb':
|
||||
$this->_titles['main'] = $this->l('Web browser use');
|
||||
$this->_query = '
|
||||
SELECT wb.`name`, COUNT(g.`id_web_browser`) AS total
|
||||
FROM `'._DB_PREFIX_.'web_browser` wb
|
||||
LEFT JOIN `'._DB_PREFIX_.'guest` g ON g.`id_web_browser` = wb.`id_web_browser`
|
||||
LEFT JOIN `'._DB_PREFIX_.'connections` c ON g.`id_guest` = c.`id_guest`
|
||||
WHERE c.`date_add` BETWEEN ';
|
||||
$this->_query2 = ' GROUP BY g.`id_web_browser`';
|
||||
break;
|
||||
case 'os':
|
||||
$this->_titles['main'] = $this->l('Operating systems use');
|
||||
$this->_query = '
|
||||
SELECT os.`name`, COUNT(g.`id_operating_system`) AS total
|
||||
FROM `'._DB_PREFIX_.'operating_system` os
|
||||
LEFT JOIN `'._DB_PREFIX_.'guest` g ON g.`id_operating_system` = os.`id_operating_system`
|
||||
LEFT JOIN `'._DB_PREFIX_.'connections` c ON g.`id_guest` = c.`id_guest`
|
||||
WHERE c.`date_add` BETWEEN ';
|
||||
$this->_query2 = ' GROUP BY g.`id_operating_system`';
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
protected function getData($layers)
|
||||
{
|
||||
$result = Db::getInstance(_PS_USE_SQL_SLAVE_)->ExecuteS($this->_query.$this->getDate().$this->_query2);
|
||||
$this->_values = array();
|
||||
$i = 0;
|
||||
foreach ($result as $row)
|
||||
{
|
||||
$this->_values[$i] = $row['total'];
|
||||
$this->_legend[$i++] = $row['name'];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user