############################################################## 
## MOD Title: Visit Coutner block for IM Portal 
## MOD Author: masterdavid < masterdavid@users.sourceforge.net > (Ronald John David) 
##             http://phpbbintegramod.sourceforge.net 
## MOD Description:  Visit Counter block for IM Portal
##                   
## MOD Version: 1.0.0
##
## Installation Level: Easy
## Installation Time:  3 Minutes
## Files To Edit:  none
##
## Included Files: blocks_imp_visit_counter.php
##		   lang_visit_counter_block.php
##		   visit_counter_block.tpl
############################################################## 
## Author Notes: Backup first your files and database before proceeding with the installation.
##############################################################
##
## MOD History: 
##
##   2004-05-02 - Version 1.0.0
##	- first release
##
############################################################## 
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD 
##############################################################

# 
#-----[ SQL ]------------------------------------------ 
#
# don't forget to use your own table prefix if you use other than phpbb_

INSERT INTO phpbb_config VALUES ('visit_counter', '0');

# 
#-----[ COPY ]------------------------------------------ 
#

copy blocks_imp_visit_counter.php to blocks/blocks_imp_visit_counter.php
copy lang_visit_counter_block.php to blocks/language/lang_english/lang_visit_counter_block.php
copy visit_counter_block.tpl to templates/YOUR_THEME/blocks/visit_counter_block.tpl

# 
#-----[ OPEN ]------------------------------------------ 
#

includes/page_header.php

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

//
// Parse and show the overall header.
//

# 
#-----[ BEFORE, ADD ]------------------------------------------ 
#

$visit_counter=$board_config['visit_counter'];
$visit_counter++;
$sql = "UPDATE " . CONFIG_TABLE . "
		SET config_value = '" . $visit_counter . "'
		WHERE config_name = 'visit_counter'";
if( !($result = $db->sql_query($sql)) )
{
	message_die(GENERAL_ERROR, 'Could not update counter information', '', __LINE__, __FILE__, $sql);
}

# 
#-----[ OTHERS ]------------------------------------------ 
#

Note: This block can be cached with cache duration according to the frequency of visits to your page.
Block variables used: none

# 
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------ 
# 
# EoM 