Seite 1 von 1

Problem with Medal System Mod

Verfasst: 15.04.2008 13:55
von tenej
First sorry if I write this post on this place. Im dont understand deutch much.

I install medal mod and get 2 errors

CREATE TABLE `phpbb_medal_user` ( `issue_id` mediumint(8) NOT NULL auto_increment, `medal_id` mediumint(8) NOT NULL default '', `user_id` mediumint(8) NOT NULL default '', `issue_reason` varchar(255) NOT NULL default '', `issue_time` int(11) NOT NULL default '', PRIMARY KEY (`issue_id`) ) TYPE=MyISAM
+++ Error: Invalid default value for 'medal_id'

CREATE TABLE `phpbb_medal_mod` ( `mod_id` mediumint(8) unsigned NOT NULL auto_increment, `medal_id` mediumint(8) NOT NULL default '', `user_id` mediumint(8) NOT NULL default '', PRIMARY KEY (`mod_id`) ) TYPE=MyISAM
+++ Error: Invalid default value for 'medal_id'

when I try to open topic, I get this error:

SQL Error : 1146 Table 'tenej_forum.phpbb_medal_user' doesn't exist

SELECT m.medal_id, m.medal_name, m.medal_image FROM phpbb_medal m, phpbb_medal_user mu WHERE mu.user_id = '2' AND m.medal_id = mu.medal_id ORDER BY m.medal_name

Line : 1159
File : viewtopic.php

How I can know wha is correct default value for medal_id?

Verfasst: 15.04.2008 17:16
von Jan500
hi

delete
default ''
i think there is a newer version (this is version 0.4.6, and yours?) of this mod right here

btw, phpbb.com is the official (english) phpbb support ;)



Jan

Verfasst: 16.04.2008 15:00
von tenej
Jan500 hat geschrieben:hi

delete
default ''
i think there is a newer version (this is version 0.4.6, and yours?) of this mod right here

btw, phpbb.com is the official (english) phpbb support ;)



Jan
this is probably not same mod. I have version 2.2.2 from here http://www.phpbb2.de/dload.php?action=file&file_id=626 Sory I notice today, that is 2 different forums.

anyway I try to delete default" string

thanks for answer

Verfasst: 16.04.2008 15:20
von tenej
With deleting default" I have create missed tables successful. Many thanks for help. But I just have another problem. when I enter administration panel, in left panel (frame) I have next error: Fatal error: Cannot redeclare get_info() in /www/*****/t/e/n/tenej/htdocs/phpBB2/admin/admin_medal.php on line 68

line 68 is: function get_info($mode, $id)

and other next lines are:
// ------------------
// Begin function block
//
function get_info($mode, $id)
{
global $db;

switch($mode)
{
case 'category':
$table = MEDAL_CAT_TABLE;
$idfield = 'cat_id';
$namefield = 'cat_title';
break;

case 'medal':
$table = MEDAL_TABLE;
$idfield = 'medal_id';
$namefield = 'medal_name';
break;

default:
message_die(GENERAL_ERROR, "Wrong mode for generating select list", "", __LINE__, __FILE__);
break;
}


how can solve that?

Verfasst: 16.04.2008 15:43
von Jan500
hi

this failure appears because this function is called twice.
maybe the script (or you) include the admin_medal.php twice.
you have to search for the including part of this file (overall-file-search) and replace include( .... with include_once( ....

Jan

Verfasst: 16.04.2008 16:03
von tenej
have same error :S