| |
| |
|
|
|
|
| |
|
| |
|
| :: |
| Author |
Message |
ondriak
Joined: 10 Nov 2007 Posts: 5 Location: Slovakia
|
Posted: Sat Nov 10, 2007 10:45 am Post subject: Help with Google Visit Counter |
|
|
| Code: | ############################################################################
## MOD Ttile : Google Visit Counter
## MOD Author : Dr DLP http://www.web-lapin.levillage.org/forum/
## MOD Description : Adds a google bot visit counter on index
## MOD Version : 1.0.0.
##
## Scripts :
## Google Track : Mojy ( < webmaster@mypsychedelicsite.com > (J.M.)
## http://www.mypsychedelicsite.com ) / Editeur Javascrpit
## Visit Counter : Smartor ( < smartor_xp@hotmail.com > (Hoang Ngoc Tu) http://smartor.is-root.com
##
## Installation level : Easy
## Iinstallation time : 5 Minutes
##
## Files to edit : 3
## -language/lang_french/lang_main.php
## -includes/page_header.php
## -templates/subSilver/index_body.tpl
##
## Files to include : n/a
##
##############################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
#################################################################
#
#------[ SQL ]-------
#
INSERT INTO phpbb_config (config_name, config_value) VALUES ('google_visit_counter', '1');
#
#-----[ OPEN ]----------------------------------------
#
language/lang_english/lang_main.php
#
#-----[ FIND ]-----------------------------------
#
//
// That's all, Folks!
#
#-----[ BEFORE , ADD ]-----------------------------
#
$lang['Google_Visit_counter'] = 'Google has come <b>%d</b> times on this board since september 2003';
#
#-----[ OPEN ]------------------------------------------
#
includes/page_header.php
#
#-----[ FIND ]------------------------------------------
#
//
// Parse and show the overall header.
//
$template->set_filenames(array(
'overall_header' => ( empty($gen_simple_header) ) ? 'overall_header.tpl' : 'simple_header.tpl')
);
#
#-----[ BEFORE , ADD ]-------------------------------------
#
//
// Dr DLP's Google Visit Counter MOD
//
$google_visit_counter = $board_config['google_visit_counter'];
$tmp_list = explode(".", $REMOTE_ADDR);
if (($tmp_list[0] == "64" && $tmp_list[1] == "68" && $tmp_list[2] == "82") || ($tmp_list[0] == "216" && $tmp_list[1] == "239" && $tmp_list[2] == "46"))
{
$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++;
}
// ------------------------------------
//
#
#-----[ FIND ]-------------------------------------------
#
'NAV_LINKS' => $nav_links_html)
#
#-----[ BEFORE , ADD ]------------------------------------
#
// Google Counter MOD
'GOOGLE_VISIT_COUNTER' => sprintf($lang['Google_Visit_counter'], $google_visit_counter),
#
#-----[ OPEN ]---------------------------------
#
templates/subSilver/index_body.tpl
#
#-----[ FIND ]---------------------------------
#
<td class="row1" align="left" width="100%"><span class="gensmall">{TOTAL_POSTS}<br />{TOTAL_USERS}<br />{NEWEST_USER}
#
#-----[ IN-LINE , AFTER , ADD ]-------------------
#
<br />{GOOGLE_VISIT_COUNTER}
#
#-----[ SAVE/CLOSE ALL FILES ]-----------
#
# EoM |
..."visit will not count"  |
|
|
| Back to top |
|
 |
|
 |
dcz Administrateur - Site Admin

Joined: 28 Apr 2006 Posts: 14403
|
Posted: Sat Nov 10, 2007 3:43 pm Post subject: Re: Help with Google Visit Counter |
|
|
Even though this mod looks quite old :
| Quote: | | $lang['Google_Visit_counter'] = 'Google has come <b>%d</b> times on this board since september 2003'; |
There is no reason why it should not work IMHO. It's really simple.
Maybe it's only the tested ip to be outdated.
Try replacing :
| Code: | if (($tmp_list[0] == "64" && $tmp_list[1] == "68" && $tmp_list[2] == "82") || ($tmp_list[0] == "216" && $tmp_list[1] == "239" && $tmp_list[2] == "46"))
{ |
With :
| Code: |
if ($tmp_list[0] == "66" && $tmp_list[1] == "249" )
{ |
To allow a greater range of Google ip.
Do you know of crawltrack ?
Can be a good one to track many bot visits and perform good stats.
++ |
_________________ Useful links :
SEO Forum || SEO Directory || SEO phpBB || SEO phpBB3 || Search
____________________
Liens Utiles :
Forum référencement || Annuaire référencement || Référencement phpBB || Référencement phpBB3 || Recherche |
|
| Back to top |
|
 |
ondriak
Joined: 10 Nov 2007 Posts: 5 Location: Slovakia
|
Posted: Sat Nov 10, 2007 5:52 pm Post subject: Re: Help with Google Visit Counter |
|
|
| dcz wrote: |
Try replacing :
| Code: | if (($tmp_list[0] == "64" && $tmp_list[1] == "68" && $tmp_list[2] == "82") || ($tmp_list[0] == "216" && $tmp_list[1] == "239" && $tmp_list[2] == "46"))
{ |
With :
| Code: |
if ($tmp_list[0] == "66" && $tmp_list[1] == "249" )
{ |
To allow a greater range of Google ip.
|
Thank You ......but your advice didn´t help me  |
|
|
| Back to top |
|
 |
Peter77 phpBB SEO Team


Joined: 10 May 2006 Posts: 512 Location: Michigan
|
Posted: Sun Nov 11, 2007 1:50 am Post subject: Re: Help with Google Visit Counter |
|
|
| Old MOD it is. I remember that I could not make it work with my 2.0.11 dispite serveral solutions found on the net. |
|
|
| Back to top |
|
 |
SeO Administrateur - Site Admin

Joined: 15 Mar 2006 Posts: 3477
|
|
| Back to top |
|
 |
|
|
| Navigation |
Similar Topics |
|
|
|
|
|
|
|
| |
|
|
|
|
| |
|
|
|
|
| |