Add-On Version: 1.0.0
Add-On Description:
Addon for phpBB Statistics that will display statistics about NV Who was here? by nickvergessen:
- Total visited users
- Total visited Registered Users
- Total visited Guests
- Total visited Bots
- Total visited Hidden Users
- Total visits
- Number of visited Users (per defined timeframe)
- Number of visited Registered Users (per defined timeframe)
- Number of visited Guests (per defined timeframe)
- Number of visited Bots (per defined timeframe)
- Number of visited Hidden Users (per defined timeframe)
- Visits by day time
- Top 10 users (by visits)
Add-On Requirements: phpBB Statistics 1.0.2(Download) & NV Who was here? 1.0.2 by nickvergessen(Download)
Add-On Author: Marc Alexander
phpBB Version: 3.0.7-PL1
phpBB Styles: prosilver
Languages: English, German
Anleitung / Instructions:
- [+] Anleitung - DE
- Lade das Archiv herunter und extrahiere es. Lade alle Dateien und Ordner innerhalb des root Verzeichnisses in dein Foren Hauptverzeichnis hoch.
Öffne includes/functions_wwh.php
Finde:- Code: Alles auswählen
function update_who_was_here_session ()
{
global $phpbb_root_path, $db, $user;
if ($user->data['user_id'] != ANONYMOUS)
{
Danach einfügen:- Code: Alles auswählen
/*
* phpBB Statistics - NV Who was here? Add-On
* by Marc Alexander (c) 2010
*/
global $table_prefix;
if (!defined('STATS_WWH_TABLE'))
{
define('STATS_WWH_TABLE', $table_prefix . 'stats_wwh');
}
$db->sql_return_on_error(true); // I don't care if it's a duplicate and the user doesn't care
$sql = 'INSERT INTO ' . STATS_WWH_TABLE . ' ' . $db->sql_build_array('INSERT', array(
'name' => (int) time(),
'data' => (int) $user->data['user_id']));
$db->sql_query($sql);
$db->sql_return_on_error(false);
// NV Who was here? Add-On -- END --
Finde:- Code: Alles auswählen
else
{
$timestamp_cleaning = $timestamp - ((3600 * $config['wwh_del_time_h']) + (60 * $config['wwh_del_time_m']) + $config['wwh_del_time_s']);
}
if ((!isset($config['wwh_last_clean']) || ($config['wwh_last_clean'] != $timestamp_cleaning)) || !$config['wwh_version'])
{
Danach einfügen:- Code: Alles auswählen
/*
* phpBB Statistics - NV Who was here? Add-On
* by Marc Alexander (c) 2010
*/
global $table_prefix;
define('STATS_WWH_TABLE', $table_prefix . 'stats_wwh');
$sql = 'SELECT name, data
FROM ' . STATS_WWH_TABLE . "
WHERE name = 'last_purge'";
$result = $db->sql_query($sql);
$last_purge = $db->sql_fetchfield('data');
if($config['wwh_version'] || ($last_purge <= $timestamp_cleaning))
{
$wwh_count_total = $wwh_count_reg = $wwh_count_guests = $wwh_count_bot = $wwh_count_hidden = 0;
$user_id_ary = array();
$sql = 'SELECT user_id, user_type, viewonline
FROM ' . WWH_TABLE . "
ORDER BY user_id ASC";
$result = $db->sql_query($sql);
while ($row = $db->sql_fetchrow($result))
{
if (!in_array($row['user_id'], $user_id_ary))
{
// At the end let's count them =)
if ($row['user_id'] == ANONYMOUS)
{
++$wwh_count_guests;
}
else if ($row['user_type'] == USER_IGNORE)
{
++$wwh_count_bot;
}
else if ($row['viewonline'] == 1)
{
++$wwh_count_reg;
}
else
{
++$wwh_count_hidden;
}
++$wwh_count_total;
}
}
$db->sql_freeresult($result);
$insert_var = $wwh_count_total . ',' . $wwh_count_reg . ',' . $wwh_count_guests . ',' . $wwh_count_bot . ',' . $wwh_count_hidden;
$sql = 'INSERT INTO ' . STATS_WWH_TABLE . ' ' . $db->sql_build_array('INSERT', array(
'name' => (int) time(),
'data' => $db->sql_escape($insert_var)));
$db->sql_query($sql);
$sql = 'UPDATE ' . STATS_WWH_TABLE . ' SET data = ' . time() . " WHERE name = 'last_purge'";
$result = $db->sql_query($sql);
if(!$db->sql_affectedrows($result))
{
$sql = 'INSERT INTO ' . STATS_WWH_TABLE . " (name, data) VALUES('last_purge', '" . time() . "');";
$db->sql_query($sql);
}
$db->sql_freeresult($sql);
}
// NV Who was here? Add-On -- END --
Danach folge einfach dem folgenden How To:
viewtopic.php?f=23&t=112&p=569#p569
- [+] Instructions - EN
- Download the Archive and extract it. Upload all files and folders inside the root folder to your forum root.
Open includes/functions_wwh.php
Find:- Code: Alles auswählen
function update_who_was_here_session ()
{
global $phpbb_root_path, $db, $user;
if ($user->data['user_id'] != ANONYMOUS)
{
Add after:- Code: Alles auswählen
/*
* phpBB Statistics - NV Who was here? Add-On
* by Marc Alexander (c) 2010
*/
global $table_prefix;
if (!defined('STATS_WWH_TABLE'))
{
define('STATS_WWH_TABLE', $table_prefix . 'stats_wwh');
}
$db->sql_return_on_error(true); // I don't care if it's a duplicate and the user doesn't care
$sql = 'INSERT INTO ' . STATS_WWH_TABLE . ' ' . $db->sql_build_array('INSERT', array(
'name' => (int) time(),
'data' => (int) $user->data['user_id']));
$db->sql_query($sql);
$db->sql_return_on_error(false);
// NV Who was here? Add-On -- END --
Find:- Code: Alles auswählen
else
{
$timestamp_cleaning = $timestamp - ((3600 * $config['wwh_del_time_h']) + (60 * $config['wwh_del_time_m']) + $config['wwh_del_time_s']);
}
if ((!isset($config['wwh_last_clean']) || ($config['wwh_last_clean'] != $timestamp_cleaning)) || !$config['wwh_version'])
{
Add after:- Code: Alles auswählen
/*
* phpBB Statistics - NV Who was here? Add-On
* by Marc Alexander (c) 2010
*/
global $table_prefix;
define('STATS_WWH_TABLE', $table_prefix . 'stats_wwh');
$sql = 'SELECT name, data
FROM ' . STATS_WWH_TABLE . "
WHERE name = 'last_purge'";
$result = $db->sql_query($sql);
$last_purge = $db->sql_fetchfield('data');
if($config['wwh_version'] || ($last_purge <= $timestamp_cleaning))
{
$wwh_count_total = $wwh_count_reg = $wwh_count_guests = $wwh_count_bot = $wwh_count_hidden = 0;
$user_id_ary = array();
$sql = 'SELECT user_id, user_type, viewonline
FROM ' . WWH_TABLE . "
ORDER BY user_id ASC";
$result = $db->sql_query($sql);
while ($row = $db->sql_fetchrow($result))
{
if (!in_array($row['user_id'], $user_id_ary))
{
// At the end let's count them =)
if ($row['user_id'] == ANONYMOUS)
{
++$wwh_count_guests;
}
else if ($row['user_type'] == USER_IGNORE)
{
++$wwh_count_bot;
}
else if ($row['viewonline'] == 1)
{
++$wwh_count_reg;
}
else
{
++$wwh_count_hidden;
}
++$wwh_count_total;
}
}
$db->sql_freeresult($result);
$insert_var = $wwh_count_total . ',' . $wwh_count_reg . ',' . $wwh_count_guests . ',' . $wwh_count_bot . ',' . $wwh_count_hidden;
$sql = 'INSERT INTO ' . STATS_WWH_TABLE . ' ' . $db->sql_build_array('INSERT', array(
'name' => (int) time(),
'data' => $db->sql_escape($insert_var)));
$db->sql_query($sql);
$sql = 'UPDATE ' . STATS_WWH_TABLE . ' SET data = ' . time() . " WHERE name = 'last_purge'";
$result = $db->sql_query($sql);
if(!$db->sql_affectedrows($result))
{
$sql = 'INSERT INTO ' . STATS_WWH_TABLE . " (name, data) VALUES('last_purge', '" . time() . "');";
$db->sql_query($sql);
}
$db->sql_freeresult($sql);
}
// NV Who was here? Add-On -- END --
After that follow the instructions on how to add an Add-On:
viewtopic.php?f=23&t=115&p=572#p572
Download:
nv_wwh_addon_1.0.0.zip




