sanırım beni yanlış anladım arkadaşım kusura bakma
benim istediğim mesela istatistikler kısmında
Arama Motoru Ziyaretleri :
Google:5216 Msn:266 Yahoo:286 Looksmart:90 GigaBlast:3 Ask Jeeves:1 InfoSeek:1 Excite:1 Lycos:1
yani google kaç kere gelmiş taramış siteyi yahoo vs vs
yani :
[syntax="php"]
##############################################################
# Mod Name : Web Crawlers Counter
# Description : Puts web crawler bot stats onto your portal and index pages.
# Version : phpBB XTreme / phpBB2 / phpBB2 plus
# Author : oc5iD ( XTreme Mods )
# Email :
admin@on-irc.net# Support :
http://www.on-irc.net/forum#
# Files to edit : 6 - /includes/page_header.php
# - /language/lang_english/lang_main.php
# - /templates/XXX/portal_body.tpl
# - /templates/XXX/index_body_plus.tpl
# - /portal.php
# - /index.php
#
# Included Files : 2 - /install/webcrawl_db_update.php
# - /install/webcrawl_install.sql
#
#
# Installation Time : 10 Minutes
##############################################################
# HISTORY:
#
# 08/01/05 v1.0 Public Release
# 10/01/05 v1.1 Fixed the double entries for Google / Yahoo
#
##############################################################
# AUTHOR NOTES : Please backup your phpBB forum before adding any MOD!
# This mod is only available on
www.phpbbhacks.com &
#
www.on-irc.net So please DO NOT post this mod on any other
# webstite without asking the authors permission.
#
# DO NOT Email me for support or mod requests. If you want
# support, or a mod request, please use our support forum.
#
http://www.on-irc.net/forum##############################################################
# I recommend you use the auto DB update file, /install/webcrawl_db_update.php
#
# Upload the /install folder to your website, and run the following fole as ADMIN
#
#
http://www.your-domain.com/xxx/install/ ... update.php#
# Or, below is the manual SQL commands.
#
##############################################################
INSERT INTO phpbb_config (config_name, config_value) VALUES ('msn_visit_counter', '1');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('yahoo_visit_counter', '1');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('jeeves_visit_counter', '1');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('yahoo_visit_counter', '1');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('excite_visit_counter', '1');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('infoseek_visit_counter', '1');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('lycos_visit_counter', '1');
##############################################################
OK, Now to edit the files:
###########################
OPEN index_body_plus.tpl
#
# -------- [ FIND & DELETE ] ------------------
#
{GOOGLE_VISIT_COUNTER}<br />
#
# -------- [ FIND ] -----------
#
<td align="center" class="row1"><span class="gensmall">{COLOR_GROUPS_LIST}</span></td>
</tr>
</table>
#
# -------- [ AFTER ADD ] --------------
#
<table width="100%" cellpadding="3" cellspacing="1" border="0" align="center" class="forumline">
<tr>
<th>{L_WEB_CRAWLERS}</th>
</tr>
<tr>
<td class="row1" width="100%">
<p align="center"><span class="gen">
{GOOGLE_VISIT_COUNTER}<br />
{MSN_VISIT_COUNTER}<br />
{YAHOO_VISIT_COUNTER}<br />
{JEEVES_VISIT_COUNTER}<br />
{INFOSEEK_VISIT_COUNTER}<br />
{EXCITE_VISIT_COUNTER} <br />
{LYCOS_VISIT_COUNTER}
</span></td>
</table>
#
# ---------- [ SAVE AND CLOSE ] -------------
#
OPEN /language/lang_english/lang_main.php
#
# ----------- [ FIND ] ---------------------
#
// Google Visit Counter Mod
$lang['Google_Visit_counter'] = 'Google visits: <b>%d</b>';
#
# ------------ [ REPLACE WITH ] ---------------
#
// XTreme Mods Web Crawler Counter Mod
$lang['web_crawlers'] = 'Web Crawlers';
$lang['Google_Visit_counter'] = 'Google visits: <b>%d</b>';
$lang['MSN_Visit_counter'] = 'MSN visits: <b>%d</b>';
$lang['Yahoo_Visit_counter'] = 'Yahoo visits: <b>%d</b>';
$lang['Jeeves_Visit_counter'] = 'Ask Jeeves visits: <b>%d</b>';
$lang['Excite_Visit_counter'] = 'Excite visits: <b>%d</b>';
$lang['InfoSeek_Visit_counter'] = 'InfoSeek visits: <b>%d</b>';
$lang['Lycos_Visit_counter'] = 'Lycos visits: <b>%d</b>';
#
# ---------- [ SAVE AND CLOSE ] -------------
#
OPEN /includes/page_header.php
#
# ----------- [ FIND ] ---------------------
#
'GOOGLE_VISIT_COUNTER' => sprintf($lang['Google_Visit_counter'], $google_visit_counter),
#
# ------------ [ REPLACE WITH ] ---------------
#
'GOOGLE_VISIT_COUNTER' => sprintf($lang['Google_Visit_counter'], $google_visit_counter),
'MSN_VISIT_COUNTER' => sprintf($lang['MSN_Visit_counter'], $msn_visit_counter),
'JEEVES_VISIT_COUNTER' => sprintf($lang['Jeeves_Visit_counter'], $jeeves_visit_counter),
'YAHOO_VISIT_COUNTER' => sprintf($lang['Yahoo_Visit_counter'], $yahoo_visit_counter),
'EXCITE_VISIT_COUNTER' => sprintf($lang['Excite_Visit_counter'], $excite_visit_counter),
'INFOSEEK_VISIT_COUNTER' => sprintf($lang['InfoSeek_Visit_counter'], $infoseek_visit_counter),
'LYCOS_VISIT_COUNTER' => sprintf($lang['Lycos_Visit_counter'], $lycos_visit_counter),
#
# ----------- [ FIND ] ---------------------
#
// Dr DLP's Google Visit Counter MOD
//
$google_visit_counter = $board_config['google_visit_counter'];
$tmp_list = explode(".", $_SERVER['$REMOTE_ADDR']);
if ( (strstr($HTTP_SERVER_VARS['HTTP_USER_AGENT'] ,'googlebot' )) ||
(strstr($HTTP_SERVER_VARS['HTTP_USER_AGENT'], 'Googlebot')) ||
(strstr($HTTP_SERVER_VARS['HTTP_USER_AGENT'], 'Mediapartners-Google'))
)
{
$sql = "UPDATE " . CONFIG_TABLE . "
SET config_value = '" . ($google_visit_counter + 1) . "'
WHERE config_name = 'google_visit_counter'";
if( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not update google counter information', '', __LINE__, __FILE__, $sql);
}
$google_visit_counter++;
$board_config['google_visit_counter'] = $board_config['google_visit_counter'] +1;
}
#
# ------------ [ REPLACE WITH ] ---------------
#
// XTreme Mods Web Crawler Counter
// Google Bots
$google_visit_counter = $board_config['google_visit_counter'];
$tmp_list = explode(".", $_SERVER['$REMOTE_ADDR']);
if (preg_match("/googlebot/i", $HTTP_SERVER_VARS['HTTP_USER_AGENT'])) {
$sql = "UPDATE " . CONFIG_TABLE . "
SET config_value = '" . ($google_visit_counter + 1) . "'
WHERE config_name = 'google_visit_counter'";
if( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not update google counter information', '', __LINE__, __FILE__, $sql);
}
$google_visit_counter++;
$board_config['google_visit_counter'] = $board_config['google_visit_counter'] +1;
}
// Yahoo Bots
$yahoo_visit_counter = $board_config['yahoo_visit_counter'];
$tmp_list = explode(".", $_SERVER['$REMOTE_ADDR']);
if (preg_match("/yahoo/i", $HTTP_SERVER_VARS['HTTP_USER_AGENT'])) {
$sql = "UPDATE " . CONFIG_TABLE . "
SET config_value = '" . ($yahoo_visit_counter + 1) . "'
WHERE config_name = 'yahoo_visit_counter'";
if( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not update Yahoo counter information', '', __LINE__, __FILE__, $sql);
}
$yahoo_visit_counter++;
$board_config['yahoo_visit_counter'] = $board_config['yahoo_visit_counter'] +1;
}
// MSN Bots
$msn_visit_counter = $board_config['msn_visit_counter'];
$tmp_list = explode(".", $_SERVER['$REMOTE_ADDR']);
if (preg_match("/msnbot/i", $HTTP_SERVER_VARS['HTTP_USER_AGENT'])) {
$sql = "UPDATE " . CONFIG_TABLE . "
SET config_value = '" . ($msn_visit_counter + 1) . "'
WHERE config_name = 'msn_visit_counter'";
if( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not update msn counter information', '', __LINE__, __FILE__, $sql);
}
$msn_visit_counter++;
$board_config['msn_visit_counter'] = $board_config['msn_visit_counter'] +1;
}
// Ask Jeaves Bots
$jeeves_visit_counter = $board_config['jeeves_visit_counter'];
$tmp_list = explode(".", $_SERVER['$REMOTE_ADDR']);
if (preg_match("/Jeeves/i", $HTTP_SERVER_VARS['HTTP_USER_AGENT'])) {
$sql = "UPDATE " . CONFIG_TABLE . "
SET config_value = '" . ($jeeves_visit_counter + 1) . "'
WHERE config_name = 'jeeves_visit_counter'";
if( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not update jeeves counter information', '', __LINE__, __FILE__, $sql);
}
$jeeves_visit_counter++;
$board_config['jeeves_visit_counter'] = $board_config['jeeves_visit_counter'] +1;
}
// Excite Bots
$excite_visit_counter = $board_config['excite_visit_counter'];
$tmp_list = explode(".", $_SERVER['$REMOTE_ADDR']);
if (preg_match("/ArchitextSpider/i", $HTTP_SERVER_VARS['HTTP_USER_AGENT'])) {
$sql = "UPDATE " . CONFIG_TABLE . "
SET config_value = '" . ($excite_visit_counter + 1) . "'
WHERE config_name = 'excite_visit_counter'";
if( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not update Excite counter information', '', __LINE__, __FILE__, $sql);
}
$excite_visit_counter++;
$board_config['excite_visit_counter'] = $board_config['excite_visit_counter'] +1;
}
// InfoSeek Bots
$infoseek_visit_counter = $board_config['infoseek_visit_counter'];
$tmp_list = explode(".", $_SERVER['$REMOTE_ADDR']);
if (preg_match("/UltraSeek/i", $HTTP_SERVER_VARS['HTTP_USER_AGENT'])) {
$sql = "UPDATE " . CONFIG_TABLE . "
SET config_value = '" . ($infoseek_visit_counter + 1) . "'
WHERE config_name = 'infoseek_visit_counter'";
if( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not update InfoSeek counter information', '', __LINE__, __FILE__, $sql);
}
$infoseek_visit_counter++;
$board_config['infoseek_visit_counter'] = $board_config['infoseek_visit_counter'] +1;
}
// Lycos Bots
$lycos_visit_counter = $board_config['lycos_visit_counter'];
$tmp_list = explode(".", $_SERVER['$REMOTE_ADDR']);
if (preg_match("/bos-spider/i", $HTTP_SERVER_VARS['HTTP_USER_AGENT'])) {
$sql = "UPDATE " . CONFIG_TABLE . "
SET config_value = '" . ($lycos_visit_counter + 1) . "'
WHERE config_name = 'lycos_visit_counter'";
if( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not update Lycos counter information', '', __LINE__, __FILE__, $sql);
}
$lycos_visit_counter++;
$board_config['lycos_visit_counter'] = $board_config['lycos_visit_counter'] +1;
}
#
# ---------- [ SAVE AND CLOSE ] -------------
#
OPEN /portal.php
#
# ----------- [ FIND ] ---------------------
#
// End add - Last visit MOD
#
# ----------- [ AFTER ADD ] ---------------------
#
'L_WEB_CRAWLERS' => $lang['web_crawlers'],
#
# ---------- [ SAVE AND CLOSE ] -------------
#
OPEN /index.php
#
# ----------- [ FIND ] ---------------------
#
// End add - Photo Album Block
#
# ----------- [ AFTER ADD ] ---------------------
#
'L_WEB_CRAWLERS' => $lang['web_crawlers'],
#
# ---------- [ SAVE AND CLOSE ] -------------
#
OPEN /templates/XXX/portal_body.tpl
#
# ----------- [ FIND ] ---------------------
#
<!-- END switch_user_logged_out -->
#
# ----------- [ AFTER ADD ] ---------------------
#
<br />
<table width="100%" cellpadding="3" cellspacing="1" border="0" align="center" class="forumline">
<tr>
<th>{L_WEB_CRAWLERS}</th>
</tr>
<tr>
<td class="row1" width="100%">
<p align="center"><span class="gen">
{GOOGLE_VISIT_COUNTER}<br />
{MSN_VISIT_COUNTER}<br />
{YAHOO_VISIT_COUNTER}<br />
{JEEVES_VISIT_COUNTER}<br />
{INFOSEEK_VISIT_COUNTER}<br />
{EXCITE_VISIT_COUNTER} <br />
{LYCOS_VISIT_COUNTER}
</span></td>
</table>
<br />
#
# ---------- [ SAVE AND CLOSE ] -------------
#
## THATS ALL FOLKS! UPLOAD ALL YOUR MODDED FILES TO THE CORRECT PLACES##
[/syntax]