renomme Mod - DB Install geht nicht

Du hast Probleme beim Einbau oder bei der Benutzung eines Mods? In diesem Forum bist du richtig.
Forumsregeln
phpBB 2.0 hat das Ende seiner Lebenszeit überschritten
phpBB 2.0 wird nicht mehr aktiv unterstützt. Insbesondere werden - auch bei Sicherheitslücken - keine Patches mehr bereitgestellt. Der Einsatz von phpBB 2.0 erfolgt daher auf eigene Gefahr. Wir empfehlen einen Umstieg auf phpBB 3.0, welches aktiv weiterentwickelt wird und für welches regelmäßig Updates zur Verfügung gestellt werden.
Antworten
Benutzeravatar
ronson
Mitglied
Beiträge: 301
Registriert: 14.04.2005 20:28
Wohnort: Darmstadt

renomme Mod - DB Install geht nicht

Beitrag von ronson »

Hallo Leute,

ich will mir den renommee_reputation Mod einbauen, doch sobaldich die update ausführen will sagt er mir:

phpBB : Kritischer Fehler

Could not connect to the database

Woran liegt das ?

hier der Code...

Code: Alles auswählen

<?php
define('IN_PHPBB', 1);
$phpbb_root_path = './';
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'config.'.$phpEx);
include($phpbb_root_path . 'common.'.$phpEx);
include($phpbb_root_path . 'includes/constants.'.$phpEx);
include($phpbb_root_path . 'includes/db.'.$phpEx);


//
// Start session management
//
$userdata = session_pagestart($user_ip, PAGE_INDEX);
init_userprefs($userdata);
//
// End session management
//

//
//
// Restrict to members:
if( !$userdata['session_logged_in'] )
{
message_die(GENERAL_MESSAGE, $lang['Not_Authorised'], $lang['Not_Authorised']);
exit;
}
//
//

if ( $userdata['user_level'] == ADMIN )
{
}
else
{
message_die(GENERAL_MESSAGE, $lang['Not_Authorised'], $lang['Not_Authorised']);
exit;
}

echo '<html>
<head>
<title>Renommee / Reputation System</title>
</head>
<body>
<h1>Renommee / Reputation System</h1>
<hr />';
if (!isset($HTTP_GET_VARS['install'])) {
echo '<a href="?install=1">Please click here | Bitte hier klicken</a>';
}
else {
$queries = array(


"CREATE TABLE " . $table_prefix . "renommee_konfig (
  name varchar(255) NOT NULL default '',
  wert varchar(255) NOT NULL default ''
) TYPE=MyISAM;",

"INSERT INTO " . $table_prefix . "renommee_konfig VALUES ('standard', '10')",
"INSERT INTO " . $table_prefix . "renommee_konfig VALUES ('undef_text', 'sprengt die Skala')",
"INSERT INTO " . $table_prefix . "renommee_konfig VALUES ('beitrags_anzahl', '10')",
"INSERT INTO " . $table_prefix . "renommee_konfig VALUES ('reg_faktor', '365')",
"INSERT INTO " . $table_prefix . "renommee_konfig VALUES ('beitrags_faktor', '1000')",
"INSERT INTO " . $table_prefix . "renommee_konfig VALUES ('r_punkte_faktor', '100')",
"INSERT INTO " . $table_prefix . "renommee_konfig VALUES ('aktiviert', '1')",
"INSERT INTO " . $table_prefix . "renommee_konfig VALUES ('beitrags_grenze', '50')",
"INSERT INTO " . $table_prefix . "renommee_konfig VALUES ('renommee_grenze', '10')",
"INSERT INTO " . $table_prefix . "renommee_konfig VALUES ('max_bewertungen_tag', '10')",
"INSERT INTO " . $table_prefix . "renommee_konfig VALUES ('bewertungen_gleicher_nutzer', '20')",
"INSERT INTO " . $table_prefix . "renommee_konfig VALUES ('wiederbewertung', '18000')",
"INSERT INTO " . $table_prefix . "renommee_konfig VALUES ('bannen', '50')",
"INSERT INTO " . $table_prefix . "renommee_konfig VALUES ('kommentar_erzwingen', '0')",


"CREATE TABLE " . $table_prefix . "renommee_rangliste (
  id mediumint(8) NOT NULL auto_increment,
  punkte mediumint(8) NOT NULL default '0',
  text text NOT NULL,
  PRIMARY KEY  (id)
) TYPE=MyISAM;",


"INSERT INTO " . $table_prefix . "renommee_rangliste VALUES (1, -999999, 'ist in Verruf geraten')",
"INSERT INTO " . $table_prefix . "renommee_rangliste VALUES (2, -50, 'sollte sich mehr bemühen und Besserung anstreben')",
"INSERT INTO " . $table_prefix . "renommee_rangliste VALUES (3, -10, 'zeigte ein beschämendes Verhalten in der Vergangenheit')",
"INSERT INTO " . $table_prefix . "renommee_rangliste VALUES (4, 0, 'ist zur Zeit noch ein unbeschriebenes Blatt')",
"INSERT INTO " . $table_prefix . "renommee_rangliste VALUES (5, 10, 'befindet sich auf einem aufsteigenden  Ast')",
"INSERT INTO " . $table_prefix . "renommee_rangliste VALUES (6, 50, 'bemüht sich redlich')",
"INSERT INTO " . $table_prefix . "renommee_rangliste VALUES (7, 150, 'ist einfach nett')",
"INSERT INTO " . $table_prefix . "renommee_rangliste VALUES (8, 250, 'ist ein von vielen geschätztes Mitglied des Forums')",
"INSERT INTO " . $table_prefix . "renommee_rangliste VALUES (9, 350, 'sorgt für eine angenehme Atmosphäre')",
"INSERT INTO " . $table_prefix . "renommee_rangliste VALUES (10, 450, 'ist ein Lichtblick')",
"INSERT INTO " . $table_prefix . "renommee_rangliste VALUES (11, 550, 'ist jedem bekannt und macht seine Sache sehr gut')",
"INSERT INTO " . $table_prefix . "renommee_rangliste VALUES (12, 650, 'ist ein Vorbild für andere')",
"INSERT INTO " . $table_prefix . "renommee_rangliste VALUES (13, 1000, 'kann auf vieles stolz sein')",
"INSERT INTO " . $table_prefix . "renommee_rangliste VALUES (14, 1500, 'hat eine strahlende Zukunft vor sich')",
"INSERT INTO " . $table_prefix . "renommee_rangliste VALUES (16, 2000, 'genießt hohes Ansehen')",

"CREATE TABLE " . $table_prefix . "renommee (
  id mediumint(8) NOT NULL auto_increment,
  quell_id mediumint(8) NOT NULL default '0',
  ziel_id mediumint(8) NOT NULL default '0',
  kommentar text NOT NULL,
  datum varchar(255) NOT NULL default '',
  post_id int(255) NOT NULL default '0',
  renommee_wert mediumint(8) NOT NULL default '0',
  PRIMARY KEY  (id)
) TYPE=MyISAM;",

"CREATE TABLE phpbb_renommee_grafik_rangliste (
  id mediumint(8) NOT NULL auto_increment,
  punkte mediumint(8) NOT NULL default '0',
  anzahl mediumint(8) NOT NULL default '0',
  PRIMARY KEY  (id)
) TYPE=MyISAM;",

"INSERT INTO " . $table_prefix . "renommee_grafik_rangliste VALUES (1, 1, 1)",
"INSERT INTO " . $table_prefix . "renommee_grafik_rangliste VALUES (2, 100, 2)",
"INSERT INTO " . $table_prefix . "renommee_grafik_rangliste VALUES (3, 550, 3)",
"INSERT INTO " . $table_prefix . "renommee_grafik_rangliste VALUES (8, 2000, 4)",

"ALTER TABLE `" . $table_prefix . "users` ADD `renommee_gesamt` MEDIUMINT(8) DEFAULT '0' NOT NULL, ADD `renommee_startwert` TINYINT(1) DEFAULT '0' NOT NULL, ADD `allow_renommee` TINYINT(1) DEFAULT '1' NOT NULL"

);

$success = true;
foreach($queries as $query) {
if (!$db->sql_query($query)) {
echo '<font color="red">An error occurred ! Changes have not been entered successfully !<br /><br />Es Fehler ist aufgetreten ! Änderung nicht erfolgreich eingetragen !</font><br /><br />';
echo mysql_error();
$success = false;
break;
}
}
if ($success) {
echo '<font color="green">DB-Changes have been entered successfully. You should delete this SQL-DB-Installer as soon as possible !<br /><br />DB-Änderung wurde erfolgreich ausgeführt. Du solltest diesen SQL-DB-Installer sobald wie möglich löschen !';
}
}
?>
Benutzeravatar
ronson
Mitglied
Beiträge: 301
Registriert: 14.04.2005 20:28
Wohnort: Darmstadt

Beitrag von ronson »

ok erledigt....
Antworten

Zurück zu „phpBB 2.0: Mod Support“