Board Statistics

Frågor kring MODdar (modifikationer) för phpBB 2.0.x.

Moderatorer: Moderatorgrupp, Supportgrupp

fara
Gammal medlem
Gammal medlem
Inlägg: 90
Blev medlem: 2005-08-21 17:37
Svar: 0

Board Statistics

Inlägg av fara »

Hej!
#
# Now we want to create the tables, therefore we run mod_table_inst.php (http://www.yoursite.com/phpBB2/mod_table_inst.php)
#
Jag får detta felmeddelande:
Warning: mysql_connect(): Access denied for user: 'AAFIKLB_MYSQL@ws12.surf-town.net' (Using password: NO) in /hsphere/local/home/aafiklbw/macarabia.net/forum/db/mysql4.php on line 48

Warning: mysql_error(): supplied argument is not a valid MySQL-Link resource in /hsphere/local/home/aafiklbw/macarabia.net/forum/db/mysql4.php on line 330

Warning: mysql_errno(): supplied argument is not a valid MySQL-Link resource in /hsphere/local/home/aafiklbw/macarabia.net/forum/db/mysql4.php on line 331
phpBB : Critical Error

Could not connect to the database

Kod: Markera allt

#################################################################
## Mod Title:    Board Statistics
## Mod Version:  2.1.5
## Mod Author: Acyd Burn < acyd.burn@gmx.de > - Meik Sievertsen ( http://www.opentools.de/board )
## Mod Description:
##	Original Idea and Statistics Mod 2.0.x (c) Nivisec
##
##	(This Description comes from the Original Statistics Mod V2.0.0b, made by Nivisec)
##    The Statistics Mod is a complete statistics core
##    for your phpBB 2 board.
##
##    Unlike the previous 1.x versions, it now does not rely on hard coded
##    statistics, but instead uses modules. Users may enable/disable modules
##    from the admin control panel and they are very easy to install. Just
##    upload the module directory into your statistics module directory that
##    you define in the admin control panel.
##
##    You also now have complete control over what user levels can view each
##    individual module!
##
##    A new nice feature is your ability to define the update period for each
##    module of statistics. If the update period has not arrived, a fast database
##    cached version will be used instead of calculating the complete new set of
##    statistics. Usefull for long query modules and rarely updated statistics modules.
##
##    Active/De-Activate your modules at will inside the admin control panel. You can
##    also place your favorite modules on top of your page. A simple click moves a module
##    up and down.
##
## Installation Level:  easy
## Installation Time:   5-10 Minutes
## Files To Edit:       constants.php
##			templates/subSilver/overall_header.tpl (if you are editing your header)
##			includes/template.php (if you use the file-cache version of the template)
## Included Files:      install.txt  (This file, you don't have to upload it)
##			mod_table_inst.php (Only needed for Installation, after Installation: DELETE the File from your webspace)
##
##                      statistics.php
##			admin/admin_statistics.php
##			includes/functions_stats.php
##			includes/functions_module.php
##			language/lang_english/lang_statistics.php
##			language/lang_german/lang_statistics.php
##			templates/subSilver/statistics.tpl
##			templates/subSilver/admin/stat_config_body.tpl
##			templates/subSilver/admin/stat_edit_module.tpl
##			templates/subSilver/admin/stat_manage_modules.tpl
##                      templates/subSilver/images/icon_mini_statistics.png
##                      stat_modules/*
##
## Complete Dedicated Page: -- OLD Page: http://nivisec.com/mods/statistics_2.php
##			    -- NEW Page: http://www.opentools.de/board (Download Section)
##					 http://www.opentools.de/board/show_modules.php (For Downloading/Uploading Modules)
##
##                          - Download the latest version
##                          - Download more modules
##                          - Submit your own written modules
#################################################################
##
## Author Note:
##
## Make sure you run the mod_table_inst.php to
## add the required tables before installing any other parts.
##
## After it is installed, you should see a new admin control panel
## section to get you started.
## You have to install and activate Modules before you see anything
## within your statistics page.
##
## To access the statistics page, you simply open statistics.php
## after it is uploaded. You may also optionally install the
## extra icon link as instructed below.
##
## Module Authors should read the docs/module_coding_guidelines.html
## or http://www.opentools.de/docs/module_coding_guidelines.html
##
#################################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
#################################################################
##
## VERSION HISTORY
##
## v2.1.5 - 2002-02-05
##	- bugfix: old language layout again allowed.
##	- bugfix: security adjustments to the most active topics, most viewed topics and top attachments modules.
##		if cache was used, users were able to see hidden topics or attachments
##	- bugfix: smilies module adjusted, now only one method is really allowed (smilepref to 0)
##	- more little bugfixes
##
## v2.1.4 - 2002-12-01
##	- fixed bug: Smilies Module (should be more time intensive but 'very' accurate)
##	- fixed bug: Condition setting within Top Downloaded Attachments Module
##	- Added install-switch to the module info parser (no need to parse some things on statistics page generation)
##	- fixed bug: Admin page Module Preview
##	- fixed some template issues
##	- module loop changed to be more stable through the page generation.
##	- fixed bug: escaping single quotes
##	- fixed templates (row colors) for nearly all provided modules
##	- Old Modules (Those from Statistics Mod Versions prior or equal Version 2.1.2 will not work... you are receiving an error now)
##		All Module Authors should upgrade their Modules to be Version 2.1.3/2.1.4 compatible.
##	- Other minor bugfixes not mentioned here
##
## v2.1.3 - 2002-11-11
##	- fixed bug: caching screws up themes and language variables
##	- speed increasements
##	- fixed issues with Admin Language Part
##	- Re-done the complete caching mechanism
##	- Module Coding Guidelines and Explanation of this new mechanisms: docs/module_coding_guidelines.html
##		or http://www.opentools.de/docs/module_coding_guidelines.html
##	- added a condition setting to the Installation, Module Authors are able to re-check Requirements now
##	- added a setting to check the needed Statistics Mod Version for a Module
##
## v2.1.2
##	- fixed bug: could not set update time back to 0
##	- fixed bug: some issues with Modules that require additional Mods
##			If this was the case, you was unable to uninstall them.
##	- New Multi Language Support added, even cached Versions should be displayed correctly.
##			But be aware if you are writing Modules, only Language Files are 
##			supported, which are defined through the $template->set_vars function.
##	- Added Recommended Update Time to info.txt
##	- Statistics Mod is able to Debug and Recommend a Update Time for you
##	- Automatic Detect and Set of recommended Update Times
##	- You are able to Install&Activate, Activate, Deactivate, Uninstall at the 
##			Module Configuration Page directly.
##	- added a symbolic Link (<a name="<module_id>">) to the statistics Output Page.
##	- added most common used Language Variables to the lang_statistics.php file.
##
## v2.1.1
##	- fixed bug: not able to deactivate Module
##	- fixed bug: not able to uninstall Module
##	- added fix for caching template systems, now all should work just fine with Template Cache File
##	- added uninstaller and update instructions (update.txt)
##
## v2.1.0
##	- Author of the Statistics Mod changed: now Acyd Burn.
##	- New Install File to be more db-safe. :)
##	- Rewrite of the module parser
##		- $template can be used in modules
##		- all things are templated, no prints/echos anymore
##	- Rewrite of the Permissions System (ALL, REG, ADMIN)
##	- Rewrite of the Modules Functions and DB to make it more compatible and db-compliant (added also a module_id)
##	- Rewrite of the Administration Interface (seperated template files)
##	- SQL Install Execution rewritten (a complete schema for all databases now supported, no variables needed. 
##		If the SQL file does not exist, no SQL is executed)
##	- Administrative Statistics (one little bug fixed with most users online stats and integrated AMod Compatibility)
##
##
#################################################################

#
# Here starts the Installation, follow the steps very close.
# After installing this Mod, please go straight to your Administration Panel
# and install and activate Modules. You will see nothing before you have not done so.
#

#
# Copy/Upload all files to their respective Location
#
# statistics.php								-> statistics.php
# admin/admin_statistics.php							-> admin/admin_statistics.php
# includes/functions_stats.php							-> includes/functions_stats.php
# includes/functions_module.php							-> includes/functions_module.php
# templates/subSilver/statistics.tpl						-> templates/subSilver/statistics.tpl
# templates/subSilver/admin/stat_config_body.tpl				-> templates/subSilver/admin/stat_config_body.tpl
# templates/subSilver/admin/stat_edit_module.tpl				-> templates/subSilver/admin/stat_edit_module.tpl
# templates/subSilver/admin/stat_manage_modules.tpl				-> templates/subSilver/admin/stat_manage_modules.tpl
# templates/subSilver/images/icon_mini_statistics.png				-> templates/subSilver/images/icon_mini_statistics.png
# stat_modules/*								-> stat_modules (upload the complete directory and all sub directories)
#

#
# Upload the Language Files (English (German is optional)) provided with the Statistics Mod, located at the language folder
# to your language Directory.
#
# language/lang_english/lang_statistics.php			-> language/lang_english/lang_statistics.php
# 

# 
# Installing the Statistics Mod (First Step -- Database):
#
# Upload this File to your phpBB2 Root Directory (where your config.php file is), it is only needed for installation: 
#	
#	mod_table_inst.php			-> mod_table_inst.php
#

#
# Now we want to create the tables, therefore we run mod_table_inst.php (http://www.yoursite.com/phpBB2/mod_table_inst.php)
# Contact me if you have questions or problems.
#

#
# For Uninstallation:
#	Upload mod_uninst.php			-> mod_uninst.php
#	Run the script and delete it after execution
#

#
# Now you have to alter existing phpBB2 files, read the instructions carefully and make sure you find the right lines.
#

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

#
#-----[ FIND ]------------------------------------------
#
if ( !defined('IN_PHPBB') )
{
	die("Hacking attempt");
}

#
#-----[ AFTER, ADD ]------------------------------------------
#
define('MODULES_TABLE', $table_prefix . 'stats_modules');
define('STATS_CONFIG_TABLE', $table_prefix . 'stats_config');


#-------------------------------------------------------------
# Optional install of tiny link beside Usergroups in header
#-------------------------------------------------------------

#
#-----[ OPEN ]------------------------------------------
#
templates/subSilver/overall_header.tpl

#
#-----[ FIND ]------------------------------------------
#
<td align="center" valign="top" nowrap="nowrap"><span class="mainmenu">&nbsp;<a href="{U_FAQ}" class="mainmenu"><img src="templates/subSilver/images/icon_mini_faq.gif" width="12" height="13" border="0" alt="{L_FAQ}" hspace="3" />{L_FAQ}</a></span><span class="mainmenu">&nbsp; &nbsp;<a href="{U_SEARCH}" class="mainmenu"><img src="templates/subSilver/images/icon_mini_search.gif" width="12" height="13" border="0" alt="{L_SEARCH}" hspace="3" />{L_SEARCH}</a>&nbsp; &nbsp;<a href="{U_MEMBERLIST}" class="mainmenu"><img src="templates/subSilver/images/icon_mini_members.gif" width="12" height="13" border="0" alt="{L_MEMBERLIST}" hspace="3" />{L_MEMBERLIST}</a>&nbsp; &nbsp;<a href="{U_GROUP_CP}" class="mainmenu"><img src="templates/subSilver/images/icon_mini_groups.gif" width="12" height="13" border="0" alt="{L_USERGROUPS}" hspace="3" />{L_USERGROUPS}</a>&nbsp;

#
#-----[ AFTER, ADD ]------------------------------------------
#
&nbsp;<a href="statistics.php" class="mainmenu"><img src="templates/subSilver/images/icon_mini_statistics.png" width="12" height="13" border="0" alt="Statistics" hspace="3" />Statistics</a>&nbsp;

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

#-------------------------------------------------------------
# NOTE: THIS STEP IS ONLY NEEDED IF YOU USE THE FILE-BASED CACHED TEMPLATE.PHP FILE
#
# If you are using the template cache system (only file-based is mentioned here), 
# please adjust your template.php as followed (This will NOT disable the Template Caching)
# It is a little tweak to let the template use the non-cached output if no cached template 
# file could be found.
#-------------------------------------------------------------

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

#
#-----[ FIND ]---------------------------------------------
# around line 144
			$fp = fopen($cache_file, 'w+');
			fwrite ($fp, '<?php' . "\n" . $this->compiled_code[$handle] . "\n?" . '>');

# 
#-----[ REPLACE WITH ]-------------------------------------- 
# 
			$fp = @fopen($cache_file, 'w+');
			if (!$fp)
			{
				eval($this->compiled_code[$handle]);
				return true;
			}
			fwrite ($fp, '<?php' . "\n" . $this->compiled_code[$handle] . "\n?" . '>');

#
#-----[ FIND ]---------------------------------------------
# around line 188
			$fp = fopen($cache_file, 'w+');
			fwrite ($fp, '<?php' . "\n" . $code . "\n?" . '>');

# 
#-----[ REPLACE WITH ]-------------------------------------- 
# 
			$fp = @fopen($cache_file, 'w+');
			if (!$fp)
			{
				$_str = '';
				eval($code);
				$this->assign_var($varname, $_str);
				return true;
			}
			fwrite ($fp, '<?php' . "\n" . $code . "\n?" . '>');


# EoM

Tack på förhand
Bild
Användarens profilbild
Holger
Support - Ledare
Support - Ledare
Inlägg: 6571
Blev medlem: 2004-06-09 09:32
Svar: 1

Inlägg av Holger »

Kan du lägga upp innehållet ur mod_table_inst.php här så ska jag extrahera innehållet (om det går) så att du kan köra det manuellt i phpmyadmin.
Holger Gremminger
Ingen support via PM!
fara
Gammal medlem
Gammal medlem
Inlägg: 90
Blev medlem: 2005-08-21 17:37
Svar: 0

Inlägg av fara »

Tack för hjälpen.

Varsågod

Kod: Markera allt

<?
/***************************************************************************
 *                            mod_table_inst.php
 *                            -------------------
 *   begin                : Sunday, Jan 13, 2002
 *   copyright            : (C) 2002 Meik Sievertsen
 *   email                : acyd.burn@gmx.de
 *
 *   $Id: mod_table_inst.php,v 1.7 2003/02/05 21:45:30 acydburn Exp $
 *
 ***************************************************************************/

/***************************************************************************
 *
 *   This program is free software; you can redistribute it and/or modify
 *   it under the terms of the GNU General Public License as published by
 *   the Free Software Foundation; either version 2 of the License, or
 *   (at your option) any later version.
 *
 ***************************************************************************/

define('IN_PHPBB', true);

$phpbb_root_path = './';
include($phpbb_root_path.'extension.inc');
include($phpbb_root_path.'common.'.$phpEx);	
	
$userdata = session_pagestart($user_ip, PAGE_INDEX);
init_userprefs($userdata);

if ( (!isset($dbms)) || ($dbms == 'oracle') || ($dbms == 'msaccess') )
{
	message_die(GENERAL_ERROR, "This Mod does not support Oracle and MsAccess Databases.");
}

include($phpbb_root_path.'includes/db.'.$phpEx);

//
// Run a complete SQL-Statement, this could be an array
//
function evaluate_statement($sql_query, $hide = FALSE, $replace = FALSE)
{
	global $table_prefix, $remove_remarks, $delimiter, $db;
	
	$errored = FALSE;
	if ($replace)
	{
		$sql_query = preg_replace('/phpbb_/', $table_prefix, $sql_query);
	}

	$sql_query = $remove_remarks($sql_query);
	$sql_query = split_sql_file($sql_query, $delimiter);

	$sql_count = count($sql_query);

	for($i = 0; $i < $sql_count; $i++)
	{
		if (!$hide)
		{
			echo "Running :: " . $sql_query[$i];
		}
		flush();

		if ( !($result = $db->sql_query($sql_query[$i])) )
		{
			$errored = true;
			$error = $db->sql_error();
			if (!$hide)
			{
				echo " -> <b>FAILED</b> ---> <u>" . $error['message'] . "</u><br /><br />\n\n";
			}
		}
		else
		{
			if (!$hide)
			{
				echo " -> <b><span class=\"ok\">COMPLETED</span></b><br /><br />\n\n";
			}
		}
	}

	if ($errored)
	{
		return (FALSE);
	}
	else
	{
		return $result;
	}
}

function fill_new_table_data($dbms)
{
	
	$data = '';

	if ( ($dbms == 'mysql') || ($dbms == 'mysql4') )
	{
		$data = '
CREATE TABLE phpbb_stats_config (
  config_name varchar(50) NOT NULL default \'\',
  config_value varchar(255) NOT NULL default \'\',
  PRIMARY KEY (config_name)
);

CREATE TABLE phpbb_stats_modules (
  module_id tinyint(8) NOT NULL default \'0\',
  name varchar(150) NOT NULL default \'\',
  active tinyint(1) NOT NULL default \'0\',
  installed tinyint(1) NOT NULL default \'0\',
  display_order mediumint(8) unsigned NOT NULL default \'0\',
  update_time mediumint(8) unsigned NOT NULL default \'0\',
  auth_value tinyint(2) NOT NULL default \'0\',
  module_info_cache blob,
  module_db_cache blob,
  module_result_cache blob,
  module_info_time int(10) unsigned NOT NULL default \'0\',
  module_cache_time int(10) unsigned NOT NULL default \'0\',
  PRIMARY KEY (module_id)
);

INSERT INTO phpbb_stats_config (config_name, config_value) VALUES (\'install_date\', \'' . time() . '\');
INSERT INTO phpbb_stats_config (config_name, config_value) VALUES (\'return_limit\', \'10\');
INSERT INTO phpbb_stats_config (config_name, config_value) VALUES (\'version\', \'2.1.5\');
INSERT INTO phpbb_stats_config (config_name, config_value) VALUES (\'modules_dir\', \'stat_modules\');
INSERT INTO phpbb_stats_config (config_name, config_value) VALUES (\'page_views\', \'0\');
';
	}
	else if ( ($dbms == 'mssql') || ($dbms == 'mssql-odbc') )
	{
		$data = '
BEGIN TRANSACTION
GO

CREATE TABLE [phpbb_stats_config] (
	[config_name] [varchar] (50) NOT NULL ,
	[config_value] [varchar] (50) NOT NULL 
) ON [PRIMARY]
GO

ALTER TABLE [phpbb_stats_config] WITH NOCHECK ADD 
	CONSTRAINT [PK_phpbb_stats_config] PRIMARY KEY CLUSTERED 
	(
		[config_name]
	)  ON [PRIMARY] 
GO

CREATE TABLE [phpbb_stats_modules] (
	[module_id] [int] NOT NULL ,
	[name] [char] (150) NOT NULL ,
	[active] [int] NOT NULL,
	[installed] [int] NOT NULL,
	[display_order] [int] NOT NULL,
	[update_time] [int] NOT NULL,
	[auth_value] [int] NOT NULL,
	[module_info_cache] [text],
	[module_db_cache] [text],
	[module_result_cache] [text],
	[module_info_time] [int] NOT NULL,
	[module_cache_time] [int] NOT NULL
) ON [PRIMARY]
GO

ALTER TABLE [phpbb_stats_modules] WITH NOCHECK ADD 
	CONSTRAINT [PK_phpbb_stats_modules] PRIMARY KEY  CLUSTERED 
	(
		[module_id]
	)  ON [PRIMARY] 
GO

ALTER TABLE [phpbb_stats_modules] WITH NOCHECK ADD 
	CONSTRAINT [DF_phpbb_stats_modules_module_id] DEFAULT (0) FOR [module_id],
	CONSTRAINT [DF_phpbb_stats_modules_active] DEFAULT (0) FOR [active],
	CONSTRAINT [DF_phpbb_stats_modules_installed] DEFAULT (0) FOR [installed],
	CONSTRAINT [DF_phpbb_stats_modules_display_order] DEFAULT (0) FOR [display_order],
	CONSTRAINT [DF_phpbb_stats_modules_update_time] DEFAULT (0) FOR [update_time],
	CONSTRAINT [DF_phpbb_stats_modules_auth_value] DEFAULT (0) FOR [auth_value],
	CONSTRAINT [DF_phpbb_stats_modules_module_info_time] DEFAULT (0) FOR [module_info_time],
	CONSTRAINT [DF_phpbb_stats_modules_module_cache_time] DEFAULT (0) FOR [module_cache_time]
GO

INSERT INTO phpbb_stats_config (config_name, config_value) VALUES (\'install_date\', \'' . time() . '\');
INSERT INTO phpbb_stats_config (config_name, config_value) VALUES (\'return_limit\', \'10\');
INSERT INTO phpbb_stats_config (config_name, config_value) VALUES (\'version\', \'2.1.5\');
INSERT INTO phpbb_stats_config (config_name, config_value) VALUES (\'modules_dir\', \'stat_modules\');
INSERT INTO phpbb_stats_config (config_name, config_value) VALUES (\'page_views\', \'0\');

COMMIT
GO
	';
	}
	else if ($dbms == 'postgres')
	{
		$data = '
CREATE TABLE phpbb_stats_config (
   config_name varchar(50) NOT NULL,
   config_value varchar(50) NOT NULL,
   CONSTRAINT phpbb_attachments_config_pkey PRIMARY KEY (config_name)
);

CREATE TABLE phpbb_stats_modules (
  module_id int4 NOT NULL DEFAULT 0,
  name varchar(150) NOT NULL default \'\',
  active int2 NOT NULL default 0,
  installed int2 NOT NULL default 0,
  display_order int4 NOT NULL default 0,
  update_time int4 NOT NULL default 0,
  auth_value int2 NOT NULL default 0,
  module_info_cache text,
  module_db_cache text,
  module_result_cache text,
  module_info_time int4 NOT NULL default 0,
  module_cache_time int4 NOT NULL default 0,
  CONSTRAINT phpbb_stats_modules_pkey PRIMARY KEY (module_id)
);

INSERT INTO phpbb_stats_config (config_name, config_value) VALUES (\'install_date\', \'' . time() . '\');
INSERT INTO phpbb_stats_config (config_name, config_value) VALUES (\'return_limit\', \'10\');
INSERT INTO phpbb_stats_config (config_name, config_value) VALUES (\'version\', \'2.1.5\');
INSERT INTO phpbb_stats_config (config_name, config_value) VALUES (\'modules_dir\', \'stat_modules\');
INSERT INTO phpbb_stats_config (config_name, config_value) VALUES (\'page_views\', \'0\');
';
	}

	return $data;
}

?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;">
<meta http-equiv="Content-Style-Type" content="text/css">
<style type="text/css">
<!--

font,th,td,p,body { font-family: "Courier New", courier; font-size: 11pt }

a:link,a:active,a:visited { color : #006699; }
a:hover		{ text-decoration: underline; color : #DD6900;}

hr	{ height: 0px; border: solid #D1D7DC 0px; border-top-width: 1px;}

.maintitle,h1,h2	{font-weight: bold; font-size: 22px; font-family: "Trebuchet MS",Verdana, Arial, Helvetica, sans-serif; text-decoration: none; line-height : 120%; color : #000000;}

.ok {color:green}

/* Import the fancy styles for IE only (NS4.x doesn't use the @import function) */
@import url("templates/subSilver/formIE.css"); 
-->
</style>
</head>
<body bgcolor="#FFFFFF" text="#000000" link="#006699" vlink="#5584AA">

<table width="100%" border="0" cellspacing="0" cellpadding="10" align="center"> 
	<tr>
		<td><table width="100%" border="0" cellspacing="0" cellpadding="0">
			<tr>
				<td><img src="templates/subSilver/images/logo_phpBB.gif" border="0" alt="Forum Home" vspace="1" /></td>
				<td align="center" width="100%" valign="middle"><span class="maintitle">Installing Statistics Mod Version 2.1.5</span></td>
			</tr>
		</table></td>
	</tr>
</table>

<br clear="all" />

<?

//
// Here we go
//
include($phpbb_root_path.'includes/sql_parse.'.$phpEx);

$available_dbms = array(
	"mysql" => array(
		"DELIM" => ";",
		"DELIM_BASIC" => ";",
		"COMMENTS" => "remove_remarks"
	), 
	"mysql4" => array(
		"DELIM" => ";", 
		"DELIM_BASIC" => ";",
		"COMMENTS" => "remove_remarks"
	),
	"mssql" => array(
		"DELIM" => "GO", 
		"DELIM_BASIC" => ";",
		"COMMENTS" => "remove_comments"
	),
	"mssql-odbc" =>	array(
		"DELIM" => "GO",
		"DELIM_BASIC" => ";",
		"COMMENTS" => "remove_comments"
	),
	"postgres" => array(
		"LABEL" => "PostgreSQL 7.x",
		"DELIM" => ";", 
		"DELIM_BASIC" => ";",
		"COMMENTS" => "remove_comments"
	)
);

$remove_remarks = $available_dbms[$dbms]['COMMENTS'];;
$delimiter = $available_dbms[$dbms]['DELIM']; 
$delimiter_basic = $available_dbms[$dbms]['DELIM_BASIC']; 

$sql_query = fill_new_table_data($dbms);

$result = evaluate_statement($sql_query, false, true);

$message = '';

if ( !$result )
{
	$message .= "<br />Some queries failed. Please contact me via email, pm, at the board or whatever, so we can solve your problems...<br />";
}
else
{
	$message .= "<br />Statistics Mod Tables generated successfully.";
}

echo "\n<br />\n<b>COMPLETE! Go to the Administration Panel and Install Modules. You have to install and activate Modules before you are able to see anything within the statistics page.</b><br />\n";
echo $message . "<br />";
echo "<br /><b>NOW DELETE THIS FILE</b><br />\n";
echo "</body>";
echo "</html>";

?>
Bild
Användarens profilbild
Holger
Support - Ledare
Support - Ledare
Inlägg: 6571
Blev medlem: 2004-06-09 09:32
Svar: 1

Inlägg av Holger »

Vad händer om du kör detta direkt i phpmyadmins SQL-fönster?

Kod: Markera allt

CREATE TABLE phpbb_stats_config ( 
  config_name varchar(50) NOT NULL default '', 
  config_value varchar(255) NOT NULL default '', 
  PRIMARY KEY (config_name) 
); 

CREATE TABLE phpbb_stats_modules (
  module_id tinyint(8) NOT NULL default '0',
  name varchar(150) NOT NULL default '',
  active tinyint(1) NOT NULL default '0',
  installed tinyint(1) NOT NULL default '0',
  display_order mediumint(8) unsigned NOT NULL default '0',
  update_time mediumint(8) unsigned NOT NULL default '0',
  auth_value tinyint(2) NOT NULL default '0',
  module_info_cache blob,
  module_db_cache blob,
  module_result_cache blob,
  module_info_time int(10) unsigned NOT NULL default '0',
  module_cache_time int(10) unsigned NOT NULL default '0',
  PRIMARY KEY (module_id)
);

INSERT INTO phpbb_stats_config (config_name, config_value) VALUES ('install_date', '' . time() . '');
INSERT INTO phpbb_stats_config (config_name, config_value) VALUES ('return_limit', '10');
INSERT INTO phpbb_stats_config (config_name, config_value) VALUES ('version', '2.1.5');
INSERT INTO phpbb_stats_config (config_name, config_value) VALUES ('modules_dir', 'stat_modules');
INSERT INTO phpbb_stats_config (config_name, config_value) VALUES ('page_views', '0');
Senast redigerad av Holger den 2006-02-14 08:54, redigerad totalt 1 gång.
Holger Gremminger
Ingen support via PM!
fara
Gammal medlem
Gammal medlem
Inlägg: 90
Blev medlem: 2005-08-21 17:37
Svar: 0

Inlägg av fara »

TUSEN TACK!

Det är toppen.
Bild
Skriv svar

Vilka är online

Användare som besöker denna kategori: 2 och 0 gäster