Seite 1 von 1

Problem bei der Installation vom Header-Mod

Verfasst: 22.03.2007 08:01
von
Hallo, ich möchte gerne den Header-Mod http://www.phpbb.de/moddb/mod.php?id=HeaderMod installieren.

Leider verstehe ich den ersten Teil der Instalationsanleitung nicht...
Dort steht:
# This MOD need a database update.
# Do this before editing files !!

CREATE TABLE `phpbb_headerlinks` (
`id` int(15) unsigned NOT NULL auto_increment,
`url` varchar(150) collate latin1_general_ci NOT NULL,
`active` int(2) NOT NULL default '1',
`name` varchar(150) collate latin1_general_ci NOT NULL,
`icon` varchar(150) collate latin1_general_ci NOT NULL,
`row` int(5) NOT NULL default '1',
PRIMARY KEY (`id`)
) ENGINE=MyISAM;

INSERT INTO `phpbb_headerlinks` (`id`, `url`, `active`, `name`, `icon`, `row`) VALUES (1, 'faq.php', 1, 'FAQ', 'icon_mini_faq.gif', 1);
INSERT INTO `phpbb_headerlinks` (`id`, `url`, `active`, `name`, `icon`, `row`) VALUES (2, 'search.php', 1, 'Suche', 'icon_mini_search.gif', 1);
INSERT INTO `phpbb_headerlinks` (`id`, `url`, `active`, `name`, `icon`, `row`) VALUES (3, 'memberlist.php', 1, 'Mitgliederliste', 'icon_mini_members.gif', 1);
INSERT INTO `phpbb_headerlinks` (`id`, `url`, `active`, `name`, `icon`, `row`) VALUES (4, 'groupcp.php', 1, 'Benutzergruppen', 'icon_mini_groups.gif', 1);
INSERT INTO `phpbb_headerlinks` (`id`, `url`, `active`, `name`, `icon`, `row`) VALUES (5, 'privmsg.php', 1, 'Persönliche Nachrichten', 'icon_mini_message.gif', 1);
Was muss ich da machen?
Wer kann mir helfen?
Vielen Dank

Verfasst: 22.03.2007 08:07
von dslmonster
MOrgän,

Also da steht es eigendlich schon drin:

# This MOD need a database update.
(Dieser MOD benötigt ein Datenbank update)

Bedeutet, Du öffnest mySQL und fügst den Code dort ein. Und dann is das auch fertig. Kannst auch mal in der Doku nach (MOD einbau schauen) da is alles erklärt.

gruß
dslmonster

Verfasst: 22.03.2007 08:28
von
danke, hat funktioniert

Verfasst: 25.07.2007 17:30
von Good Father
Tja, hab ja schon so einige Mods eingebaut, aber hier komm ich nicht weiter :oops:

Wenn ich versuche

Code: Alles auswählen

 CREATE TABLE `phpbb_headerlinks` (
  `id` int(15) unsigned NOT NULL auto_increment,
  `url` varchar(150) collate latin1_general_ci NOT NULL,
  `active` int(2) NOT NULL default '1',
  `name` varchar(150) collate latin1_general_ci NOT NULL,
  `icon` varchar(150) collate latin1_general_ci NOT NULL,
  `row` int(5) NOT NULL default '1',
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM;
über php MyAdmin via SQL auszuführen, bekomme ich immer eine Fehlermeldung

Wenn ich folgendes php Script ausführe

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.$phpEx?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 = 'Updating the database';
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[] = "CREATE TABLE `" . $table_prefix . "headerlinks` (
  `id` int(15) unsigned NOT NULL auto_increment,
  `url` varchar(150) collate latin1_general_ci NOT NULL,
  `active` int(2) NOT NULL default '1',
  `name` varchar(150) collate latin1_general_ci NOT NULL,
  `icon` varchar(150) collate latin1_general_ci NOT NULL,
  `row` int(5) NOT NULL default '1',
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM";

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>Error:</b></font> ' . $error['message'] . '</li><br />';
	}
	else
	{
		echo '<li>' . $sql[$i] . '<br /> +++ <font color="#00AA00"><b>Successfull</b></font></li><br />';
	}
}


echo '</ul></span></td></tr><tr><td class="catBottom" height="28">&nbsp;</td></tr>';

echo '<tr><th>End</th></tr><tr><td><span class="genmed">Installation is now finished. Please be sure to delete this file now.<br />If you have run into any errors, please visit the <a href="http://www.phpbbsupport.co.uk" target="_phpbbsupport">phpBBSupport.co.uk</a> and ask someone for help.</span></td></tr>';
echo '<tr><td class="catBottom" height="28" align="center"><span class="genmed"><a href="' . append_sid("index.$phpEx") . '">Have a nice day</a></span></td></table>';

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

?>
kommt folgende Fehlermeldung

Code: Alles auswählen

CREATE TABLE `phpbb_headerlinks` ( `id` int(15) unsigned NOT NULL auto_increment, `url` varchar(150) collate latin1_general_ci NOT NULL, `active` int(2) NOT NULL default '1', `name` varchar(150) collate latin1_general_ci NOT NULL, `icon` varchar(150) collate latin1_general_ci NOT NULL, `row` int(5) NOT NULL default '1', PRIMARY KEY (`id`) ) ENGINE=MyISAM
+++ Error: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'collate latin1_general_ci NOT NULL, `active` int(2) NOT NULL 
Ich verwende auf meinem Server MySQL 4.0.24-standard

Kann da jemand helfen ??