Lida 23377 vezes
Olá a todos,A melhor forma de analisar os visitantes únicos e páginas vistas muito próximas do valor real é usar o www.alexa.comExemplo do euromilhoes.comhttp://www.alexa.com/data/details/traffic_details?q=&url=www.euromilhoes.com
http://www.webtuga.com/modules.php?name=Statistics&op=StatsNada como o phpnuke com o modulo Statistics!eheh
aprveito o tópico e seu tema para perguntar uma koisa, onde arranjo um contador em php para o fórum??
################################################################ Title: Visit Counter by pukapuka## Version: 1.0.1## Author: pukapuka <pukalite@gmail.com>## Description:## Just count the visit of the board. Total visits and Today visits are stored in db.## Promotes from Text based Visit Counter of Smartor <smartor_xp@hotmail.com>## Counter settings can be changed in admin control panel.## This Version is tested and works with phpBB 2.0.15#### Installation Level: Easy## Installation Time: 5 Minutes## Files To Edit (3+):## includes/page_header.php## language/lang_english/lang_main.php## language/lang_englist/lang_admin.php## and all the files you want the counter appears#### Included Files (2):## admin/admin_visit_counter.php## templates/subSilver/admin/visit_counter_body.tpl################################################################## Revision History:## v1.0.1 09/05/2005## - fix in counting today visitors## - fix some silly errors## v1.0.0 21/03/2005## - Initial Release################################################################## Author Note## - Demo location: http://www.lazyphp.net## - For any concerns please contact me at http://www.lazyphp.net## - For security purposes, please check http://www.lazyphp.net or http://phpbbhacks.com for the## latest version of this MOD. Downloading this MOD from other sites could cause malicious code## to enter into your phpBB forum## - This MOD is released under the GPL License################################################################## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD################################################################-----[ COPY/UPLOAD ]---------------------------------------------#All distributed files to their respective location (the directory structure is in the folder root)##-----[ DATABASE UPDATE ]---------------------------------------------# Replace phpbb_ with your table prefix#INSERT INTO phpbb_config (config_name, config_value) VALUES ('visit_counter_active', '0');INSERT INTO phpbb_config (config_name, config_value) VALUES ('total_visit', '0');INSERT INTO phpbb_config (config_name, config_value) VALUES ('today_visit', '0');INSERT INTO phpbb_config (config_name, config_value) VALUES ('visit_counter_begin', UNIX_TIMESTAMP());INSERT INTO phpbb_config (config_name, config_value) VALUES ('visit_counter_tomorrow', '');##-----[ OPEN ]---------------------------------------------#language/lang_english/lang_main.php##-----[ FIND ]---------------------------------------------#//// That's all, Folks!##-----[ BEFORE, ADD ]--------------------------------------#//// visit Counter by pukapuka//$lang['Total_Visit'] = 'This board has <b>%d</b> visitors in total since <b>%s</b>';$lang['Today_Visit'] = 'Today <b>%s</b> has <b>%d</b> visitors';##-----[ OPEN ]---------------------------------------------#language/lang_english/lang_admin.php##-----[ FIND ]---------------------------------------------#//// That's all Folks!##-----[ BEFORE, ADD ]--------------------------------------#//// visit counter by pukapuka//$lang['Visit_Counter'] = 'Visit Counter';$lang['Visit_Counter_Explain'] = '';$lang['Visit_Counter_Settings'] = 'Settings';$lang['VS_Active'] = 'Active';$lang['VS_Total_Visit'] = 'Total Visit';$lang['VS_From'] = 'From';$lang['Day'] = 'Day';$lang['Month'] = 'Month';$lang['Year'] = 'Year';$lang['Select_Day'] = 'Select Day';$lang['Select_Month'] = 'Select Month';##-----[ OPEN ]---------------------------------------------#includes/page_header.php##-----[ FIND ]---------------------------------------------#$template->pparse('overall_header');##-----[ BEFORE, ADD ]--------------------------------------#//// visit counter by pukapuka//if ($board_config['visit_counter_active']){ $total_visit = $board_config['total_visit']; $today_visit = $board_config['today_visit']; $day = 60 * 60 * 24; $visit_counter_tomorrow = empty($board_config['visit_counter_tomorrow']) ? (intval(time() / $day) + 1) * $day : $board_config['visit_counter_tomorrow']; if ($userdata['session_start'] >= (time() - 1)) { $total_visit++; $sql = "UPDATE " . CONFIG_TABLE ." SET config_value='" .$total_visit ."' WHERE config_name='total_visit'"; if( !($result = $db->sql_query($sql)) ) { message_die(GENERAL_ERROR, 'Could not update counter information', '', __LINE__, __FILE__, $sql); } if ($userdata['session_start'] < $visit_counter_tomorrow) { $today_visit++; } else { $today_visit = 1; $sql = "UPDATE " . CONFIG_TABLE ." SET config_value='" .(intval(time() / $day) + 1) * $day ."' WHERE config_name='visit_counter_tomorrow'"; if( !($result = $db->sql_query($sql)) ) { message_die(GENERAL_ERROR, 'Could not update counter information', '', __LINE__, __FILE__, $sql); } } $sql = "UPDATE " . CONFIG_TABLE . " SET config_value = '" .$today_visit ."' WHERE config_name = 'today_visit'"; if( !($result = $db->sql_query($sql)) ) { message_die(GENERAL_ERROR, 'Could not update counter information', '', __LINE__, __FILE__, $sql); } } $template->assign_block_vars('counter', array( "TOTAL_VISIT" => sprintf($lang['Total_Visit'], $total_visit, create_date('jS F Y', $board_config['visit_counter_begin'], $board_config['board_timezone'])), "TODAY_VISIT" => sprintf($lang['Today_Visit'], create_date('jS F Y', time(), $board_config['board_timezone']), $today_visit) ));}################################################################ Now, u can add the below code into any pages that u want the counter displays## <!-- BEGIN counter --> {counter.TOTAL_VISIT}<br />{counter.TODAY_VISIT} <!-- END counter -->## Follow Example: templates/subSilver/ index_body.tpl################################################################-----[ OPEN ]---------------------------------------------#templates/subSilver/index_body.tpl##-----[ FIND ]---------------------------------------------#<td class="row1" align="center" valign="middle" rowspan="2"><img src="templates/subSilver/images/whosonline.gif" alt="{L_WHO_IS_ONLINE}" /></td>##-----[ REPLACE BY ]---------------------------------------------#<td class="row1" align="center" valign="middle" rowspan="3"><img src="templates/subSilver/images/whosonline.gif" alt="{L_WHO_IS_ONLINE}" /></td>##-----[ FIND ]---------------------------------------------# <td class="row1" align="left"><span class="gensmall">{TOTAL_USERS_ONLINE} [ {L_WHOSONLINE_ADMIN} ] [ {L_WHOSONLINE_MOD} ]<br />{RECORD_USERS}<br />{LOGGED_IN_USER_LIST}</span></td> </tr>##-----[ AFTER, ADD ]--------------------------------------# <!-- BEGIN counter --> <tr> <td class="row1" align="left"><span class="gensmall">{counter.TOTAL_VISIT}<br />{counter.TODAY_VISIT}</span></td> </tr> <!-- END counter -->##-----[ SAVE/CLOSE ALL FILES ]------------------------------------------## EoM
Domínios
AdSense