Seite 1 von 1
Birthday mod von TerraFrost - Datenbankeintrageungen
Verfasst: 10.04.2006 16:49
von Mr. Magoo
Schönen guten Tag allerseits,
ich bin gerade dabei, den Geburtstagsmod von TerraFrost zu installieren. Die einzelnen Seiten habe ich schon abgeändert, leider komme ich mit den Datenbankeintragungen nicht weiter.
#-----[ SQL ]-------------------------------------------
#
ALTER TABLE phpbb_users ADD user_birthday int[8] DEFAULT '0' NOT NULL;
INSERT INTO phpbb_config (config_name, config_value) VALUES ('bday_show',1);
INSERT INTO phpbb_config (config_name, config_value) VALUES ('bday_require',0);
INSERT INTO phpbb_config (config_name, config_value) VALUES ('bday_year',0);
INSERT INTO phpbb_config (config_name, config_value) VALUES ('bday_lock',0);
INSERT INTO phpbb_config (config_name, config_value) VALUES ('bday_lookahead',7);
INSERT INTO phpbb_config (config_name, config_value) VALUES ('bday_max',100);
INSERT INTO phpbb_config (config_name, config_value) VALUES ('bday_min',5);
#
Bei "phpbb_users" habe ich einfach eine Zeile eingefügt. Mit den anderen Einfügungen komme ich nicht klar. Ich benutze im übrigen phpMyadmin.
Kann mir da jemand weiterhelfen?
Verfasst: 10.04.2006 16:55
von Gulaschk@none
na du gehst in dein phpmyadmin und oben steht sql da klickst du drauf dann öffnet sich ein neues fenster da gibst du
Code: Alles auswählen
ALTER TABLE phpbb_users ADD user_birthday int[8] DEFAULT '0' NOT NULL;
INSERT INTO phpbb_config (config_name, config_value) VALUES ('bday_show',1);
INSERT INTO phpbb_config (config_name, config_value) VALUES ('bday_require',0);
INSERT INTO phpbb_config (config_name, config_value) VALUES ('bday_year',0);
INSERT INTO phpbb_config (config_name, config_value) VALUES ('bday_lock',0);
INSERT INTO phpbb_config (config_name, config_value) VALUES ('bday_lookahead',7);
INSERT INTO phpbb_config (config_name, config_value) VALUES ('bday_max',100);
INSERT INTO phpbb_config (config_name, config_value) VALUES ('bday_min',5);
und dann steht da ob es erfolgreich war oder nicht
was hast du für ein phpmyadmin ?
Verfasst: 10.04.2006 16:59
von ATARI
oder du speichert dir folgenden code als irgendwas.php ab, lädst die datei in deinen phpBB_root/ (da wo die memerblist ist) und rufst die datei 1x über den browser auf.
anschließend löscht du die datei wieder vom server.
fertig!
Code: Alles auswählen
<?php
/***************************************************************************
* db_update.php
* -------------------
*
* copyright : ©2003 Freakin' Booty ;-P & Antony Bailey
* project : http://sourceforge.net/projects/dbgenerator
* Website : http://freakingbooty.no-ip.com/ & http://www.rapiddr3am.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);
//
// Start session management
//
$userdata = session_pagestart($user_ip, PAGE_INDEX);
init_userprefs($userdata);
//
// End session management
//
if( !$userdata['session_logged_in'] )
{
$header_location = ( @preg_match('/Microsoft|WebSTAR|Xitami/', getenv('SERVER_SOFTWARE')) ) ? 'Refresh: 0; URL=' : 'Location: ';
header($header_location . append_sid(LOGIN_MG . "?redirect=db_update.$phpEx", true));
exit;
}
if( $userdata['user_level'] != ADMIN )
{
message_die(GENERAL_MESSAGE, 'You are not authorised to access this page');
}
$page_title = 'Aktualisiere Datenbank';
include($phpbb_root_path . 'includes/page_header.'.$phpEx);
echo '<table width="100%" cellspacing="1" cellpadding="2" border="0" class="forumline">';
echo '<tr><th>Updating the database</th></tr><tr><td><span class="genmed"><ul type="circle">';
$sql = array();
$sql[] = "ALTER TABLE " . $table_prefix . "users ADD user_birthday int[8] DEFAULT '0' NOT NULL";
$sql[] = "INSERT INTO " . $table_prefix . "config (config_name, config_value) VALUES ('bday_show',1)";
$sql[] = "INSERT INTO " . $table_prefix . "config (config_name, config_value) VALUES ('bday_require',0)";
$sql[] = "INSERT INTO " . $table_prefix . "config (config_name, config_value) VALUES ('bday_year',0)";
$sql[] = "INSERT INTO " . $table_prefix . "config (config_name, config_value) VALUES ('bday_lock',0)";
$sql[] = "INSERT INTO " . $table_prefix . "config (config_name, config_value) VALUES ('bday_lookahead',7)";
$sql[] = "INSERT INTO " . $table_prefix . "config (config_name, config_value) VALUES ('bday_max',100)";
$sql[] = "INSERT INTO " . $table_prefix . "config (config_name, config_value) VALUES ('bday_min',5)";
for( $i = 0; $i < count($sql); $i++ )
{
if( !$result = $db->sql_query ($sql[$i]) )
{
$error = $db->sql_error();
echo '<li>' . $sql[$i] . '<br /> +++ <font color="#FF0000"><b>Fehler:</b></font> ' . $error['message'] . '</li><br />';
}
else
{
echo '<li>' . $sql[$i] . '<br /> +++ <font color="#00AA00"><b>Erfolgreich</b></font></li><br />';
}
}
echo '</ul></span></td></tr><tr><td class="catBottom" height="28"> </td></tr>';
echo '<tr><th>End</th></tr><tr><td><span class="genmed">Installation ist beendet. Stelle sicher, dass die Datei jetzt gelöscht wird.<br />Wenn du Probleme hattest, besuche <a href="http://www.phpbbsupport.co.uk" target="_phpbbsupport">phpBBSupport.co.uk</a> und frage jemanden nach Hilfe.</span></td></tr>';
echo '<tr><td class="catBottom" height="28" align="center"><span class="genmed"><a href="' . append_sid(FORUM_MG) . '">Einen schönen Tag noch.</a></span></td></table>';
include($phpbb_root_path . 'includes/page_tail.'.$phpEx);
?>
Verfasst: 10.04.2006 17:15
von Mr. Magoo
Hat funktioniert. Vielen Dank für die schnellen Antworten.
Ist ja doch sehr einfach mit phpMyAdmin (2.7.0)
