Seite 1 von 2

umbaun?

Verfasst: 01.09.2003 19:09
von Ratte
kann mir bitte jemand dieses db_install.php umbaun?
meine tabellen heißen nicht phpbb sondern zphpbb....

wär echt cool danke
<?
define('IN_PHPBB', true);
$phpbb_root_path = './';
include($zphpbb_root_path . 'extension.inc');
include($zphpbb_root_path . 'common.'.$phpEx);
include($zphpbb_root_path . 'includes/functions_selects.'.$phpEx);
define('SITE_HISTORY_TABLE', $table_prefix.'site_history');

$userdata = session_pagestart($user_ip, PAGE_INDEX);
init_userprefs($userdata);

if ( $userdata['user_level'] != ADMIN )
{
message_die(GENERAL_ERROR, "You are not authorised");
}
else
{
$sql=array(
"CREATE TABLE ".$table_prefix."shoutbox (
id int(11) NOT NULL auto_increment,
sb_user_id int(11) NOT NULL,
msg varchar(255) NOT NULL,
timestamp int(10) unsigned NOT NULL,
sb_username varchar(255) NOT NULL,
PRIMARY KEY (id)
)",

"CREATE TABLE ".$table_prefix."shoutbox_config (
config_name varchar(255) NOT NULL,
config_value varchar(255) NOT NULL,
PRIMARY KEY (config_name)
)",

"INSERT INTO ".$table_prefix."shoutbox_config (config_name, config_value) VALUES ('allow_guest_view','1')",
"INSERT INTO ".$table_prefix."shoutbox_config (config_name, config_value) VALUES ('allow_guest','0')",
"INSERT INTO ".$table_prefix."shoutbox_config (config_name, config_value) VALUES ('allow_delete_all','0')",
"INSERT INTO ".$table_prefix."shoutbox_config (config_name, config_value) VALUES ('allow_delete','0')",
"INSERT INTO ".$table_prefix."shoutbox_config (config_name, config_value) VALUES ('allow_edit_all','0')",
"INSERT INTO ".$table_prefix."shoutbox_config (config_name, config_value) VALUES ('allow_edit','0')",
"INSERT INTO ".$table_prefix."shoutbox_config (config_name, config_value) VALUES ('allow_bbcode','1')",
"INSERT INTO ".$table_prefix."shoutbox_config (config_name, config_value) VALUES ('allow_smilies','1')",
"INSERT INTO ".$table_prefix."shoutbox_config (config_name, config_value) VALUES ('links_names','1')",
"INSERT INTO ".$table_prefix."shoutbox_config (config_name, config_value) VALUES ('make_links','1')",
"INSERT INTO ".$table_prefix."shoutbox_config (config_name, config_value) VALUES ('count_msg','100')",
"INSERT INTO ".$table_prefix."shoutbox_config (config_name, config_value) VALUES ('delete_days','30')",
"INSERT INTO ".$table_prefix."shoutbox_config (config_name, config_value) VALUES ('text_lenght','500')",
"INSERT INTO ".$table_prefix."shoutbox_config (config_name, config_value) VALUES ('word_lenght','90')",
"INSERT INTO ".$table_prefix."shoutbox_config (config_name, config_value) VALUES ('date_format','D G:i')",
"INSERT INTO ".$table_prefix."shoutbox_config (config_name, config_value) VALUES ('date_on','1')",
"INSERT INTO ".$table_prefix."shoutbox_config (config_name, config_value) VALUES ('shoutbox_on','1')",
"INSERT INTO ".$table_prefix."shoutbox_config (config_name, config_value) VALUES ('shout_width','630')",
"INSERT INTO ".$table_prefix."shoutbox_config (config_name, config_value) VALUES ('shout_height','130')",
"INSERT INTO ".$table_prefix."shoutbox_config (config_name, config_value) VALUES ('banned_user_id','')",
"INSERT INTO ".$table_prefix."shoutbox_config (config_name, config_value) VALUES ('banned_user_id_view','')",
);

$n=0;
$message='</span></td><td align="left"><span class="gen"><b>Install results:</b><br/><br/>';
while($sql[$n])
{
$message .= ($mods[$n-1] != $mods[$n]) ? '<p><b><font size=3>'.$mods[$n].'</font></b><br/>' : '';
if(!$result = $db->sql_query($sql[$n]))
$message .= '<b><font color=#FF0000>[failed]</font></b><font size="1"> line: '.($n+1).' , '.$sql[$n].'</font><br />';
else $message .='<b><font color=#0000fF>[done]</font></b><font size="1"> line: '.($n+1).' , '.$sql[$n].'</font><br />';
$n++;
}

message_die(GENERAL_MESSAGE, $message);
}
?>

Verfasst: 01.09.2003 19:10
von Warren
was willste denn umbauen?

drück dich etwas klarer aus...

Verfasst: 01.09.2003 19:13
von Ratte
ok hat sich schon erledigt.....................

Verfasst: 01.09.2003 19:14
von Leuchte
mit "$table_prefix" werden die eigentlich automatisch an den prefix angepasst. du musst dort nichts verändern.

Verfasst: 01.09.2003 19:15
von Schumi
$table_prefix enthält doch dein Prefix.

Verfasst: 01.09.2003 19:16
von Warren
das dacht ich auch, deshalb wusste ich nich, was er umbaun will..

Verfasst: 01.09.2003 19:33
von Ratte
ja sorry erst denken dann posten

[ externes Bild ]

Verfasst: 01.09.2003 20:03
von Warren
das sagst du??

Verfasst: 01.09.2003 20:07
von Leuchte
ich glaub er meinte sich damit :roll:

Verfasst: 01.09.2003 20:09
von Warren
oh, sorry, bin etwas genervt, mein board läuft nicht (http://www.phpbb.de/viewtopic.php?t=34775 )