http://lezzetler.com/
ustte linkini verdiğim forumda..
Kimler Çevrimiçi bolumunde fi tarihinden beri forumların toplam ziyaret sayısı:xxxxx kadar
degeri veriyor bunun modulunu bulabilirmiyiz..
#############################################################
## MOD Title: Simple Visitor Counter
## MOD Author: rudi1234 (Rudi Niemeijer) www.testforum.nl
## MOD Description: This mod places an extra line in the 'Who is Online' box containing the number of visitors and avg. visitors per day
## MOD Version: 0.0.1
##
## Installation Level: (Intermediate)
## Installation Time: 15 Minutes
## Files To Edit: sessions.php, lang_english.php (and any other supported language files), functions.php, index_body.tpl, page_header.php
## Included Files: n/a
## Extra table: login_data
##############################################################
## For Security Purposes, Please Check: http://www.phpbb.com/mods/ for the
## latest version of this MOD. Downloading this MOD from other sites could cause malicious code
## to enter into your phpBB Forum. As such, phpBB will not offer support for MOD's not offered
## in our MOD-Database, located at: http://www.phpbb.com/mods/
##############################################################
## Author Notes:
## This mod involves creating a new table.
##
##############################################################
## MOD History:
##
## 2003-09-24 - Version 0.0.2
## - added table name VISITS_TABLE to constants.php
## - replaced use of table name in MOD with constant
## - Added 'As' keyword to SQL syntax to comply with ANSI-SQL
## - changed MOD instructions slightly to comply with MOD rules
## 2003-09-23 - Version 0.0.1
## - first working version
##
##############################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
## THIS MOD IS BETA, DON'T USE IT ON A PRODUCTION BOARD
##############################################################
#
#-----[ CREATE TABLE ]----------------------------------------
#
CREATE TABLE visits (
visit_start INT(11) NOT NULL,
visit_user_id MEDIUMINT(8) NOT NULL
);
#
#-----[ OPEN ]------------------------------------------------
#
/includes/constants.php
#
#-----[ FIND ]------------------------------------------------
#
define('VOTE_USERS_TABLE', $table_prefix.'vote_voters');
#
#-----[ ADD AFTER ]-------------------------------------------
#
define('VISITS_TABLE', 'visits');
#
#-----[ OPEN ]------------------------------------------------
#
/includes/session.php
#
#-----[ FIND ]------------------------------------------------
#
$userdata['session_id'] = $session_id;
$userdata['session_ip'] = $user_ip;
#
#-----[ ADD BEFORE ]------------------------------------------
#
$sql = "INSERT INTO " . VISITS_TABLE . "
(visit_start, visit_user_id)
VALUES ($current_time, $user_id)";
if ( !$db->sql_query($sql) )
{
message_die(CRITICAL_ERROR, 'Error creating visit record', '', __LINE__, __FILE__, $sql);
}
#
#-----[ OPEN ]------------------------------------------------
#
\language\lang_english\lang_main.php (and all other languages your board supports)
#
#-----[ FIND ]------------------------------------------------
#
$lang['Record_online_users'] =
#
#-----[ ADD AFTER ]-------------------------------------------
#
$lang['Total_visitors'] = 'We had <b>%s</b> users visiting since %s (on average %s per day)'; //first %s is total hits, second %s is date board started, third is avg/day.
#
#-----[ OPEN ]------------------------------------------------
#
/includes/functions.php
#
#-----[ FIND ]------------------------------------------------
#
function get_db_stat($mode)
{
global $db;
switch( $mode )
{
#
#-----[ ADD AFTER ]-------------------------------------------
#
case 'num_visitors':
$sql = "SELECT COUNT(*) AS visitors
FROM " . VISITS_TABLE;
break;
#
#-----[ FIND ]------------------------------------------------
#
case 'usercount':
return $row['total'];
break;
#
#-----[ ADD BEFORE ]------------------------------------------
#
case 'num_visitors':
return $row['visitors'];
break;
#
#-----[ OPEN ]------------------------------------------------
#
/templates/subSilver/index_body.tpl (and/or any other template your board supports)
#
#-----[ FIND ]------------------------------------------------
#
<br />{NEWEST_USER}
#
#-----[ ADD BEFORE ]------------------------------------------
#
<br />{TOTAL_VISITORS}
#
#-----[ OPEN ]------------------------------------------------
#
/includes/page_header.php
#
#-----[ FIND ]------------------------------------------------
#
$template->assign_vars(array(
#
#-----[ ADD BEFORE ]------------------------------------------
#
$visitcount = get_db_stat('num_visitors');
$boarddays = ( time() - $board_config['board_startdate'] ) / 86400;
$visitsperday = $visitcount / $boarddays;
#
#-----[ FIND ]------------------------------------------------
#
$template->assign_vars(array(
#
#-----[ ADD AFTER ]-------------------------------------------
#
'TOTAL_VISITORS' => sprintf($lang['Total_visitors'], $visitcount, create_date($board_config['default_dateformat'], $board_config['board_startdate'], $board_config['board_timezone']), sprintf("%.1f", $visitsperday)),
#
#-----[ SAVE/CLOSE ALL FILES ]--------------------------------
#
# EoM
Bu forumu görüntüleyenler: Kayıtlı kullanıcı yok ve 0 misafir