1 頁 (共 1 頁)

[分享]Codecrush IP Log v0.2.6

發表於 : 2003-03-04 17:13
八塊的多多
官方下載點
http://www.codecrush.com/repository/cc_ip_mod026.zip

代碼: 選擇全部

################################################################# 
## Mod Title: Codecrush IP Log 
## Mod Version: 0.2.6 
## Author: Kristoffer Tjaernaas < dar@swirve.com > - www.codecrush.com 
## Description: 
##   This is a simple IP logger, that will log the IP of anyone browsing
##   to your phpbb forums.
##   I created it cause I couldn't find any other IP-tracking utility within
##   phpbb besides the poster_ip. I wanted to keep a log of all visitors
##   not just posters. I tried another IP-mod I found, but it didn't fit my 
##   needs. And so I created this. 
##
##   If there's any requests for further development of this simple mod,
##   visit www.codecrush.com and request it ;)
## 
## Installation Level: moderate 
## Installation Time: 5 Minutes 
## Files To Edit: sessions.php, functions.php, constants.php
## Included Files: admin_ip_log.php, ip_log_body.tpl, csv_ip_log.php, lang_ccip.php, cc_mod.php,
##                 admin_config_ip_log.php, ip_log_config_body.tpl, admin_ip_log_bat.php, ip_log_bat.tpl
################################################################# 
## Security Disclaimer: This MOD Cannot Be Posted To Or Added At Any Non-Official phpBB Sites 
################################################################# 
## 
## Author Note: 
##   You should know how to add a table to your database if you wanna use this mod. 
## 
################################################################# 
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD 
################################################################# 

# 
#-----[ ADD/CREATE DATABASE TABLE ENTRY ]------------------------------------------ 
# 
# Assuming your table-prefix is "phpbb_" (see your config-php)
INSERT INTO phpbb_config( config_name, config_value ) VALUES ("cc_logs_per_page","100");
INSERT INTO phpbb_config( config_name, config_value ) VALUES ("cc_log_on","1");
INSERT INTO phpbb_config( config_name, config_value ) VALUES ("cc_log_stats_on","1");
CREATE TABLE cc_ip_log( log_nr INT UNSIGNED NOT NULL primary key auto_increment, logged TIMESTAMP(14), username VARCHAR(25), user_ip VARCHAR(8), browser VARCHAR(64) );

# 
#-----[ COPY FILES ]------------------------------------------ 
# 
# Copy these files in place (where subXXX is subSilver or whatever templates you're using.): 

admin_ip_log.php -> admin/admin_ip_log.php 
csv_ip_log.php -> admin/csv_ip_log.php
admin_config_ip_log.php -> admin/admin_config_ip_log.php
ip_log_body.tpl -> templates/subXXX/admin/ip_log_body.tpl 
ip_log_config_body.tpl ->templates/subXXX/admin/ip_log_config_body.tpl
admin_ip_log_bat.php -> admin/admin_ip_log_bat.php
ip_log_bat.tpl -> templates/subXXX/admin/ip_log_bat.tpl
lang_ccip.php -> language/lang_english/lang_ccip.php
cc_mod.php -> includes/cc_mod.php

# 
#-----[ OPEN ]------------------------------------------ 
# 
includes/sessions.php

# 
#-----[ FIND ]------------------------------------------ 
# 
// 
// Initial ban check against user id, IP and email address 

# 
#-----[ BEFORE, ADD ]------------------------------------------ 
# 
   // 
   // CC IP-mod ($user_ip is created in common.php) 
   // 
   global  $phpEx, $phpbb_root_path;
   include($phpbb_root_path . 'includes/cc_mod.'.$phpEx);

# 
#-----[ OPEN ]------------------------------------------ 
# 
includes/functions.php

# 
#-----[ FIND ]------------------------------------------ 
# 
function decode_ip($int_ip) 
{ 
$hexipbang = explode('.', chunk_split($int_ip, 2, '.')); 
return hexdec($hexipbang[0]). '.' . hexdec($hexipbang[1]) . '.' . hexdec($hexipbang[2]) . '.' . hexdec($hexipbang[3]); 
} 

# 
#-----[ AFTER, ADD ]------------------------------------------ 
# 
// 
// decode mysql-timestamps 
// 
function mysql_timestamp_to_timestamp($dt) 
{ 
                $yr=strval(substr($dt,0,4)); 
                $mo=strval(substr($dt,4,2)); 
                $da=strval(substr($dt,6,2)); 
                $hr=strval(substr($dt,8,2)); 
                $mi=strval(substr($dt,10,2)); 
                $se=strval(substr($dt,10,2)); 

                return mktime($hr,$mi,$se,$mo,$da,$yr); 
} 


# 
#-----[ OPEN ]------------------------------------------ 
# 
includes/constants.php 

# 
#-----[ FIND ]------------------------------------------ 
# 

// Auth settings 

# 
#-----[ BEFORE, ADD ]------------------------------------------ 
# 
define('PAGE_CSV', -23); 


# 
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------ 
# 
# EoM 
它可以在後台把來訪的會員IP紀錄顯示出來,跟小竹子殿下™發表的<Codecrush IP log mod>很相近,功能有比較強一點!只可惜是英文介面,很多地方我自己也看不懂,不知道有沒有熱心的翻譯官幫忙翻譯?

發表於 : 2004-07-04 01:35
幻狼神威
是一樣的........ :-o

中文化語系(直接覆蓋 lang_ccip.php 這個檔):
[php]
<?PHP
/***************************************************************************
* [正體中文語系] Chinese Traditional Taiwan
* -------------------
* Translated by : LERA, illusion-Rose Studio(http://lerax.sytes.net/)
*
****************************************************************************/

//
// IP Log admin
//
$lang['IP_log_title'] = "IP 記錄管理";
$lang['IP_log_config_title'] = "IP 記錄組態設定";
$lang['IP_log_explain'] = "你可以在這裡檢視連結到討論區的連線。";
$lang['IP_log_config_explain'] = "你可以在這裡設定你的IP 記錄組態。";

$lang['IP_number'] = "#";
$lang['IP_date'] = "日期";
$lang['IP_user'] = "使用者";
$lang['IP_ip'] = "IP";
$lang['IP_browser'] = "瀏覽器";
$lang['IP_referrer'] = "Referrer";
$lang['Delete_ip_log'] = "清除記錄";
$lang['Delete_ip_log_explain'] = "清除所有的連線記錄";
$lang['IP_log_deleted'] = "連線記錄已被清除";
$lang['Csv_ip_log'] = "匯出記錄到 csv";

$lang['IP_select'] = "檢視一個或多個特定使用者的記錄";
$lang['IP_select_free'] = "在這裡輸入使用者的名稱: %s (可以使用 * 萬用字元)";
$lang['IP_select_explain'] = "你可以在你的瀏覽器上以滑鼠搭配鍵盤一次選取並檢視多個使用者的 IP 記錄,或者是";
$lang['IP_select_ip'] = "檢視一個或多個特定 IP 的記錄";
$lang['IP_select_ip_free'] = "在這裡輸入 IP 的位址: %s (每一格皆可以使用 * 萬用字元)";
$lang['IP_select_ip_explain'] = "你可以在你的瀏覽器上以滑鼠搭配鍵盤一次選取並檢視多個不同的 IP 記錄,或者是";

$lang['Browser_stats_title'] = "瀏覽器的版本狀態";
$lang['Browser_stats_title_off'] = "瀏覽器版本狀態的功能已被關閉";
$lang['Browser_stats_explain'] = "此狀態無法包含訪客的資料,也無法顯示有多少使用者在相同的作業系統下使用相同的瀏覽器。";

$lang['IPC_name'] = "選項";
$lang['IPC_value'] = "數值";
$lang['IPC_per_page'] = "每頁的記錄筆數";
$lang['IPC_updated'] = "IP 記綠組態設定已成功的更新!";
$lang['IPC_ON_OFF'] = "開啟 IP 記錄";
$lang['IPC_STATS_ON_OFF'] = "開啟 IP 狀態記錄";

$lang['CSV_explain'] = "csv 是以逗號分隔資料的檔案格式,並且能相容於大部份的試算表程式,例如:MS Excel。你可以將你現在所看到的記錄匯出(下載)成 csv 的檔案格式。假如你沒有指定選擇的使用者或 IP,將會匯出全部的記錄。";

// the database creation stuff
$lang['IP_DB_MNG'] = "Codecrush IP Log - Database Creation and Alteration";
$lang['IP_DB_EXPLAIN'] = "Click away at the buttons! %s When there's no more buttons to click, your database should be prepared and ready for the Codecrush IP Log.";
$lang['IP_log_create'] = "%sCreate the main IP Log table%s";
$lang['IP_log_created'] = "The main IP Log table exists - nothing more todo";
$lang['IP_log_pp_create'] = "%sCreate Database variable for Logs Per Page option%s";
$lang['IP_log_pp_created'] = "The Logs Per Page option exists - nothing more todo";
$lang['IP_log_on_create'] = "%sCreate Database variable for Log ON/OFF option%s";
$lang['IP_log_on_created'] = "The ON/OFF option exists - nothing more todo";
$lang['IP_log_s_on_create'] = "%sCreate Database variable for Stats option%s";
$lang['IP_log_s_on_created'] = "The Stats option exists - nothing more todo";

// the Batcher
$lang['IP_batch_ex'] = "這裡是顯示你要以批次排程取得記錄的 IP 位址";
$lang['IP_batch_D'] = "這裡是顯示::完全相同::的記錄";
$lang['IP_batch_C'] = "這裡是顯示 C net 相同的記錄";
$lang['IP_batch_B'] = "這裡是顯示 B net 相同的記錄";
$lang['IP_batch_h1'] = "指定批次排程的 IP";
$lang['IP_batch_hu'] = "使用者";
$lang['IP_batch_hh'] = "HEX IP";
$lang['IP_batch_hd'] = "DEC IP";
$lang['IP_batch_hn'] = "網路服務";
$lang['IP_batch_title'] = "IP 記錄 - 批次比對功能";
$lang['IP_batch_text'] = "IP 記錄比對功能將依據你所輸入的 IP 位址,從你的記錄中比對出相似的 IP 位址資料。";

?>[/php]
未完....... :oops:
不過那幾個也幾乎用不到....... :P