ich habe mir folgenden Hack besorgt toplist_hack_1.3.8, ihn eingebaut aber mit der sqldatei stimmt was nicht. Es gibt Fehlermeldungen und ich hab nun schon ganz lange rumprobiert und gegooglet, ich kann die Fehlenden Tabellen einfach nicht richtig einsetzen.
Vielleicht kann mir hier wer weiterhelfen *hoff*
Code: Alles auswählen
<?
/***************************************************************************
* toplist_install.php
* -------------------
* begin : 2003/01/25
* copyright : (C) 2003 Cees-Jan Kiewiet
* email : webmaster@wyrihaximus.net
*
*
***************************************************************************/
/***************************************************************************
*
* 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);
//include($phpbb_root_path . 'includes/functions_selects.'.$phpEx);
include($phpbb_root_path . 'mods/toplist_mod/toplist_common.'.$phpEx);
//
// Start session management
//
$userdata = session_pagestart($user_ip, 0);
init_userprefs($userdata);
//
// End session management
//
if( !$userdata['session_logged_in'] )
{
header('Location: ' . append_sid("login.$phpEx?redirect=toplist_install.$phpEx", true));
}
if( $userdata['user_level'] != ADMIN )
{
message_die(GENERAL_MESSAGE, $lang['Not_Authorised']);
}
$pre_table_list = mysql_list_tables($dbname);
while($row = mysql_fetch_row($pre_table_list))
{
$table_list[] = $row[0];
}
if(in_array("toplist",$table_list))
{
$sql_array[] = "ALTER TABLE toplist RENAME " . TOPLIST_TABLE;
}
elseif(in_array(TOPLIST_TABLE,$table_list))
{
//
// I'm bored I have nothing to do :P
//
}
else
{
$sql_array[] = "CREATE TABLE " . TOPLIST_TABLE . " (id int(255) NOT NULL auto_increment, nam varchar(255) NOT NULL default '', inf varchar(255) NOT NULL default '', " . HIN . " int(255) NOT NULL default '0', lin varchar(255) NOT NULL default '', " . OUT . " int(255) NOT NULL default '0', " . IMG . " int(255) NOT NULL default '0', ban varchar(255) NOT NULL default 'http://', owner int(255) NOT NULL default '0', tot int(255) NOT NULL default '0', imgfile varchar(50) NOT NULL default 'button1', PRIMARY KEY (id)) TYPE=MyISAM";
}
if(!in_array(TOPLIST_ANTI_FLOOD_TABLE,$table_list))
{
$sql_array[] = "CREATE TABLE " . TOPLIST_ANTI_FLOOD_TABLE . " (id INT( 255 ) NOT NULL ,ip VARCHAR( 8 ) NOT NULL ,time INT( 11 ) NOT NULL ,type VARCHAR( 3 ) NOT NULL ) TYPE=MyISAM";
}
$ip_field = false;
$result = $db->sql_query("SHOW FIELDS FROM " . TOPLIST_TABLE);
while($row = $db->sql_fetchrow($result))
{
if($row['Field']=='ip')
{
$ip_field = true;
}
}
if(!$ip_field)
{
$sql_array[] = "ALTER TABLE " . TOPLIST_TABLE . " ADD ip VARCHAR( 8 ) NOT NULL";
}
config_sql('toplist_button_1', '', false);
config_sql('toplist_button_2', '', false);
config_sql('toplist_button_1_l', '', false);
config_sql('toplist_button_2_l', '', false);
config_sql('toplist_imge_dis', 5, false);
config_sql('toplist_view_' . HIN . '_hits', 1, false);
config_sql('toplist_view_' . OUT . '_hits', 1, false);
config_sql('toplist_view_' . IMG . '_hits', 1, false);
config_sql('toplist_dimensions', '', false);
config_sql('toplist_prune_' . IMG . '_hits_interval', 0, false);
config_sql('toplist_prune_' . IMG . '_hits_last', time(), false);
config_sql('toplist_prune_' . HIN . '_hits_interval', 0, false);
config_sql('toplist_prune_' . HIN . '_hits_last', time(), false);
config_sql('toplist_prune_' . OUT . '_hits_interval', 0, false);
config_sql('toplist_prune_' . OUT . '_hits_last', time(), false);
config_sql('toplist_anti_flood_' . OUT . '_hits_interval', 0, false);
config_sql('toplist_anti_flood_' . HIN . '_hits_interval', 0, false);
config_sql('toplist_anti_flood_' . IMG . '_hits_interval', 0, false);
config_sql('toplist_toplist_top10',0, false);
config_sql('toplist_count_hin_hits', 1, false);
config_sql('toplist_count_img_hits', 1, false);
config_sql('toplist_count_out_hits', 1, false);
config_sql('toplist_hin_activation', 0, false);
config_sql('toplist_version', '1.3.8', true);
$sql_count = count($sql_array);
for($i = 0; $i < $sql_count; $i++)
{
$message .= "Running :: " . $sql_array[$i];
if ( !$db->sql_query($sql_array[$i]) )
{
$errored = true;
$error = $db->sql_error();
$message .= " -> <b>FAILED</b> ---> <u>" . $error['message'] . "</u><br /><br />\n\n";
}
else
{
$message .= " -> <b>COMPLETED</b><br /><br />\n\n";
}
}
if( $errored )
{
$message .= "Some of the querys have failed, contact me so I can fix the errors.";
}
else
{
if(@unlink(__FILE__))
{
$message .= (($sql_count==0) ? "No database updates where needed." : " The database has been updated successfully.") . " This file has been deleted.";
}
else
{
$message .= (($sql_count==0) ? "No database updates where needed." : " The database has been updated successfully.") . " This file must be deleted.";
}
}
message_die(GENERAL_MESSAGE, $message);
?>
Es handelt sich um folgendes Forum:
http://www.familybasar.bplaced.de/phpBB2/index.php
dort ist nun auch eine Fehlermeldung zu sehen!
Danke schonmal für die Hilfe